diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-10-17 16:43:37 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-10-17 16:59:41 -0300 |
commit | e9f27feb82523df1ce6948f0c7b62733c2b6c071 (patch) | |
tree | b65deba4449e7c337eeb91b5b9f6d13527596630 /src/leap | |
parent | d2c25d3b1e2c7e694a2a0dad0d9f75ec4df5c53b (diff) |
Only show N unread Emails when N > 0
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/bitmask/gui/mail_status.py | 7 |
1 files changed, 5 insertions, 2 deletions
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" |