diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-05-01 09:28:06 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-05-01 09:28:06 (GMT) |
commit | b476b13673e5e3869c286aac871bcd624cc3c070 (patch) | |
tree | 468e9d30c359d0097f9be2093b3415e55382c9dd /sugar/graphics/toolbutton.py | |
parent | 0ebba0d454a2243e7a683d0f0c279c559d0f9c4c (diff) |
Add a set_named_icon method
Diffstat (limited to 'sugar/graphics/toolbutton.py')
-rw-r--r-- | sugar/graphics/toolbutton.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sugar/graphics/toolbutton.py b/sugar/graphics/toolbutton.py index bf196f9..b93db3e 100644 --- a/sugar/graphics/toolbutton.py +++ b/sugar/graphics/toolbutton.py @@ -22,7 +22,9 @@ from sugar.graphics.icon import Icon class ToolButton(gtk.ToolButton): def __init__(self, named_icon=None): gtk.ToolButton.__init__(self) + self.set_named_icon(named_icon) + def set_named_icon(self, named_icon): icon = Icon(named_icon) self.set_icon_widget(icon) - icon.show() + icon.show() |