Updated to 1.3.99.20110228

- Fixed Bug 673047 - abrt ibus_xkb_get_current_layout for non-XKB system
  Updated ibus-541492-xkb.patch
This commit is contained in:
Takao Fujiwara 2011-03-10 18:07:52 +09:00
parent e582076b9a
commit 9d6bb4f328
10 changed files with 1095 additions and 474 deletions

2
.gitignore vendored
View File

@ -9,3 +9,5 @@ ibus-1.3.6.tar.gz
/ibus-1.3.99.20110127.tar.gz
/ibus-1.3.99.20110206.tar.gz
/ibus-ui-gjs-plugins-20110214.tar.bz2
/ibus-1.3.99.20110228.tar.gz
/gnome-shell-ibus-plugins-20110304.tar.bz2

View File

@ -1,6 +1,6 @@
From 8265052e2616f25af6e6a84cda8fb6d5c4d5f4ed Mon Sep 17 00:00:00 2001
From 4e217b71d30c4f645014e67dd083364a58bd15db Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Fri, 4 Feb 2011 19:48:19 +0900
Date: Thu, 10 Mar 2011 15:31:55 +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,19 +18,19 @@ IBUS_PRELOAD_ENGINE_MODE_USER and users can customize the value
Loading system default may spend the startup time. If you mind it,
your dist may like to put TRUE in 'use_local_preload_engines' value.
---
bus/ibusimpl.c | 241 ++++++++++++++++++++++++++++++++++----------------
bus/ibusimpl.c | 279 ++++++++++++++++++++++++++++++++++---------------
data/ibus.schemas.in | 13 +++
ibus/common.py | 6 ++
setup/main.py | 37 +++++++-
setup/setup.ui | 21 ++++-
ibus/common.py | 6 +
setup/main.py | 37 ++++++-
setup/setup.ui | 21 +++-
src/ibustypes.h | 10 ++
6 files changed, 242 insertions(+), 86 deletions(-)
6 files changed, 272 insertions(+), 94 deletions(-)
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
index cbcf7f4..1bb159e 100644
index 8d4ec36..f86b149 100644
--- a/bus/ibusimpl.c
+++ b/bus/ibusimpl.c
@@ -144,6 +144,9 @@ static void bus_ibus_impl_set_previous_engine
@@ -144,6 +144,9 @@ static void bus_ibus_impl_set_previo
static void bus_ibus_impl_set_preload_engines
(BusIBusImpl *ibus,
GVariant *value);
@ -40,10 +40,11 @@ index cbcf7f4..1bb159e 100644
static void bus_ibus_impl_set_use_sys_layout
(BusIBusImpl *ibus,
GVariant *value);
@@ -270,6 +273,126 @@ _panel_destroy_cb (BusPanelProxy *panel,
@@ -271,6 +274,141 @@ _panel_destroy_cb (BusPanelProxy *panel,
g_object_unref (panel);
}
+#ifndef OS_CHROMEOS
+static gint
+_engine_desc_cmp (IBusEngineDesc *desc1,
+ IBusEngineDesc *desc2)
@ -51,7 +52,9 @@ index cbcf7f4..1bb159e 100644
+ return - ((gint) ibus_engine_desc_get_rank (desc1)) +
+ ((gint) ibus_engine_desc_get_rank (desc2));
+}
+#endif
+
+#ifndef OS_CHROMEOS
+static gint
+_get_config_preload_engine_mode (BusIBusImpl *ibus)
+{
@ -75,6 +78,7 @@ index cbcf7f4..1bb159e 100644
+
+ return preload_engine_mode;
+}
+#endif
+
+static void
+_set_preload_engines (BusIBusImpl *ibus,
@ -104,7 +108,13 @@ index cbcf7f4..1bb159e 100644
+ "preload_engines") == NULL) {
+ ibus_config_set_value (ibus->config, "general",
+ "preload_engines", value);
+ } else {
+ /* We don't update preload_engines with an empty string for safety.
+ * Just unref the floating value. */
+ g_variant_unref (value);
+ }
+ } else if (value != NULL) {
+ g_variant_unref (value);
+ }
+
+ g_list_foreach (engine_list, (GFunc) g_object_ref, NULL);
@ -120,6 +130,7 @@ index cbcf7f4..1bb159e 100644
+ bus_ibus_impl_update_engines_hotkey_profile (ibus);
+}
+
+#ifndef OS_CHROMEOS
+static void
+_set_language_relative_preload_engines (BusIBusImpl *ibus)
+{
@ -131,10 +142,13 @@ index cbcf7f4..1bb159e 100644
+
+ g_assert (BUS_IS_IBUS_IMPL (ibus));
+
+ /* The setlocale call first checks LC_ALL. If it's not available, checks
+ * LC_CTYPE. If it's also not available, checks LANG. */
+ lang = g_strdup (setlocale (LC_CTYPE, NULL));
+ if (lang == NULL) {
+ return;
+ }
+
+ p = index (lang, '.');
+ if (p) {
+ *p = '\0';
@ -163,20 +177,22 @@ index cbcf7f4..1bb159e 100644
+ _set_preload_engines (ibus, g_variant_builder_end (&builder));
+ g_list_free (engines);
+}
+#endif
+
static void
bus_ibus_impl_set_hotkey (BusIBusImpl *ibus,
GQuark hotkey,
@@ -354,34 +477,32 @@ static void
@@ -381,34 +519,43 @@ static void
bus_ibus_impl_set_preload_engines (BusIBusImpl *ibus,
GVariant *value)
{
- GList *engine_list = NULL;
+ gint preload_engine_mode = _get_config_preload_engine_mode (ibus);
-
- g_list_foreach (ibus->engine_list, (GFunc) g_object_unref, NULL);
- g_list_free (ibus->engine_list);
-
+#ifndef OS_CHROMEOS
+ gint preload_engine_mode = _get_config_preload_engine_mode (ibus);
- if (value != NULL && g_variant_classify (value) == G_VARIANT_CLASS_ARRAY) {
- GVariantIter iter;
- g_variant_iter_init (&iter, value);
@ -193,14 +209,23 @@ index cbcf7f4..1bb159e 100644
+ _set_preload_engines (ibus, value);
}
}
+#else
+ _set_preload_engines (ibus, value);
+#endif
+}
- g_list_foreach (engine_list, (GFunc) g_object_ref, NULL);
- ibus->engine_list = engine_list;
+/**
+ * bus_ibus_impl_set_preload_engine_mode:
+ *
+ * A function to be called when "preload_engines_mode" config is updated.
+ */
+static void
+bus_ibus_impl_set_preload_engine_mode (BusIBusImpl *ibus,
+ GVariant *value)
+{
+#ifndef OS_CHROMEOS
+ gint preload_engine_mode = IBUS_PRELOAD_ENGINE_MODE_LANG_RELATIVE;
- if (ibus->engine_list) {
@ -218,10 +243,11 @@ index cbcf7f4..1bb159e 100644
+ }
+
+ _set_language_relative_preload_engines (ibus);
+#endif
}
/**
@@ -459,82 +580,48 @@ bus_ibus_impl_set_use_global_engine (BusIBusImpl *ibus,
@@ -489,89 +636,48 @@ bus_ibus_impl_set_use_global_engine (Bus
}
}
@ -238,7 +264,7 @@ index cbcf7f4..1bb159e 100644
/**
* bus_ibus_impl_set_default_preload_engines:
*
- * If the "preload_engines" config variable is not set yet, set the default value which is determined based on a current locale (LC_ALL).
- * If the "preload_engines" config variable is not set yet, set the default value which is determined based on a current locale.
+ * bus_ibus_impl_set_default_preload_engines handles the gconf value
+ * /desktop/ibus/general/preload_engines and preload_engine_mode.
+ * The idea is, if users don't customize the preload_engines with ibus-setup,
@ -282,7 +308,14 @@ index cbcf7f4..1bb159e 100644
}
done = TRUE;
- gchar *lang = g_strdup (setlocale (LC_ALL, NULL));
-
- /* The setlocale call first checks LC_ALL. If it's not available, checks
- * LC_CTYPE. If it's also not available, checks LANG. */
- gchar *lang = g_strdup (setlocale (LC_CTYPE, NULL));
- if (lang == NULL) {
- return;
- }
-
- gchar *p = index (lang, '.');
- if (p) {
- *p = '\0';
@ -327,16 +360,16 @@ index cbcf7f4..1bb159e 100644
#endif
}
@@ -548,6 +635,7 @@ const static struct {
{ "general/hotkey", "next_engine_in_menu", bus_ibus_impl_set_next_engine_in_menu },
{ "general/hotkey", "previous_engine", bus_ibus_impl_set_previous_engine },
{ "general", "preload_engines", bus_ibus_impl_set_preload_engines },
+ { "general", "preload_engine_mode", bus_ibus_impl_set_preload_engine_mode },
{ "general", "use_system_keyboard_layout", bus_ibus_impl_set_use_sys_layout },
{ "general", "use_global_engine", bus_ibus_impl_set_use_global_engine },
{ "general", "embed_preedit_text", bus_ibus_impl_set_embed_preedit_text },
@@ -587,6 +693,7 @@ const static struct {
{ "general/hotkey", "next_engine_in_menu", bus_ibus_impl_set_next_engine_in_menu },
{ "general/hotkey", "previous_engine", bus_ibus_impl_set_previous_engine },
{ "general", "preload_engines", bus_ibus_impl_set_preload_engines },
+ { "general", "preload_engines_mode", bus_ibus_impl_set_preload_engine_mode },
{ "general", "use_system_keyboard_layout", bus_ibus_impl_set_use_sys_layout },
{ "general", "use_global_engine", bus_ibus_impl_set_use_global_engine },
{ "general", "embed_preedit_text", bus_ibus_impl_set_embed_preedit_text },
diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in
index 54709ce..2ed0321 100644
index 7ca4899..39922a0 100644
--- a/data/ibus.schemas.in
+++ b/data/ibus.schemas.in
@@ -13,6 +13,19 @@
@ -360,7 +393,7 @@ index 54709ce..2ed0321 100644
<applyto>/desktop/ibus/general/hotkey/trigger</applyto>
<owner>ibus</owner>
diff --git a/ibus/common.py b/ibus/common.py
index 763ed1c..1264787 100644
index e105f18..20c0710 100644
--- a/ibus/common.py
+++ b/ibus/common.py
@@ -33,6 +33,8 @@ __all__ = (
@ -372,7 +405,7 @@ index 763ed1c..1264787 100644
"default_reply_handler",
"default_error_handler",
"DEFAULT_ASYNC_HANDLERS",
@@ -133,6 +135,10 @@ ORIENTATION_HORIZONTAL = 0
@@ -132,6 +134,10 @@ ORIENTATION_HORIZONTAL = 0
ORIENTATION_VERTICAL = 1
ORIENTATION_SYSTEM = 2
@ -384,10 +417,10 @@ index 763ed1c..1264787 100644
pass
diff --git a/setup/main.py b/setup/main.py
index 8bac900..c855b86 100644
index 7f4a040..9cdce02 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -191,15 +191,22 @@ class Setup(object):
@@ -213,15 +213,22 @@ class Setup(object):
self.__checkbutton_use_global_engine.connect("toggled", self.__checkbutton_use_global_engine_toggled_cb)
# init engine page
@ -415,7 +448,7 @@ index 8bac900..c855b86 100644
self.__treeview = self.__builder.get_object("treeview_engines")
self.__treeview.set_engines(engines)
@@ -243,6 +250,13 @@ class Setup(object):
@@ -265,6 +272,13 @@ class Setup(object):
engine_names = map(lambda e: e.name, engines)
self.__config.set_list("general", "preload_engines", engine_names, "s")
@ -429,7 +462,7 @@ index 8bac900..c855b86 100644
def __button_engine_add_cb(self, button):
engine = self.__combobox.get_active_engine()
self.__treeview.append_engine(engine)
@@ -254,6 +268,19 @@ class Setup(object):
@@ -276,6 +290,19 @@ class Setup(object):
about.run()
about.destroy()
@ -450,10 +483,10 @@ index 8bac900..c855b86 100644
try:
self.__bus = ibus.Bus()
diff --git a/setup/setup.ui b/setup/setup.ui
index de58446..71f723d 100644
index cddae98..edfb3a8 100644
--- a/setup/setup.ui
+++ b/setup/setup.ui
@@ -486,7 +486,22 @@
@@ -582,7 +582,22 @@
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
@ -477,7 +510,7 @@ index de58446..71f723d 100644
<property name="visible">True</property>
<child>
<object class="GtkAlignment" id="alignment6">
@@ -637,7 +652,7 @@
@@ -733,7 +748,7 @@
</child>
</object>
<packing>
@ -486,7 +519,7 @@ index de58446..71f723d 100644
</packing>
</child>
<child>
@@ -676,7 +691,7 @@ You may use up/down buttons to change it.&lt;/i&gt;&lt;/small&gt;</property>
@@ -772,7 +787,7 @@ You may use up/down buttons to change it.&lt;/i&gt;&lt;/small&gt;</property>
</object>
<packing>
<property name="expand">False</property>
@ -517,5 +550,5 @@ index 035d124..0a9d7b2 100644
* @x: x coordinate.
* @y: y coordinate.
--
1.7.3.2
1.7.4.1

View File

@ -1,6 +1,6 @@
From 245b932b2a72bd23ab8f40ec624184da7ad53b8d Mon Sep 17 00:00:00 2001
From ab4b0cc4dca45cc950a72ec65664649b415d40f0 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Fri, 4 Feb 2011 19:48:10 +0900
Date: Thu, 10 Mar 2011 14:26:49 +0900
Subject: [PATCH] Add XKB layouts
---
@ -27,11 +27,11 @@ Subject: [PATCH] Add XKB layouts
xkb/ibus-xkb-main.c | 105 +++++++
xkb/xkblayout.xml.in | 16 +
xkb/xkblayoutconfig.xml.in | 6 +
xkb/xkblib.c | 297 +++++++++++++++++++
xkb/xkblib.c | 303 +++++++++++++++++++
xkb/xkblib.h | 40 +++
xkb/xkbxml.c | 696 ++++++++++++++++++++++++++++++++++++++++++++
xkb/xkbxml.h | 189 ++++++++++++
27 files changed, 3793 insertions(+), 6 deletions(-)
27 files changed, 3799 insertions(+), 6 deletions(-)
create mode 100644 ibus/xkblayout.py.in
create mode 100644 ibus/xkbxml.py.in
create mode 100644 setup/xkbsetup.py
@ -72,7 +72,7 @@ index 02b7163..6cbe82a 100644
$(NULL)
diff --git a/configure.ac b/configure.ac
index 0c06fbc..8667510 100644
index def1986..1347991 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,6 +185,57 @@ else
@ -133,7 +133,7 @@ index 0c06fbc..8667510 100644
# GObject introspection
GOBJECT_INTROSPECTION_CHECK([0.6.8])
@@ -427,6 +478,7 @@ gconf/Makefile
@@ -413,6 +464,7 @@ gconf/Makefile
gconf/gconf.xml.in
bindings/Makefile
bindings/vala/Makefile
@ -141,7 +141,7 @@ index 0c06fbc..8667510 100644
])
AC_OUTPUT
@@ -442,6 +494,7 @@ Build options:
@@ -428,6 +480,7 @@ Build options:
Build gtk2 immodule $enable_gtk2
Build gtk3 immodule $enable_gtk3
Build XIM agent server $enable_xim
@ -150,10 +150,10 @@ index 0c06fbc..8667510 100644
Build gconf modules $enable_gconf
Build memconf modules $enable_memconf
diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in
index aa66aa5..54709ce 100644
index b75295e..7ca4899 100644
--- a/data/ibus.schemas.in
+++ b/data/ibus.schemas.in
@@ -167,6 +167,42 @@
@@ -190,6 +190,42 @@
</locale>
</schema>
<schema>
@ -251,10 +251,10 @@ index 7c8f8be..3c25605 100644
+from xkbxml import *
from _config import *
diff --git a/ibus/bus.py b/ibus/bus.py
index 15a8fd3..74b6820 100644
index b915190..c01468c 100644
--- a/ibus/bus.py
+++ b/ibus/bus.py
@@ -154,6 +154,9 @@ class Bus(object.Object):
@@ -157,6 +157,9 @@ class Bus(object.Object):
data = serializable.deserialize_object(data)
return data
@ -265,10 +265,10 @@ index 15a8fd3..74b6820 100644
return self.__ibus.Introspect()
diff --git a/ibus/interface/iibus.py b/ibus/interface/iibus.py
index e63caa3..8b7b6f7 100644
index 678d517..7de56fc 100644
--- a/ibus/interface/iibus.py
+++ b/ibus/interface/iibus.py
@@ -72,6 +72,9 @@ class IIBus(dbus.service.Object):
@@ -75,6 +75,9 @@ class IIBus(dbus.service.Object):
@method(in_signature="v", out_signature="v")
def Ping(self, data, dbusconn): pass
@ -971,7 +971,7 @@ index 2fd8876..7383177 100644
+ self.__title = title
diff --git a/setup/main.py b/setup/main.py
index 96e9456..8bac900 100644
index a22bb0c..7f4a040 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -37,6 +37,7 @@ from gtk import gdk
@ -982,7 +982,7 @@ index 96e9456..8bac900 100644
from i18n import DOMAINNAME, _, N_, init as i18n_init
(
@@ -219,6 +220,8 @@ class Setup(object):
@@ -241,6 +242,8 @@ class Setup(object):
self.__combobox.connect("notify::active-engine", self.__combobox_notify_active_engine_cb)
self.__treeview.connect("notify", self.__treeview_notify_cb)
@ -992,10 +992,10 @@ index 96e9456..8bac900 100644
engine = self.__combobox.get_active_engine()
button = self.__builder.get_object("button_engine_add")
diff --git a/setup/setup.ui b/setup/setup.ui
index 0e31a78..de58446 100644
index 0a69df8..cddae98 100644
--- a/setup/setup.ui
+++ b/setup/setup.ui
@@ -129,7 +129,6 @@
@@ -117,7 +117,6 @@
<child>
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
@ -1003,7 +1003,7 @@ index 0e31a78..de58446 100644
<property name="tooltip_text" translatable="yes">The shortcut keys for switching to previous input method in the list</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Previous input method:</property>
@@ -216,7 +215,6 @@
@@ -204,7 +203,6 @@
<child>
<object class="GtkEntry" id="entry_prev_engine">
<property name="visible">True</property>
@ -1011,7 +1011,7 @@ index 0e31a78..de58446 100644
<property name="can_focus">True</property>
<property name="editable">False</property>
</object>
@@ -228,7 +226,6 @@
@@ -216,7 +214,6 @@
<object class="GtkButton" id="button_prev_engine">
<property name="label" translatable="yes">...</property>
<property name="visible">True</property>
@ -1019,7 +1019,7 @@ index 0e31a78..de58446 100644
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
@@ -729,6 +726,7 @@ You may use up/down buttons to change it.&lt;/i&gt;&lt;/small&gt;</property>
@@ -825,6 +822,7 @@ You may use up/down buttons to change it.&lt;/i&gt;&lt;/small&gt;</property>
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
@ -1027,7 +1027,7 @@ index 0e31a78..de58446 100644
<child>
<object class="GtkCheckButton" id="checkbutton_use_sys_layout">
<property name="label" translatable="yes">Use system keyboard layout</property>
@@ -797,6 +795,57 @@ You may use up/down buttons to change it.&lt;/i&gt;&lt;/small&gt;</property>
@@ -840,6 +838,57 @@ You may use up/down buttons to change it.&lt;/i&gt;&lt;/small&gt;</property>
<property name="position">0</property>
</packing>
</child>
@ -1036,7 +1036,7 @@ index 0e31a78..de58446 100644
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label18">
+ <object class="GtkLabel" id="label20">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">System Keyboard Layout:</property>
+ <property name="use_markup">True</property>
@ -1085,7 +1085,7 @@ index 0e31a78..de58446 100644
</object>
</child>
</object>
@@ -942,4 +991,558 @@ Homepage: http://code.google.com/p/ibus
@@ -1038,4 +1087,558 @@ Homepage: http://code.google.com/p/ibus
</object>
</child>
</object>
@ -2984,10 +2984,10 @@ index 0000000..b1212d1
+</xkblayout>
diff --git a/xkb/xkblib.c b/xkb/xkblib.c
new file mode 100644
index 0000000..1f6f8d7
index 0000000..640f783
--- /dev/null
+++ b/xkb/xkblib.c
@@ -0,0 +1,297 @@
@@ -0,0 +1,303 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/* vim:set et sts=4: */
+/* bus - The Input Bus
@ -3053,12 +3053,6 @@ index 0000000..1f6f8d7
+ unsigned long l, nitems, bytes_after;
+ unsigned char *prop = NULL;
+
+ if (XkbGetState (xdisplay, XkbUseCoreKbd, &state) != Success) {
+ g_warning ("Could not get state");
+ return;
+ }
+ default_layout_group = state.group;
+
+ xkb_rules_name = XInternAtom (xdisplay, "_XKB_RULES_NAMES", TRUE);
+ if (xkb_rules_name == None) {
+ g_warning ("Could not get XKB rules atom");
@ -3088,6 +3082,12 @@ index 0000000..1f6f8d7
+ default_models = g_strsplit ((gchar *) prop, ",", -1);
+ prop += strlen ((const char *) prop) + 1;
+ default_options = g_strsplit ((gchar *) prop, ",", -1);
+
+ if (XkbGetState (xdisplay, XkbUseCoreKbd, &state) != Success) {
+ g_warning ("Could not get state");
+ return;
+ }
+ default_layout_group = state.group;
+}
+
+static Bool
@ -3232,7 +3232,10 @@ index 0000000..1f6f8d7
+gchar *
+ibus_xkb_get_current_layout (void)
+{
+ g_assert (default_layouts != NULL);
+ if (default_layouts == NULL) {
+ g_warning ("Your system seems not to support XKB.");
+ return NULL;
+ }
+
+ return g_strjoinv (",", (gchar **) default_layouts);
+}
@ -3266,7 +3269,10 @@ index 0000000..1f6f8d7
+ gboolean retval;
+ gchar *layouts_line;
+
+ g_assert (default_layouts != NULL);
+ if (default_layouts == NULL) {
+ g_warning ("Your system seems not to support XKB.");
+ return NULL;
+ }
+
+ if (layouts == NULL || g_strcmp0 (layouts, "default") == 0) {
+ layouts_line = g_strjoinv (",", (gchar **) default_layouts);
@ -4229,5 +4235,5 @@ index 0000000..f4858fa
+G_END_DECLS
+#endif
--
1.7.3.2
1.7.4.1

View File

@ -1,38 +0,0 @@
From 50fa73713cae31a09d65f5ff4097458e76df3231 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Wed, 9 Feb 2011 11:05:09 +0900
Subject: [PATCH] Implement GJS UI for GNOME-Shell.
---
configure.ac | 2 +
ui/Makefile.am | 1 +
2 files changed, 4536 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index f1575e7..50aaaf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -392,6 +392,8 @@ ibus/_config.py
ibus/Makefile
ibus/interface/Makefile
ui/Makefile
+ui/gjs/Makefile
+ui/gjs/_ibus/Makefile
ui/gtk/Makefile
ui/gtk/ibus-ui-gtk
ui/gtk/gtkpanel.xml.in
diff --git a/ui/Makefile.am b/ui/Makefile.am
index a0e287e..2f1a0af 100644
--- a/ui/Makefile.am
+++ b/ui/Makefile.am
@@ -22,6 +22,7 @@
if ENABLE_PYTHON
SUBDIRS = \
+ gjs \
gtk \
$(NULL)
endif
--
1.7.3.2

File diff suppressed because it is too large Load Diff

View File

@ -1,125 +1 @@
From 2cf859f01912fe41fd36edaeb0efc21f4fabcb0f Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Sat, 5 Feb 2011 03:00:04 +0900
Subject: [PATCH] Added GTK3 definitions.
---
client/gtk2/ibusimcontext.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index 745722f..608f294 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -506,12 +506,21 @@ ibus_im_context_class_init (IBusIMContextClass *class)
* used extensively.
*/
static guint16 cedilla_compose_seqs[] = {
+#ifdef DEPRECATED_GDK_KEYSYMS
GDK_dead_acute, GDK_C, 0, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
GDK_dead_acute, GDK_c, 0, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
GDK_Multi_key, GDK_apostrophe, GDK_C, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
GDK_Multi_key, GDK_apostrophe, GDK_c, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
GDK_Multi_key, GDK_C, GDK_apostrophe, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
GDK_Multi_key, GDK_c, GDK_apostrophe, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
+#else
+ GDK_KEY_dead_acute, GDK_KEY_C, 0, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
+ GDK_KEY_dead_acute, GDK_KEY_c, 0, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
+ GDK_KEY_Multi_key, GDK_KEY_apostrophe, GDK_KEY_C, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
+ GDK_KEY_Multi_key, GDK_KEY_apostrophe, GDK_KEY_c, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
+ GDK_KEY_Multi_key, GDK_KEY_C, GDK_KEY_apostrophe, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
+ GDK_KEY_Multi_key, GDK_KEY_c, GDK_KEY_apostrophe, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
+#endif
};
static void
--
1.7.3.2
From a00ebefde44cf5daaa642fc880c51357cb83f15b Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Tue, 8 Feb 2011 18:17:11 +0900
Subject: [PATCH] Fixed typo.
---
client/gtk2/ibusimcontext.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index 608f294..bb5ae5c 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -401,11 +401,11 @@ _get_boolean_env(const gchar *name,
if (value == NULL)
return defval;
- if (g_strcmp0 (name, "") == 0 ||
- g_strcmp0 (name, "0") == 0 ||
- g_strcmp0 (name, "false") == 0 ||
- g_strcmp0 (name, "False") == 0 ||
- g_strcmp0 (name, "FALSE") == 0)
+ if (g_strcmp0 (value, "") == 0 ||
+ g_strcmp0 (value, "0") == 0 ||
+ g_strcmp0 (value, "false") == 0 ||
+ g_strcmp0 (value, "False") == 0 ||
+ g_strcmp0 (value, "FALSE") == 0)
return FALSE;
return TRUE;
--
1.7.3.2
From 0501756a1e51469849eca064aeb1e340afbf8be2 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Wed, 9 Feb 2011 00:51:39 +0900
Subject: [PATCH] Add pkgdatadir in ibus-1.0.pc.in
---
ibus-1.0.pc.in | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ibus-1.0.pc.in b/ibus-1.0.pc.in
index 88357af..9f593ab 100644
--- a/ibus-1.0.pc.in
+++ b/ibus-1.0.pc.in
@@ -2,6 +2,8 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
+datadir=@datadir@
+pkgdatadir=@datadir@/ibus
Name: IBus
Description: IBus Library
--
1.7.3.2
From 8ebad5f07b1ba821e278d4d04ab74e2d31a40139 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Sat, 19 Feb 2011 04:52:40 +0900
Subject: [PATCH] Call gtk_key_snooper_remove when GTK IM client is switched.
---
client/gtk2/ibusimcontext.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index bb5ae5c..c4ade53 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -620,6 +620,12 @@ ibus_im_context_finalize (GObject *obj)
pango_attr_list_unref (ibusimcontext->preedit_attrs);
}
+ if (_key_snooper_id != 0) {
+ IDEBUG ("snooper is terminated.");
+ gtk_key_snooper_remove (_key_snooper_id);
+ _key_snooper_id = 0;
+ }
+
G_OBJECT_CLASS(parent_class)->finalize (obj);
}
--
1.7.4

53
ibus.js
View File

@ -1,53 +0,0 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
/* To enable IBus panel for gnome-shell, two modifications are needed.
* 1. Copy this file to /usr/share/gnome-shell/js/ui/status/ibus.js
* 2. Modify /usr/share/gnome-shell/js/ui/panel.js with the following patch.
*/
/*
--- usr/share/gnome-shell/js/ui/panel.js
+++ usr/share/gnome-shell/js/ui/panel.js
@@ -33,12 +33,13 @@ const ANIMATED_ICON_UPDATE_TIMEOUT = 100;
const SPINNER_UPDATE_TIMEOUT = 130;
const SPINNER_SPEED = 0.02;
-const STANDARD_TRAY_ICON_ORDER = ['a11y', 'display', 'keyboard', 'volume', 'bluetooth', 'network', 'battery'];
+const STANDARD_TRAY_ICON_ORDER = ['a11y', 'display', 'keyboard', 'volume', 'bluetooth', 'network', 'battery', 'ibus'];
const STANDARD_TRAY_ICON_SHELL_IMPLEMENTATION = {
'a11y': imports.ui.status.accessibility.ATIndicator,
'volume': imports.ui.status.volume.Indicator,
'battery': imports.ui.status.power.Indicator,
- 'keyboard': imports.ui.status.keyboard.XKBIndicator
+ 'keyboard': imports.ui.status.keyboard.XKBIndicator,
+ 'ibus': imports.ui.status.ibus.Indicator,
};
if (Config.HAVE_BLUETOOTH)
*/
const GLib = imports.gi.GLib;
//const IBUS_PKGDATADIR = imports.misc.config.IBUS_PKGDATADIR;
//const IBUS_GJSDIR = IBUS_PKGDATADIR + '/ui/gjs';
const IBUS_GJSDIR = '/usr/share/ibus' + '/ui/gjs';
const SystemStatusButton = imports.ui.panelMenu.SystemStatusButton;
if (GLib.file_test(IBUS_GJSDIR, GLib.FileTest.IS_DIR)) {
imports.searchPath.push(IBUS_GJSDIR);
const ibusindicator = imports.ibusindicator;
}
Indicator.prototype = {
_init: function() {
if (ibusindicator == undefined) {
this._uiapplication = new SystemStatusButton('', '');
} else {
this._uiapplication = new ibusindicator.Indicator();
}
this.actor = this._uiapplication.actor;
this.menu = this._uiapplication.menu;
},
};
function Indicator() {
this._init.apply(this, arguments);
}

View File

@ -3,6 +3,7 @@
%{!?gtk3_binary_version: %define gtk3_binary_version %(pkg-config --variable=gtk_binary_version gtk+-3.0)}
%define have_libxkbfile 1
%define have_gjsfile 1
%define ibus_api_version 1.0
%define glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999")
@ -11,22 +12,22 @@
%define gnome_icon_theme_legacy_version 2.91.6
Name: ibus
Version: 1.3.99.20110206
Release: 4%{?dist}
Version: 1.3.99.20110228
Release: 1%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
Group: System Environment/Libraries
URL: http://code.google.com/p/ibus/
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
Source1: xinput-ibus
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-ui-gjs-plugins-20110214.tar.bz2
Source3: ibus.js
Patch0: ibus-HEAD.patch
%if %have_gjsfile
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/gnome-shell-ibus-plugins-20110304.tar.bz2
%endif
# Patch0: ibus-HEAD.patch
Patch1: ibus-435880-surrounding-text.patch
Patch2: ibus-541492-xkb.patch
Patch3: ibus-530711-preload-sys.patch
Patch4: ibus-657165-panel-libs.patch
Patch5: ibus-657165-gjs-plugins.patch
# This will be removed after the new gnome-shell is integrated.
Patch99: ibus-675503-gnome-shell-workaround.patch
@ -139,8 +140,10 @@ The ibus-devel-docs package contains developer documentation for ibus
%prep
%setup -q
%if %have_gjsfile
bzcat %SOURCE2 | tar xf -
%patch0 -p1
%endif
# %patch0 -p1
%patch99 -p1 -b .g-s-typo
# start surrounding patch
%patch1 -p1 -b .surrounding
@ -151,7 +154,6 @@ cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c
%endif
%patch3 -p1 -b .preload-sys
%patch4 -p1 -b .panel-libs
%patch5 -p1 -b .gjs
%build
%if %have_libxkbfile
@ -183,9 +185,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/%{gtk3_binary_version}/immodules/im-ibus
# install xinput config file
install -pm 644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_xinputconf}
# install ibus.js for a reference
install -pm 644 -D %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/ibus/ui/gjs/ibus.js
# install .desktop files
# correct location in upstream.
if test ! -f $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop -a \
@ -205,6 +204,22 @@ desktop-file-install --delete-original \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applications/*
%if %have_gjsfile
cp -R js/ui/status/ibus $RPM_BUILD_ROOT%{_datadir}/ibus/ui/gjs-g-s
cat >> $RPM_BUILD_ROOT%{_datadir}/ibus/ui/gjs-g-s/README <<_EOF
IBus Panel for GNOME-Shell
--------------------------
This is an alpha version of IBus Panel for GNOME-Shell.
These files under this directory are prepared for the test purpose.
It is planned to integrate the files into gnome-shell finally.
Please refer the installation:
https://fedoraproject.org/wiki/I18N/InputMethods#GNOME-Shell
Bug Report:
https://bugzilla.redhat.com/show_bug.cgi?id=657165
_EOF
%endif
# FIXME: no version number
%find_lang %{name}10
@ -312,18 +327,16 @@ fi
%{_datadir}/gtk-doc/html/*
%changelog
* Mon Feb 21 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110206-4
- Fixed Bug 677856 - left ibus snooper when im client is switched.
- Fixed Bug 678825 - SEGV in g_return_if_fail_warning.
* Mon Feb 14 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110206-1
* Thu Mar 10 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110228-1
- Updated to 1.3.99.20110228
- Integrated the part of gjs in Bug 657165 ibus for gnome-shell.
Added ibus-ui-gjs-plugins-20110214.tar.bz2
Added ibus-657165-panel-libs.patch
Added ibus-657165-gjs-plugins.patch
Added gnome-shell-ibus-plugins-20110304.tar.bz2
- Fixed Bug 675503 - a regression in sync mode
Added ibus-675503-gnome-shell-workaround.patch until gnome-shell is updated.
- Updated ibus-HEAD.patch from upstream.
- Fixed Bug 677856 - left ibus snooper when im client is switched.
- Fixed Bug 673047 - abrt ibus_xkb_get_current_layout for non-XKB system
Updated ibus-541492-xkb.patch
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.99.20110127-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

View File

@ -1,2 +1,2 @@
e35785efcf8d938170def1cf76f4f25b ibus-1.3.99.20110206.tar.gz
c279d4aa00021a45b81954211c5c88e7 ibus-ui-gjs-plugins-20110214.tar.bz2
223ce787c5357f833ba34cdaf502ef76 ibus-1.3.99.20110228.tar.gz
3d97318591cfb2aa82f97db3f3a5a7f2 gnome-shell-ibus-plugins-20110304.tar.bz2

View File

@ -1,7 +1,7 @@
XIM=ibus
XIM_PROGRAM="/usr/bin/ibus-daemon"
ICON="ibus"
XIM_ARGS="--xim"
XIM_ARGS="-r --xim"
PREFERENCE_PROGRAM=/usr/bin/ibus-setup
SHORT_DESC="IBus"
GTK_IM_MODULE=ibus