[ibus/f16] Fixed Bug 746869 - no keymaps if the XKB has no group and no variant
Takao Fujiwara
fujiwara at fedoraproject.org
Thu Oct 20 03:23:16 UTC 2011
commit a4b3ac56f9e768eea08a579b64cab091fda204bc
Author: Takao Fujiwara <tfujiwar at redhat.com>
Date: Thu Oct 20 12:22:58 2011 +0900
Fixed Bug 746869 - no keymaps if the XKB has no group and no variant
.gitignore | 2 +
ibus-HEAD.patch | 82 +++++++++++++++++++++++++++++++++++++++++++
ibus-xx-bridge-hotkey.patch | 20 +++++-----
ibus.spec | 13 ++++---
sources | 4 +-
5 files changed, 104 insertions(+), 17 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c11e51c..f4f5b87 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,5 @@ ibus-1.3.6.tar.gz
/ibus-gjs-3.1.91.20110913.tar.gz
/ibus-gjs-3.0.2.20110928.tar.gz
/ibus-gjs-3.2.0.20110928.tar.gz
+/ibus-gjs-3.0.2.20111018.tar.gz
+/ibus-gjs-3.2.0.20111018.tar.gz
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index 8b13789..d15f9b4 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -1 +1,83 @@
+From 5d519fb7a798e252dc28665694d53b0773542584 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1 at gmail.com>
+Date: Thu, 20 Oct 2011 11:00:23 +0900
+Subject: [PATCH] Fix previous_engine without global engine.
+
+---
+ bus/ibusimpl.c | 31 +++++++++++++++++++------------
+ 1 files changed, 19 insertions(+), 12 deletions(-)
+
+diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
+index 1494f5f..0a4f3fb 100644
+--- a/bus/ibusimpl.c
++++ b/bus/ibusimpl.c
+@@ -1044,13 +1044,14 @@ bus_ibus_impl_get_engine_desc (BusIBusImpl *ibus,
+ }
+
+ /**
+- * bus_ibus_impl_context_request_next_engine_in_menu:
++ * bus_ibus_impl_context_request_rotate_engine_in_menu:
+ *
+- * Process the "next_engine_in_menu" hotkey.
++ * Process the "next_engine_in_menu" or "previous_engine" hotkey.
+ */
+ static void
+-bus_ibus_impl_context_request_next_engine_in_menu (BusIBusImpl *ibus,
+- BusInputContext *context)
++bus_ibus_impl_context_request_rotate_engine_in_menu (BusIBusImpl *ibus,
++ BusInputContext *context,
++ gboolean is_next)
+ {
+ BusEngineProxy *engine;
+ IBusEngineDesc *desc;
+@@ -1071,12 +1072,20 @@ bus_ibus_impl_context_request_next_engine_in_menu (BusIBusImpl *ibus,
+
+ p = g_list_find (ibus->register_engine_list, desc);
+ if (p != NULL) {
+- p = p->next;
++ if (is_next) {
++ p = p->next;
++ } else if (p->prev) {
++ p = p->prev;
++ }
+ }
+ if (p == NULL) {
+ p = g_list_find (ibus->engine_list, desc);
+ if (p != NULL) {
+- p = p->next;
++ if (is_next) {
++ p = p->next;
++ } else if (p->prev) {
++ p = p->prev;
++ }
+ }
+ }
+
+@@ -1126,12 +1135,9 @@ bus_ibus_impl_context_request_previous_engine (BusIBusImpl *ibus,
+ }
+ }
+
+- /*
+- * If the previous engine name is not found, switch to the next engine
+- * in the menu. This behavior is better than doing nothing.
+- */
+ if (!engine_name) {
+- bus_ibus_impl_context_request_next_engine_in_menu (ibus, context);
++ bus_ibus_impl_context_request_rotate_engine_in_menu (ibus, context,
++ FALSE);
+ return;
+ }
+
+@@ -2084,7 +2090,8 @@ bus_ibus_impl_filter_keyboard_shortcuts (BusIBusImpl *ibus,
+ }
+ if (event == next) {
+ if (bus_input_context_is_enabled (context)) {
+- bus_ibus_impl_context_request_next_engine_in_menu (ibus, context);
++ bus_ibus_impl_context_request_rotate_engine_in_menu (ibus, context,
++ TRUE);
+ }
+ else {
+ bus_input_context_enable (context);
+--
+1.7.6.4
diff --git a/ibus-xx-bridge-hotkey.patch b/ibus-xx-bridge-hotkey.patch
index ed5b02e..3d58a19 100644
--- a/ibus-xx-bridge-hotkey.patch
+++ b/ibus-xx-bridge-hotkey.patch
@@ -1386,7 +1386,7 @@ index 7cf1995..a19d16e 100644
+
#endif
diff --git a/ui/gtk/panel.py b/ui/gtk/panel.py
-index 8804634..a2a5733 100644
+index 8804634..bef6fbf 100644
--- a/ui/gtk/panel.py
+++ b/ui/gtk/panel.py
@@ -67,6 +67,7 @@ class Panel(ibus.PanelBase):
@@ -1404,7 +1404,7 @@ index 8804634..a2a5733 100644
+ self.__default_layout = 'default'
+ self.__default_model = 'default'
+ self.__default_option = 'default'
-+ self.__disabled_engines = None
++ self.__disabled_engines = []
+ self.__disabled_engines_id = -1
+ self.__disabled_engines_prev_id = -1
+ self.__disabled_engines_swapped = 0
@@ -1455,8 +1455,7 @@ index 8804634..a2a5733 100644
+ models = None
+ if default_model != None and default_model != '':
+ models = default_model.split(',')
-+ if self.__disabled_engines == None or self.__disabled_engines == []:
-+ self.__disabled_engines = []
++ if len(self.__disabled_engines) == 0:
+ for i, layout in enumerate(layouts):
+ registry = ibus.XKBConfigRegistry()
+ langs = registry.get_layout_lang()[layout]
@@ -1467,15 +1466,16 @@ index 8804634..a2a5733 100644
+ if i == 0:
+ layout = default_layout
+ model = default_model
-+ elif i < len(models):
++ elif models != None and i < len(models):
+ model = models[i]
+ if model == '':
+ model = None
+ model_desc = _("Default Layout")
+ if i == 0:
+ l = 0
-+ for j in range(0, len(models)):
-+ l = l + len(models[j])
++ if models != None:
++ for j in range(0, len(models)):
++ l = l + len(models[j])
+ if l != 0:
+ model_desc = model_desc + " (" + model + ")"
+ elif model != None:
@@ -1491,7 +1491,7 @@ index 8804634..a2a5733 100644
+ self.__disabled_engines_id = self.__xkblayout.get_group()
+ if not use_bridge_hotkey:
+ return
-+ if self.__disabled_engines != None and self.__disabled_engines != []:
++ if len(self.__disabled_engines) > 0:
+ if self.__focus_ic == None:
+ return
+ engine = self.__focus_ic.get_engine()
@@ -1620,7 +1620,7 @@ index 8804634..a2a5733 100644
+ if engine.name.startswith(ibus.DEFAULT_BRIDGE_ENGINE_NAME):
+ if not self.__use_bridge_hotkey():
+ continue
-+ if self.__disabled_engines == None:
++ if len(self.__disabled_engines) == 0:
+ continue
+ engine.disabled_engines_id = -1
+ for j, kb_engine in enumerate(self.__disabled_engines):
@@ -1749,7 +1749,7 @@ index 8804634..a2a5733 100644
return engine.layout
+ elif self.__use_bridge_hotkey() and \
+ self.__disabled_engines_id >= 0 and \
-+ self.__disabled_engines != None and \
++ len(self.__disabled_engines) > 0 and \
+ self.__disabled_engines_id < len(self.__disabled_engines):
+ if changed_state and self.__disabled_engines_prev_id != -1:
+ # stateChanged is always called triple because we change
diff --git a/ibus.spec b/ibus.spec
index f39fb03..c2846a7 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -7,11 +7,11 @@
%if 0%{?fedora} > 15
%define have_bridge_hotkey 1
-%define ibus_gjs_version 3.2.0.20110928
+%define ibus_gjs_version 3.2.0.20111018
%define ibus_gjs_build_failure 1
%else
%define have_bridge_hotkey 0
-%define ibus_gjs_version 3.0.2.20110928
+%define ibus_gjs_version 3.0.2.20111018
%define ibus_gjs_build_failure 0
%endif
@@ -24,7 +24,7 @@
Name: ibus
Version: 1.4.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
Group: System Environment/Libraries
@@ -34,7 +34,7 @@ Source1: xinput-ibus
%if %have_gjsfile
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-gjs-%{ibus_gjs_version}.tar.gz
%endif
-# Patch0: ibus-HEAD.patch
+Patch0: ibus-HEAD.patch
Patch1: ibus-530711-preload-sys.patch
Patch2: ibus-541492-xkb.patch
Patch3: ibus-xx-bridge-hotkey.patch
@@ -187,7 +187,7 @@ cd $d
cd ..
%endif
%endif
-# %patch0 -p1
+%patch0 -p1
%patch93 -p1 -b .g-s-preedit
cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c
%patch1 -p1 -b .preload-sys
@@ -386,6 +386,9 @@ fi
%{_datadir}/gtk-doc/html/*
%changelog
+* Thu Oct 20 2011 Takao Fujiwara <tfujiwar at redhat.com> - 1.4.0-4
+- Fixed Bug 746869 - no keymaps if the XKB has no group and no variant
+
* Fri Sep 30 2011 Takao Fujiwara <tfujiwar at redhat.com> - 1.4.0-3
- Rebuilt for f16 gnome-shell 3.2 and gjs 1.30
diff --git a/sources b/sources
index f4e3a6f..4de594d 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
b4f063794e89c71eb1f8cb543210da30 ibus-1.4.0.tar.gz
-d22db933185cca069fb45694320ee522 ibus-gjs-3.0.2.20110928.tar.gz
-74d11c1c56eeb35433c0ee0ca2f10279 ibus-gjs-3.2.0.20110928.tar.gz
+21093439be2c7321cb1a85ca3307a0b5 ibus-gjs-3.0.2.20111018.tar.gz
+d7555d6c3eca572f713ec4135e7a1b87 ibus-gjs-3.2.0.20111018.tar.gz
More information about the scm-commits
mailing list