From 80224fc2fa99f281e61b635dac479ac11dad2357 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Thu, 31 Jan 2013 18:01:44 +0900 Subject: [PATCH] Updated ibus-530711-preload-sys.patch. Fixes #904799 --- ibus-530711-preload-sys.patch | 45 ++++++++++++++++++++++++------- ibus-xx-setup-frequent-lang.patch | 8 +++--- ibus.spec | 5 +++- 3 files changed, 43 insertions(+), 15 deletions(-) diff --git a/ibus-530711-preload-sys.patch b/ibus-530711-preload-sys.patch index 54b0eec..42245b4 100644 --- a/ibus-530711-preload-sys.patch +++ b/ibus-530711-preload-sys.patch @@ -1,6 +1,6 @@ -From f209d4c3430df3707c432ddfcfc184b791bb50fd Mon Sep 17 00:00:00 2001 +From 84354457b25d77fed1184224ce71a31ff6facfec Mon Sep 17 00:00:00 2001 From: fujiwarat -Date: Fri, 11 Jan 2013 23:03:19 +0900 +Date: Thu, 31 Jan 2013 17:30:09 +0900 Subject: [PATCH] Reload preload engines until users customize the list. The idea is, if users don't customize the preload_engines with ibus-setup, @@ -18,11 +18,11 @@ IBUS_PRELOAD_ENGINE_MODE_USER and users can customize the value 'preload_engines'. --- data/ibus.schemas.in | 24 +++++++++ - setup/main.py | 61 +++++++++++++++++++++-- + setup/main.py | 73 ++++++++++++++++++++++++--- setup/setup.ui | 22 +++++++-- src/ibustypes.h | 10 ++++ ui/gtk3/panel.vala | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 5 files changed, 246 insertions(+), 7 deletions(-) + 5 files changed, 254 insertions(+), 11 deletions(-) diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in index 70bf9ca..7833959 100644 @@ -60,10 +60,10 @@ index 70bf9ca..7833959 100644 /desktop/ibus/general/preload_engines ibus diff --git a/setup/main.py b/setup/main.py -index 707faa4..aae6bb9 100644 +index 707faa4..4826037 100644 --- a/setup/main.py +++ b/setup/main.py -@@ -190,6 +190,20 @@ class Setup(object): +@@ -190,16 +190,27 @@ class Setup(object): self.__checkbutton_use_global_engine.connect("toggled", self.__checkbutton_use_global_engine_toggled_cb) @@ -84,7 +84,18 @@ index 707faa4..aae6bb9 100644 # init engine page self.__engines = self.__bus.list_engines() self.__combobox = self.__builder.get_object("combobox_engines") -@@ -243,6 +257,7 @@ class Setup(object): + self.__combobox.set_engines(self.__engines) + +- tmp_dict = {} +- for e in self.__engines: +- tmp_dict[e.get_name()] = e + engine_names = values.get("preload_engines", []) +- engines = [tmp_dict[name] for name in engine_names if name in tmp_dict] ++ engines = self.__get_engine_descs_from_names(engine_names) + + self.__treeview = self.__builder.get_object("treeview_engines") + self.__treeview.set_engines(engines) +@@ -243,6 +254,7 @@ class Setup(object): self.__checkbutton_auto_start_toggled_cb) self.__config = self.__bus.get_config() @@ -92,7 +103,7 @@ index 707faa4..aae6bb9 100644 self.__init_hotkey() self.__init_panel() -@@ -251,8 +266,8 @@ class Setup(object): +@@ -251,8 +263,8 @@ class Setup(object): def __combobox_notify_active_engine_cb(self, combobox, property): engine = self.__combobox.get_active_engine() button = self.__builder.get_object("button_engine_add") @@ -103,7 +114,21 @@ index 707faa4..aae6bb9 100644 def __get_engine_setup_exec_args(self, engine): args = [] -@@ -324,6 +339,34 @@ class Setup(object): +@@ -272,6 +284,13 @@ class Setup(object): + args.append(path.basename(setup_path)) + return args + ++ def __get_engine_descs_from_names(self, engine_names): ++ tmp_dict = {} ++ for e in self.__engines: ++ tmp_dict[e.get_name()] = e ++ engines = [tmp_dict[name] for name in engine_names if name in tmp_dict] ++ return engines ++ + def __treeview_notify_cb(self, treeview, prop): + if prop.name not in ("active-engine", "engines"): + return +@@ -324,6 +343,34 @@ class Setup(object): del self.__engine_setup_exec_list[name] self.__engine_setup_exec_list[name] = os.spawnl(os.P_NOWAIT, *args) @@ -138,7 +163,7 @@ index 707faa4..aae6bb9 100644 def __init_bus(self): self.__bus = IBus.Bus() if self.__bus.is_connected(): -@@ -538,8 +581,18 @@ class Setup(object): +@@ -538,8 +585,18 @@ class Setup(object): value = GLib.Variant.new_boolean(value) self.__config.set_value("general", "use_global_engine", value) diff --git a/ibus-xx-setup-frequent-lang.patch b/ibus-xx-setup-frequent-lang.patch index d8d7b4b..e703cb4 100644 --- a/ibus-xx-setup-frequent-lang.patch +++ b/ibus-xx-setup-frequent-lang.patch @@ -1,6 +1,6 @@ -From 7c4c048bd5aceb15d44042c72ff931d0c05d440f Mon Sep 17 00:00:00 2001 +From 1f21bce0403cdf7f99faa33842bc23b49aaee8cc Mon Sep 17 00:00:00 2001 From: fujiwarat -Date: Fri, 11 Jan 2013 23:04:53 +0900 +Date: Thu, 31 Jan 2013 17:31:55 +0900 Subject: [PATCH] Enable ibus-setup to show the frequently used languages only in IME list. @@ -411,7 +411,7 @@ index 0f8a6ae..9828ee6 100644 return self.get_property("active-engine") diff --git a/setup/main.py b/setup/main.py -index aae6bb9..ded85c0 100644 +index 4826037..42fcb33 100644 --- a/setup/main.py +++ b/setup/main.py @@ -207,6 +207,7 @@ class Setup(object): @@ -421,7 +421,7 @@ index aae6bb9..ded85c0 100644 + self.__combobox.set_config(self.__config) self.__combobox.set_engines(self.__engines) - tmp_dict = {} + engine_names = values.get("preload_engines", []) -- 1.8.0 diff --git a/ibus.spec b/ibus.spec index 98930e7..3ac6da4 100644 --- a/ibus.spec +++ b/ibus.spec @@ -35,7 +35,7 @@ Name: ibus Version: 1.5.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Intelligent Input Bus for Linux OS License: LGPLv2+ Group: System Environment/Libraries @@ -477,6 +477,9 @@ fi %{_datadir}/gtk-doc/html/* %changelog +* Thu Jan 31 2013 Takao Fujiwara - 1.5.1-2 +- Updated ibus-530711-preload-sys.patch. Fixes #904799 + * Tue Jan 08 2013 Takao Fujiwara - 1.5.1-1 - Bumped to 1.5.1 - Bumped to ibus-gjs 3.4.1.20130115 for f17