diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-10-03 15:07:47 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-10-03 15:07:47 -0300 |
commit | d0371ad6b83c8c4e1fdbf2cf99bff317832f0062 (patch) | |
tree | 6ed55d2ce618ebda7d56941c30840a1f500c79f9 /src/leap/bitmask/config/leapsettings.py | |
parent | e4d381e4235436c039951ff7af88af608ac18d3d (diff) | |
parent | 689c716b831047c8fe18945956e809b74e4250a3 (diff) |
Merge remote-tracking branch 'kali/bug/fix-eip-switch-on' into develop
Diffstat (limited to 'src/leap/bitmask/config/leapsettings.py')
-rw-r--r-- | src/leap/bitmask/config/leapsettings.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/leap/bitmask/config/leapsettings.py b/src/leap/bitmask/config/leapsettings.py index 7ab1ace3..4660535a 100644 --- a/src/leap/bitmask/config/leapsettings.py +++ b/src/leap/bitmask/config/leapsettings.py @@ -65,6 +65,7 @@ class LeapSettings(object): PROPERPROVIDER_KEY = "ProperProvider" REMEMBER_KEY = "RememberUserAndPass" DEFAULTPROVIDER_KEY = "DefaultProvider" + AUTOSTARTEIP_KEY = "AutoStartEIP" ALERTMISSING_KEY = "AlertMissingScripts" GATEWAY_KEY = "Gateway" PINNED_KEY = "Pinned" @@ -302,6 +303,24 @@ class LeapSettings(object): else: self._settings.setValue(self.DEFAULTPROVIDER_KEY, provider) + def get_autostart_eip(self): + """ + Gets whether the app should autostart EIP. + + :rtype: bool + """ + return to_bool(self._settings.value(self.AUTOSTARTEIP_KEY, False)) + + def set_autostart_eip(self, autostart): + """ + Sets whether the app should autostart EIP. + + :param autostart: True if we should try to autostart EIP. + :type autostart: bool + """ + leap_assert_type(autostart, bool) + self._settings.setValue(self.AUTOSTARTEIP_KEY, autostart) + def get_alert_missing_scripts(self): """ Returns the setting for alerting of missing up/down scripts. |