From 8dbf0056a6bcfbc1164afbd4e2f5a8483b9f21c0 Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Mon, 5 Sep 2011 10:46:26 -0700 Subject: Revert "setting_types: avoid using GVariant" This reverts commit 4ee4055a9a77e7cf0ebba636f569e3181e8d7697. We are now on pygobject-3.0, so this issue went away. --- caribou/settings/setting_types.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'caribou') 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 -- cgit v1.2.1