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 <dsd@laptop.org> [added description; split out from another patch] Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
This commit is contained in:
parent
e05f84bc4f
commit
4aacaaf56e
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user