summaryrefslogtreecommitdiff
path: root/src/leap/config/leapsettings.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-06-13 10:52:26 -0300
committerTomás Touceda <chiiph@leap.se>2013-06-13 10:52:26 -0300
commit35291c130f749850753e89d889a121ec098c0dc9 (patch)
tree59305982261bdcca659b45bafdd4c97597ac17ee /src/leap/config/leapsettings.py
parentf35506e9b93cf0182af37ccdcc36e343b44b882c (diff)
parentcd11784b8fdf0cb45783e8d6a8e9b5288f34820d (diff)
Merge remote-tracking branch 'kali/feature/osx-eip-scripts_rev1' into develop
Conflicts: src/leap/gui/mainwindow.py
Diffstat (limited to 'src/leap/config/leapsettings.py')
-rw-r--r--src/leap/config/leapsettings.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/leap/config/leapsettings.py b/src/leap/config/leapsettings.py
index 006be851..ab0c1860 100644
--- a/src/leap/config/leapsettings.py
+++ b/src/leap/config/leapsettings.py
@@ -66,6 +66,7 @@ class LeapSettings(object):
PROPERPROVIDER_KEY = "ProperProvider"
REMEMBER_KEY = "RememberUserAndPass"
DEFAULTPROVIDER_KEY = "DefaultProvider"
+ ALERTMISSING_KEY = "AlertMissingScripts"
def __init__(self, standalone=False):
"""
@@ -249,3 +250,21 @@ class LeapSettings(object):
"""
leap_assert(len(provider) > 0, "We cannot save an empty provider")
self._settings.setValue(self.DEFAULTPROVIDER_KEY, provider)
+
+ def get_alert_missing_scripts(self):
+ """
+ Returns the setting for alerting of missing up/down scripts.
+
+ :rtype: bool
+ """
+ return to_bool(self._settings.value(self.ALERTMISSING_KEY, True))
+
+ def set_alert_missing_scripts(self, value):
+ """
+ Sets the setting for alerting of missing up/down scripts.
+
+ :param value: the value to set
+ :type value: bool
+ """
+ leap_assert_type(value, bool)
+ self._settings.setValue(self.ALERTMISSING_KEY, value)