From 1b06bfe7561fe34c6f2a9149b1f5eb35a755956b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 13 Jun 2014 08:07:24 +0530 Subject: [PATCH] Disable system tray notifications on OS X < 10.8 since they are broken anyway --- src/calibre/gui2/notify.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/calibre/gui2/notify.py b/src/calibre/gui2/notify.py index 3bef5654cc..755606e609 100644 --- a/src/calibre/gui2/notify.py +++ b/src/calibre/gui2/notify.py @@ -101,6 +101,13 @@ class QtNotifier(Notifier): except: pass +class DummyNotifier(Notifier): + + ok = True + + def __call__(self, body, summary=None, replaces_id=None, timeout=0): + pass + class AppleNotifier(Notifier): def __init__(self): @@ -145,10 +152,15 @@ def get_notifier(systray=None): ans = FDONotifier() if not ans.ok: ans = None - elif isosx and get_osx_version() >= (10, 8, 0): - ans = AppleNotifier() - if not ans.ok: - ans = None + elif isosx: + if get_osx_version() >= (10, 8, 0): + ans = AppleNotifier() + if not ans.ok: + ans = DummyNotifier() + else: + # We dont use Qt's systray based notifier as it uses Growl and is + # broken with different versions of Growl + ans = DummyNotifier() if ans is None: ans = QtNotifier(systray) if not ans.ok: