From 6a5f389436accb6dcac273289865750b4134c9c1 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 17 Aug 2007 23:04:10 +0000 Subject: Set the icon-set property to avoid resetting the icon_size --- (limited to 'sugar') diff --git a/sugar/graphics/icon.py b/sugar/graphics/icon.py index c19f27e..e324d45 100644 --- a/sugar/graphics/icon.py +++ b/sugar/graphics/icon.py @@ -78,7 +78,7 @@ class Icon(gtk.Image): source.set_state(gtk.STATE_INSENSITIVE) icon_set.add_source(source) - self.set_from_icon_set(icon_set, self.props.icon_size) + self.props.icon_set = icon_set def _update_icon(self): if not self._constructed: @@ -126,12 +126,12 @@ class Icon(gtk.Image): elif pspec.name == 'stroke-color': self._stroke_color = value self._update_icon() - elif pspec.name == 'icon-size': - gtk.Image.do_set_property(self, pspec, value) - self._update_icon() else: gtk.Image.do_set_property(self, pspec, value) + if pspec.name == 'icon-size': + self._update_icon() + def do_get_property(self, pspec): if pspec.name == 'fill-color': return self._fill_color -- cgit v0.9.1