From ff4009cb6e4c814a31761408c6a67c30374c43a6 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 7 Mar 2008 00:55:46 +0000 Subject: [PATCH] Fix add_toolbutton() to work with non-stock images. --- deluge/ui/gtkui/toolbar.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/toolbar.py b/deluge/ui/gtkui/toolbar.py index 5f00e6727..542d8d83d 100644 --- a/deluge/ui/gtkui/toolbar.py +++ b/deluge/ui/gtkui/toolbar.py @@ -87,7 +87,9 @@ class ToolBar(component.Component): tooltip=None): """Adds a toolbutton to the toolbar""" # Create the button - toolbutton = gtk.ToolButton(stock) + toolbutton = gtk.ToolButton() + if stock is not None: + toolbutton.set_stock_id(stock) if label is not None: toolbutton.set_label(label) if image is not None: @@ -104,7 +106,7 @@ class ToolBar(component.Component): self.toolbar.insert(toolbutton, -1) # Show the new toolbutton - toolbutton.show() + toolbutton.show_all() return toolbutton