mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 20:44:50 +00:00
Fix add_toolbutton() to work with non-stock images.
This commit is contained in:
parent
882a7e8033
commit
ff4009cb6e
@ -87,7 +87,9 @@ class ToolBar(component.Component):
|
|||||||
tooltip=None):
|
tooltip=None):
|
||||||
"""Adds a toolbutton to the toolbar"""
|
"""Adds a toolbutton to the toolbar"""
|
||||||
# Create the button
|
# 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:
|
if label is not None:
|
||||||
toolbutton.set_label(label)
|
toolbutton.set_label(label)
|
||||||
if image is not None:
|
if image is not None:
|
||||||
@ -104,7 +106,7 @@ class ToolBar(component.Component):
|
|||||||
self.toolbar.insert(toolbutton, -1)
|
self.toolbar.insert(toolbutton, -1)
|
||||||
|
|
||||||
# Show the new toolbutton
|
# Show the new toolbutton
|
||||||
toolbutton.show()
|
toolbutton.show_all()
|
||||||
|
|
||||||
return toolbutton
|
return toolbutton
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user