diff options
author | Simon Schampijer <simon@schampijer.de> | 2012-03-20 12:32:41 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2012-03-22 15:49:14 (GMT) |
commit | 425e9becfcae67207ecc0e4e56d3cc5f8e0ea2cd (patch) | |
tree | 43ab4f0aeda0d225224de6bfcb6b87987bcdb0b2 /src/sugar3/graphics/icon.py | |
parent | c653cdf4dc384bfbffba7193427c3e206c140bad (diff) |
Remove the workaround for missing gobject-introspection bindings of Rsvg
gobject introspection bindings for librsvg have been pushed to librsvg
master [1] in 2.35.0, which solved [2]. We only have slight adopts to
make in our usage, for example we can not pass the data property
to the default constructor anymore and get_width and get_height is not
available anymore for the handle, but we can use the properties
instead.
The sugar-toolkit-gtk3 and therefore Activities that have been ported
to it do need a version of librsvg >= 2.35.0 to be able to work,
which ships for example with Fedora 17.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Daniel Drake <dsd@laptop.org>
[1] http://git.gnome.org/browse/librsvg/
[2] https://bugzilla.gnome.org/show_bug.cgi?id=663049
[3] http://developer.gnome.org/rsvg/stable/RsvgHandle.html
Diffstat (limited to 'src/sugar3/graphics/icon.py')
-rw-r--r-- | src/sugar3/graphics/icon.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py index a1800c7..970446a 100644 --- a/src/sugar3/graphics/icon.py +++ b/src/sugar3/graphics/icon.py @@ -29,14 +29,13 @@ from gi.repository import GObject from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GdkPixbuf +from gi.repository import Rsvg import cairo from sugar3.graphics import style from sugar3.graphics.xocolor import XoColor from sugar3.util import LRU -from gi.repository import SugarExt - _BADGE_SIZE = 0.45 @@ -64,7 +63,7 @@ class _SVGLoader(object): logging.error( 'Icon %s, entity %s is invalid.', file_name, entity) - return SugarExt.RsvgWrapper.new(icon) + return Rsvg.Handle.new_from_data(icon) class _IconInfo(object): @@ -260,8 +259,8 @@ class _IconBuffer(object): if is_svg: handle = self._load_svg(icon_info.file_name) - icon_width = handle.get_width() - icon_height = handle.get_height() + icon_width = handle.props.width + icon_height = handle.props.height else: pixbuf = GdkPixbuf.Pixbuf.new_from_file(icon_info.file_name) icon_width = pixbuf.get_width() |