From e5afffff50a746ebf3df3d8cacaf094e3f6e08c1 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Fri, 30 Oct 2015 13:03:05 -0300 Subject: [feat] add ui message to help new mail users Add a UI message for the user to know where to go next. This message goes away after 60 seconds or right after a MUA logs in. - Resolves: #7552 --- src/leap/bitmask/gui/mail_status.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/leap/bitmask/gui/mail_status.py') 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. -- cgit v1.2.3