diff options
| author | Huang Peng <shawn.p.huang@gmail.com> | 2008-07-31 12:09:04 +0800 |
|---|---|---|
| committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-07-31 12:09:04 +0800 |
| commit | 67bb63aa51963b487037de820c32e3986832a309 (patch) | |
| tree | e6ec62bab5f1a837e62d2e95b0050a3a7fa3dd0c /gconf | |
| parent | 211e3f2a79e99b105ea06280c14b8a5ca9380782 (diff) | |
| download | ibus-67bb63aa51963b487037de820c32e3986832a309.tar.gz ibus-67bb63aa51963b487037de820c32e3986832a309.tar.xz ibus-67bb63aa51963b487037de820c32e3986832a309.zip | |
Make ibus inherit from ibus.Object.
Diffstat (limited to 'gconf')
| -rw-r--r-- | gconf/config.py | 3 | ||||
| -rw-r--r-- | gconf/main.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/gconf/config.py b/gconf/config.py index 3a1e027..10e4917 100644 --- a/gconf/config.py +++ b/gconf/config.py @@ -38,8 +38,9 @@ class Config(ibus.Object): (gobject.TYPE_STRING, gobject.TYPE_PYOBJECT)), } - def __init__ (self, conn = None, path = None): + def __init__ (self, _ibus = None, path = None): super(Config, self).__init__() + conn = _ibus.get_conn() if _ibus != None else None self.__proxy = ConfigProxy(self, conn, path) self.__client = gconf.Client() self.__handler_id = self.__client.connect("value-changed", self.__value_changed_cb) diff --git a/gconf/main.py b/gconf/main.py index a96ebe7..295f3ae 100644 --- a/gconf/main.py +++ b/gconf/main.py @@ -32,7 +32,7 @@ class GconfApplication: def __init__(self): self.__mainloop = gobject.MainLoop() self.__ibus = ibus.IBus() - self.__ibus.call_on_disconnection(self.__disconnected_cb) + self.__ibus.connect("destroy", self.__ibus_destroy_cb) self.__config = config.Config(self.__ibus, CONFIG_PATH) self.__config.connect("destroy", self.__config_destroy_cb) @@ -45,7 +45,7 @@ class GconfApplication: def __config_destroy_cb(self, config): self.__mainloop.quit() - def __disconnected_cb(self, conn): + def __ibus_destroy_cb(self, _ibus): print "disconnected" self.__mainloop.quit() |
