summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-09-18 09:50:09 -0400
committerKali Kaneko <kali@leap.se>2013-09-18 09:50:09 -0400
commit735111cee1c28ccc07c87d806bc5412aaffcedf7 (patch)
treeec2fb7489a4ad8467907aa8ef08e4662b332cd4d /src/leap/bitmask/gui
parente475daff20a2278ad170cb1ebaf528e7ee4a1657 (diff)
parenta81ae28db34412c298ececc64319a9cf993c18f3 (diff)
Merge remote-tracking branch 'ivan-github/bug/3774_handle-logout-problem' into develop
Diffstat (limited to 'src/leap/bitmask/gui')
-rw-r--r--src/leap/bitmask/gui/mainwindow.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 98cfacb1..89069151 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -1453,13 +1453,16 @@ class MainWindow(QtGui.QMainWindow):
Switches the stackedWidget back to the login stage after
logging out
"""
- self._logged_user = None
- self.ui.action_log_out.setEnabled(False)
- self.ui.stackedWidget.setCurrentIndex(self.LOGIN_INDEX)
- self._login_widget.set_password("")
- self._login_widget.set_enabled(True)
- self._login_widget.set_status("")
- self.ui.btnPreferences.setEnabled(False)
+ if ok:
+ self._logged_user = None
+ self.ui.action_log_out.setEnabled(False)
+ self.ui.stackedWidget.setCurrentIndex(self.LOGIN_INDEX)
+ self._login_widget.set_password("")
+ self._login_widget.set_enabled(True)
+ self._login_widget.set_status("")
+ else:
+ status_text = self.tr("Something went wrong with the logout.")
+ self._status_panel.set_global_status(status_text, error=True)
def _intermediate_stage(self, data):
"""