From defa8ee66d4a1a780bad0e6799ed0bb166d69eba Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Thu, 27 Sep 2012 10:11:34 +0900 Subject: [PATCH] Fix IBus.Bus.get_config is null. Now im-ibus.so uses ibus_bus_new_async() instead of ibus_bus_new() and then if ibus-setup-anthy calls GTK+ UI before ibus_bus_new(), the async function is called instead and the delay is happened with the latest ibus 1.5. The fix is to call ibus_bus_new() before GTK+. BUG=RH#859585 TEST=Manually Review URL: https://codereview.appspot.com/6566053 --- setup/main.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setup/main.py b/setup/main.py index 300f11b..8a2391d 100644 --- a/setup/main.py +++ b/setup/main.py @@ -66,12 +66,20 @@ class Setup(object): def __init__(self): super(Setup, self).__init__() + + # IBus.Bus() calls ibus_bus_new(). + # Gtk.Builder().add_from_file() also calls ibus_bus_new_async() + # via ibus_im_context_new(). + # Then if IBus.Bus() is called after Gtk.Builder().add_from_file(), + # the connection delay would be happened without an async + # finish function. + self.__bus = None + self.__init_bus() + gtk_builder_file = path.join(path.dirname(__file__), "./setup.ui") self.__builder = Gtk.Builder() self.__builder.set_translation_domain(DOMAINNAME) self.__builder.add_from_file(gtk_builder_file); - self.__bus = None - self.__init_bus() self.__init_ui() def __init_hotkey(self): -- 2.7.4