[Sugar-devel] [sugar-toolkit-gtk3] Set getter an setter in icon_name property - SL #3849

godiard at sugarlabs.org godiard at sugarlabs.org
Tue Sep 18 11:08:29 EDT 2012


From: Gonzalo Odiard <godiard at gmail.com>

With g-i bindings, setting the property don't change the size
and the button is bigger than should be.
Now we have two properties for the same, icon_name and named_icon,
maybe one should be deprecated.

Signed-off-by: Gonzalo Odiard <gonzalo at laptop.org>
---
 src/sugar3/graphics/radiotoolbutton.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/sugar3/graphics/radiotoolbutton.py b/src/sugar3/graphics/radiotoolbutton.py
index 006d167..0c44347 100644
--- a/src/sugar3/graphics/radiotoolbutton.py
+++ b/src/sugar3/graphics/radiotoolbutton.py
@@ -131,6 +131,9 @@ class RadioToolButton(Gtk.RadioToolButton):
     named_icon = GObject.property(type=str, setter=set_named_icon,
                                   getter=get_named_icon)
 
+    icon_name = GObject.property(type=str, setter=set_named_icon,
+                                  getter=get_named_icon)
+
     def set_xo_color(self, xo_color):
         if self._xo_color != xo_color:
             self._xo_color = xo_color
-- 
1.7.11.4



More information about the Sugar-devel mailing list