Permalink
Browse files

image can be a pixbuf

  • Loading branch information...
1 parent 2686c33 commit 4081350306541d6270cff9d1ed94ddad9372667c @NickCis NickCis committed Jan 10, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 gtkPopupNotify.py
View
4 gtkPopupNotify.py
@@ -6,7 +6,7 @@
# modified by NickCis 2010 http://github.com/NickCis/gtkPopupNotify
# Modifications:
# Added: * Corner support (notifications can be displayed in all corners
-# * Use of gtk Stock items to render images in notifications
+# * Use of gtk Stock items or pixbuf to render images in notifications
# * Posibility of use fixed height
# * Posibility of use image as background
# * Not displaying over Windows taskbar(taken from emesene gpl v3)
@@ -196,6 +196,8 @@ def __init__(self, stack, title, message, image, leftCb, middleCb, rightCb):
self.image.set_alignment(0, 0)
if image in gtk.stock_list_ids():
self.image.set_from_stock(image, gtk.ICON_SIZE_DIALOG)
+ elif type(image) == gtk.gdk.Pixbuf:
+ self.image.set_from_pixbuf(image)
else:
self.image.set_from_file(image)
body_box.pack_start(self.image, False, False, 5)

0 comments on commit 4081350

Please sign in to comment.