diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-08-17 23:04:10 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-08-17 23:04:10 (GMT) |
commit | 6a5f389436accb6dcac273289865750b4134c9c1 (patch) | |
tree | 149e1245211614213f7dd9659a97ca8039ff8906 /sugar | |
parent | e6ab812294467418120ea774ea168705a4fcc47d (diff) |
Set the icon-set property to avoid resetting the icon_size
Diffstat (limited to 'sugar')
-rw-r--r-- | sugar/graphics/icon.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 |