Add xo_color constructor param to RadioToolButton.

This commit is contained in:
Tomeu Vizoso 2007-08-20 22:48:38 +02:00
parent cc8b8de690
commit 8c113d5561

View File

@ -24,13 +24,16 @@ from sugar.graphics.palette import Palette, WidgetInvoker
class RadioToolButton(gtk.RadioToolButton): class RadioToolButton(gtk.RadioToolButton):
__gtype_name__ = "SugarRadioToolButton" __gtype_name__ = "SugarRadioToolButton"
def __init__(self, named_icon=None, group=None): def __init__(self, named_icon=None, group=None, xo_color=None):
gtk.RadioToolButton.__init__(self, group=group) gtk.RadioToolButton.__init__(self, group=group)
self._palette = None self._palette = None
self._xo_color = xo_color
self.set_named_icon(named_icon) self.set_named_icon(named_icon)
def set_named_icon(self, named_icon): def set_named_icon(self, named_icon):
icon = Icon(named_icon) icon = Icon(named_icon,
xo_color=self._xo_color,
icon_size=gtk.ICON_SIZE_LARGE_TOOLBAR)
self.set_icon_widget(icon) self.set_icon_widget(icon)
icon.show() icon.show()