summaryrefslogtreecommitdiff
path: root/src/leap/config
diff options
context:
space:
mode:
authorTomas Touceda <chiiph@leap.se>2013-04-09 09:24:23 -0300
committerTomas Touceda <chiiph@leap.se>2013-04-09 09:24:23 -0300
commit01f956f859a94f37aaebf9acc932c26564087ae8 (patch)
treeeca24d5dc5bfe90c1abcea6998e91de578b76b7e /src/leap/config
parentfb51905d5dde6880a40b551ba185d7932cc1ae07 (diff)
parentbcfdc13f5450e3df695c61c44bf637b18386f31a (diff)
Merge remote-tracking branch 'kali/bug/deselect-remember' into develop
Diffstat (limited to 'src/leap/config')
-rw-r--r--src/leap/config/leapsettings.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/leap/config/leapsettings.py b/src/leap/config/leapsettings.py
index 35c9fef6..19ec4a9a 100644
--- a/src/leap/config/leapsettings.py
+++ b/src/leap/config/leapsettings.py
@@ -64,6 +64,7 @@ class LeapSettings(object):
USER_KEY = "User"
AUTOLOGIN_KEY = "AutoLogin"
PROPERPROVIDER_KEY = "ProperProvider"
+ REMEMBER_KEY = "RememberUserAndPass"
def __init__(self, standalone=False):
"""
@@ -169,6 +170,25 @@ class LeapSettings(object):
leap_assert(len(user) > 0, "We cannot save an empty user")
self._settings.setValue(self.USER_KEY, user)
+ def get_remember(self):
+ """
+ Returns the value of the remember selection.
+
+ @rtype: bool
+ """
+ return to_bool(self._settings.value(self.REMEMBER_KEY, False))
+
+ def set_remember(self, remember):
+ """
+ Sets wheter the app should remember username and password
+
+ @param remember: True if the app should remember username and
+ password, False otherwise
+ @rtype: bool
+ """
+ leap_assert_type(remember, bool)
+ self._settings.setValue(self.REMEMBER_KEY, remember)
+
def get_autologin(self):
"""
Returns True if the app should automatically login, False otherwise