From cb997a5264bd78db73c558595126c89215718537 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 19 Apr 2007 18:53:55 +0200 Subject: [PATCH] More work on the new toolbars --- data/gtkrc | 1 + tests/test-ui.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/data/gtkrc b/data/gtkrc index cb635362..71c57bdb 100644 --- a/data/gtkrc +++ b/data/gtkrc @@ -4,3 +4,4 @@ gtk-font-name = "Bitstream Vera Sans 7" gtk-icon-sizes = "gtk-menu=32,32:gtk-button=32,32" gtk-cursor-theme-name = "olpc" gtk-cursor-theme-size = 48 +gtk-toolbar-style = GTK_TOOLBAR_ICONS diff --git a/tests/test-ui.py b/tests/test-ui.py index 6c1f6676..ad324cc9 100755 --- a/tests/test-ui.py +++ b/tests/test-ui.py @@ -18,11 +18,29 @@ import gtk + +class Toolbar(gtk.Toolbar): + def __init__(self): + gtk.Toolbar.__init__(self) + + icon = gtk.ToolButton() + icon.set_icon_name('text-format-bold') + self.insert(icon, -1) + icon.show() + class Window(gtk.Window): def __init__(self): gtk.Window.__init__(self) self.set_default_size(800, 600) + box = gtk.VBox() + self.add(box) + box.show() + + toolbar = Toolbar() + box.pack_start(toolbar, False) + toolbar.show() + window = Window() window.connect("destroy", lambda w: gtk.main_quit()) window.show()