From ecc0cc9ca63fd24d054fddc361fad573aaabec94 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 3 Nov 2013 16:41:24 +0100 Subject: [PATCH] [magneto.gtk] set the appropriate icon name on the notification object --- magneto/src/magneto/gtk/interfaces.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/magneto/src/magneto/gtk/interfaces.py b/magneto/src/magneto/gtk/interfaces.py index 1c2d9443f..02d889e54 100644 --- a/magneto/src/magneto/gtk/interfaces.py +++ b/magneto/src/magneto/gtk/interfaces.py @@ -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