Fixed Bug 746869 - no keymaps if the XKB has no group and no variant
This commit is contained in:
parent
1bd91f5e51
commit
a4b3ac56f9
2
.gitignore
vendored
2
.gitignore
vendored
@ -21,3 +21,5 @@ ibus-1.3.6.tar.gz
|
|||||||
/ibus-gjs-3.1.91.20110913.tar.gz
|
/ibus-gjs-3.1.91.20110913.tar.gz
|
||||||
/ibus-gjs-3.0.2.20110928.tar.gz
|
/ibus-gjs-3.0.2.20110928.tar.gz
|
||||||
/ibus-gjs-3.2.0.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
|
||||||
|
@ -1 +1,83 @@
|
|||||||
|
From 5d519fb7a798e252dc28665694d53b0773542584 Mon Sep 17 00:00:00 2001
|
||||||
|
From: fujiwarat <takao.fujiwara1@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
|
||||||
|
|
||||||
|
@ -1386,7 +1386,7 @@ index 7cf1995..a19d16e 100644
|
|||||||
+
|
+
|
||||||
#endif
|
#endif
|
||||||
diff --git a/ui/gtk/panel.py b/ui/gtk/panel.py
|
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
|
--- a/ui/gtk/panel.py
|
||||||
+++ b/ui/gtk/panel.py
|
+++ b/ui/gtk/panel.py
|
||||||
@@ -67,6 +67,7 @@ class Panel(ibus.PanelBase):
|
@@ -67,6 +67,7 @@ class Panel(ibus.PanelBase):
|
||||||
@ -1404,7 +1404,7 @@ index 8804634..a2a5733 100644
|
|||||||
+ self.__default_layout = 'default'
|
+ self.__default_layout = 'default'
|
||||||
+ self.__default_model = 'default'
|
+ self.__default_model = 'default'
|
||||||
+ self.__default_option = 'default'
|
+ self.__default_option = 'default'
|
||||||
+ self.__disabled_engines = None
|
+ self.__disabled_engines = []
|
||||||
+ self.__disabled_engines_id = -1
|
+ self.__disabled_engines_id = -1
|
||||||
+ self.__disabled_engines_prev_id = -1
|
+ self.__disabled_engines_prev_id = -1
|
||||||
+ self.__disabled_engines_swapped = 0
|
+ self.__disabled_engines_swapped = 0
|
||||||
@ -1455,8 +1455,7 @@ index 8804634..a2a5733 100644
|
|||||||
+ models = None
|
+ models = None
|
||||||
+ if default_model != None and default_model != '':
|
+ if default_model != None and default_model != '':
|
||||||
+ models = default_model.split(',')
|
+ models = default_model.split(',')
|
||||||
+ if self.__disabled_engines == None or self.__disabled_engines == []:
|
+ if len(self.__disabled_engines) == 0:
|
||||||
+ self.__disabled_engines = []
|
|
||||||
+ for i, layout in enumerate(layouts):
|
+ for i, layout in enumerate(layouts):
|
||||||
+ registry = ibus.XKBConfigRegistry()
|
+ registry = ibus.XKBConfigRegistry()
|
||||||
+ langs = registry.get_layout_lang()[layout]
|
+ langs = registry.get_layout_lang()[layout]
|
||||||
@ -1467,13 +1466,14 @@ index 8804634..a2a5733 100644
|
|||||||
+ if i == 0:
|
+ if i == 0:
|
||||||
+ layout = default_layout
|
+ layout = default_layout
|
||||||
+ model = default_model
|
+ model = default_model
|
||||||
+ elif i < len(models):
|
+ elif models != None and i < len(models):
|
||||||
+ model = models[i]
|
+ model = models[i]
|
||||||
+ if model == '':
|
+ if model == '':
|
||||||
+ model = None
|
+ model = None
|
||||||
+ model_desc = _("Default Layout")
|
+ model_desc = _("Default Layout")
|
||||||
+ if i == 0:
|
+ if i == 0:
|
||||||
+ l = 0
|
+ l = 0
|
||||||
|
+ if models != None:
|
||||||
+ for j in range(0, len(models)):
|
+ for j in range(0, len(models)):
|
||||||
+ l = l + len(models[j])
|
+ l = l + len(models[j])
|
||||||
+ if l != 0:
|
+ if l != 0:
|
||||||
@ -1491,7 +1491,7 @@ index 8804634..a2a5733 100644
|
|||||||
+ self.__disabled_engines_id = self.__xkblayout.get_group()
|
+ self.__disabled_engines_id = self.__xkblayout.get_group()
|
||||||
+ if not use_bridge_hotkey:
|
+ if not use_bridge_hotkey:
|
||||||
+ return
|
+ return
|
||||||
+ if self.__disabled_engines != None and self.__disabled_engines != []:
|
+ if len(self.__disabled_engines) > 0:
|
||||||
+ if self.__focus_ic == None:
|
+ if self.__focus_ic == None:
|
||||||
+ return
|
+ return
|
||||||
+ engine = self.__focus_ic.get_engine()
|
+ engine = self.__focus_ic.get_engine()
|
||||||
@ -1620,7 +1620,7 @@ index 8804634..a2a5733 100644
|
|||||||
+ if engine.name.startswith(ibus.DEFAULT_BRIDGE_ENGINE_NAME):
|
+ if engine.name.startswith(ibus.DEFAULT_BRIDGE_ENGINE_NAME):
|
||||||
+ if not self.__use_bridge_hotkey():
|
+ if not self.__use_bridge_hotkey():
|
||||||
+ continue
|
+ continue
|
||||||
+ if self.__disabled_engines == None:
|
+ if len(self.__disabled_engines) == 0:
|
||||||
+ continue
|
+ continue
|
||||||
+ engine.disabled_engines_id = -1
|
+ engine.disabled_engines_id = -1
|
||||||
+ for j, kb_engine in enumerate(self.__disabled_engines):
|
+ for j, kb_engine in enumerate(self.__disabled_engines):
|
||||||
@ -1749,7 +1749,7 @@ index 8804634..a2a5733 100644
|
|||||||
return engine.layout
|
return engine.layout
|
||||||
+ elif self.__use_bridge_hotkey() and \
|
+ elif self.__use_bridge_hotkey() and \
|
||||||
+ self.__disabled_engines_id >= 0 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):
|
+ self.__disabled_engines_id < len(self.__disabled_engines):
|
||||||
+ if changed_state and self.__disabled_engines_prev_id != -1:
|
+ if changed_state and self.__disabled_engines_prev_id != -1:
|
||||||
+ # stateChanged is always called triple because we change
|
+ # stateChanged is always called triple because we change
|
||||||
|
13
ibus.spec
13
ibus.spec
@ -7,11 +7,11 @@
|
|||||||
|
|
||||||
%if 0%{?fedora} > 15
|
%if 0%{?fedora} > 15
|
||||||
%define have_bridge_hotkey 1
|
%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
|
%define ibus_gjs_build_failure 1
|
||||||
%else
|
%else
|
||||||
%define have_bridge_hotkey 0
|
%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
|
%define ibus_gjs_build_failure 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
Name: ibus
|
Name: ibus
|
||||||
Version: 1.4.0
|
Version: 1.4.0
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Intelligent Input Bus for Linux OS
|
Summary: Intelligent Input Bus for Linux OS
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -34,7 +34,7 @@ Source1: xinput-ibus
|
|||||||
%if %have_gjsfile
|
%if %have_gjsfile
|
||||||
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-gjs-%{ibus_gjs_version}.tar.gz
|
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-gjs-%{ibus_gjs_version}.tar.gz
|
||||||
%endif
|
%endif
|
||||||
# Patch0: ibus-HEAD.patch
|
Patch0: ibus-HEAD.patch
|
||||||
Patch1: ibus-530711-preload-sys.patch
|
Patch1: ibus-530711-preload-sys.patch
|
||||||
Patch2: ibus-541492-xkb.patch
|
Patch2: ibus-541492-xkb.patch
|
||||||
Patch3: ibus-xx-bridge-hotkey.patch
|
Patch3: ibus-xx-bridge-hotkey.patch
|
||||||
@ -187,7 +187,7 @@ cd $d
|
|||||||
cd ..
|
cd ..
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
# %patch0 -p1
|
%patch0 -p1
|
||||||
%patch93 -p1 -b .g-s-preedit
|
%patch93 -p1 -b .g-s-preedit
|
||||||
cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c
|
cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c
|
||||||
%patch1 -p1 -b .preload-sys
|
%patch1 -p1 -b .preload-sys
|
||||||
@ -386,6 +386,9 @@ fi
|
|||||||
%{_datadir}/gtk-doc/html/*
|
%{_datadir}/gtk-doc/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 20 2011 Takao Fujiwara <tfujiwar@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@redhat.com> - 1.4.0-3
|
* Fri Sep 30 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.4.0-3
|
||||||
- Rebuilt for f16 gnome-shell 3.2 and gjs 1.30
|
- Rebuilt for f16 gnome-shell 3.2 and gjs 1.30
|
||||||
|
|
||||||
|
4
sources
4
sources
@ -1,3 +1,3 @@
|
|||||||
b4f063794e89c71eb1f8cb543210da30 ibus-1.4.0.tar.gz
|
b4f063794e89c71eb1f8cb543210da30 ibus-1.4.0.tar.gz
|
||||||
d22db933185cca069fb45694320ee522 ibus-gjs-3.0.2.20110928.tar.gz
|
21093439be2c7321cb1a85ca3307a0b5 ibus-gjs-3.0.2.20111018.tar.gz
|
||||||
74d11c1c56eeb35433c0ee0ca2f10279 ibus-gjs-3.2.0.20110928.tar.gz
|
d7555d6c3eca572f713ec4135e7a1b87 ibus-gjs-3.2.0.20111018.tar.gz
|
||||||
|
Loading…
Reference in New Issue
Block a user