diff options
author | Huang Peng <shawn.p.huang@gmail.com> | 2008-07-28 14:53:46 +0800 |
---|---|---|
committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-07-28 14:53:46 +0800 |
commit | 0514cc8f4599954fa2ef0cd88e8cf6737ca9ea56 (patch) | |
tree | 8f608328845d1d098977b902290c1fcc33515d31 /gconf | |
parent | e5e9f635f396f243d59afd153b131fbf6e7a69dc (diff) | |
download | ibus-0514cc8f4599954fa2ef0cd88e8cf6737ca9ea56.tar.gz ibus-0514cc8f4599954fa2ef0cd88e8cf6737ca9ea56.tar.xz ibus-0514cc8f4599954fa2ef0cd88e8cf6737ca9ea56.zip |
Remove gtk.
Diffstat (limited to 'gconf')
-rw-r--r-- | gconf/main.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gconf/main.py b/gconf/main.py index db5fc58..e5d81d6 100644 --- a/gconf/main.py +++ b/gconf/main.py @@ -24,29 +24,30 @@ import sys import getopt import ibus import config -import gtk +import gobject + CONFIG_PATH = "/org/freedesktop/IBus/GConf" + class GconfApplication: def __init__(self): - self.__conn = ibus.Connection() - self.__conn.call_on_disconnection(self.__disconnected_cb) + self.__mainloop = gobject.MainLoop() + self.__ibus = ibus.IBus() + self.__ibus.call_on_disconnection(self.__disconnected_cb) - self.__config = config.Config(self.__conn, CONFIG_PATH) + self.__config = config.Config(self.__ibus, CONFIG_PATH) - self.__conn.get_ibus().RegisterConfig(CONFIG_PATH, True) + self.__ibus.register_config(CONFIG_PATH, True) def run(self): - gtk.main() + self.__mainloop.run() def __disconnected_cb(self, conn): print "disconnected" - gtk.main_quit() + self.__mainloop.quit() def launch_gconf(): - # gtk.settings_get_default().props.gtk_theme_name = "/home/phuang/.themes/aud-Default/gtk-2.0/gtkrc" - # gtk.rc_parse("./themes/default/gtkrc") GconfApplication().run() def print_help(out, v = 0): |