From 8c391386d79ac11be88281005862d646c2bbf728 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 10 Apr 2007 22:45:36 +0200 Subject: [PATCH] Fix the buddy picture --- shell/view/BuddyMenu.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/shell/view/BuddyMenu.py b/shell/view/BuddyMenu.py index d4874228..10b198d1 100644 --- a/shell/view/BuddyMenu.py +++ b/shell/view/BuddyMenu.py @@ -38,17 +38,14 @@ class BuddyMenu(Menu): self.props.padding = units.points_to_pixels(5) pixbuf = self._get_buddy_icon_pixbuf() if pixbuf: - icon_item = hippo.CanvasImage() scaled_pixbuf = pixbuf.scale_simple(units.grid_to_pixels(1), units.grid_to_pixels(1), gtk.gdk.INTERP_BILINEAR) del pixbuf + image = hippo.cairo_surface_from_gdk_pixbuf(scaled_pixbuf) + icon_item = hippo.CanvasImage(image=image) self.add_separator() self.append(icon_item) - # FIXME: have to set the image _after_ adding the HippoCanvasImage - # to it's parent item, because that sets the HippoCanvasImage's context, - # which resets the object's 'image' property. Grr. - #_sugar.hippo_canvas_image_set_image_from_gdk_pixbuf(icon_item, scaled_pixbuf) self._buddy.connect('icon-changed', self.__buddy_icon_changed_cb)