summaryrefslogtreecommitdiff
path: root/caribou
diff options
context:
space:
mode:
authorEitan Isaacson <eitan@monotonous.org>2011-09-05 10:46:26 -0700
committerEitan Isaacson <eitan@monotonous.org>2011-09-05 10:47:02 -0700
commit8dbf0056a6bcfbc1164afbd4e2f5a8483b9f21c0 (patch)
treeac183f600827e3a782d8cbe653d988ef6f366b0e /caribou
parent54ee200626ca8661b4fa6b1e25b4be37ac291fbc (diff)
downloadcaribou-8dbf0056a6bcfbc1164afbd4e2f5a8483b9f21c0.tar.gz
Revert "setting_types: avoid using GVariant"
This reverts commit 4ee4055a9a77e7cf0ebba636f569e3181e8d7697. We are now on pygobject-3.0, so this issue went away.
Diffstat (limited to 'caribou')
-rw-r--r--caribou/settings/setting_types.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/caribou/settings/setting_types.py b/caribou/settings/setting_types.py
index c4af2a6..f6a0503 100644
--- a/caribou/settings/setting_types.py
+++ b/caribou/settings/setting_types.py
@@ -107,8 +107,8 @@ class ValueSetting(Setting):
return bool(self.value)
@property
- def default_value(self):
- return "%r" % self.value
+ def gvariant(self):
+ return GLib.Variant(self.variant_type, self.value)
class BooleanSetting(ValueSetting):
variant_type = 'b'
@@ -117,13 +117,6 @@ 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