From 3709e9c11931ba2a6d92a19bb31c6c4f28c6ec9f Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Sun, 8 Jun 2008 19:25:11 +0200 Subject: [PATCH] reducing font size of terminals; push buttons to top --- ClientIOTerminal.py | 6 ++++++ DbgTerminal.py | 5 +++++ MainControlWindow.py | 36 ++++++++++++++---------------------- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/ClientIOTerminal.py b/ClientIOTerminal.py index 6cb1753..2c1162f 100644 --- a/ClientIOTerminal.py +++ b/ClientIOTerminal.py @@ -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) + + diff --git a/DbgTerminal.py b/DbgTerminal.py index 7c49445..605c2b7 100644 --- a/DbgTerminal.py +++ b/DbgTerminal.py @@ -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() diff --git a/MainControlWindow.py b/MainControlWindow.py index 55bff28..42f8285 100755 --- a/MainControlWindow.py +++ b/MainControlWindow.py @@ -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) -- 2.39.5