summaryrefslogtreecommitdiffstats
path: root/gconf
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-07-30 15:57:03 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-07-30 15:57:03 +0800
commit4e2adddf79bbfcfc42720c0a52c6a6a741fb1ebe (patch)
tree3005491d58b1da286f3069c2641517af4733b5ab /gconf
parent950a0a8bd7b088cd50f8c60434c562044778d6fc (diff)
downloadibus-4e2adddf79bbfcfc42720c0a52c6a6a741fb1ebe.tar.gz
ibus-4e2adddf79bbfcfc42720c0a52c6a6a741fb1ebe.tar.xz
ibus-4e2adddf79bbfcfc42720c0a52c6a6a741fb1ebe.zip
Test bool at first.
Diffstat (limited to 'gconf')
-rw-r--r--gconf/config.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gconf/config.py b/gconf/config.py
index 1a43b65..1cdb155 100644
--- a/gconf/config.py
+++ b/gconf/config.py
@@ -86,15 +86,15 @@ class Config(ibus.Object):
if isinstance(value, str) or isinstance(value, unicode):
ret = gconf.Value(gconf.VALUE_STRING)
ret.set_string(value)
+ elif isinstance(value, bool):
+ ret = gconf.Value(gconf.VALUE_BOOL)
+ ret.set_bool(value)
elif isinstance(value, int):
ret = gconf.Value(gconf.VALUE_INT)
ret.set_int(value)
elif isinstance(value, float):
ret = gconf.Value(gconf.VALUE_FLOAT)
ret.set_float(value)
- elif isinstance(value, bool):
- ret = gconf.Value(gconf.VALUE_BOOL)
- ret.set_bool(value)
elif isinstance(value, tuple):
if len(value) != 2:
raise ibus.IBusException("Pair must have two value")