From 9d258325182ba259bce1ad60e46928b38a8c91fe Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 26 Jan 2010 14:31:54 -0700 Subject: [PATCH] ... --- src/calibre/gui2/notify.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/calibre/gui2/notify.py b/src/calibre/gui2/notify.py index 0f498c45d1..385fdd92b7 100644 --- a/src/calibre/gui2/notify.py +++ b/src/calibre/gui2/notify.py @@ -85,18 +85,21 @@ class QtNotifier(Notifier): def __call__(self, body, summary=None, replaces_id=None, timeout=0): timeout, body, summary = self.get_msg_parms(timeout, body, summary) if self.systray is not None: - hide = False try: - if not isinstance(body, unicode): - 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() + hide = False + try: + if not isinstance(body, unicode): + 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() + except: + pass class GrowlNotifier(Notifier):