diff options
| author | Huang Peng <shawn.p.huang@gmail.com> | 2008-07-30 15:57:03 +0800 |
|---|---|---|
| committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-07-30 15:57:03 +0800 |
| commit | 4e2adddf79bbfcfc42720c0a52c6a6a741fb1ebe (patch) | |
| tree | 3005491d58b1da286f3069c2641517af4733b5ab /gconf | |
| parent | 950a0a8bd7b088cd50f8c60434c562044778d6fc (diff) | |
| download | ibus-4e2adddf79bbfcfc42720c0a52c6a6a741fb1ebe.tar.gz ibus-4e2adddf79bbfcfc42720c0a52c6a6a741fb1ebe.tar.xz ibus-4e2adddf79bbfcfc42720c0a52c6a6a741fb1ebe.zip | |
Test bool at first.
Diffstat (limited to 'gconf')
| -rw-r--r-- | gconf/config.py | 6 |
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") |
