X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=StatusWindow.py;h=f03c11c27d579173db6641aa42d5394b842d9e52;hb=71d49bb703b17f3000aac3d13767d7779fae9895;hp=3209fed5b94e69141518965cfc87363c7dc938e1;hpb=0296b6d5afe20a15764842873917bf1d6aa34b77;p=pygdb.git diff --git a/StatusWindow.py b/StatusWindow.py index 3209fed..f03c11c 100644 --- a/StatusWindow.py +++ b/StatusWindow.py @@ -10,6 +10,7 @@ import string import os import vte +import Configuration import DbgTerminal import BreakpointsFrame import PositionFrame @@ -19,10 +20,12 @@ import WatchesFrame class StatusWindow (gtk.Window): - def __init__(self, debugger): + def __init__(self, debugger, vimservername): gtk.Window.__init__(self) + self.vimservername = vimservername self.debugger = debugger + self.debugger.gotActiveCallback += [self.updateValues] self.set_border_width(5) self.set_title("Status") @@ -41,6 +44,8 @@ class StatusWindow (gtk.Window): WatchesFrame.WatchesFrame(debugger), \ BreakpointsFrame.BreakpointsFrame(debugger) ] + #Register callback after frames! + self.debugger.gotActiveCallback += [self.updateValues] #First paned window self.paned1 = gtk.VPaned() @@ -85,6 +90,24 @@ class StatusWindow (gtk.Window): conf.addInt("statuswnd-paned1", self.paned1.get_position()) conf.addInt("statuswnd-paned2", self.paned2.get_position()) + conf.setCommand( self.debugger.clientCmd ) + for f in self.frames: f.fillConfiguration(conf) + + def updateValues(self, status, param): + + conf = Configuration.Configuration() + self.fillConfiguration(conf) + conf.store(".pygdb.conf") + + self.updateVim() + + + def updateVim(self): + + os.system('gvim --servername %s --remote-send " :GDBLoadConfig"' % \ + self.vimservername) + +