Updated ibus-xx-increase-timeout.patch to fix #1163722
Updated ibus-HEAD.patch for upstream #1747, #1748, #1753 and gnome #703020, gnome #730628
This commit is contained in:
parent
ecdef2cb48
commit
727f9412b9
572
ibus-HEAD.patch
572
ibus-HEAD.patch
@ -98,3 +98,575 @@ index 76cea23..7b99fdf 100644
|
||||
--
|
||||
1.8.5.3
|
||||
|
||||
From e2507263817926ceb97511da3d617934d4b73443 Mon Sep 17 00:00:00 2001
|
||||
From: Osamu Aoki <osamu@debian.org>
|
||||
Date: Thu, 13 Nov 2014 11:23:38 +0900
|
||||
Subject: [PATCH] ibus-setup tries C since en_US.UTF-8 is not installed in
|
||||
Debian by default.
|
||||
|
||||
BUG=https://code.google.com/p/ibus/issues/detail?id=1747
|
||||
TEST=setup
|
||||
|
||||
Review URL: https://codereview.appspot.com/166420043
|
||||
Patch from Osamu Aoki <osamu@debian.org>.
|
||||
---
|
||||
setup/enginecombobox.py | 2 +-
|
||||
setup/enginedialog.py | 13 +++++++++----
|
||||
2 files changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/setup/enginecombobox.py b/setup/enginecombobox.py
|
||||
index 2a2a677..199ed96 100644
|
||||
--- a/setup/enginecombobox.py
|
||||
+++ b/setup/enginecombobox.py
|
||||
@@ -78,7 +78,7 @@ class EngineComboBox(Gtk.ComboBox):
|
||||
keys.sort(key=functools.cmp_to_key(locale.strcoll))
|
||||
loc = locale.getlocale()[0]
|
||||
# None on C locale
|
||||
- if loc == None:
|
||||
+ if loc == None or loc == 'C':
|
||||
loc = 'en_US'
|
||||
current_lang = IBus.get_language_name(loc)
|
||||
# move current language to the first place
|
||||
diff --git a/setup/enginedialog.py b/setup/enginedialog.py
|
||||
index 8a56901..2b179ad 100644
|
||||
--- a/setup/enginedialog.py
|
||||
+++ b/setup/enginedialog.py
|
||||
@@ -325,21 +325,26 @@ class EngineDialog(Gtk.Dialog):
|
||||
|
||||
# Retrieve Untranslated language names.
|
||||
backup_locale = locale.setlocale(locale.LC_ALL, None)
|
||||
- try:
|
||||
- locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
|
||||
+ def __set_untrans_with_locale(en_locale):
|
||||
+ locale.setlocale(locale.LC_ALL, en_locale)
|
||||
untrans = IBus.get_language_name(e.get_language())
|
||||
if untrans == None:
|
||||
untrans = ''
|
||||
self.__untrans_for_lang[l] = untrans
|
||||
+ try:
|
||||
+ __set_untrans_with_locale('en_US.UTF-8')
|
||||
except locale.Error:
|
||||
- pass
|
||||
+ try:
|
||||
+ __set_untrans_with_locale('C')
|
||||
+ except locale.Error:
|
||||
+ pass
|
||||
locale.setlocale(locale.LC_ALL, backup_locale)
|
||||
|
||||
keys = list(self.__engines_for_lang.keys())
|
||||
keys.sort(key=functools.cmp_to_key(locale.strcoll))
|
||||
loc = locale.getlocale()[0]
|
||||
# None on C locale
|
||||
- if loc == None:
|
||||
+ if loc == None or loc == 'C':
|
||||
loc = 'en_US'
|
||||
current_lang = IBus.get_language_name(loc)
|
||||
# move current language to the first place
|
||||
--
|
||||
1.8.5.3
|
||||
|
||||
From de3541d2a26c673f27c068559f6d363064e03760 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Thu, 13 Nov 2014 11:28:43 +0900
|
||||
Subject: [PATCH] Remove "Release" modifiers key on ibus-setup.
|
||||
|
||||
BUG=https://code.google.com/p/ibus/issues/detail?id=1748
|
||||
TEST=setup
|
||||
|
||||
Review URL: https://codereview.appspot.com/167570043
|
||||
---
|
||||
setup/keyboardshortcut.py | 12 ++++--------
|
||||
1 file changed, 4 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/setup/keyboardshortcut.py b/setup/keyboardshortcut.py
|
||||
index 91595f7..86463cb 100644
|
||||
--- a/setup/keyboardshortcut.py
|
||||
+++ b/setup/keyboardshortcut.py
|
||||
@@ -105,20 +105,16 @@ class KeyboardShortcutSelection(Gtk.Box):
|
||||
Gtk.CheckButton.new_with_mnemonic("_Hyper"),
|
||||
Gdk.ModifierType.HYPER_MASK))
|
||||
# <CapsLock> is not parsed by gtk_accelerator_parse()
|
||||
- # FIXME: Need to check if ibus gtk panel can enable <Release>.
|
||||
- self.__modifier_buttons.append(("Release",
|
||||
- Gtk.CheckButton.new_with_mnemonic("_Release"),
|
||||
- Gdk.ModifierType.RELEASE_MASK))
|
||||
+ # <Release> is not supported by XIGrabKeycode()
|
||||
for name, button, mask in self.__modifier_buttons:
|
||||
button.connect("toggled", self.__modifier_button_toggled_cb, name)
|
||||
|
||||
table.attach(self.__modifier_buttons[0][1], 0, 1, 0, 1)
|
||||
table.attach(self.__modifier_buttons[1][1], 1, 2, 0, 1)
|
||||
table.attach(self.__modifier_buttons[2][1], 2, 3, 0, 1)
|
||||
- table.attach(self.__modifier_buttons[3][1], 3, 4, 0, 1)
|
||||
- table.attach(self.__modifier_buttons[4][1], 0, 1, 1, 2)
|
||||
- table.attach(self.__modifier_buttons[5][1], 1, 2, 1, 2)
|
||||
- table.attach(self.__modifier_buttons[6][1], 2, 3, 1, 2)
|
||||
+ table.attach(self.__modifier_buttons[3][1], 0, 1, 1, 2)
|
||||
+ table.attach(self.__modifier_buttons[4][1], 1, 2, 1, 2)
|
||||
+ table.attach(self.__modifier_buttons[5][1], 2, 3, 1, 2)
|
||||
hbox.pack_start(table, True, True, 4)
|
||||
self.pack_start(hbox, False, True, 4)
|
||||
|
||||
--
|
||||
1.8.5.3
|
||||
|
||||
From a7abce698f40e60275c46f05967e8cc369769e4b Mon Sep 17 00:00:00 2001
|
||||
From: Peng Wu <alexepico@gmail.com>
|
||||
Date: Wed, 19 Nov 2014 18:10:05 +0900
|
||||
Subject: [PATCH] Fixes ibus_engine_update_lookup_table_fast method
|
||||
|
||||
gnome shell needs the previous page and next page
|
||||
to correctly show the page up/down arrows,
|
||||
send three pages instead of one page.
|
||||
|
||||
URL: https://bugzilla.gnome.org/show_bug.cgi?id=703020
|
||||
|
||||
BUG=
|
||||
|
||||
Review URL: https://codereview.appspot.com/164540045
|
||||
Patch from Peng Wu <alexepico@gmail.com>.
|
||||
---
|
||||
src/ibusengine.c | 27 ++++++++++++++++++++++-----
|
||||
1 file changed, 22 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/ibusengine.c b/src/ibusengine.c
|
||||
index 53d57df..4758f82 100644
|
||||
--- a/src/ibusengine.c
|
||||
+++ b/src/ibusengine.c
|
||||
@@ -1422,12 +1422,17 @@ ibus_engine_update_lookup_table_fast (IBusEngine *engine,
|
||||
IBusLookupTable *table,
|
||||
gboolean visible)
|
||||
{
|
||||
+ /* Note: gnome shell needs the previous page and next page
|
||||
+ to correctly show the page up/down arrows,
|
||||
+ send three pages instead of one page. */
|
||||
+
|
||||
g_return_if_fail (IBUS_IS_ENGINE (engine));
|
||||
g_return_if_fail (IBUS_IS_LOOKUP_TABLE (table));
|
||||
|
||||
IBusLookupTable *new_table;
|
||||
IBusText *text;
|
||||
gint page_begin;
|
||||
+ gint cursor_pos;
|
||||
gint i;
|
||||
|
||||
if (table->candidates->len < table->page_size << 2) {
|
||||
@@ -1436,19 +1441,31 @@ ibus_engine_update_lookup_table_fast (IBusEngine *engine,
|
||||
}
|
||||
|
||||
page_begin = (table->cursor_pos / table->page_size) * table->page_size;
|
||||
+ cursor_pos = ibus_lookup_table_get_cursor_in_page (table);
|
||||
+
|
||||
+ if (table->cursor_pos >= table->page_size) {
|
||||
+ /* has previous page, adjust the value. */
|
||||
+ page_begin -= table->page_size;
|
||||
+ cursor_pos += table->page_size;
|
||||
+ }
|
||||
|
||||
- new_table = ibus_lookup_table_new (table->page_size, 0, table->cursor_visible, table->round);
|
||||
+ new_table = ibus_lookup_table_new
|
||||
+ (table->page_size, 0, table->cursor_visible, table->round);
|
||||
|
||||
- for (i = page_begin; i < page_begin + table->page_size && i < table->candidates->len; i++) {
|
||||
- ibus_lookup_table_append_candidate (new_table, ibus_lookup_table_get_candidate (table, i));
|
||||
+ /* '3' means the previous page, current page and next page. */
|
||||
+ for (i = page_begin; i < page_begin + 3 * table->page_size &&
|
||||
+ i < table->candidates->len; i++) {
|
||||
+ ibus_lookup_table_append_candidate
|
||||
+ (new_table, ibus_lookup_table_get_candidate (table, i));
|
||||
}
|
||||
|
||||
for (i = 0; (text = ibus_lookup_table_get_label (table, i)) != NULL; i++) {
|
||||
ibus_lookup_table_append_label (new_table, text);
|
||||
}
|
||||
|
||||
- ibus_lookup_table_set_cursor_pos (new_table, ibus_lookup_table_get_cursor_in_page (table));
|
||||
- ibus_lookup_table_set_orientation (new_table, ibus_lookup_table_get_orientation (table));
|
||||
+ ibus_lookup_table_set_cursor_pos (new_table, cursor_pos);
|
||||
+ ibus_lookup_table_set_orientation
|
||||
+ (new_table, ibus_lookup_table_get_orientation (table));
|
||||
|
||||
ibus_engine_update_lookup_table (engine, new_table, visible);
|
||||
|
||||
--
|
||||
1.8.5.3
|
||||
|
||||
From f69ddc3952971c5599c92aee3dc1de6017d07f3c Mon Sep 17 00:00:00 2001
|
||||
From: Peng Wu <alexepico@gmail.com>
|
||||
Date: Fri, 5 Dec 2014 11:41:08 +0900
|
||||
Subject: [PATCH] Fixes ibus_keyval_name method in c++ binding
|
||||
|
||||
Add G_BEGIN_DECLS and G_END_DECLS macros in src/ibuskeys.h
|
||||
|
||||
BUG=
|
||||
|
||||
Review URL: https://codereview.appspot.com/185850043
|
||||
Patch from Peng Wu <alexepico@gmail.com>.
|
||||
---
|
||||
src/ibuskeys.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/ibuskeys.h b/src/ibuskeys.h
|
||||
index 6acb0d6..7969929 100644
|
||||
--- a/src/ibuskeys.h
|
||||
+++ b/src/ibuskeys.h
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
+G_BEGIN_DECLS
|
||||
/**
|
||||
* ibus_keyval_name:
|
||||
* @keyval: Key symbol.
|
||||
@@ -73,4 +74,5 @@ guint ibus_unicode_to_keyval (gunichar wc);
|
||||
**/
|
||||
gunichar ibus_keyval_to_unicode (guint keyval);
|
||||
|
||||
+G_END_DECLS
|
||||
#endif // __IBUS_KEYS_H_
|
||||
--
|
||||
1.8.5.3
|
||||
|
||||
From 097715746da0f56b8b8c3ddae2da3442032bff0c Mon Sep 17 00:00:00 2001
|
||||
From: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Fri, 5 Dec 2014 20:25:44 +0900
|
||||
Subject: [PATCH] Carry current context content type into fake context when
|
||||
switching
|
||||
|
||||
When focus moves out of a context to the fake context we should keep
|
||||
the content type properties as they were in the focused out context.
|
||||
|
||||
This allows panel implementations to show the proper UI while input
|
||||
focus moves away temporarily from a text entry.
|
||||
|
||||
E.g. a password entry is focused and the user clicks on the panel
|
||||
UI. At this point ibus switches the currently focused context to the
|
||||
fake context and emits set-content-type with the fake context
|
||||
properties which are empty and thus the panel reacts to it. This isn't
|
||||
the intended behavior though since, from a user POV, the password
|
||||
entry is still the context that will be getting text input when the
|
||||
panel UI gets dismissed.
|
||||
|
||||
R=shawn.p.huang@gmail.com
|
||||
BUG=https://bugzilla.gnome.org/show_bug.cgi?id=730628
|
||||
|
||||
Review URL: https://codereview.appspot.com/176260043
|
||||
Patch from Rui Matos <tiagomatos@gmail.com>.
|
||||
---
|
||||
bus/ibusimpl.c | 6 ++++
|
||||
bus/inputcontext.c | 91 +++++++++++++++++++++++++++++++++---------------------
|
||||
bus/inputcontext.h | 10 ++++++
|
||||
3 files changed, 72 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
|
||||
index dd254e2..61f6649 100644
|
||||
--- a/bus/ibusimpl.c
|
||||
+++ b/bus/ibusimpl.c
|
||||
@@ -620,6 +620,8 @@ bus_ibus_impl_set_focused_context (BusIBusImpl *ibus,
|
||||
}
|
||||
|
||||
BusEngineProxy *engine = NULL;
|
||||
+ guint purpose = 0;
|
||||
+ guint hints = 0;
|
||||
|
||||
if (ibus->focused_context) {
|
||||
if (ibus->use_global_engine) {
|
||||
@@ -634,12 +636,16 @@ bus_ibus_impl_set_focused_context (BusIBusImpl *ibus,
|
||||
if (ibus->panel != NULL)
|
||||
bus_panel_proxy_focus_out (ibus->panel, ibus->focused_context);
|
||||
|
||||
+ bus_input_context_get_content_type (ibus->focused_context,
|
||||
+ &purpose, &hints);
|
||||
g_object_unref (ibus->focused_context);
|
||||
ibus->focused_context = NULL;
|
||||
}
|
||||
|
||||
if (context == NULL && ibus->use_global_engine) {
|
||||
context = ibus->fake_context;
|
||||
+ if (context)
|
||||
+ bus_input_context_set_content_type (context, purpose, hints);
|
||||
}
|
||||
|
||||
if (context) {
|
||||
diff --git a/bus/inputcontext.c b/bus/inputcontext.c
|
||||
index d9924a1..ea77102 100644
|
||||
--- a/bus/inputcontext.c
|
||||
+++ b/bus/inputcontext.c
|
||||
@@ -1151,6 +1151,47 @@ bus_input_context_service_method_call (IBusService *service,
|
||||
g_return_if_reached ();
|
||||
}
|
||||
|
||||
+static void
|
||||
+_ic_set_content_type (BusInputContext *context,
|
||||
+ GVariant *value)
|
||||
+{
|
||||
+ guint purpose = 0;
|
||||
+ guint hints = 0;
|
||||
+
|
||||
+ g_variant_get (value, "(uu)", &purpose, &hints);
|
||||
+ if (purpose != context->purpose || hints != context->hints) {
|
||||
+ GError *error;
|
||||
+ gboolean retval;
|
||||
+
|
||||
+ context->purpose = purpose;
|
||||
+ context->hints = hints;
|
||||
+
|
||||
+ if (context->has_focus && context->engine)
|
||||
+ bus_engine_proxy_set_content_type (context->engine,
|
||||
+ purpose,
|
||||
+ hints);
|
||||
+
|
||||
+ if (context->has_focus) {
|
||||
+ g_signal_emit (context,
|
||||
+ context_signals[SET_CONTENT_TYPE],
|
||||
+ 0,
|
||||
+ context->purpose,
|
||||
+ context->hints);
|
||||
+ }
|
||||
+
|
||||
+ error = NULL;
|
||||
+ retval = bus_input_context_property_changed (context,
|
||||
+ "ContentType",
|
||||
+ value,
|
||||
+ &error);
|
||||
+ if (!retval) {
|
||||
+ g_warning ("Failed to emit PropertiesChanged signal: %s",
|
||||
+ error->message);
|
||||
+ g_error_free (error);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
bus_input_context_service_set_property (IBusService *service,
|
||||
GDBusConnection *connection,
|
||||
@@ -1175,41 +1216,7 @@ bus_input_context_service_set_property (IBusService *service,
|
||||
|
||||
if (g_strcmp0 (property_name, "ContentType") == 0) {
|
||||
BusInputContext *context = (BusInputContext *) service;
|
||||
- guint purpose = 0;
|
||||
- guint hints = 0;
|
||||
-
|
||||
- g_variant_get (value, "(uu)", &purpose, &hints);
|
||||
- if (purpose != context->purpose || hints != context->hints) {
|
||||
- GError *error;
|
||||
- gboolean retval;
|
||||
-
|
||||
- context->purpose = purpose;
|
||||
- context->hints = hints;
|
||||
-
|
||||
- if (context->has_focus && context->engine)
|
||||
- bus_engine_proxy_set_content_type (context->engine,
|
||||
- purpose,
|
||||
- hints);
|
||||
-
|
||||
- if (context->has_focus) {
|
||||
- g_signal_emit (context,
|
||||
- context_signals[SET_CONTENT_TYPE],
|
||||
- 0,
|
||||
- context->purpose,
|
||||
- context->hints);
|
||||
- }
|
||||
-
|
||||
- error = NULL;
|
||||
- retval = bus_input_context_property_changed (context,
|
||||
- "ContentType",
|
||||
- value,
|
||||
- &error);
|
||||
- if (!retval) {
|
||||
- g_warning ("Failed to emit PropertiesChanged signal: %s",
|
||||
- error->message);
|
||||
- g_error_free (error);
|
||||
- }
|
||||
- }
|
||||
+ _ic_set_content_type (context, value);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2521,3 +2528,17 @@ bus_input_context_get_content_type (BusInputContext *context,
|
||||
*purpose = context->purpose;
|
||||
*hints = context->hints;
|
||||
}
|
||||
+
|
||||
+void
|
||||
+bus_input_context_set_content_type (BusInputContext *context,
|
||||
+ guint purpose,
|
||||
+ guint hints)
|
||||
+{
|
||||
+ GVariant *value;
|
||||
+
|
||||
+ g_assert (BUS_IS_INPUT_CONTEXT (context));
|
||||
+
|
||||
+ value = g_variant_ref_sink (g_variant_new ("(uu)", purpose, hints));
|
||||
+ _ic_set_content_type (context, value);
|
||||
+ g_variant_unref (value);
|
||||
+}
|
||||
diff --git a/bus/inputcontext.h b/bus/inputcontext.h
|
||||
index f282fae..258f501 100644
|
||||
--- a/bus/inputcontext.h
|
||||
+++ b/bus/inputcontext.h
|
||||
@@ -250,5 +250,15 @@ void bus_input_context_get_content_type
|
||||
guint *purpose,
|
||||
guint *hints);
|
||||
|
||||
+/**
|
||||
+ * bus_input_context_set_content_type:
|
||||
+ * @purpose: Input purpose.
|
||||
+ * @hints: Input hints.
|
||||
+ */
|
||||
+void bus_input_context_set_content_type
|
||||
+ (BusInputContext *context,
|
||||
+ guint purpose,
|
||||
+ guint hints);
|
||||
+
|
||||
G_END_DECLS
|
||||
#endif
|
||||
--
|
||||
1.8.5.3
|
||||
|
||||
From 8f471ce138a9dc10ab5b1e0c716bb48ca36fe12a Mon Sep 17 00:00:00 2001
|
||||
From: Doug Rintoul <doug_rintoul@sil.org>
|
||||
Date: Mon, 8 Dec 2014 12:52:00 +0900
|
||||
Subject: [PATCH] Show language rather than layout in xkb panel icon
|
||||
|
||||
BUG=https://code.google.com/p/ibus/issues/detail?id=1753
|
||||
TEST=ui/gtk3/ibus-ui-gtk3
|
||||
|
||||
Review URL: https://codereview.appspot.com/184840043
|
||||
Patch from Doug Rintoul <doug_rintoul@sil.org>.
|
||||
---
|
||||
ui/gtk3/panel.vala | 8 ++++----
|
||||
ui/gtk3/switcher.vala | 42 ++++++++++++++++++------------------------
|
||||
2 files changed, 22 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala
|
||||
index 7b99fdf..4e02140 100644
|
||||
--- a/ui/gtk3/panel.vala
|
||||
+++ b/ui/gtk3/panel.vala
|
||||
@@ -1135,16 +1135,16 @@ class Panel : IBus.PanelService {
|
||||
if (icon_name[0] == '/')
|
||||
m_status_icon.set_from_file(icon_name);
|
||||
else {
|
||||
- string symbol = null;
|
||||
+ string language = null;
|
||||
|
||||
if (engine != null) {
|
||||
var name = engine.get_name();
|
||||
if (name.length >= 4 && name[0:4] == "xkb:")
|
||||
- symbol = m_switcher.get_xkb_symbol(engine);
|
||||
+ language = m_switcher.get_xkb_language(engine);
|
||||
}
|
||||
|
||||
- if (symbol != null) {
|
||||
- Gdk.Pixbuf pixbuf = create_icon_pixbuf_with_string(symbol);
|
||||
+ if (language != null) {
|
||||
+ Gdk.Pixbuf pixbuf = create_icon_pixbuf_with_string(language);
|
||||
m_status_icon.set_from_pixbuf(pixbuf);
|
||||
} else {
|
||||
var theme = Gtk.IconTheme.get_default();
|
||||
diff --git a/ui/gtk3/switcher.vala b/ui/gtk3/switcher.vala
|
||||
index 7601d80..476b159 100644
|
||||
--- a/ui/gtk3/switcher.vala
|
||||
+++ b/ui/gtk3/switcher.vala
|
||||
@@ -21,8 +21,6 @@
|
||||
*/
|
||||
|
||||
class Switcher : Gtk.Window {
|
||||
- private const int DESC_LABEL_MAX_LEN = 20;
|
||||
-
|
||||
private class IBusEngineButton : Gtk.Button {
|
||||
public IBusEngineButton(IBus.EngineDesc engine, Switcher switcher) {
|
||||
GLib.Object();
|
||||
@@ -38,14 +36,14 @@ class Switcher : Gtk.Window {
|
||||
icon.set_valign(Gtk.Align.CENTER);
|
||||
add(icon);
|
||||
} else {
|
||||
- var symbol = switcher.get_xkb_symbol(engine);
|
||||
+ var language = switcher.get_xkb_language(engine);
|
||||
|
||||
- Gtk.Label label = new Gtk.Label(symbol);
|
||||
+ Gtk.Label label = new Gtk.Label(language);
|
||||
label.set_halign(Gtk.Align.CENTER);
|
||||
label.set_valign(Gtk.Align.CENTER);
|
||||
- string symbol_font = "Monospace Bold 16";
|
||||
+ string language_font = "Monospace Bold 16";
|
||||
string markup = "<span font=\"%s\">%s</span>".
|
||||
- printf(symbol_font, symbol);
|
||||
+ printf(language_font, language);
|
||||
|
||||
label.set_markup(markup);
|
||||
|
||||
@@ -89,7 +87,7 @@ class Switcher : Gtk.Window {
|
||||
private uint m_popup_delay_time_id = 0;
|
||||
private int m_root_x;
|
||||
private int m_root_y;
|
||||
- private GLib.HashTable<string, string> m_xkb_symbols =
|
||||
+ private GLib.HashTable<string, string> m_xkb_languages =
|
||||
new GLib.HashTable<string, string>(GLib.str_hash,
|
||||
GLib.str_equal);
|
||||
|
||||
@@ -268,10 +266,6 @@ class Switcher : Gtk.Window {
|
||||
return true;
|
||||
});
|
||||
|
||||
- if (longname.length > DESC_LABEL_MAX_LEN) {
|
||||
- longname = longname[0:DESC_LABEL_MAX_LEN];
|
||||
- }
|
||||
-
|
||||
button.longname = longname;
|
||||
m_label.set_label(longname);
|
||||
|
||||
@@ -429,37 +423,37 @@ class Switcher : Gtk.Window {
|
||||
m_popup_delay_time = popup_delay_time;
|
||||
}
|
||||
|
||||
- public string get_xkb_symbol(IBus.EngineDesc engine) {
|
||||
+ public string get_xkb_language(IBus.EngineDesc engine) {
|
||||
var name = engine.get_name();
|
||||
|
||||
assert(name[0:4] == "xkb:");
|
||||
|
||||
- var symbol = m_xkb_symbols[name];
|
||||
+ var language = m_xkb_languages[name];
|
||||
|
||||
- if (symbol != null)
|
||||
- return symbol;
|
||||
+ if (language != null)
|
||||
+ return language;
|
||||
|
||||
- var layout = engine.get_layout();
|
||||
+ language = engine.get_language();
|
||||
|
||||
/* Maybe invalid layout */
|
||||
- if (layout.length < 2)
|
||||
- return layout;
|
||||
+ if (language.length < 2)
|
||||
+ return language;
|
||||
|
||||
- symbol = layout[0:2].up();
|
||||
+ language = language[0:2].up();
|
||||
|
||||
int index = 0;
|
||||
|
||||
- foreach (var saved_symbol in m_xkb_symbols.get_values()) {
|
||||
- if (symbol == saved_symbol[0:2])
|
||||
+ foreach (var saved_language in m_xkb_languages.get_values()) {
|
||||
+ if (language == saved_language[0:2])
|
||||
index++;
|
||||
}
|
||||
|
||||
if (index > 0) {
|
||||
unichar u = 0x2081 + index;
|
||||
- symbol = "%s%s".printf(symbol, u.to_string());
|
||||
+ language = "%s%s".printf(language, u.to_string());
|
||||
}
|
||||
|
||||
- m_xkb_symbols.insert(name, symbol);
|
||||
- return symbol;
|
||||
+ m_xkb_languages.insert(name, language);
|
||||
+ return language;
|
||||
}
|
||||
}
|
||||
--
|
||||
1.8.5.3
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- ibus-1.5.8/bus/global.c.orig 2014-10-24 11:39:02.992359855 +0900
|
||||
+++ ibus-1.5.8/bus/global.c 2014-10-24 11:40:33.917051813 +0900
|
||||
+++ ibus-1.5.8/bus/global.c 2014-12-01 19:11:11.311759112 +0900
|
||||
@@ -28,4 +28,4 @@ gchar *g_address = "unix:tmpdir=/tmp";
|
||||
gchar *g_cache = "auto";
|
||||
gboolean g_mempro = FALSE;
|
||||
gboolean g_verbose = FALSE;
|
||||
-gint g_gdbus_timeout = 5000;
|
||||
+gint g_gdbus_timeout = 20000;
|
||||
+gint g_gdbus_timeout = 15000;
|
||||
--- ibus-1.5.8/bus/ibusimpl.c.orig 2014-10-14 12:15:30.547369108 +0900
|
||||
+++ ibus-1.5.8/bus/ibusimpl.c 2014-10-14 12:16:23.182396247 +0900
|
||||
@@ -1390,11 +1390,12 @@ _ibus_set_global_engine_ready_cb (BusInp
|
||||
@ -24,65 +24,61 @@
|
||||
else {
|
||||
g_dbus_method_invocation_return_value (data->invocation, NULL);
|
||||
--- ibus-1.5.8/bus/main.c.orig 2014-10-24 11:41:32.579140912 +0900
|
||||
+++ ibus-1.5.8/bus/main.c 2014-10-24 11:41:43.520343867 +0900
|
||||
+++ ibus-1.5.8/bus/main.c 2014-12-01 19:12:17.235109849 +0900
|
||||
@@ -64,7 +64,7 @@ static const GOptionEntry entries[] =
|
||||
{ "address", 'a', 0, G_OPTION_ARG_STRING, &g_address, "specify the address of ibus daemon.", "address" },
|
||||
{ "replace", 'r', 0, G_OPTION_ARG_NONE, &replace, "if there is an old ibus-daemon is running, it will be replaced.", NULL },
|
||||
{ "cache", 't', 0, G_OPTION_ARG_STRING, &g_cache, "specify the cache mode. [auto/refresh/none]", NULL },
|
||||
- { "timeout", 'o', 0, G_OPTION_ARG_INT, &g_gdbus_timeout, "gdbus reply timeout in milliseconds. pass -1 to use the default timeout of gdbus.", "timeout [default is 5000]" },
|
||||
+ { "timeout", 'o', 0, G_OPTION_ARG_INT, &g_gdbus_timeout, "gdbus reply timeout in milliseconds. pass -1 to use the default timeout of gdbus.", "timeout [default is 20000]" },
|
||||
+ { "timeout", 'o', 0, G_OPTION_ARG_INT, &g_gdbus_timeout, "gdbus reply timeout in milliseconds. pass -1 to use the default timeout of gdbus.", "timeout [default is 15000]" },
|
||||
{ "mem-profile", 'm', 0, G_OPTION_ARG_NONE, &g_mempro, "enable memory profile, send SIGUSR2 to print out the memory profile.", NULL },
|
||||
{ "restart", 'R', 0, G_OPTION_ARG_NONE, &restart, "restart panel and config processes when they die.", NULL },
|
||||
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &g_verbose, "verbose.", NULL },
|
||||
--- ibus-1.5.8/src/ibusshare.c.orig 2014-10-22 11:49:55.386913376 +0900
|
||||
+++ ibus-1.5.8/src/ibusshare.c 2014-10-24 11:44:15.719249951 +0900
|
||||
+++ ibus-1.5.8/src/ibusshare.c 2014-12-01 19:13:01.135009323 +0900
|
||||
@@ -158,8 +158,9 @@ ibus_get_socket_path (void)
|
||||
gint
|
||||
ibus_get_timeout (void)
|
||||
{
|
||||
- /* 6000 ms is the default timeout on the ibus-daemon side (5 sec) plus 1. */
|
||||
- static const gint default_timeout = 6000;
|
||||
+ /* 21000 ms is the default timeout on the ibus-daemon side
|
||||
+ * (20 sec) plus 1. */
|
||||
+ static const gint default_timeout = 21000;
|
||||
+ /* 16000 ms is the default timeout on the ibus-daemon side
|
||||
+ * (15 sec) plus 1. */
|
||||
+ static const gint default_timeout = 16000;
|
||||
|
||||
static gint64 timeout = -2;
|
||||
if (timeout == -2) {
|
||||
--- ibus-1.5.8/ui/gtk3/panel.vala.orig 2014-10-22 12:00:37.017604825 +0900
|
||||
+++ ibus-1.5.8/ui/gtk3/panel.vala 2014-10-22 15:00:47.742187430 +0900
|
||||
@@ -687,14 +687,28 @@ class Panel : IBus.PanelService {
|
||||
+++ ibus-1.5.8/ui/gtk3/panel.vala 2014-11-28 18:49:49.878234966 +0900
|
||||
@@ -65,6 +65,8 @@ class Panel : IBus.PanelService {
|
||||
red = 0.0, green = 0.0, blue = 0.0, alpha = 1.0 };
|
||||
private XKBLayout m_xkblayout = new XKBLayout();
|
||||
private bool inited_engines_order = true;
|
||||
+ private uint m_preload_engines_id;
|
||||
+ private const uint PRELOAD_ENGINES_DELAY_TIME = 30000;
|
||||
|
||||
private GLib.List<Keybinding> m_keybindings = new GLib.List<Keybinding>();
|
||||
|
||||
@@ -764,8 +766,21 @@ class Panel : IBus.PanelService {
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (m_preload_engines_id != 0) {
|
||||
+ GLib.Source.remove(m_preload_engines_id);
|
||||
+ m_preload_engines_id = 0;
|
||||
+ }
|
||||
+
|
||||
names += engines[index].get_name();
|
||||
- m_bus.preload_engines_async.begin(names, -1, null);
|
||||
+ m_preload_engines_id =
|
||||
+ Timeout.add(
|
||||
+ PRELOAD_ENGINES_DELAY_TIME,
|
||||
+ () => {
|
||||
+ m_bus.preload_engines_async.begin(names,
|
||||
+ -1,
|
||||
+ null);
|
||||
+ return false;
|
||||
+ });
|
||||
}
|
||||
|
||||
private void set_engine(IBus.EngineDesc engine) {
|
||||
- if (!m_bus.set_global_engine(engine.get_name())) {
|
||||
- warning("Switch engine to %s failed.", engine.get_name());
|
||||
- return;
|
||||
- }
|
||||
+ /* Use async because IBus.Bus.set_global_engine() uses
|
||||
+ * IBus.get_timeout() internally and the value does not follow
|
||||
+ * ibus-daemon --timeout.
|
||||
+ */
|
||||
+ m_bus.set_global_engine_async.begin(engine.get_name(), -1, null,
|
||||
+ (obj, res) => {
|
||||
+ try {
|
||||
+ bool result =
|
||||
+ m_bus.set_global_engine_async_finish(res);
|
||||
+ if (!result)
|
||||
+ warning("Switch engine to %s failed.",
|
||||
+ engine.get_name());
|
||||
+ } catch (GLib.Error e) {
|
||||
+ warning("Switch engine to %s failed.: GLib.Error: %s",
|
||||
+ engine.get_name(),
|
||||
+ e.message);
|
||||
+ }
|
||||
|
||||
- // set xkb layout
|
||||
- if (!m_use_system_keyboard_layout)
|
||||
- m_xkblayout.set_layout(engine);
|
||||
+ // set xkb layout
|
||||
+ if (!m_use_system_keyboard_layout)
|
||||
+ m_xkblayout.set_layout(engine);
|
||||
+ });
|
||||
|
||||
engine_contexts_insert(engine);
|
||||
}
|
||||
private void update_engines(string[]? unowned_engine_names,
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
Name: ibus
|
||||
Version: 1.5.9
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: Intelligent Input Bus for Linux OS
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
@ -411,6 +411,11 @@ fi
|
||||
%{_datadir}/gtk-doc/html/*
|
||||
|
||||
%changelog
|
||||
* Mon Dec 08 2014 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.9-6
|
||||
- Updated ibus-xx-increase-timeout.patch to fix #1163722
|
||||
- Updated ibus-HEAD.patch for upstream #1747, #1748, #1753
|
||||
and gnome #703020, gnome #730628
|
||||
|
||||
* Wed Nov 12 2014 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.9-5
|
||||
- rhbz#1161871 Added BR of python and python3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user