summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/mail_status.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-10-03 15:54:24 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-10-03 15:54:24 -0300
commita8c9810f5a90578c4dcce2f519e4d89be068f71a (patch)
tree4fcd3afc97cb3524392b064583158803de3a9967 /src/leap/bitmask/gui/mail_status.py
parent0690de8d28a8bbb99e08a4c93837c843f8cda2f4 (diff)
parente05d074d5458bc3cce5519227c9971d4ffa09280 (diff)
Merge remote-tracking branch 'chiiph/bug/properly_enable_services' into develop
Diffstat (limited to 'src/leap/bitmask/gui/mail_status.py')
-rw-r--r--src/leap/bitmask/gui/mail_status.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/leap/bitmask/gui/mail_status.py b/src/leap/bitmask/gui/mail_status.py
index 770d991f..ab9052d7 100644
--- a/src/leap/bitmask/gui/mail_status.py
+++ b/src/leap/bitmask/gui/mail_status.py
@@ -199,7 +199,8 @@ class MailStatusWidget(QtGui.QWidget):
:param status: the status text to display
:type status: unicode
- :param ready: 2 or >2 if mx is ready, 0 if stopped, 1 if it's starting.
+ :param ready: 2 or >2 if mx is ready, 0 if stopped, 1 if it's
+ starting, < 0 if disabled.
:type ready: int
"""
self.ui.lblMailStatus.setText(status)
@@ -219,6 +220,8 @@ class MailStatusWidget(QtGui.QWidget):
icon = self.CONNECTED_ICON
self._mx_status = self.tr('ON')
tray_status = self.tr('Mail is ON')
+ elif ready < 0:
+ tray_status = self.tr("Mail is disabled")
self.ui.lblMailStatusIcon.setPixmap(icon)
self._action_mail_status.setText(tray_status)
@@ -392,6 +395,12 @@ class MailStatusWidget(QtGui.QWidget):
self._set_mail_status(self.tr("About to start, please wait..."),
ready=1)
+ def set_disabled(self):
+ """
+ Displays the correct UI for disabled mail.
+ """
+ self._set_mail_status(self.tr("Disabled"), -1)
+
def stopped_mail(self):
"""
Displayes the correct UI for the stopped state.