From 98d34f057a7f7b3ee5622d0dfc09eadfa16e6284 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 20 Dec 2020 11:49:24 +0530 Subject: [PATCH] More stupid PyQt enums --- src/calibre/gui2/notify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/notify.py b/src/calibre/gui2/notify.py index 5571642b21..80b8f74d5e 100644 --- a/src/calibre/gui2/notify.py +++ b/src/calibre/gui2/notify.py @@ -124,6 +124,7 @@ class QtNotifier(Notifier): def __call__(self, body, summary=None, replaces_id=None, timeout=0): timeout, body, summary = self.get_msg_parms(timeout, body, summary) + from PyQt5.Qt import QSystemTrayIcon if self.systray is not None: try: hide = False @@ -133,7 +134,7 @@ class QtNotifier(Notifier): if ismacos and not self.systray.isVisible(): self.systray.show() hide = True - self.systray.showMessage(summary, body, self.systray.Information, + self.systray.showMessage(summary, body, QSystemTrayIcon.MessageIcon.Information, timeout) finally: if hide: