Revised ibus-530711-preload-sys.patch

This commit is contained in:
Takao Fujiwara 2011-03-11 18:23:28 +09:00
parent 9d6bb4f328
commit 193527479f
3 changed files with 119 additions and 14 deletions

View File

@ -1,6 +1,6 @@
From 4e217b71d30c4f645014e67dd083364a58bd15db Mon Sep 17 00:00:00 2001
From 047452beffd7cb429bf4dfeb2371f120cc8041a6 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Thu, 10 Mar 2011 15:31:55 +0900
Date: Fri, 11 Mar 2011 16:07: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,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 | 279 ++++++++++++++++++++++++++++++++++---------------
bus/ibusimpl.c | 286 +++++++++++++++++++++++++++++++++++---------------
data/ibus.schemas.in | 13 +++
ibus/common.py | 6 +
setup/main.py | 37 ++++++-
setup/setup.ui | 21 +++-
src/ibustypes.h | 10 ++
6 files changed, 272 insertions(+), 94 deletions(-)
6 files changed, 279 insertions(+), 94 deletions(-)
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
index 8d4ec36..f86b149 100644
index 8d4ec36..0caa8c7 100644
--- a/bus/ibusimpl.c
+++ b/bus/ibusimpl.c
@@ -144,6 +144,9 @@ static void bus_ibus_impl_set_previo
@@ -144,6 +144,9 @@ static void bus_ibus_impl_set_previous_engine
static void bus_ibus_impl_set_preload_engines
(BusIBusImpl *ibus,
GVariant *value);
@ -40,7 +40,7 @@ index 8d4ec36..f86b149 100644
static void bus_ibus_impl_set_use_sys_layout
(BusIBusImpl *ibus,
GVariant *value);
@@ -271,6 +274,141 @@ _panel_destroy_cb (BusPanelProxy *panel,
@@ -278,6 +281,141 @@ _panel_destroy_cb (BusPanelProxy *panel,
g_object_unref (panel);
}
@ -182,7 +182,7 @@ index 8d4ec36..f86b149 100644
static void
bus_ibus_impl_set_hotkey (BusIBusImpl *ibus,
GQuark hotkey,
@@ -381,34 +519,43 @@ static void
@@ -388,34 +526,50 @@ static void
bus_ibus_impl_set_preload_engines (BusIBusImpl *ibus,
GVariant *value)
{
@ -233,8 +233,15 @@ index 8d4ec36..f86b149 100644
- if (component && !bus_component_is_running (component)) {
- bus_component_start (component, g_verbose);
- }
+ /* bus_ibus_impl_reload_config() sets value = NULL.
+ * bus_ibus_impl_reload_config() is always called when
+ * RequestName signal is sent so it is good to get the gconf value
+ * again when value == NULL.
+ */
+ if (value != NULL && g_variant_classify (value) == G_VARIANT_CLASS_INT32) {
+ preload_engine_mode = g_variant_get_int32 (value);
+ } else {
+ preload_engine_mode = _get_config_preload_engine_mode (ibus);
}
- bus_ibus_impl_update_engines_hotkey_profile (ibus);
@ -247,7 +254,7 @@ index 8d4ec36..f86b149 100644
}
/**
@@ -489,89 +636,48 @@ bus_ibus_impl_set_use_global_engine (Bus
@@ -496,89 +650,48 @@ bus_ibus_impl_set_use_global_engine (BusIBusImpl *ibus,
}
}
@ -360,7 +367,7 @@ index 8d4ec36..f86b149 100644
#endif
}
@@ -587,6 +693,7 @@ const static struct {
@@ -594,6 +707,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 },
@ -483,7 +490,7 @@ index 7f4a040..9cdce02 100644
try:
self.__bus = ibus.Bus()
diff --git a/setup/setup.ui b/setup/setup.ui
index cddae98..edfb3a8 100644
index f1e6d0b..562c091 100644
--- a/setup/setup.ui
+++ b/setup/setup.ui
@@ -582,7 +582,22 @@

View File

@ -1 +1,96 @@
From fbdd157b2ab1e6e873818132530dd9e55e4f94dd Mon Sep 17 00:00:00 2001
From: Peng Huang <shawn.p.huang@gmail.com>
Date: Mon, 7 Mar 2011 10:26:04 -0500
Subject: [PATCH] Move gtk_key_snooper_remove from function object_fini to class_fini.
BUG=http://crosbug.com/12803
TEST=Linux desktop
Review URL: http://codereview.appspot.com/4267044
---
client/gtk2/ibusimcontext.c | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index a634d0e..31a415d 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -88,6 +88,7 @@ static GtkWidget *_input_widget = NULL;
/* functions prototype */
static void ibus_im_context_class_init (IBusIMContextClass *class);
+static void ibus_im_context_class_fini (IBusIMContextClass *class);
static void ibus_im_context_init (GObject *obj);
static void ibus_im_context_finalize (GObject *obj);
static void ibus_im_context_reset (GtkIMContext *context);
@@ -152,10 +153,10 @@ ibus_im_context_register_type (GTypeModule *type_module)
static const GTypeInfo ibus_im_context_info = {
sizeof (IBusIMContextClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
(GClassInitFunc) ibus_im_context_class_init,
- NULL, /* class finialize */
+ (GClassFinalizeFunc) ibus_im_context_class_fini,
NULL, /* class data */
sizeof (IBusIMContext),
0,
@@ -477,6 +478,16 @@ ibus_im_context_class_init (IBusIMContextClass *class)
_key_snooper_id = gtk_key_snooper_install (_key_snooper_cb, NULL);
}
+static void
+ibus_im_context_class_fini (IBusIMContextClass *class)
+{
+ if (_key_snooper_id != 0) {
+ IDEBUG ("snooper is terminated.");
+ gtk_key_snooper_remove (_key_snooper_id);
+ _key_snooper_id = 0;
+ }
+}
+
/* Copied from gtk+2.0-2.20.1/modules/input/imcedilla.c to fix crosbug.com/11421.
* Overwrite the original Gtk+'s compose table in gtk+-2.x.y/gtk/gtkimcontextsimple.c. */
@@ -601,12 +612,6 @@ 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.1
From c0489ba017f298e51efe86bc7f5def1928389197 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Fri, 11 Mar 2011 15:53:53 +0900
Subject: [PATCH] Fix preedit_string = NULL in ibus-x11 _free_ic()
---
client/x11/main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/client/x11/main.c b/client/x11/main.c
index a2967cc..16104de 100644
--- a/client/x11/main.c
+++ b/client/x11/main.c
@@ -526,6 +526,7 @@ _free_ic (gpointer data, gpointer user_data)
g_return_if_fail (x11ic != NULL);
g_free (x11ic->preedit_string);
+ x11ic->preedit_string = NULL;
if (x11ic->preedit_attrs) {
g_object_unref (x11ic->preedit_attrs);
--
1.7.4.1

View File

@ -13,7 +13,7 @@
Name: ibus
Version: 1.3.99.20110228
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
Group: System Environment/Libraries
@ -23,7 +23,7 @@ Source1: xinput-ibus
%if %have_gjsfile
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/gnome-shell-ibus-plugins-20110304.tar.bz2
%endif
# Patch0: ibus-HEAD.patch
Patch0: ibus-HEAD.patch
Patch1: ibus-435880-surrounding-text.patch
Patch2: ibus-541492-xkb.patch
Patch3: ibus-530711-preload-sys.patch
@ -143,7 +143,7 @@ The ibus-devel-docs package contains developer documentation for ibus
%if %have_gjsfile
bzcat %SOURCE2 | tar xf -
%endif
# %patch0 -p1
%patch0 -p1
%patch99 -p1 -b .g-s-typo
# start surrounding patch
%patch1 -p1 -b .surrounding
@ -327,6 +327,9 @@ fi
%{_datadir}/gtk-doc/html/*
%changelog
* Fri Mar 11 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110228-2
- Revised ibus-530711-preload-sys.patch
* 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.