import gtk
+import pango
import pty
import string
import time
self.connect("cursor-moved", self.contents_changed)
self.connect("child-exited", lambda *w: gtk.main_quit())
+ fontdesc = pango.FontDescription("monospace 9")
+ self.set_font(fontdesc)
+
+
def contents_changed(self, term):
c,r = term.get_cursor_position()
#Set title and add terminal
self.set_title("Main Control")
self.set_border_width(5)
+
+ #Vertical box. Top: Buttons, Bottom: Terminal vpane
+ vbox = gtk.VBox(False,5)
+ self.add(vbox)
- #The main horizontal pane left=buttons, right=terminals
- hbox = gtk.HBox(False,0)
- self.add(hbox)
- hpaned = gtk.HPaned()
- hbox.pack_start(hpaned, True, True)
-
-
-
- #Plug together the buttons
- vbox = gtk.VButtonBox()
- vbox.set_layout(gtk.BUTTONBOX_START)
- hpaned.add1(vbox)
+ #Button box
+ hbtnbox = gtk.HButtonBox()
+ hbtnbox.set_layout(gtk.BUTTONBOX_START)
+ vbox.pack_start(hbtnbox)
self.runBtn = gtk.Button("Run")
- vbox.add(self.runBtn)
+ hbtnbox.add(self.runBtn)
self.continueBtn = gtk.Button("Continue")
- vbox.add(self.continueBtn)
+ hbtnbox.add(self.continueBtn)
self.stepoverBtn = gtk.Button("Step Over")
- vbox.add(self.stepoverBtn)
+ hbtnbox.add(self.stepoverBtn)
self.stepinBtn = gtk.Button("Step In")
- vbox.add(self.stepinBtn)
+ hbtnbox.add(self.stepinBtn)
self.quitBtn = gtk.Button("Quit")
- vbox.add(self.quitBtn)
-
-
- #Plug together the terminals
- vbox = gtk.VBox()
- hpaned.add2(vbox)
+ hbtnbox.add(self.quitBtn)
+ #Vertical pane for terminals
vpaned = gtk.VPaned()
vbox.pack_start(vpaned, True, True)
vpaned.add(self.dbgterm)