From 4aacaaf56e209c193327bd88c991acf30cf295f5 Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Tue, 15 Nov 2011 20:35:45 +0100 Subject: [PATCH] icon: fix set_source_pixbuf() invocations The previous set_source_pixbuf() invocation (on a Cairo context) involves Gdk data types, so in the new introspection world we need to call a Gdk function rather than operating on the Cairo object (even if Cairo had already been converted to introspection). Signed-off-by: Daniel Drake [added description; split out from another patch] Signed-off-by: Sascha Silbe --- src/sugar3/graphics/icon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py index 3d122900..6a3df859 100644 --- a/src/sugar3/graphics/icon.py +++ b/src/sugar3/graphics/icon.py @@ -181,7 +181,7 @@ class _IconBuffer(object): if not sensitive: pixbuf = self._get_insensitive_pixbuf(pixbuf, widget) - context.set_source_pixbuf(pixbuf, 0, 0) + Gdk.cairo_set_source_pixbuf(context, pixbuf, 0, 0) context.paint() def _get_size(self, icon_width, icon_height, padding): @@ -294,12 +294,12 @@ class _IconBuffer(object): pixbuf = handle.get_pixbuf() pixbuf = self._get_insensitive_pixbuf(pixbuf, widget) - context.set_source_pixbuf(pixbuf, 0, 0) + Gdk.cairo_set_source_pixbuf(context, pixbuf, 0, 0) context.paint() else: if not sensitive: pixbuf = self._get_insensitive_pixbuf(pixbuf, widget) - context.set_source_pixbuf(pixbuf, 0, 0) + Gdk.cairo_set_source_pixbuf(context, pixbuf, 0, 0) context.paint() if self.badge_name: