summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-10-10 16:09:07 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-10-10 16:56:51 -0300
commitd42e5d5587af0ac62a9cc05e299d24215b15ac21 (patch)
treeca537fa65860ec2c644af4275c302c0a33c2c596 /src/leap/bitmask/gui
parentb7c1f1b359fcd5c099340ef53ac928d24c848331 (diff)
Display a Soledad error to the user if needed.
Diffstat (limited to 'src/leap/bitmask/gui')
-rw-r--r--src/leap/bitmask/gui/mail_status.py11
-rw-r--r--src/leap/bitmask/gui/mainwindow.py4
2 files changed, 13 insertions, 2 deletions
diff --git a/src/leap/bitmask/gui/mail_status.py b/src/leap/bitmask/gui/mail_status.py
index 8f846b55..2ac9a332 100644
--- a/src/leap/bitmask/gui/mail_status.py
+++ b/src/leap/bitmask/gui/mail_status.py
@@ -192,6 +192,17 @@ class MailStatusWidget(QtGui.QWidget):
leap_assert_type(action_mail_status, QtGui.QAction)
self._action_mail_status = action_mail_status
+ def set_soledad_failed(self):
+ """
+ SLOT
+ TRIGGER:
+ SoledadBootstrapper.soledad_failed
+
+ This method is called whenever soledad has a failure.
+ """
+ msg = self.tr("There was an unexpected problem with Soledad.")
+ self._set_mail_status(msg, ready=-1)
+
def _set_mail_status(self, status, ready=0):
"""
Sets the Mail status in the label and in the tray icon.
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 0d0c6339..69545751 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -254,8 +254,8 @@ class MainWindow(QtGui.QMainWindow):
self._soledad_bootstrapped_stage)
self._soledad_bootstrapper.soledad_timeout.connect(
self._retry_soledad_connection)
- # XXX missing connect to soledad_failed (signal unrecoverable to user)
- # TODO wait until chiiph ui refactor.
+ self._soledad_bootstrapper.soledad_failed.connect(
+ self._mail_status.set_soledad_failed)
self._smtp_bootstrapper = SMTPBootstrapper()
self._smtp_bootstrapper.download_config.connect(