From 1edc6ca1b18c123ae0730f2ffebda30d749a6677 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Sat, 29 Oct 2011 10:58:15 +0200 Subject: [PATCH] Don't use hippo-canvas for rendering pixbufs hippo-canvas isn't available in the GTK3 world and we can do fine without it for rendering pixbufs. [split out from another patch; added description] Signed-off-by: Sascha Silbe --- src/sugar3/graphics/icon.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py index 6b58c1ea..1049074a 100644 --- a/src/sugar3/graphics/icon.py +++ b/src/sugar3/graphics/icon.py @@ -182,8 +182,7 @@ class _IconBuffer(object): if not sensitive: pixbuf = self._get_insensitive_pixbuf(pixbuf, widget) - surface = hippo.cairo_surface_from_gdk_pixbuf(pixbuf) - context.set_source_surface(surface, 0, 0) + context.set_source_pixbuf(pixbuf, 0, 0) context.paint() def _get_size(self, icon_width, icon_height, padding): @@ -296,14 +295,12 @@ class _IconBuffer(object): pixbuf = handle.get_pixbuf() pixbuf = self._get_insensitive_pixbuf(pixbuf, widget) - pixbuf_surface = hippo.cairo_surface_from_gdk_pixbuf(pixbuf) - context.set_source_surface(pixbuf_surface, 0, 0) + context.set_source_pixbuf(pixbuf, 0, 0) context.paint() else: if not sensitive: pixbuf = self._get_insensitive_pixbuf(pixbuf, widget) - pixbuf_surface = hippo.cairo_surface_from_gdk_pixbuf(pixbuf) - context.set_source_surface(pixbuf_surface, 0, 0) + context.set_source_pixbuf(pixbuf, 0, 0) context.paint() if self.badge_name: