summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/config
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-10-16 17:06:24 -0300
committerKali Kaneko <kali@leap.se>2013-10-16 17:06:24 -0300
commit0c2567096393f9a8fa86e0e7d8460ccca15756d7 (patch)
treef8e3b80af31f188ab089d1eae5f4f1186fb1bdff /src/leap/bitmask/config
parent36c36bc9dc9fed643245c9c96a9840f06c515ec1 (diff)
parent2a920d3b499c4a35d647c181eb596d041c2deead (diff)
Merge remote-tracking branch 'ivan-github/bug/4116_remember-last-login-domain' into develop
Diffstat (limited to 'src/leap/bitmask/config')
-rw-r--r--src/leap/bitmask/config/leapsettings.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/leap/bitmask/config/leapsettings.py b/src/leap/bitmask/config/leapsettings.py
index d7b60ba9..c524425e 100644
--- a/src/leap/bitmask/config/leapsettings.py
+++ b/src/leap/bitmask/config/leapsettings.py
@@ -62,6 +62,7 @@ class LeapSettings(object):
GEOMETRY_KEY = "Geometry"
WINDOWSTATE_KEY = "WindowState"
USER_KEY = "User"
+ PROVIDER_KEY = "Provider"
REMEMBER_KEY = "RememberUserAndPass"
DEFAULTPROVIDER_KEY = "DefaultProvider"
AUTOSTARTEIP_KEY = "AutoStartEIP"
@@ -241,6 +242,24 @@ class LeapSettings(object):
leap_assert(len(user) > 0, "We cannot save an empty user")
self._settings.setValue(self.USER_KEY, user)
+ def get_provider(self):
+ """
+ Returns the configured provider to remember, None if there isn't one
+
+ :rtype: str or None
+ """
+ return self._settings.value(self.PROVIDER_KEY, None)
+
+ def set_provider(self, provider):
+ """
+ Saves the provider to remember
+
+ :param provider: provider name to remember
+ :type provider: str
+ """
+ leap_assert(len(provider) > 0, "We cannot save an empty provider")
+ self._settings.setValue(self.PROVIDER_KEY, provider)
+
def get_remember(self):
"""
Returns the value of the remember selection.