summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-04-09 20:48:29 +0900
committerkali <kali@leap.se>2013-04-09 20:48:29 +0900
commitbcfdc13f5450e3df695c61c44bf637b18386f31a (patch)
treebb97f1983866451c402163e563b784bad70afb2b
parent9628f1a85980515d5ef468caa226b321a1ee3353 (diff)
make state switch more readable
-rw-r--r--src/leap/gui/mainwindow.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index e5efdbed..3c256bea 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -224,8 +224,9 @@ class MainWindow(QtGui.QMainWindow):
self._wizard = None
def _remember_state_changed(self, state):
- self.ui.chkAutoLogin.setEnabled(state == QtCore.Qt.Checked)
- self._settings.set_remember(bool(state))
+ enable = True if state == QtCore.Qt.Checked else False
+ self.ui.chkAutoLogin.setEnabled(enable)
+ self._settings.set_remember(enable)
def _finish_init(self):
self.ui.cmbProviders.addItems(self._configured_providers())