[magneto.gtk] set the appropriate icon name on the notification object

This commit is contained in:
Fabio Erculiani
2013-11-03 16:41:24 +01:00
parent 7034a45701
commit ecc0cc9ca6
+3 -5
View File
@@ -145,16 +145,14 @@ class Magneto(MagnetoCore):
return False
pynotify.init(_("System Updates"))
n = pynotify.Notification(title, text)
pixbuf = self._status_icon.get_pixbuf()
if pixbuf:
n.set_icon_from_pixbuf(pixbuf)
if urgency == "critical":
n.set_urgency(pynotify.URGENCY_CRITICAL)
elif urgency == "low":
n.set_urgency(pynotify.URGENCY_LOW)
self.last_alert = (title, text)
try:
# this has been dropped from libnotify 0.7
n.attach_to_status_icon(self._status_icon)
except AttributeError:
pass
n.show()
return False