mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Disable system tray notifications on OS X < 10.8 since they are broken anyway
This commit is contained in:
parent
29fab25da6
commit
1b06bfe756
@ -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):
|
||||
elif isosx:
|
||||
if get_osx_version() >= (10, 8, 0):
|
||||
ans = AppleNotifier()
|
||||
if not ans.ok:
|
||||
ans = None
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user