This commit is contained in:
Kovid Goyal 2010-01-26 13:43:04 -07:00
parent 2d33bab4bd
commit 67b7e9dce3

View File

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