summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/mainwindow.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-08-29 17:19:02 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-08-29 17:35:20 -0300
commitc43193f36b69620a5f88ec67c515975819c6b542 (patch)
treea0fd82239cb6d05388cc9ec661153aee2aa7de14 /src/leap/bitmask/gui/mainwindow.py
parenta877a30cd8e2346171b79d08d5a1edecac99de94 (diff)
Enable password change when soledad is ready.
Closes #3610.
Diffstat (limited to 'src/leap/bitmask/gui/mainwindow.py')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 34451928..6d612d4e 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -284,6 +284,7 @@ class MainWindow(QtGui.QMainWindow):
# Services signals/slots connection
self.new_updates.connect(self._react_to_new_updates)
self.soledad_ready.connect(self._start_imap_service)
+ self.soledad_ready.connect(self._set_soledad_ready)
self.mail_client_logged_in.connect(self._fetch_incoming_mail)
################################# end Qt Signals connection ########
@@ -298,6 +299,7 @@ class MainWindow(QtGui.QMainWindow):
self._bypass_checks = bypass_checks
self._soledad = None
+ self._soledad_ready = False
self._keymanager = None
self._imap_service = None
@@ -415,11 +417,26 @@ class MainWindow(QtGui.QMainWindow):
Displays the preferences window.
"""
preferences_window = PreferencesWindow(
- self, self._srp_auth, self._soledad,
- self._settings, self._standalone)
+ self, self._srp_auth, self._settings, self._standalone)
+
+ if self._soledad_ready:
+ preferences_window.set_soledad_ready(self._soledad)
+ else:
+ self.soledad_ready.connect(
+ lambda: preferences_window.set_soledad_ready(self._soledad))
preferences_window.show()
+ def _set_soledad_ready(self):
+ """
+ SLOT
+ TRIGGERS:
+ self.soledad_ready
+
+ It sets the soledad object as ready to use.
+ """
+ self._soledad_ready = True
+
def _uncheck_logger_button(self):
"""
SLOT