This commit is contained in:
Kovid Goyal 2010-01-26 14:31:54 -07:00
parent 67b7e9dce3
commit 9d25832518

View File

@ -85,18 +85,21 @@ 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)
if self.systray is not None: if self.systray is not None:
hide = False
try: try:
if not isinstance(body, unicode): hide = False
body = body.decode('utf-8') try:
if isosx and not self.systray.isVisible(): if not isinstance(body, unicode):
self.systray.show() body = body.decode('utf-8')
hide = True if isosx and not self.systray.isVisible():
self.systray.showMessage(summary, body, self.systray.Information, self.systray.show()
timeout) hide = True
finally: self.systray.showMessage(summary, body, self.systray.Information,
if hide: timeout)
self.systray.hide() finally:
if hide:
self.systray.hide()
except:
pass
class GrowlNotifier(Notifier): class GrowlNotifier(Notifier):