More stupid PyQt enums

This commit is contained in:
Kovid Goyal 2020-12-20 11:49:24 +05:30
parent 2bb1f38fd6
commit 98d34f057a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -124,6 +124,7 @@ class QtNotifier(Notifier):
def __call__(self, body, summary=None, replaces_id=None, timeout=0): def __call__(self, body, summary=None, replaces_id=None, timeout=0):
timeout, body, summary = self.get_msg_parms(timeout, body, summary) timeout, body, summary = self.get_msg_parms(timeout, body, summary)
from PyQt5.Qt import QSystemTrayIcon
if self.systray is not None: if self.systray is not None:
try: try:
hide = False hide = False
@ -133,7 +134,7 @@ class QtNotifier(Notifier):
if ismacos and not self.systray.isVisible(): if ismacos and not self.systray.isVisible():
self.systray.show() self.systray.show()
hide = True hide = True
self.systray.showMessage(summary, body, self.systray.Information, self.systray.showMessage(summary, body, QSystemTrayIcon.MessageIcon.Information,
timeout) timeout)
finally: finally:
if hide: if hide: