From 553af1bdb019160fd8894a27947d4e6f96b74bf4 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Tue, 3 May 2011 18:24:10 +0200 Subject: [PATCH] [magneto] since notify-python is crap, use attach_to_status_icon and catch AttributeError --- magneto/src/magneto/gtk/interfaces.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/magneto/src/magneto/gtk/interfaces.py b/magneto/src/magneto/gtk/interfaces.py index 0e69ae975..356ec33c4 100644 --- a/magneto/src/magneto/gtk/interfaces.py +++ b/magneto/src/magneto/gtk/interfaces.py @@ -153,9 +153,11 @@ class Magneto(MagnetoCore): elif urgency == 'low': n.set_urgency(pynotify.URGENCY_LOW) self.last_alert = (title, text) - if hasattr(n, "attach_to_status_icon"): + try: # this has been dropped from libnotify 0.7 n.attach_to_status_icon(self.status_icon) + except AttributeError: + pass n.show() return False