Updated to 1.3.99.20101202

This commit is contained in:
Takao Fujiwara 2010-12-09 15:42:20 +09:00
parent fe43636ab1
commit cf977d166c
7 changed files with 162 additions and 71 deletions

2
.gitignore vendored
View File

@ -1,5 +1,7 @@
ibus-1.3.6.tar.gz ibus-1.3.6.tar.gz
/ibus-1.3.7.tar.gz /ibus-1.3.7.tar.gz
/ibus-1.3.8.tar.gz /ibus-1.3.8.tar.gz
/ibus-1.3.9.tar.gz
/ibus-1.3.99.20101028.tar.gz /ibus-1.3.99.20101028.tar.gz
/ibus-1.3.99.20101118.tar.gz /ibus-1.3.99.20101118.tar.gz
/ibus-1.3.99.20101202.tar.gz

View File

@ -1,6 +1,6 @@
From e1316c38ca1b20c51c02d22517c54fcdcd42898e Mon Sep 17 00:00:00 2001 From 3ac76032c89fc3062a84fd824b4e53a7ae023841 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@unixuser.org> From: Daiki Ueno <ueno@unixuser.org>
Date: Mon, 22 Nov 2010 12:48:51 +0900 Date: Thu, 9 Dec 2010 15:03:54 +0900
Subject: [PATCH] Support surrounding-text retrieval. Subject: [PATCH] Support surrounding-text retrieval.
This change adds a new API function ibus_engine_get_surrounding_text(). This change adds a new API function ibus_engine_get_surrounding_text().
@ -23,7 +23,7 @@ Also,
resets the current surrounding-text. resets the current surrounding-text.
--- ---
bus/engineproxy.c | 43 +++++++++++++ bus/engineproxy.c | 43 +++++++++++++
bus/engineproxy.h | 4 + bus/engineproxy.h | 11 +++
bus/inputcontext.c | 32 +++++++++ bus/inputcontext.c | 32 +++++++++
client/gtk2/ibusimcontext.c | 93 ++++++++++++++++++++++++--- client/gtk2/ibusimcontext.c | 93 ++++++++++++++++++++++++---
configure.ac | 14 ++++ configure.ac | 14 ++++
@ -35,15 +35,15 @@ resets the current surrounding-text.
src/ibusinputcontext.c | 61 ++++++++++++++++++ src/ibusinputcontext.c | 61 ++++++++++++++++++
src/ibusinputcontext.h | 11 +++ src/ibusinputcontext.h | 11 +++
src/ibusmarshalers.list | 1 + src/ibusmarshalers.list | 1 +
13 files changed, 414 insertions(+), 12 deletions(-) 13 files changed, 421 insertions(+), 12 deletions(-)
diff --git a/bus/engineproxy.c b/bus/engineproxy.c diff --git a/bus/engineproxy.c b/bus/engineproxy.c
index eb9412c..2955f71 100644 index 59d495d..01116c2 100644
--- a/bus/engineproxy.c --- a/bus/engineproxy.c
+++ b/bus/engineproxy.c +++ b/bus/engineproxy.c
@@ -41,6 +41,10 @@ struct _BusEngineProxy { @@ -47,6 +47,10 @@ struct _BusEngineProxy {
/* a key mapping for the engine that converts keycode into keysym. the mapping is used only when use_sys_layout is FALSE. */
IBusKeymap *keymap; IBusKeymap *keymap;
IBusPropList *prop_list;
/* private member */ /* private member */
+ +
+ /* surrounding text */ + /* surrounding text */
@ -52,16 +52,16 @@ index eb9412c..2955f71 100644
}; };
struct _BusEngineProxyClass { struct _BusEngineProxyClass {
@@ -78,6 +82,8 @@ enum { @@ -83,6 +87,8 @@ enum {
static guint engine_signals[LAST_SIGNAL] = { 0 }; static guint engine_signals[LAST_SIGNAL] = { 0 };
// static guint engine_signals[LAST_SIGNAL] = { 0 };
+static IBusText *text_empty = NULL; +static IBusText *text_empty = NULL;
+ +
/* functions prototype */ /* functions prototype */
static void bus_engine_proxy_set_property (BusEngineProxy *engine, static void bus_engine_proxy_set_property (BusEngineProxy *engine,
guint prop_id, guint prop_id,
@@ -325,11 +331,16 @@ bus_engine_proxy_class_init (BusEngineProxyClass *class) @@ -330,11 +336,16 @@ bus_engine_proxy_class_init (BusEngineProxyClass *class)
G_TYPE_NONE, G_TYPE_NONE,
1, 1,
IBUS_TYPE_PROPERTY); IBUS_TYPE_PROPERTY);
@ -78,7 +78,7 @@ index eb9412c..2955f71 100644
} }
static void static void
@@ -388,6 +399,11 @@ bus_engine_proxy_real_destroy (IBusProxy *proxy) @@ -393,6 +404,11 @@ bus_engine_proxy_real_destroy (IBusProxy *proxy)
engine->keymap = NULL; engine->keymap = NULL;
} }
@ -90,7 +90,7 @@ index eb9412c..2955f71 100644
IBUS_PROXY_CLASS (bus_engine_proxy_parent_class)->destroy ((IBusProxy *)engine); IBUS_PROXY_CLASS (bus_engine_proxy_parent_class)->destroy ((IBusProxy *)engine);
} }
@@ -861,6 +877,33 @@ void bus_engine_proxy_property_hide (BusEngineProxy *engine, @@ -926,6 +942,33 @@ void bus_engine_proxy_property_hide (BusEngineProxy *engine,
NULL); NULL);
} }
@ -121,28 +121,35 @@ index eb9412c..2955f71 100644
+ } + }
+} +}
+ +
/* a macro to generate a function to call a nullary D-Bus method. */
#define DEFINE_FUNCTION(Name, name) \ #define DEFINE_FUNCTION(Name, name) \
void \ void \
bus_engine_proxy_##name (BusEngineProxy *engine) \
diff --git a/bus/engineproxy.h b/bus/engineproxy.h diff --git a/bus/engineproxy.h b/bus/engineproxy.h
index c11bf2a..38bc996 100644 index 5e658a4..2ad6ed4 100644
--- a/bus/engineproxy.h --- a/bus/engineproxy.h
+++ b/bus/engineproxy.h +++ b/bus/engineproxy.h
@@ -92,5 +92,9 @@ void bus_engine_proxy_property_show (BusEngineProxy *engi @@ -210,5 +210,16 @@ void bus_engine_proxy_property_hide (BusEngineProxy *engine,
void bus_engine_proxy_property_hide (BusEngineProxy *engine, */
const gchar *prop_name);
gboolean bus_engine_proxy_is_enabled (BusEngineProxy *engine); gboolean bus_engine_proxy_is_enabled (BusEngineProxy *engine);
+/**
+ * bus_engine_proxy_set_surrounding_text:
+ *
+ * Call "SetSurroundingText" method of an engine asynchronously.
+ */
+void bus_engine_proxy_set_surrounding_text +void bus_engine_proxy_set_surrounding_text
+ (BusEngineProxy *engine, + (BusEngineProxy *engine,
+ IBusText *text, + IBusText *text,
+ guint cursor_pos); + guint cursor_pos);
+
+
G_END_DECLS G_END_DECLS
#endif #endif
diff --git a/bus/inputcontext.c b/bus/inputcontext.c diff --git a/bus/inputcontext.c b/bus/inputcontext.c
index b006ed4..7e425c7 100644 index 7e522f3..de9f31f 100644
--- a/bus/inputcontext.c --- a/bus/inputcontext.c
+++ b/bus/inputcontext.c +++ b/bus/inputcontext.c
@@ -241,6 +241,11 @@ static const gchar introspection_xml[] = @@ -247,6 +247,11 @@ static const gchar introspection_xml[] =
" <method name='GetEngine'>" " <method name='GetEngine'>"
" <arg direction='out' type='v' name='desc' />" " <arg direction='out' type='v' name='desc' />"
" </method>" " </method>"
@ -154,9 +161,9 @@ index b006ed4..7e425c7 100644
/* signals */ /* signals */
" <signal name='CommitText'>" " <signal name='CommitText'>"
" <arg type='v' name='text' />" " <arg type='v' name='text' />"
@@ -903,6 +908,32 @@ _ic_get_engine (BusInputContext *context, @@ -961,6 +966,32 @@ _ic_get_engine (BusInputContext *context,
} * Handle a D-Bus method call whose destination and interface name are both "org.freedesktop.IBus.InputContext"
*/
static void static void
+_ic_set_surrounding_text (BusInputContext *context, +_ic_set_surrounding_text (BusInputContext *context,
+ GVariant *parameters, + GVariant *parameters,
@ -187,7 +194,7 @@ index b006ed4..7e425c7 100644
bus_input_context_service_method_call (IBusService *service, bus_input_context_service_method_call (IBusService *service,
GDBusConnection *connection, GDBusConnection *connection,
const gchar *sender, const gchar *sender,
@@ -941,6 +972,7 @@ bus_input_context_service_method_call (IBusService *service, @@ -999,6 +1030,7 @@ bus_input_context_service_method_call (IBusService *service,
{ "IsEnabled", _ic_is_enabled }, { "IsEnabled", _ic_is_enabled },
{ "SetEngine", _ic_set_engine }, { "SetEngine", _ic_set_engine },
{ "GetEngine", _ic_get_engine }, { "GetEngine", _ic_get_engine },
@ -196,7 +203,7 @@ index b006ed4..7e425c7 100644
gint i; gint i;
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index 63d66c9..f1f0d6e 100644 index a6a11b4..0c15df9 100644
--- a/client/gtk2/ibusimcontext.c --- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c +++ b/client/gtk2/ibusimcontext.c
@@ -106,6 +106,12 @@ static void ibus_im_context_set_cursor_location @@ -106,6 +106,12 @@ static void ibus_im_context_set_cursor_location
@ -290,8 +297,8 @@ index 63d66c9..f1f0d6e 100644
switch (event->type) { switch (event->type) {
case GDK_KEY_RELEASE: case GDK_KEY_RELEASE:
retval = ibus_input_context_process_key_event (ibusimcontext->ibuscontext, retval = ibus_input_context_process_key_event (ibusimcontext->ibuscontext,
@@ -523,6 +550,8 @@ ibus_im_context_focus_in (GtkIMContext *context) @@ -516,6 +543,8 @@ ibus_im_context_focus_in (GtkIMContext *context)
g_object_weak_ref ((GObject *) context, _weak_notify_cb, NULL); (gpointer *) &_focus_im_context);
_focus_im_context = context; _focus_im_context = context;
} }
+ +
@ -299,7 +306,7 @@ index 63d66c9..f1f0d6e 100644
} }
static void static void
@@ -695,6 +724,39 @@ ibus_im_context_set_use_preedit (GtkIMContext *context, gboolean use_preedit) @@ -689,6 +718,39 @@ ibus_im_context_set_use_preedit (GtkIMContext *context, gboolean use_preedit)
} }
static void static void
@ -339,7 +346,7 @@ index 63d66c9..f1f0d6e 100644
_bus_connected_cb (IBusBus *bus, _bus_connected_cb (IBusBus *bus,
IBusIMContext *ibusimcontext) IBusIMContext *ibusimcontext)
{ {
@@ -710,6 +772,8 @@ _ibus_context_commit_text_cb (IBusInputContext *ibuscontext, @@ -704,6 +766,8 @@ _ibus_context_commit_text_cb (IBusInputContext *ibuscontext,
IDEBUG ("%s", __FUNCTION__); IDEBUG ("%s", __FUNCTION__);
g_signal_emit (ibusimcontext, _signal_commit_id, 0, text->text); g_signal_emit (ibusimcontext, _signal_commit_id, 0, text->text);
@ -348,7 +355,7 @@ index 63d66c9..f1f0d6e 100644
} }
static gboolean static gboolean
@@ -982,6 +1046,8 @@ _ibus_context_show_preedit_text_cb (IBusInputContext *ibuscontext, @@ -976,6 +1040,8 @@ _ibus_context_show_preedit_text_cb (IBusInputContext *ibuscontext,
ibusimcontext->preedit_visible = TRUE; ibusimcontext->preedit_visible = TRUE;
g_signal_emit (ibusimcontext, _signal_preedit_start_id, 0); g_signal_emit (ibusimcontext, _signal_preedit_start_id, 0);
g_signal_emit (ibusimcontext, _signal_preedit_changed_id, 0); g_signal_emit (ibusimcontext, _signal_preedit_changed_id, 0);
@ -357,7 +364,7 @@ index 63d66c9..f1f0d6e 100644
} }
static void static void
@@ -1146,17 +1212,21 @@ _slave_preedit_end_cb (GtkIMContext *slave, @@ -1139,17 +1205,21 @@ _slave_preedit_end_cb (GtkIMContext *slave,
g_signal_emit (ibusimcontext, _signal_preedit_end_id, 0); g_signal_emit (ibusimcontext, _signal_preedit_end_id, 0);
} }
@ -383,7 +390,7 @@ index 63d66c9..f1f0d6e 100644
_slave_delete_surrounding_cb (GtkIMContext *slave, _slave_delete_surrounding_cb (GtkIMContext *slave,
gint offset_from_cursor, gint offset_from_cursor,
guint nchars, guint nchars,
@@ -1165,8 +1235,9 @@ _slave_delete_surrounding_cb (GtkIMContext *slave, @@ -1158,8 +1228,9 @@ _slave_delete_surrounding_cb (GtkIMContext *slave,
gboolean return_value; gboolean return_value;
if (ibusimcontext->enable && ibusimcontext->ibuscontext) { if (ibusimcontext->enable && ibusimcontext->ibuscontext) {
@ -850,7 +857,7 @@ index fc26a7c..4f08401 100644
ibus_input_context_is_enabled (IBusInputContext *context) ibus_input_context_is_enabled (IBusInputContext *context)
{ {
diff --git a/src/ibusinputcontext.h b/src/ibusinputcontext.h diff --git a/src/ibusinputcontext.h b/src/ibusinputcontext.h
index 671b7ce..8f20e2d 100644 index 8b1f16c..fb65348 100644
--- a/src/ibusinputcontext.h --- a/src/ibusinputcontext.h
+++ b/src/ibusinputcontext.h +++ b/src/ibusinputcontext.h
@@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
@ -861,7 +868,7 @@ index 671b7ce..8f20e2d 100644
/* /*
* Type macros. * Type macros.
@@ -277,6 +278,16 @@ IBusEngineDesc @@ -279,6 +280,16 @@ IBusEngineDesc
void ibus_input_context_set_engine (IBusInputContext *context, void ibus_input_context_set_engine (IBusInputContext *context,
const gchar *name); const gchar *name);
@ -891,5 +898,5 @@ index 5184278..5dc7fc2 100644
VOID:OBJECT,UINT,BOOL,UINT VOID:OBJECT,UINT,BOOL,UINT
VOID:OBJECT,BOOL VOID:OBJECT,BOOL
-- --
1.7.2.1 1.7.3.2

View File

@ -1,6 +1,6 @@
From 154582485a21da5c8ecf09ca500fc58f7400c7d4 Mon Sep 17 00:00:00 2001 From 6819ae6b980d0c22e498aa367b8d9c0791acf9be Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com> From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Fri, 26 Nov 2010 14:13:17 +0900 Date: Thu, 9 Dec 2010 15:03:08 +0900
Subject: [PATCH] Reload preload engines until users customize the list. Subject: [PATCH] Reload preload engines until users customize the list.
The idea is, if users don't customize the preload_engines with ibus-setup, The idea is, if users don't customize the preload_engines with ibus-setup,
@ -18,16 +18,16 @@ IBUS_PRELOAD_ENGINE_MODE_USER and users can customize the value
Loading system default may spend the startup time. If you mind it, 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. your dist may like to put TRUE in 'use_local_preload_engines' value.
--- ---
bus/ibusimpl.c | 228 +++++++++++++++++++++++++++++++++++--------------- bus/ibusimpl.c | 229 +++++++++++++++++++++++++++++++++++--------------
data/ibus.schemas.in | 13 +++ data/ibus.schemas.in | 13 +++
ibus/common.py | 6 ++ ibus/common.py | 6 ++
setup/main.py | 37 +++++++- setup/main.py | 37 +++++++-
setup/setup.ui | 21 ++++- setup/setup.ui | 21 ++++-
src/ibustypes.h | 10 ++ src/ibustypes.h | 10 ++
6 files changed, 241 insertions(+), 74 deletions(-) 6 files changed, 242 insertions(+), 74 deletions(-)
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
index b045d7f..eb353c2 100644 index d7e496d..6f39fac 100644
--- a/bus/ibusimpl.c --- a/bus/ibusimpl.c
+++ b/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_previous_engine
@ -40,7 +40,7 @@ index b045d7f..eb353c2 100644
static void bus_ibus_impl_set_use_sys_layout static void bus_ibus_impl_set_use_sys_layout
(BusIBusImpl *ibus, (BusIBusImpl *ibus,
GVariant *value); GVariant *value);
@@ -264,6 +267,122 @@ _panel_destroy_cb (BusPanelProxy *panel, @@ -264,6 +267,123 @@ _panel_destroy_cb (BusPanelProxy *panel,
g_object_unref (panel); g_object_unref (panel);
} }
@ -99,6 +99,7 @@ index b045d7f..eb353c2 100644
+ } + }
+ +
+ if (engine_list != NULL && + if (engine_list != NULL &&
+ ibus->config != NULL &&
+ ibus_config_get_value (ibus->config, "general", + ibus_config_get_value (ibus->config, "general",
+ "preload_engines") == NULL) { + "preload_engines") == NULL) {
+ ibus_config_set_value (ibus->config, "general", + ibus_config_set_value (ibus->config, "general",
@ -163,7 +164,7 @@ index b045d7f..eb353c2 100644
static void static void
bus_ibus_impl_set_hotkey (BusIBusImpl *ibus, bus_ibus_impl_set_hotkey (BusIBusImpl *ibus,
GQuark hotkey, GQuark hotkey,
@@ -347,34 +466,32 @@ static void @@ -347,34 +467,32 @@ static void
bus_ibus_impl_set_preload_engines (BusIBusImpl *ibus, bus_ibus_impl_set_preload_engines (BusIBusImpl *ibus,
GVariant *value) GVariant *value)
{ {
@ -217,7 +218,7 @@ index b045d7f..eb353c2 100644
} }
/** /**
@@ -452,69 +569,47 @@ bus_ibus_impl_set_use_global_engine (BusIBusImpl *ibus, @@ -452,69 +570,47 @@ bus_ibus_impl_set_use_global_engine (BusIBusImpl *ibus,
} }
} }
@ -310,7 +311,7 @@ index b045d7f..eb353c2 100644
} }
/* The list of config entries that are related to ibus-daemon. */ /* The list of config entries that are related to ibus-daemon. */
@@ -527,6 +622,7 @@ const static struct { @@ -527,6 +623,7 @@ const static struct {
{ "general/hotkey", "next_engine_in_menu", bus_ibus_impl_set_next_engine_in_menu }, { "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/hotkey", "previous_engine", bus_ibus_impl_set_previous_engine },
{ "general", "preload_engines", bus_ibus_impl_set_preload_engines }, { "general", "preload_engines", bus_ibus_impl_set_preload_engines },
@ -500,5 +501,5 @@ index 035d124..0a9d7b2 100644
* @x: x coordinate. * @x: x coordinate.
* @y: y coordinate. * @y: y coordinate.
-- --
1.7.2.1 1.7.3.2

View File

@ -1,6 +1,6 @@
From 4bac7696cf277414eba7b166fcd8dbfabe8f9e6f Mon Sep 17 00:00:00 2001 From 715f102611ac16ebc8f66f4fc3b4547c983105ea Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com> From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Mon, 22 Nov 2010 11:39:27 +0900 Date: Thu, 9 Dec 2010 15:03:14 +0900
Subject: [PATCH] Add XKB layouts Subject: [PATCH] Add XKB layouts
--- ---
@ -11,7 +11,7 @@ Subject: [PATCH] Add XKB layouts
ibus/__init__.py | 2 + ibus/__init__.py | 2 +
ibus/bus.py | 3 + ibus/bus.py | 3 +
ibus/interface/iibus.py | 3 + ibus/interface/iibus.py | 3 +
ibus/xkblayout.py.in | 190 ++++++++++++ ibus/xkblayout.py.in | 225 ++++++++++++++
ibus/xkbxml.py.in | 412 ++++++++++++++++++++++++++ ibus/xkbxml.py.in | 412 ++++++++++++++++++++++++++
setup/Makefile.am | 1 + setup/Makefile.am | 1 +
setup/enginecombobox.py | 7 +- setup/enginecombobox.py | 7 +-
@ -31,7 +31,7 @@ Subject: [PATCH] Add XKB layouts
xkb/xkblib.h | 40 +++ xkb/xkblib.h | 40 +++
xkb/xkbxml.c | 696 ++++++++++++++++++++++++++++++++++++++++++++ xkb/xkbxml.c | 696 ++++++++++++++++++++++++++++++++++++++++++++
xkb/xkbxml.h | 189 ++++++++++++ xkb/xkbxml.h | 189 ++++++++++++
27 files changed, 3758 insertions(+), 6 deletions(-) 27 files changed, 3793 insertions(+), 6 deletions(-)
create mode 100644 ibus/xkblayout.py.in create mode 100644 ibus/xkblayout.py.in
create mode 100644 ibus/xkbxml.py.in create mode 100644 ibus/xkbxml.py.in
create mode 100644 setup/xkbsetup.py create mode 100644 setup/xkbsetup.py
@ -150,7 +150,7 @@ index 1a1e663..ea0d32b 100644
Build gconf modules $enable_gconf Build gconf modules $enable_gconf
Build memconf modules $enable_memconf Build memconf modules $enable_memconf
diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in
index 5956171..322f831 100644 index 9b82857..3007e08 100644
--- a/data/ibus.schemas.in --- a/data/ibus.schemas.in
+++ b/data/ibus.schemas.in +++ b/data/ibus.schemas.in
@@ -180,6 +180,42 @@ @@ -180,6 +180,42 @@
@ -197,7 +197,7 @@ index 5956171..322f831 100644
<applyto>/desktop/ibus/panel/use_custom_font</applyto> <applyto>/desktop/ibus/panel/use_custom_font</applyto>
<owner>ibus</owner> <owner>ibus</owner>
diff --git a/ibus/Makefile.am b/ibus/Makefile.am diff --git a/ibus/Makefile.am b/ibus/Makefile.am
index d1cd750..783b4dc 100644 index d1cd750..7f8590c 100644
--- a/ibus/Makefile.am --- a/ibus/Makefile.am
+++ b/ibus/Makefile.am +++ b/ibus/Makefile.am
@@ -58,12 +58,38 @@ nodist_ibus_PYTHON = \ @@ -58,12 +58,38 @@ nodist_ibus_PYTHON = \
@ -214,7 +214,7 @@ index d1cd750..783b4dc 100644
+ibus_PYTHON += $(xkblayout_py_DATA) +ibus_PYTHON += $(xkblayout_py_DATA)
+ +
+if ENABLE_XKB +if ENABLE_XKB
+XKB_COMMAND=\\\""$(libexecdir)/ibus-xkb"\\\" +XKB_COMMAND=\\\"$(libexecdir)/ibus-xkb\\\"
+HAVE_XKB=True +HAVE_XKB=True
+else +else
+XKB_COMMAND="None" +XKB_COMMAND="None"
@ -280,10 +280,10 @@ index e63caa3..8b7b6f7 100644
diff --git a/ibus/xkblayout.py.in b/ibus/xkblayout.py.in diff --git a/ibus/xkblayout.py.in b/ibus/xkblayout.py.in
new file mode 100644 new file mode 100644
index 0000000..63d4327 index 0000000..7685776
--- /dev/null --- /dev/null
+++ b/ibus/xkblayout.py.in +++ b/ibus/xkblayout.py.in
@@ -0,0 +1,190 @@ @@ -0,0 +1,225 @@
+# vim:set et sts=4 sw=4: +# vim:set et sts=4 sw=4:
+# +#
+# ibus - The Input Bus +# ibus - The Input Bus
@ -311,9 +311,10 @@ index 0000000..63d4327
+ "XKBLayout", + "XKBLayout",
+ ) + )
+ +
+import os +import os, sys, time
+ +
+XKB_COMMAND = @XKB_COMMAND@ +XKB_COMMAND = @XKB_COMMAND@
+XKB_SESSION_TIME_OUT = 30.0
+ +
+class XKBLayout(): +class XKBLayout():
+ def __init__(self, config = None, command=XKB_COMMAND): + def __init__(self, config = None, command=XKB_COMMAND):
@ -325,6 +326,9 @@ index 0000000..63d4327
+ self.__default_layout = self.get_layout() + self.__default_layout = self.get_layout()
+ self.__default_model = self.get_model() + self.__default_model = self.get_model()
+ self.__default_option = self.get_option() + self.__default_option = self.get_option()
+ self.__time_lag_session_xkb_layout = True
+ self.__time_lag_session_xkb_option = True
+ self.__time_lag_session_xkb_timer = time.time()
+ self.__xkb_latin_layouts = [] + self.__xkb_latin_layouts = []
+ if config != None: + if config != None:
+ self.__xkb_latin_layouts = list(self.__config.get_value("general", + self.__xkb_latin_layouts = list(self.__config.get_value("general",
@ -402,18 +406,38 @@ index 0000000..63d4327
+ if self.__default_layout == None: + if self.__default_layout == None:
+ return + return
+ layout = str(layout) + layout = str(layout)
+ # if set_default_layout() is not default, the default layout is
+ # pulled from the current XKB. But it's possible gnome-settings-daemon
+ # does not run yet. I added XKB_SESSION_TIME_OUT for the timer.
+ if self.__time_lag_session_xkb_layout == True:
+ self.__default_layout = self.get_layout()
+ self.__default_model = self.get_model()
+ if self.__time_lag_session_xkb_option == True:
+ self.__default_option = self.get_option()
+ if (self.__time_lag_session_xkb_layout == True or \
+ self.__time_lag_session_xkb_option == True ) and \
+ (self.__time_lag_session_xkb_timer - time.time() \
+ > XKB_SESSION_TIME_OUT):
+ self.__time_lag_session_xkb_layout = False
+ self.__time_lag_session_xkb_option = False
+ if layout == "default": + if layout == "default":
+ layout = self.__default_layout + layout = self.__default_layout
+ else:
+ self.__time_lag_session_xkb_layout = False
+ if model != None: + if model != None:
+ model = str(model) + model = str(model)
+ if model == "default": + if model == "default":
+ (layout, model) = self.__get_model_from_layout(layout) + (layout, model) = self.__get_model_from_layout(layout)
+ if model == "default": + if model == "default":
+ model = self.__default_model + model = self.__default_model
+ else:
+ self.__time_lag_session_xkb_layout = False
+ if option != None: + if option != None:
+ option = str(option) + option = str(option)
+ if option == "default": + if option == "default":
+ option = self.__default_option + option = self.__default_option
+ else:
+ self.__time_lag_session_xkb_option = False
+ need_us_layout = False + need_us_layout = False
+ for latin_layout in self.__xkb_latin_layouts: + for latin_layout in self.__xkb_latin_layouts:
+ latin_layout = str(latin_layout) + latin_layout = str(latin_layout)
@ -448,6 +472,12 @@ index 0000000..63d4327
+ def set_default_layout(self, layout="default", model="default"): + def set_default_layout(self, layout="default", model="default"):
+ if not self.__use_xkb: + if not self.__use_xkb:
+ return + return
+ if layout == None:
+ print >> sys.stderr, "ibus.xkblayout: None layout"
+ return
+ if model == None:
+ print >> sys.stderr, "ibus.xkblayout: None model"
+ return
+ if layout == 'default': + if layout == 'default':
+ self.__default_layout = self.get_layout() + self.__default_layout = self.get_layout()
+ self.__default_model = self.get_model() + self.__default_model = self.get_model()
@ -455,6 +485,7 @@ index 0000000..63d4327
+ if model == 'default': + if model == 'default':
+ (layout, model) = self.__get_model_from_layout(layout) + (layout, model) = self.__get_model_from_layout(layout)
+ self.__default_layout = layout + self.__default_layout = layout
+ self.__time_lag_session_xkb_layout = False
+ if model == 'default': + if model == 'default':
+ self.__default_model = None + self.__default_model = None
+ else: + else:
@ -463,10 +494,14 @@ index 0000000..63d4327
+ def set_default_option(self, option="default"): + def set_default_option(self, option="default"):
+ if not self.__use_xkb: + if not self.__use_xkb:
+ return + return
+ if option == None:
+ print >> sys.stderr, "ibus.xkblayout: None option"
+ return
+ if option == 'default': + if option == 'default':
+ self.__default_option = self.get_option() + self.__default_option = self.get_option()
+ else: + else:
+ self.__default_option = option + self.__default_option = option
+ self.__time_lag_session_xkb_option = False
+ +
+ def reload_default_layout(self): + def reload_default_layout(self):
+ if not self.__use_xkb: + if not self.__use_xkb:
@ -936,7 +971,7 @@ index 2fd8876..7383177 100644
+ self.__title = title + self.__title = title
diff --git a/setup/main.py b/setup/main.py diff --git a/setup/main.py b/setup/main.py
index 92a2398..1912e20 100644 index 215670d..c855b86 100644
--- a/setup/main.py --- a/setup/main.py
+++ b/setup/main.py +++ b/setup/main.py
@@ -37,6 +37,7 @@ from gtk import gdk @@ -37,6 +37,7 @@ from gtk import gdk
@ -947,7 +982,7 @@ index 92a2398..1912e20 100644
from i18n import DOMAINNAME, _, N_, init as i18n_init from i18n import DOMAINNAME, _, N_, init as i18n_init
( (
@@ -229,6 +230,8 @@ class Setup(object): @@ -226,6 +227,8 @@ class Setup(object):
self.__combobox.connect("notify::active-engine", self.__combobox_notify_active_engine_cb) self.__combobox.connect("notify::active-engine", self.__combobox_notify_active_engine_cb)
self.__treeview.connect("notify", self.__treeview_notify_cb) self.__treeview.connect("notify", self.__treeview_notify_cb)
@ -4194,5 +4229,5 @@ index 0000000..f4858fa
+G_END_DECLS +G_END_DECLS
+#endif +#endif
-- --
1.7.2.1 1.7.3.2

View File

@ -1 +1,47 @@
From 98419a4133f6358ec2e8ad56c62aacf3e3754c3e Mon Sep 17 00:00:00 2001
From: Peng Huang <shawn.p.huang@gmail.com>
Date: Wed, 8 Dec 2010 16:37:42 +0800
Subject: [PATCH] Fix GI transfer mode annotation in ibus_bus_list_*engines() comment.
See https://bugzilla.gnome.org/show_bug.cgi?id=635248. Also, do not mark those
functions as "not implemented", since they are apparently implemented.
BUG=none
TEST=manual
Review URL: http://codereview.appspot.com/3274044
---
src/ibusbus.h | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/ibusbus.h b/src/ibusbus.h
index 2e288f5..fb56b76 100644
--- a/src/ibusbus.h
+++ b/src/ibusbus.h
@@ -246,21 +246,18 @@ gboolean ibus_bus_register_component(IBusBus *bus,
/**
* ibus_bus_list_engines:
* @bus: An IBusBus.
- * @returns: (transfer full) (element-type IBusEngineDesc): A List of engines.
+ * @returns: (transfer container) (element-type IBusEngineDesc): A List of engines.
*
* List engines.
- * Note that this function is not yet implemented.
*/
GList *ibus_bus_list_engines (IBusBus *bus);
/**
* ibus_bus_list_active_engines:
* @bus: An IBusBus.
- * @returns: (transfer full) (element-type IBusEngineDesc): A List of active engines.
+ * @returns: (transfer container) (element-type IBusEngineDesc): A List of active engines.
*
* List active engines.
- * Note that this function is not yet implemented.
- * <note><para>Not yet implemented.</para></note>
*/
GList *ibus_bus_list_active_engines
(IBusBus *bus);
--
1.7.3.2

View File

@ -11,15 +11,15 @@
%define im_chooser_version 1.2.5 %define im_chooser_version 1.2.5
Name: ibus Name: ibus
Version: 1.3.99.20101118 Version: 1.3.99.20101202
Release: 2%{?dist} Release: 1%{?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
URL: http://code.google.com/p/ibus/ URL: http://code.google.com/p/ibus/
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
Source1: xinput-ibus Source1: xinput-ibus
# 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-435880-surrounding-text.patch Patch3: ibus-435880-surrounding-text.patch
@ -89,6 +89,7 @@ This package contains the libraries for IBus
Summary: IBus im module for gtk2 Summary: IBus im module for gtk2
Group: System Environment/Libraries Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires(post): glib2 >= %{glib_ver} Requires(post): glib2 >= %{glib_ver}
# Added for F14: need to keep bumping for backports # Added for F14: need to keep bumping for backports
Obsoletes: ibus-gtk < %{version}-%{release} Obsoletes: ibus-gtk < %{version}-%{release}
@ -101,6 +102,7 @@ This package contains ibus im module for gtk2
Summary: IBus im module for gtk3 Summary: IBus im module for gtk3
Group: System Environment/Libraries Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires(post): glib2 >= %{glib_ver} Requires(post): glib2 >= %{glib_ver}
%description gtk3 %description gtk3
@ -110,6 +112,7 @@ This package contains ibus im module for gtk3
Summary: Development tools for ibus Summary: Development tools for ibus
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: glib2-devel Requires: glib2-devel
Requires: dbus-devel Requires: dbus-devel
@ -128,7 +131,7 @@ The ibus-devel-docs package contains developer documentation for ibus
%prep %prep
%setup -q %setup -q
# %patch0 -p1 %patch0 -p1
%patch1 -p1 -b .preload-sys %patch1 -p1 -b .preload-sys
%if %have_libxkbfile %if %have_libxkbfile
%patch2 -p1 -b .xkb %patch2 -p1 -b .xkb
@ -230,16 +233,16 @@ fi
%postun libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig
%post gtk2 %post gtk2
%{_bindir}/update-gtk-immodules %{_host} %{_bindir}/update-gtk-immodules %{_host} || :
%postun gtk2 %postun gtk2
%{_bindir}/update-gtk-immodules %{_host} %{_bindir}/update-gtk-immodules %{_host} || :
%post gtk3 %post gtk3
%{_bindir}/gtk-query-immodules-3.0-%{__isa_bits} --update-cache %{_bindir}/gtk-query-immodules-3.0-%{__isa_bits} --update-cache || :
%postun gtk3 %postun gtk3
%{_bindir}/gtk-query-immodules-3.0-%{__isa_bits} --update-cache %{_bindir}/gtk-query-immodules-3.0-%{__isa_bits} --update-cache || :
# FIXME: no version number # FIXME: no version number
%files -f %{name}10.lang %files -f %{name}10.lang
@ -291,11 +294,8 @@ fi
%{_datadir}/gtk-doc/html/* %{_datadir}/gtk-doc/html/*
%changelog %changelog
* Fri Dec 3 2010 Matthias Clasen <mclasen@redhat.com> - 1.3.99.20101118-2 * Thu Dec 09 2010 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20101202-1
- Rebuild against newer gtk3 - Updated to 1.3.99.20101202
* Fri Nov 26 2010 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20101118-1
- Updated to 1.3.99.20101118
- Added ibus-530711-preload-sys.patch - Added ibus-530711-preload-sys.patch
Fixed Bug 530711 - Reload preloaded engines by login Fixed Bug 530711 - Reload preloaded engines by login

View File

@ -1 +1 @@
b8a7fb91ae719e9b0bfdb2a09d5d1691 ibus-1.3.99.20101118.tar.gz 02ca4012ac92aeaba97568591d4d9844 ibus-1.3.99.20101202.tar.gz