Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2011-10-29 08:58:15 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-12-13 20:19:52 (GMT)
commit1edc6ca1b18c123ae0730f2ffebda30d749a6677 (patch)
treedaeb349ef369ab6dfc0fe5e74d02b9cd268e9be2
parentaf4bde1e83e9d7af36aa75f4115a67c98a905204 (diff)
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 <silbe@activitycentral.com>
-rw-r--r--src/sugar3/graphics/icon.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index 6b58c1e..1049074 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: