diff options
author | James Henstridge <jamesh@src.gnome.org> | 2001-09-12 02:40:40 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2001-09-12 02:40:40 +0000 |
commit | 52961cbe165bbfc907c745f91020b5b94be442e6 (patch) | |
tree | ef1c061713fa24cd6fb47e090bee8b4358270dfc /examples/pygtk-demo/demos/toolbar.py | |
parent | 505906fdb8077bbf91d76ae94692c8feca6d38c5 (diff) | |
download | pygtk-short-class-names-branch.tar.gz |
try again. Got a server aborted message last time :(short-class-names-branch
Diffstat (limited to 'examples/pygtk-demo/demos/toolbar.py')
-rw-r--r-- | examples/pygtk-demo/demos/toolbar.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/examples/pygtk-demo/demos/toolbar.py b/examples/pygtk-demo/demos/toolbar.py index eb56d592..f5c6b6a7 100644 --- a/examples/pygtk-demo/demos/toolbar.py +++ b/examples/pygtk-demo/demos/toolbar.py @@ -43,7 +43,7 @@ def set_tooltips_cb(button, toolbar, enable): toolbar.set_tooltips(enable) def main(): - win = gtk.GtkWindow() + win = gtk.Window() if __name__ == '__main__': win.connect('destroy', lambda win: gtk.main_quit()) @@ -51,49 +51,50 @@ def main(): win.set_policy(gtk.FALSE, gtk.TRUE, gtk.TRUE) win.set_border_width(5) - pix, mask = gtk.pixmap_colormap_create_from_xpm_d(None, win.get_colormap(), - None, folder_icon) + pix, mask = gtk.gdk.pixmap_colormap_create_from_xpm_d(None, + win.get_colormap(), + None, folder_icon) - toolbar = gtk.GtkToolbar() + toolbar = gtk.Toolbar() win.add(toolbar) button = toolbar.append_item("Horizontal", "Horizontal toolbar layout", - None, gtk.GtkPixmap(pix, mask), None, None) + None, gtk.Pixmap(pix, mask), None, None) button.connect("clicked", set_orient_cb, toolbar, gtk.ORIENTATION_HORIZONTAL) button = toolbar.append_item("Vertical", "Vertical toolbar layout", - None, gtk.GtkPixmap(pix, mask), None, None) + None, gtk.Pixmap(pix, mask), None, None) button.connect("clicked", set_orient_cb, toolbar, gtk.ORIENTATION_VERTICAL) toolbar.append_space() button = toolbar.append_item("Icons", "Only show toolbar icons", - None, gtk.GtkPixmap(pix, mask), None, None) + None, gtk.Pixmap(pix, mask), None, None) button.connect("clicked", set_style_cb, toolbar, gtk.TOOLBAR_ICONS) button = toolbar.append_item("Text", "Only show toolbar texts", - None, gtk.GtkPixmap(pix, mask), None, None) + None, gtk.Pixmap(pix, mask), None, None) button.connect("clicked", set_style_cb, toolbar, gtk.TOOLBAR_TEXT) button = toolbar.append_item("Both", "Show toolbar icons and text", - None, gtk.GtkPixmap(pix, mask), None, None) + None, gtk.Pixmap(pix, mask), None, None) button.connect("clicked", set_style_cb, toolbar, gtk.TOOLBAR_BOTH) toolbar.append_space() - entry = gtk.GtkEntry() + entry = gtk.Entry() toolbar.append_widget(entry, None, None) toolbar.append_space() button = toolbar.append_item("Enable", "Enable tooltips", - None, gtk.GtkPixmap(pix, mask), None, None) + None, gtk.Pixmap(pix, mask), None, None) button.connect("clicked", set_tooltips_cb, toolbar, gtk.TRUE) button = toolbar.append_item("Disable", "Disable tooltips", - None, gtk.GtkPixmap(pix, mask), None, None) + None, gtk.Pixmap(pix, mask), None, None) button.connect("clicked", set_tooltips_cb, toolbar, gtk.FALSE) win.show_all() |