]> git.sthu.org Git - pygdb.git/commitdiff
reducing font size of terminals; push buttons to top
authorStefan Huber <shuber2@gmail.com>
Sun, 8 Jun 2008 17:25:11 +0000 (19:25 +0200)
committerStefan Huber <shuber2@gmail.com>
Sun, 8 Jun 2008 17:25:11 +0000 (19:25 +0200)
ClientIOTerminal.py
DbgTerminal.py
MainControlWindow.py

index 6cb17539dfe3c9faafee3c113d073a88b736deb5..2c1162f5c1d8bf0e75871546468423e86721f4ca 100644 (file)
@@ -5,6 +5,7 @@ __author__ = "shuber"
 
 
 import gtk
+import pango
 import vte
 
 
@@ -23,6 +24,7 @@ class ClientIOWindow (gtk.Window):
                self.terminal = ClientIOTerminal(pty_master)
                self.add(self.terminal)
 
+       
                #Show the window
                self.show_all()
 
@@ -34,3 +36,7 @@ class ClientIOTerminal(vte.Terminal):
                vte.Terminal.__init__(self)
                self.set_pty(pty_master)
 
+               fontdesc = pango.FontDescription("monospace 9")
+               self.set_font(fontdesc)
+
+
index 7c494458000fb40005486ea9f8b85f64849ec4ee..605c2b79612823a92f4955f935517737b142f856 100644 (file)
@@ -5,6 +5,7 @@ __author__ = "shuber"
 
 
 import gtk
+import pango
 import pty
 import string
 import time
@@ -38,6 +39,10 @@ class DbgTerminal (vte.Terminal):
                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()
index 55bff28ce698ae6eb83329dccd63da2dd3f36690..42f828521d50c85b633c172a44c8b0d37b46cae1 100755 (executable)
@@ -32,37 +32,29 @@ class MainControlWindow (gtk.Window):
                #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)