Disable system tray notifications on OS X < 10.8 since they are broken anyway

This commit is contained in:
Kovid Goyal 2014-06-13 08:07:24 +05:30
parent 29fab25da6
commit 1b06bfe756

View File

@ -101,6 +101,13 @@ class QtNotifier(Notifier):
except: except:
pass pass
class DummyNotifier(Notifier):
ok = True
def __call__(self, body, summary=None, replaces_id=None, timeout=0):
pass
class AppleNotifier(Notifier): class AppleNotifier(Notifier):
def __init__(self): def __init__(self):
@ -145,10 +152,15 @@ def get_notifier(systray=None):
ans = FDONotifier() ans = FDONotifier()
if not ans.ok: if not ans.ok:
ans = None ans = None
elif isosx and get_osx_version() >= (10, 8, 0): elif isosx:
ans = AppleNotifier() if get_osx_version() >= (10, 8, 0):
if not ans.ok: ans = AppleNotifier()
ans = None 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: if ans is None:
ans = QtNotifier(systray) ans = QtNotifier(systray)
if not ans.ok: if not ans.ok: