[Sugar-devel] [PATCH sugar-toolkit] ToolButton: add 'icon_name' as a GObject property SL #3658
Manuel Quiñones
manuq at laptop.org
Fri Jun 1 09:54:44 EDT 2012
Sugar ToolButton inherits from Gtk.ToolButton but is not overwriting
'icon_name' property. So 'icon_name' can be passed to the constructor
of Sugar ToolButton but the result is different than setting it via
ToolButton.props.icon_name.
Signed-off-by: Manuel Quiñones <manuq at laptop.org>
---
src/sugar/graphics/toolbutton.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/sugar/graphics/toolbutton.py b/src/sugar/graphics/toolbutton.py
index 25833b6..3a40fb4 100644
--- a/src/sugar/graphics/toolbutton.py
+++ b/src/sugar/graphics/toolbutton.py
@@ -120,6 +120,8 @@ class ToolButton(gtk.ToolButton):
self.set_icon_widget(icon)
icon.show()
+ icon_name = gobject.property(type=str, setter=set_icon)
+
def create_palette(self):
return None
--
1.7.10.1
More information about the Sugar-devel
mailing list