From e9f27feb82523df1ce6948f0c7b62733c2b6c071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 17 Oct 2013 16:43:37 -0300 Subject: Only show N unread Emails when N > 0 --- src/leap/bitmask/gui/mail_status.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/leap/bitmask/gui/mail_status.py b/src/leap/bitmask/gui/mail_status.py index 2ac9a332..83533666 100644 --- a/src/leap/bitmask/gui/mail_status.py +++ b/src/leap/bitmask/gui/mail_status.py @@ -387,8 +387,11 @@ class MailStatusWidget(QtGui.QWidget): self._set_mail_status(self.tr("Failed")) elif req.event == proto.IMAP_UNREAD_MAIL: if self._smtp_started and self._imap_started: - self._set_mail_status(self.tr("%s Unread Emails") % - (req.content), ready=2) + if req.content != "0": + self._set_mail_status(self.tr("%s Unread Emails") % + (req.content,), ready=2) + else: + self._set_mail_status("", ready=2) else: leap_assert(False, # XXX ??? "Don't know how to handle this state: %s" -- cgit v1.2.3