From 2321c9d5b4b4feae7521b94cd7c28f00324a8f73 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 30 Apr 2007 13:42:45 +0200 Subject: [PATCH] Icon widget --- sugar/graphics/toolbutton.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sugar/graphics/toolbutton.py b/sugar/graphics/toolbutton.py index a8c7abae..541f6c93 100644 --- a/sugar/graphics/toolbutton.py +++ b/sugar/graphics/toolbutton.py @@ -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()