diff options
author | Simon Schampijer <simon@schampijer.de> | 2011-11-04 08:30:01 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2011-12-13 20:19:52 (GMT) |
commit | 0d827e7e6632a978a93a37ac4b9b15f419bc0b87 (patch) | |
tree | 9abd6a106769fddb8f82f1d547e40e5daed9bf62 /src/sugar3/graphics/icon.py | |
parent | 8efb7c3f9318f139639d6986db1ecaf4b3dc98b9 (diff) |
Adapt to Gtk.icon_size_lookup*() API changes
In PyGTK, icon_size_lookup*() returned just the icon size as a 2-tuple [1].
In GTK3+pygi, an additional boolean value indicating whether the passed-in
value was valid is returned. [3,4]
[1] http://developer.gnome.org/pygtk/stable/class-gtkiconsource.html#function-gtk--icon-size-lookup
[2] http://developer.gnome.org/pygtk/stable/class-gtkiconsource.html#function-gtk--icon-size-lookup-for-settings
[3] http://developer.gnome.org/gtk/stable/gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup
[4] http://developer.gnome.org/gtk/stable/gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup-for-settings
Signed-off-by: Simon Schampijer <simon@schampijer.de>
[marked unused local variables, fixed overlong line]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Diffstat (limited to 'src/sugar3/graphics/icon.py')
-rw-r--r-- | src/sugar3/graphics/icon.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py index 65e576f..04c1e89 100644 --- a/src/sugar3/graphics/icon.py +++ b/src/sugar3/graphics/icon.py @@ -346,7 +346,7 @@ class Icon(Gtk.Image): self._buffer.file_name = self.props.file if self.props.pixel_size == -1: - width, height = Gtk.icon_size_lookup(self.props.icon_size) + valid_, width, height = Gtk.icon_size_lookup(self.props.icon_size) else: width = height = self.props.pixel_size if self._buffer.width != width or self._buffer.height != height: |