[magneto.gtk] set the appropriate icon name on the notification object
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user