adding auto-load-config of vim when pygdb gets re-activated
[pygdb.git] / StatusWindow.py
index 3209fed5b94e69141518965cfc87363c7dc938e1..6c918e5c306731c3d36212c4c749977b30a54f37 100644 (file)
@@ -10,6 +10,7 @@ import string
 import os
 import vte
 
+import Configuration
 import DbgTerminal
 import BreakpointsFrame
 import PositionFrame
@@ -23,6 +24,7 @@ class StatusWindow (gtk.Window):
                gtk.Window.__init__(self)
 
                self.debugger = debugger
+               self.debugger.gotActiveCallback += [self.updateValues]
                
                self.set_border_width(5)
                self.set_title("Status")
@@ -41,6 +43,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()
@@ -88,3 +92,13 @@ class StatusWindow (gtk.Window):
                for f in self.frames:
                        f.fillConfiguration(conf)
 
+
+       def updateValues(self, status, param):
+
+               conf = Configuration.Configuration()
+               self.fillConfiguration(conf)
+               conf.store(".pygdb.conf")
+
+               os.system('gvim --servername pygdb --remote-send ":GDBLoadConfig<CR>"')
+
+