summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-10-17 17:00:42 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-10-17 17:00:42 -0300
commit7d3ead024ab87c7995e2d0ca7478735da374f508 (patch)
treeb65deba4449e7c337eeb91b5b9f6d13527596630
parentd2c25d3b1e2c7e694a2a0dad0d9f75ec4df5c53b (diff)
parente9f27feb82523df1ce6948f0c7b62733c2b6c071 (diff)
Merge remote-tracking branch 'chiiph/bug/display_new_mail_count' into develop
-rw-r--r--changes/bug_display_new_mail_only1
-rw-r--r--src/leap/bitmask/gui/mail_status.py7
2 files changed, 6 insertions, 2 deletions
diff --git a/changes/bug_display_new_mail_only b/changes/bug_display_new_mail_only
new file mode 100644
index 00000000..218cd16e
--- /dev/null
+++ b/changes/bug_display_new_mail_only
@@ -0,0 +1 @@
+ o Only show N unread Emails when N > 0. Fixes #4098. \ No newline at end of file
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"