diff --git a/src/sugar3/graphics/radiotoolbutton.py b/src/sugar3/graphics/radiotoolbutton.py index aafe8fb9..4e27a8f7 100644 --- a/src/sugar3/graphics/radiotoolbutton.py +++ b/src/sugar3/graphics/radiotoolbutton.py @@ -85,7 +85,14 @@ class RadioToolButton(Gtk.RadioToolButton): self.set_icon_widget(icon) icon.show() - icon_name = GObject.property(type=str, setter=set_icon_name) + def get_icon_name(self): + if self.props.icon_widget is not None: + return self.props.icon_widget.props.icon_name + else: + return None + + icon_name = GObject.property(type=str, setter=set_icon_name, + getter=get_icon_name) def set_xo_color(self, xo_color): if self._xo_color != xo_color: diff --git a/src/sugar3/graphics/toggletoolbutton.py b/src/sugar3/graphics/toggletoolbutton.py index 5f08a520..e893c7a9 100644 --- a/src/sugar3/graphics/toggletoolbutton.py +++ b/src/sugar3/graphics/toggletoolbutton.py @@ -80,7 +80,14 @@ class ToggleToolButton(Gtk.ToggleToolButton): self.set_icon_widget(icon) icon.show() - icon_name = GObject.property(type=str, setter=set_icon_name) + def get_icon_name(self): + if self.props.icon_widget is not None: + return self.props.icon_widget.props.icon_name + else: + return None + + icon_name = GObject.property(type=str, setter=set_icon_name, + getter=get_icon_name) def create_palette(self): return None diff --git a/src/sugar3/graphics/toolbutton.py b/src/sugar3/graphics/toolbutton.py index 37ed85cd..265153da 100644 --- a/src/sugar3/graphics/toolbutton.py +++ b/src/sugar3/graphics/toolbutton.py @@ -119,7 +119,14 @@ class ToolButton(Gtk.ToolButton): self.set_icon_widget(icon) icon.show() - icon_name = GObject.property(type=str, setter=set_icon_name) + def get_icon_name(self): + if self.props.icon_widget is not None: + return self.props.icon_widget.props.icon_name + else: + return None + + icon_name = GObject.property(type=str, setter=set_icon_name, + getter=get_icon_name) def create_palette(self): return None