Icon widget

This commit is contained in:
Marco Pesenti Gritti 2007-04-30 13:42:45 +02:00
parent 4ecb7e26f9
commit 2321c9d5b4

View File

@ -17,9 +17,12 @@
import gtk
from sugar.graphics.icon import Icon
class ToolButton(gtk.ToolButton):
def __init__(self, icon_name=None):
def __init__(self, icon_resource=None):
gtk.ToolButton.__init__(self)
if icon_name:
self.set_icon_name(icon_name)
icon = Icon(icon_resource)
self.set_icon_widget(icon)
icon.show()