summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/mail_status.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/gui/mail_status.py')
-rw-r--r--src/leap/bitmask/gui/mail_status.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/leap/bitmask/gui/mail_status.py b/src/leap/bitmask/gui/mail_status.py
index eebae49b..8b4329d7 100644
--- a/src/leap/bitmask/gui/mail_status.py
+++ b/src/leap/bitmask/gui/mail_status.py
@@ -58,6 +58,8 @@ class MailStatusWidget(QtGui.QWidget):
self.ui = Ui_MailStatusWidget()
self.ui.setupUi(self)
+ self.ui.lblMailReadyHelp.setVisible(False)
+
# set systray tooltip status
self._mx_status = ""
self._service_name = get_service_display_name(MX_SERVICE)
@@ -103,6 +105,8 @@ class MailStatusWidget(QtGui.QWidget):
callback=self._mail_handle_imap_events)
register(event=catalog.SMTP_SERVICE_STARTED,
callback=self._mail_handle_imap_events)
+ register(event=catalog.IMAP_CLIENT_LOGIN,
+ callback=self._mail_handle_imap_events)
self._soledad_event.connect(
self._mail_handle_soledad_events_slot)
@@ -415,6 +419,10 @@ class MailStatusWidget(QtGui.QWidget):
self._show_unread_mails()
elif event == catalog.IMAP_SERVICE_STARTED:
self._imap_started = True
+ elif event == catalog.IMAP_CLIENT_LOGIN:
+ # If a MUA has logged in then we don't need to show this.
+ self._hide_mail_ready_help()
+
if ext_status is not None:
self._set_mail_status(ext_status, ready=1)
@@ -483,6 +491,15 @@ class MailStatusWidget(QtGui.QWidget):
"""
self._set_mail_status(self.tr("ON"), 2)
+ # this help message will hide when the MUA connects
+ self.ui.lblMailReadyHelp.setVisible(True)
+
+ def _hide_mail_ready_help(self):
+ """
+ Hide the mail help message on the UI.
+ """
+ self.ui.lblMailReadyHelp.setVisible(False)
+
def mail_state_disabled(self):
"""
Display the correct UI for the disabled state.