10 import BreakpointsFrame
15 class StatusWindow (gtk
.Window
):
17 def __init__(self
, mainctrlwnd
, debugger
):
19 gtk
.Window
.__init
__(self
)
20 self
.debugger
= debugger
22 self
.set_border_width(5)
23 self
.set_title("Status")
24 self
.set_default_size(400,600)
25 self
.connect("destroy", lambda *w
: gtk
.main_quit())
27 vbox
= gtk
.VBox(False, 5)
30 self
.status
= gtk
.Label("Not Running")
31 vbox
.pack_start(self
.status
, False, False)
32 self
.paned1
= gtk
.VPaned()
37 self
.frames
+= [WatchesFrame
.WatchesFrame(debugger
)]
38 self
.frames
+= [BreakpointsFrame
.BreakpointsFrame(debugger
)]
39 self
.paned1
.add1(self
.frames
[0])
40 self
.paned1
.add2(self
.frames
[1])
42 #Register callback function for new positions
43 #and update the values
44 mainctrlwnd
.newPosCbs
+= [self
.updateValues
]
49 def applyConfiguration(self
, conf
):
51 w
= conf
.findInt("statuswnd-width")
52 h
= conf
.findInt("statuswnd-height")
53 paned1
= conf
.findInt("statuswnd-paned1")
55 if w
!=None and h
!=None:
58 self
.paned1
.set_position(paned1
)
61 while not self
.debugger
.isActive():
65 f
.applyConfiguration(conf
)
68 def fillConfiguration(self
, conf
):
70 conf
.addInt("statuswnd-width", self
.get_size()[0])
71 conf
.addInt("statuswnd-height", self
.get_size()[1])
72 conf
.addInt("statuswnd-paned1", self
.paned1
.get_position())
75 f
.fillConfiguration(conf
)
78 def updateValues(self
, pos
):
81 self
.status
.set_text("Exited")
84 self
.status
.set_text("%s:%s" % (file, lineno
))