summaryrefslogtreecommitdiff
path: root/caribou/settings/setting_types.py
diff options
context:
space:
mode:
Diffstat (limited to 'caribou/settings/setting_types.py')
-rw-r--r--caribou/settings/setting_types.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/caribou/settings/setting_types.py b/caribou/settings/setting_types.py
index efa438c..66fb0f0 100644
--- a/caribou/settings/setting_types.py
+++ b/caribou/settings/setting_types.py
@@ -108,8 +108,8 @@ class ValueSetting(Setting):
return bool(self.value)
@property
- def gvariant(self):
- return GLib.Variant(self.variant_type, self.value)
+ def default_value(self):
+ return "%r" % self.value
class BooleanSetting(ValueSetting):
variant_type = 'b'
@@ -118,6 +118,13 @@ class BooleanSetting(ValueSetting):
# Almost anything could be a boolean.
return bool(val)
+ @property
+ def default_value(self):
+ if self.value:
+ return "true"
+ else:
+ return "false"
+
class IntegerSetting(ValueSetting):
variant_type = 'i'
entry_type = ENTRY_SPIN