summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-03-11 13:37:14 -0300
committerTomás Touceda <chiiph@leap.se>2013-03-11 13:37:14 -0300
commiteaec4a9fff67134284f45eb850f0d7e0f7f275f0 (patch)
tree5f5c323b40bc1b1888ecfa9c69aaffbe05c6ee34 /src/leap
parent1e3631c9a21f99e08bbb4bace61590b1221bc9f1 (diff)
Finish up translation support
Also: - Add spanish translations - Fix an issue when disabling autologin
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/app.py2
-rw-r--r--src/leap/gui/mainwindow.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/leap/app.py b/src/leap/app.py
index a790f81b..246f2d14 100644
--- a/src/leap/app.py
+++ b/src/leap/app.py
@@ -81,7 +81,7 @@ def main():
if qtTranslator.load("qt_%s" % locale, ":/translations"):
app.installTranslator(qtTranslator)
appTranslator = QtCore.QTranslator()
- if appTranslator.load("leap_client_%s" % locale, ":/translations"):
+ if appTranslator.load("%s.qm" % locale[:2], ":/translations"):
app.installTranslator(appTranslator)
# Needed for initializing qsettings it will write
diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py
index 399a7cb4..4e6bb5fe 100644
--- a/src/leap/gui/mainwindow.py
+++ b/src/leap/gui/mainwindow.py
@@ -205,7 +205,7 @@ class MainWindow(QtGui.QMainWindow):
else:
settings = QtCore.QSettings()
saved_user = settings.value(self.USER_KEY, None)
- auto_login = settings.value(self.AUTOLOGIN_KEY, None)
+ auto_login = settings.value(self.AUTOLOGIN_KEY, "false") != "false"
if saved_user is not None:
self.ui.lnUser.setText(saved_user)
@@ -217,8 +217,8 @@ class MainWindow(QtGui.QMainWindow):
self.ui.lnPassword.setText(saved_password.decode("utf8"))
# Only automatically login if there is a saved user
- if auto_login is not None:
- self.ui.chkAutoLogin.setChecked(True)
+ self.ui.chkAutoLogin.setChecked(auto_login)
+ if auto_login:
self._login()
def _show_systray(self):