RadioToolButton, ToolButton, ToggleToolButton: add back the getter for the icon_name property

Follow up of fe11a3aa23
This commit is contained in:
Simon Schampijer 2012-09-20 09:38:39 +02:00
parent c411190178
commit 2bedec55ed
3 changed files with 24 additions and 3 deletions

View File

@ -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:

View File

@ -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

View File

@ -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