Updated to 1.3.99.20110117
- Updated ibus-HEAD.patch from upstream. - Fixed Bug 666427 - ibus requires dbus-x11 - Fixed Bug 670137 - QT_IM_MODULE=xim in ibus.conf without ibus-qt
This commit is contained in:
parent
6225bbcb57
commit
069aa90e81
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ ibus-1.3.6.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
|
/ibus-1.3.99.20101202.tar.gz
|
||||||
|
/ibus-1.3.99.20110117.tar.gz
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
From 3ac76032c89fc3062a84fd824b4e53a7ae023841 Mon Sep 17 00:00:00 2001
|
From 2284f5ada37ff8f13a802bd652e2b71b68db1b10 Mon Sep 17 00:00:00 2001
|
||||||
From: Daiki Ueno <ueno@unixuser.org>
|
From: Daiki Ueno <ueno@unixuser.org>
|
||||||
Date: Thu, 9 Dec 2010 15:03:54 +0900
|
Date: Wed, 26 Jan 2011 15:42:44 +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().
|
||||||
@ -22,25 +22,25 @@ Also,
|
|||||||
- destroy
|
- destroy
|
||||||
resets the current surrounding-text.
|
resets the current surrounding-text.
|
||||||
---
|
---
|
||||||
bus/engineproxy.c | 43 +++++++++++++
|
bus/engineproxy.c | 43 ++++++++++++
|
||||||
bus/engineproxy.h | 11 +++
|
bus/engineproxy.h | 11 +++
|
||||||
bus/inputcontext.c | 32 +++++++++
|
bus/inputcontext.c | 36 ++++++++++
|
||||||
client/gtk2/ibusimcontext.c | 93 ++++++++++++++++++++++++---
|
client/gtk2/ibusimcontext.c | 138 ++++++++++++++++++++++++++++++++++-----
|
||||||
configure.ac | 14 ++++
|
configure.ac | 14 ++++
|
||||||
ibus/engine.py | 6 ++
|
ibus/engine.py | 6 ++
|
||||||
ibus/interface/iengine.py | 3 +
|
ibus/interface/iengine.py | 3 +
|
||||||
ibus/interface/iinputcontext.py | 3 +
|
ibus/interface/iinputcontext.py | 5 ++
|
||||||
src/ibusengine.c | 138 +++++++++++++++++++++++++++++++++++++++++
|
src/ibusengine.c | 138 +++++++++++++++++++++++++++++++++++++++
|
||||||
src/ibusengine.h | 21 ++++++-
|
src/ibusengine.h | 21 ++++++-
|
||||||
src/ibusinputcontext.c | 61 ++++++++++++++++++
|
src/ibusenginedesc.c | 132 +++++++++++++++++++++++++++++++++++++
|
||||||
src/ibusinputcontext.h | 11 +++
|
|
||||||
src/ibusenginedesc.c | 91 +++++++++++++++++++++++++
|
|
||||||
src/ibusenginedesc.h | 11 +++
|
src/ibusenginedesc.h | 11 +++
|
||||||
|
src/ibusinputcontext.c | 91 +++++++++++++++++++++++++
|
||||||
|
src/ibusinputcontext.h | 11 +++
|
||||||
src/ibusmarshalers.list | 1 +
|
src/ibusmarshalers.list | 1 +
|
||||||
15 files changed, 421 insertions(+), 12 deletions(-)
|
15 files changed, 644 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
diff --git a/bus/engineproxy.c b/bus/engineproxy.c
|
diff --git a/bus/engineproxy.c b/bus/engineproxy.c
|
||||||
index 59d495d..01116c2 100644
|
index f808727..b35933f 100644
|
||||||
--- a/bus/engineproxy.c
|
--- a/bus/engineproxy.c
|
||||||
+++ b/bus/engineproxy.c
|
+++ b/bus/engineproxy.c
|
||||||
@@ -47,6 +47,10 @@ struct _BusEngineProxy {
|
@@ -47,6 +47,10 @@ struct _BusEngineProxy {
|
||||||
@ -92,7 +92,7 @@ index 59d495d..01116c2 100644
|
|||||||
IBUS_PROXY_CLASS (bus_engine_proxy_parent_class)->destroy ((IBusProxy *)engine);
|
IBUS_PROXY_CLASS (bus_engine_proxy_parent_class)->destroy ((IBusProxy *)engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -926,6 +942,33 @@ void bus_engine_proxy_property_hide (BusEngineProxy *engine,
|
@@ -950,6 +966,33 @@ void bus_engine_proxy_property_hide (BusEngineProxy *engine,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,10 +127,10 @@ index 59d495d..01116c2 100644
|
|||||||
#define DEFINE_FUNCTION(Name, name) \
|
#define DEFINE_FUNCTION(Name, name) \
|
||||||
void \
|
void \
|
||||||
diff --git a/bus/engineproxy.h b/bus/engineproxy.h
|
diff --git a/bus/engineproxy.h b/bus/engineproxy.h
|
||||||
index 5e658a4..2ad6ed4 100644
|
index 2a82fc6..0680917 100644
|
||||||
--- a/bus/engineproxy.h
|
--- a/bus/engineproxy.h
|
||||||
+++ b/bus/engineproxy.h
|
+++ b/bus/engineproxy.h
|
||||||
@@ -210,5 +210,16 @@ void bus_engine_proxy_property_hide (BusEngineProxy *engine,
|
@@ -212,5 +212,16 @@ void bus_engine_proxy_property_hide (BusEngineProxy *engine,
|
||||||
*/
|
*/
|
||||||
gboolean bus_engine_proxy_is_enabled (BusEngineProxy *engine);
|
gboolean bus_engine_proxy_is_enabled (BusEngineProxy *engine);
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ index 5e658a4..2ad6ed4 100644
|
|||||||
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 7e522f3..de9f31f 100644
|
index 32d51e8..20f561c 100644
|
||||||
--- a/bus/inputcontext.c
|
--- a/bus/inputcontext.c
|
||||||
+++ b/bus/inputcontext.c
|
+++ b/bus/inputcontext.c
|
||||||
@@ -247,6 +247,11 @@ static const gchar introspection_xml[] =
|
@@ -247,6 +247,11 @@ static const gchar introspection_xml[] =
|
||||||
@ -163,7 +163,7 @@ index 7e522f3..de9f31f 100644
|
|||||||
/* signals */
|
/* signals */
|
||||||
" <signal name='CommitText'>"
|
" <signal name='CommitText'>"
|
||||||
" <arg type='v' name='text' />"
|
" <arg type='v' name='text' />"
|
||||||
@@ -961,6 +966,32 @@ _ic_get_engine (BusInputContext *c
|
@@ -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"
|
* Handle a D-Bus method call whose destination and interface name are both "org.freedesktop.IBus.InputContext"
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -196,7 +196,7 @@ index 7e522f3..de9f31f 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,
|
||||||
@@ -999,6 +1030,7 @@ bus_input_context_service_method_call (I
|
@@ -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 },
|
||||||
@ -204,7 +204,7 @@ index 7e522f3..de9f31f 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
gint i;
|
gint i;
|
||||||
@@ -2059,6 +2091,10 @@ bus_input_context_set_engine (BusInputCo
|
@@ -2059,6 +2091,10 @@ bus_input_context_set_engine (BusInputContext *context,
|
||||||
bus_engine_proxy_set_cursor_location (context->engine, context->x, context->y, context->w, context->h);
|
bus_engine_proxy_set_cursor_location (context->engine, context->x, context->y, context->w, context->h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -216,21 +216,28 @@ index 7e522f3..de9f31f 100644
|
|||||||
context_signals[ENGINE_CHANGED],
|
context_signals[ENGINE_CHANGED],
|
||||||
0);
|
0);
|
||||||
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 a6a11b4..0c15df9 100644
|
index 009d05d..22d1e46 100644
|
||||||
--- a/client/gtk2/ibusimcontext.c
|
--- a/client/gtk2/ibusimcontext.c
|
||||||
+++ b/client/gtk2/ibusimcontext.c
|
+++ b/client/gtk2/ibusimcontext.c
|
||||||
@@ -59,8 +59,8 @@ struct _IBusIMContext {
|
@@ -27,6 +27,7 @@
|
||||||
GdkRectangle cursor_area;
|
#include <gtk/gtk.h>
|
||||||
|
#include <gdk/gdkkeysyms.h>
|
||||||
|
#include <ibus.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include "ibusimcontext.h"
|
||||||
|
|
||||||
|
#if !GTK_CHECK_VERSION (2, 91, 0)
|
||||||
|
@@ -60,7 +61,8 @@ struct _IBusIMContext {
|
||||||
gboolean has_focus;
|
gboolean has_focus;
|
||||||
|
|
||||||
|
guint32 time;
|
||||||
- gint caps;
|
- gint caps;
|
||||||
-
|
|
||||||
+ guint supported_caps;
|
+ guint supported_caps;
|
||||||
+ guint caps;
|
+ guint caps;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _IBusIMContextClass {
|
struct _IBusIMContextClass {
|
||||||
@@ -106,11 +106,18 @@ static void ibus_im_context_set_curs
|
@@ -108,11 +110,18 @@ static void ibus_im_context_set_cursor_location
|
||||||
static void ibus_im_context_set_use_preedit
|
static void ibus_im_context_set_use_preedit
|
||||||
(GtkIMContext *context,
|
(GtkIMContext *context,
|
||||||
gboolean use_preedit);
|
gboolean use_preedit);
|
||||||
@ -249,7 +256,7 @@ index a6a11b4..0c15df9 100644
|
|||||||
|
|
||||||
static void _bus_connected_cb (IBusBus *bus,
|
static void _bus_connected_cb (IBusBus *bus,
|
||||||
IBusIMContext *context);
|
IBusIMContext *context);
|
||||||
@@ -124,14 +131,15 @@ static void _slave_preedit_start_cb
|
@@ -126,14 +135,15 @@ static void _slave_preedit_start_cb (GtkIMContext *slave,
|
||||||
IBusIMContext *context);
|
IBusIMContext *context);
|
||||||
static void _slave_preedit_end_cb (GtkIMContext *slave,
|
static void _slave_preedit_end_cb (GtkIMContext *slave,
|
||||||
IBusIMContext *context);
|
IBusIMContext *context);
|
||||||
@ -268,11 +275,11 @@ index a6a11b4..0c15df9 100644
|
|||||||
+ guint nchars,
|
+ guint nchars,
|
||||||
+ IBusIMContext *context);
|
+ IBusIMContext *context);
|
||||||
+static void _request_surrounding_text (IBusIMContext *context);
|
+static void _request_surrounding_text (IBusIMContext *context);
|
||||||
|
static void _create_fake_input_context (void);
|
||||||
|
|
||||||
static GType _ibus_type_im_context = 0;
|
|
||||||
static GtkIMContextClass *parent_class = NULL;
|
@@ -221,6 +231,17 @@ _focus_out_cb (GtkWidget *widget,
|
||||||
@@ -196,6 +204,17 @@ ibus_im_context_new (void)
|
return FALSE;
|
||||||
return IBUS_IM_CONTEXT (obj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+static void
|
+static void
|
||||||
@ -289,16 +296,16 @@ index a6a11b4..0c15df9 100644
|
|||||||
static gint
|
static gint
|
||||||
_key_snooper_cb (GtkWidget *widget,
|
_key_snooper_cb (GtkWidget *widget,
|
||||||
GdkEventKey *event,
|
GdkEventKey *event,
|
||||||
@@ -223,6 +242,8 @@ _key_snooper_cb (GtkWidget *widget,
|
@@ -311,6 +332,8 @@ _key_snooper_cb (GtkWidget *widget,
|
||||||
if (G_UNLIKELY (event->state & IBUS_IGNORED_MASK))
|
ibusimcontext->time = event->time;
|
||||||
return FALSE;
|
}
|
||||||
|
|
||||||
+ _request_surrounding_text (ibusimcontext);
|
+ _request_surrounding_text (ibusimcontext);
|
||||||
+
|
+
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
case GDK_KEY_RELEASE:
|
case GDK_KEY_RELEASE:
|
||||||
retval = ibus_input_context_process_key_event (ibuscontext,
|
retval = ibus_input_context_process_key_event (ibuscontext,
|
||||||
@@ -269,6 +290,7 @@ ibus_im_context_class_init (IBusIMCo
|
@@ -357,6 +380,7 @@ ibus_im_context_class_init (IBusIMContextClass *class)
|
||||||
im_context_class->set_client_window = ibus_im_context_set_client_window;
|
im_context_class->set_client_window = ibus_im_context_set_client_window;
|
||||||
im_context_class->set_cursor_location = ibus_im_context_set_cursor_location;
|
im_context_class->set_cursor_location = ibus_im_context_set_cursor_location;
|
||||||
im_context_class->set_use_preedit = ibus_im_context_set_use_preedit;
|
im_context_class->set_use_preedit = ibus_im_context_set_use_preedit;
|
||||||
@ -306,10 +313,10 @@ index a6a11b4..0c15df9 100644
|
|||||||
gobject_class->finalize = ibus_im_context_finalize;
|
gobject_class->finalize = ibus_im_context_finalize;
|
||||||
|
|
||||||
_signal_commit_id =
|
_signal_commit_id =
|
||||||
@@ -367,7 +389,12 @@ ibus_im_context_init (GObject *obj)
|
@@ -463,7 +487,12 @@ ibus_im_context_init (GObject *obj)
|
||||||
|
|
||||||
ibusimcontext->ibuscontext = NULL;
|
ibusimcontext->ibuscontext = NULL;
|
||||||
ibusimcontext->has_focus = FALSE;
|
ibusimcontext->has_focus = FALSE;
|
||||||
|
ibusimcontext->time = GDK_CURRENT_TIME;
|
||||||
- ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS | IBUS_CAP_SURROUNDING_TEXT;
|
- ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS | IBUS_CAP_SURROUNDING_TEXT;
|
||||||
+#ifdef ENABLE_SURROUNDING
|
+#ifdef ENABLE_SURROUNDING
|
||||||
+ ibusimcontext->supported_caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS | IBUS_CAP_SURROUNDING_TEXT;
|
+ ibusimcontext->supported_caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS | IBUS_CAP_SURROUNDING_TEXT;
|
||||||
@ -320,16 +327,16 @@ index a6a11b4..0c15df9 100644
|
|||||||
|
|
||||||
|
|
||||||
// Create slave im context
|
// Create slave im context
|
||||||
@@ -459,6 +486,8 @@ ibus_im_context_filter_keypress (GtkIMCo
|
@@ -559,6 +588,8 @@ ibus_im_context_filter_keypress (GtkIMContext *context,
|
||||||
if (ibusimcontext->client_window == NULL && event->window != NULL)
|
ibusimcontext->time = event->time;
|
||||||
gtk_im_context_set_client_window ((GtkIMContext *)ibusimcontext, event->window);
|
}
|
||||||
|
|
||||||
+ _request_surrounding_text (ibusimcontext);
|
+ _request_surrounding_text (ibusimcontext);
|
||||||
+
|
+
|
||||||
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,
|
||||||
@@ -516,6 +545,8 @@ ibus_im_context_focus_in (GtkIMContext *
|
@@ -623,6 +654,8 @@ ibus_im_context_focus_in (GtkIMContext *context)
|
||||||
(gpointer *) &_focus_im_context);
|
(gpointer *) &_focus_im_context);
|
||||||
_focus_im_context = context;
|
_focus_im_context = context;
|
||||||
}
|
}
|
||||||
@ -338,7 +345,7 @@ index a6a11b4..0c15df9 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -670,6 +701,25 @@ ibus_im_context_set_cursor_location (Gtk
|
@@ -780,6 +813,25 @@ ibus_im_context_set_cursor_location (GtkIMContext *context, GdkRectangle *area)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -364,7 +371,7 @@ index a6a11b4..0c15df9 100644
|
|||||||
ibus_im_context_set_use_preedit (GtkIMContext *context, gboolean use_preedit)
|
ibus_im_context_set_use_preedit (GtkIMContext *context, gboolean use_preedit)
|
||||||
{
|
{
|
||||||
IDEBUG ("%s", __FUNCTION__);
|
IDEBUG ("%s", __FUNCTION__);
|
||||||
@@ -678,17 +728,50 @@ ibus_im_context_set_use_preedit (GtkIMCo
|
@@ -788,17 +840,50 @@ ibus_im_context_set_use_preedit (GtkIMContext *context, gboolean use_preedit)
|
||||||
|
|
||||||
if(ibusimcontext->ibuscontext) {
|
if(ibusimcontext->ibuscontext) {
|
||||||
if (use_preedit) {
|
if (use_preedit) {
|
||||||
@ -418,7 +425,7 @@ index a6a11b4..0c15df9 100644
|
|||||||
_bus_connected_cb (IBusBus *bus,
|
_bus_connected_cb (IBusBus *bus,
|
||||||
IBusIMContext *ibusimcontext)
|
IBusIMContext *ibusimcontext)
|
||||||
{
|
{
|
||||||
@@ -704,6 +787,8 @@ _ibus_context_commit_text_cb (IBusInputC
|
@@ -817,6 +902,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);
|
||||||
@ -427,7 +434,7 @@ index a6a11b4..0c15df9 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -976,6 +1061,8 @@ _ibus_context_show_preedit_text_cb (IBus
|
@@ -1111,6 +1198,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);
|
||||||
@ -436,7 +443,7 @@ index a6a11b4..0c15df9 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1041,6 +1128,14 @@ _ibus_context_destroy_cb (IBusInputConte
|
@@ -1176,6 +1265,14 @@ _ibus_context_destroy_cb (IBusInputContext *ibuscontext,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -451,7 +458,7 @@ index a6a11b4..0c15df9 100644
|
|||||||
_create_input_context (IBusIMContext *ibusimcontext)
|
_create_input_context (IBusIMContext *ibusimcontext)
|
||||||
{
|
{
|
||||||
IDEBUG ("%s", __FUNCTION__);
|
IDEBUG ("%s", __FUNCTION__);
|
||||||
@@ -1083,6 +1178,10 @@ _create_input_context (IBusIMContext *ib
|
@@ -1218,6 +1315,10 @@ _create_input_context (IBusIMContext *ibusimcontext)
|
||||||
"disabled",
|
"disabled",
|
||||||
G_CALLBACK (_ibus_context_disabled_cb),
|
G_CALLBACK (_ibus_context_disabled_cb),
|
||||||
ibusimcontext);
|
ibusimcontext);
|
||||||
@ -462,7 +469,7 @@ index a6a11b4..0c15df9 100644
|
|||||||
g_signal_connect (ibusimcontext->ibuscontext, "destroy",
|
g_signal_connect (ibusimcontext->ibuscontext, "destroy",
|
||||||
G_CALLBACK (_ibus_context_destroy_cb),
|
G_CALLBACK (_ibus_context_destroy_cb),
|
||||||
ibusimcontext);
|
ibusimcontext);
|
||||||
@@ -1139,17 +1238,21 @@ _slave_preedit_end_cb (GtkIMContext *sl
|
@@ -1274,17 +1375,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -488,7 +495,7 @@ index a6a11b4..0c15df9 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,
|
||||||
@@ -1158,8 +1261,9 @@ _slave_delete_surrounding_cb (GtkIMConte
|
@@ -1293,9 +1398,10 @@ _slave_delete_surrounding_cb (GtkIMContext *slave,
|
||||||
gboolean return_value;
|
gboolean return_value;
|
||||||
|
|
||||||
if (ibusimcontext->enable && ibusimcontext->ibuscontext) {
|
if (ibusimcontext->enable && ibusimcontext->ibuscontext) {
|
||||||
@ -499,11 +506,12 @@ index a6a11b4..0c15df9 100644
|
|||||||
+ return return_value;
|
+ return return_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef OS_CHROMEOS
|
||||||
diff --git a/configure.ac b/configure.ac
|
diff --git a/configure.ac b/configure.ac
|
||||||
index ea0d32b..1347991 100644
|
index 1a1e663..def1986 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -405,6 +405,19 @@ AC_ARG_WITH(no-snooper-apps,
|
@@ -354,6 +354,19 @@ AC_ARG_WITH(no-snooper-apps,
|
||||||
AC_DEFINE_UNQUOTED(NO_SNOOPER_APPS, "$NO_SNOOPER_APPS",
|
AC_DEFINE_UNQUOTED(NO_SNOOPER_APPS, "$NO_SNOOPER_APPS",
|
||||||
[Does not enbale keyboard snooper in those applications])
|
[Does not enbale keyboard snooper in those applications])
|
||||||
|
|
||||||
@ -523,7 +531,7 @@ index ea0d32b..1347991 100644
|
|||||||
# check iso-codes
|
# check iso-codes
|
||||||
PKG_CHECK_MODULES(ISOCODES, [
|
PKG_CHECK_MODULES(ISOCODES, [
|
||||||
iso-codes
|
iso-codes
|
||||||
@@ -477,5 +490,6 @@ Build options:
|
@@ -424,5 +437,6 @@ Build options:
|
||||||
Build document $enable_gtk_doc
|
Build document $enable_gtk_doc
|
||||||
Enable key snooper $enable_key_snooper
|
Enable key snooper $enable_key_snooper
|
||||||
No snooper regexes "$NO_SNOOPER_APPS"
|
No snooper regexes "$NO_SNOOPER_APPS"
|
||||||
@ -569,10 +577,10 @@ index 2386c0f..5db2012 100644
|
|||||||
def SetCapabilities(self, cap): pass
|
def SetCapabilities(self, cap): pass
|
||||||
|
|
||||||
diff --git a/ibus/interface/iinputcontext.py b/ibus/interface/iinputcontext.py
|
diff --git a/ibus/interface/iinputcontext.py b/ibus/interface/iinputcontext.py
|
||||||
index 89f6dbd..2db1c9b 100644
|
index 89f6dbd..bb25c5a 100644
|
||||||
--- a/ibus/interface/iinputcontext.py
|
--- a/ibus/interface/iinputcontext.py
|
||||||
+++ b/ibus/interface/iinputcontext.py
|
+++ b/ibus/interface/iinputcontext.py
|
||||||
@@ -49,6 +49,9 @@ class IInputContext(dbus.service.Object)
|
@@ -49,6 +49,9 @@ class IInputContext(dbus.service.Object):
|
||||||
@method(in_signature="iiii")
|
@method(in_signature="iiii")
|
||||||
def SetCursorLocation(self, x, y, w, h): pass
|
def SetCursorLocation(self, x, y, w, h): pass
|
||||||
|
|
||||||
@ -582,7 +590,7 @@ index 89f6dbd..2db1c9b 100644
|
|||||||
@method()
|
@method()
|
||||||
def FocusIn(self): pass
|
def FocusIn(self): pass
|
||||||
|
|
||||||
@@ -137,4 +140,6 @@ class IInputContext(dbus.service.Object)
|
@@ -137,4 +140,6 @@ class IInputContext(dbus.service.Object):
|
||||||
@signal(signature="v")
|
@signal(signature="v")
|
||||||
def UpdateProperty(self, prop): pass
|
def UpdateProperty(self, prop): pass
|
||||||
|
|
||||||
@ -590,7 +598,7 @@ index 89f6dbd..2db1c9b 100644
|
|||||||
+ def EngineChanged(self): pass
|
+ def EngineChanged(self): pass
|
||||||
|
|
||||||
diff --git a/src/ibusengine.c b/src/ibusengine.c
|
diff --git a/src/ibusengine.c b/src/ibusengine.c
|
||||||
index ae07393..777d404 100644
|
index ae07393..f284af6 100644
|
||||||
--- a/src/ibusengine.c
|
--- a/src/ibusengine.c
|
||||||
+++ b/src/ibusengine.c
|
+++ b/src/ibusengine.c
|
||||||
@@ -45,6 +45,7 @@ enum {
|
@@ -45,6 +45,7 @@ enum {
|
||||||
@ -861,198 +869,8 @@ index 46d0a04..a5f5aea 100644
|
|||||||
* ibus_engine_get_name:
|
* ibus_engine_get_name:
|
||||||
* @engine: An IBusEngine.
|
* @engine: An IBusEngine.
|
||||||
* @returns: Name of IBusEngine.
|
* @returns: Name of IBusEngine.
|
||||||
diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c
|
|
||||||
index fc26a7c..4f08401 100644
|
|
||||||
--- a/src/ibusinputcontext.c
|
|
||||||
+++ b/src/ibusinputcontext.c
|
|
||||||
@@ -52,6 +52,7 @@ enum {
|
|
||||||
CURSOR_DOWN_LOOKUP_TABLE,
|
|
||||||
REGISTER_PROPERTIES,
|
|
||||||
UPDATE_PROPERTY,
|
|
||||||
+ ENGINE_CHANGED,
|
|
||||||
LAST_SIGNAL,
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -59,13 +60,20 @@ enum {
|
|
||||||
/* BusInputContextPriv */
|
|
||||||
struct _IBusInputContextPrivate {
|
|
||||||
gboolean own;
|
|
||||||
+
|
|
||||||
+ /* surrounding text */
|
|
||||||
+ IBusText *surrounding_text;
|
|
||||||
+ guint surrounding_cursor_pos;
|
|
||||||
};
|
|
||||||
typedef struct _IBusInputContextPrivate IBusInputContextPrivate;
|
|
||||||
|
|
||||||
static guint context_signals[LAST_SIGNAL] = { 0 };
|
|
||||||
// static guint context_signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
+static IBusText *text_empty = NULL;
|
|
||||||
+
|
|
||||||
/* functions prototype */
|
|
||||||
+static void ibus_input_context_real_destroy (IBusProxy *context);
|
|
||||||
static void ibus_input_context_g_signal (GDBusProxy *proxy,
|
|
||||||
const gchar *sender_name,
|
|
||||||
const gchar *signal_name,
|
|
||||||
@@ -76,10 +84,13 @@ G_DEFINE_TYPE (IBusInputContext, ibus_in
|
|
||||||
static void
|
|
||||||
ibus_input_context_class_init (IBusInputContextClass *class)
|
|
||||||
{
|
|
||||||
+ IBusProxyClass *ibus_proxy_class = IBUS_PROXY_CLASS (class);
|
|
||||||
GDBusProxyClass *g_dbus_proxy_class = G_DBUS_PROXY_CLASS (class);
|
|
||||||
|
|
||||||
g_type_class_add_private (class, sizeof (IBusInputContextPrivate));
|
|
||||||
|
|
||||||
+ ibus_proxy_class->destroy = ibus_input_context_real_destroy;
|
|
||||||
+
|
|
||||||
g_dbus_proxy_class->g_signal = ibus_input_context_g_signal;
|
|
||||||
|
|
||||||
/* install signals */
|
|
||||||
@@ -114,6 +125,21 @@ ibus_input_context_class_init (IBusInput
|
|
||||||
G_TYPE_NONE, 0);
|
|
||||||
|
|
||||||
/**
|
|
||||||
+ * IBusInputContext::engine-changed:
|
|
||||||
+ * @context: An IBusInputContext.
|
|
||||||
+ *
|
|
||||||
+ * Emitted when an IME is changed.
|
|
||||||
+ */
|
|
||||||
+ context_signals[ENGINE_CHANGED] =
|
|
||||||
+ g_signal_new (I_("engine-changed"),
|
|
||||||
+ G_TYPE_FROM_CLASS (class),
|
|
||||||
+ G_SIGNAL_RUN_LAST,
|
|
||||||
+ 0,
|
|
||||||
+ NULL, NULL,
|
|
||||||
+ _ibus_marshal_VOID__VOID,
|
|
||||||
+ G_TYPE_NONE, 0);
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
* IBusInputContext::commit-text:
|
|
||||||
* @context: An IBusInputContext.
|
|
||||||
* @text: Text to be committed.
|
|
||||||
@@ -442,6 +468,9 @@ ibus_input_context_class_init (IBusInput
|
|
||||||
G_TYPE_NONE,
|
|
||||||
1,
|
|
||||||
IBUS_TYPE_PROPERTY);
|
|
||||||
+
|
|
||||||
+ text_empty = ibus_text_new_from_static_string ("");
|
|
||||||
+ g_object_ref_sink (text_empty);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -450,6 +479,22 @@ ibus_input_context_init (IBusInputContex
|
|
||||||
IBusInputContextPrivate *priv;
|
|
||||||
priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (context);
|
|
||||||
priv->own = TRUE;
|
|
||||||
+ priv->surrounding_text = g_object_ref_sink (text_empty);
|
|
||||||
+ priv->surrounding_cursor_pos = 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+ibus_input_context_real_destroy (IBusProxy *context)
|
|
||||||
+{
|
|
||||||
+ IBusInputContextPrivate *priv;
|
|
||||||
+ priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (IBUS_INPUT_CONTEXT (context));
|
|
||||||
+
|
|
||||||
+ if (priv->surrounding_text) {
|
|
||||||
+ g_object_unref (priv->surrounding_text);
|
|
||||||
+ priv->surrounding_text = NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ IBUS_PROXY_CLASS(ibus_input_context_parent_class)->destroy (context);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -479,6 +524,7 @@ ibus_input_context_g_signal (GDBusProxy
|
|
||||||
{ "PageDownLookupTable", PAGE_DOWN_LOOKUP_TABLE },
|
|
||||||
{ "CursorUpLookupTable", CURSOR_UP_LOOKUP_TABLE },
|
|
||||||
{ "CursorDownLookupTable", CURSOR_DOWN_LOOKUP_TABLE },
|
|
||||||
+ { "EngineChanged", ENGINE_CHANGED },
|
|
||||||
};
|
|
||||||
|
|
||||||
if (g_strcmp0 (signal_name, "CommitText") == 0) {
|
|
||||||
@@ -821,6 +867,38 @@ ibus_input_context_property_hide (IBusIn
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void
|
|
||||||
+ibus_input_context_set_surrounding_text (IBusInputContext *context,
|
|
||||||
+ IBusText *text,
|
|
||||||
+ guint32 cursor_pos)
|
|
||||||
+{
|
|
||||||
+ g_assert (IBUS_IS_INPUT_CONTEXT (context));
|
|
||||||
+ g_assert (IBUS_IS_TEXT (text));
|
|
||||||
+
|
|
||||||
+ IBusInputContextPrivate *priv;
|
|
||||||
+ priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (context);
|
|
||||||
+
|
|
||||||
+ if (priv->surrounding_text == NULL ||
|
|
||||||
+ g_strcmp0 (text->text, priv->surrounding_text->text) != 0 ||
|
|
||||||
+ cursor_pos != priv->surrounding_cursor_pos) {
|
|
||||||
+ GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text);
|
|
||||||
+ if (priv->surrounding_text)
|
|
||||||
+ g_object_unref (priv->surrounding_text);
|
|
||||||
+ priv->surrounding_text = (IBusText *) g_object_ref_sink (text);
|
|
||||||
+ priv->surrounding_cursor_pos = cursor_pos;
|
|
||||||
+
|
|
||||||
+ g_dbus_proxy_call ((GDBusProxy *) context,
|
|
||||||
+ "SetSurroundingText", /* method_name */
|
|
||||||
+ g_variant_new ("(vu)", variant, cursor_pos), /* parameters */
|
|
||||||
+ G_DBUS_CALL_FLAGS_NONE, /* flags */
|
|
||||||
+ -1, /* timeout */
|
|
||||||
+ NULL, /* cancellable */
|
|
||||||
+ NULL, /* callback */
|
|
||||||
+ NULL /* user_data */
|
|
||||||
+ );
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
gboolean
|
|
||||||
ibus_input_context_is_enabled (IBusInputContext *context)
|
|
||||||
{
|
|
||||||
diff --git a/src/ibusinputcontext.h b/src/ibusinputcontext.h
|
|
||||||
index 8b1f16c..fb65348 100644
|
|
||||||
--- a/src/ibusinputcontext.h
|
|
||||||
+++ b/src/ibusinputcontext.h
|
|
||||||
@@ -41,6 +41,7 @@
|
|
||||||
|
|
||||||
#include "ibusproxy.h"
|
|
||||||
#include "ibusenginedesc.h"
|
|
||||||
+#include "ibustext.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Type macros.
|
|
||||||
@@ -279,6 +280,16 @@ IBusEngineDesc
|
|
||||||
void ibus_input_context_set_engine (IBusInputContext *context,
|
|
||||||
const gchar *name);
|
|
||||||
|
|
||||||
+/**
|
|
||||||
+ * ibus_input_context_set_surrounding_text:
|
|
||||||
+ * @context: An IBusInputContext.
|
|
||||||
+ * @text: An IBusText surrounding the current cursor on the application.
|
|
||||||
+ * @cursor_po: Current cursor position in characters in @text.
|
|
||||||
+*/
|
|
||||||
+void ibus_input_context_set_surrounding_text
|
|
||||||
+ (IBusInputContext *context,
|
|
||||||
+ IBusText *text,
|
|
||||||
+ guint32 cursor_pos);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
#endif
|
|
||||||
diff --git a/src/ibusmarshalers.list b/src/ibusmarshalers.list
|
|
||||||
index 5184278..5dc7fc2 100644
|
|
||||||
--- a/src/ibusmarshalers.list
|
|
||||||
+++ b/src/ibusmarshalers.list
|
|
||||||
@@ -13,6 +13,7 @@ VOID:INT,INT,INT,INT
|
|
||||||
VOID:UINT,UINT
|
|
||||||
VOID:INT,UINT
|
|
||||||
VOID:UINT,UINT,UINT
|
|
||||||
+VOID:OBJECT,UINT
|
|
||||||
VOID:OBJECT,UINT,BOOL
|
|
||||||
VOID:OBJECT,UINT,BOOL,UINT
|
|
||||||
VOID:OBJECT,BOOL
|
|
||||||
diff --git a/src/ibusenginedesc.c b/src/ibusenginedesc.c
|
diff --git a/src/ibusenginedesc.c b/src/ibusenginedesc.c
|
||||||
index 5184278..5dc7fc2 100644
|
index ca5ef60..956ce73 100644
|
||||||
--- a/src/ibusenginedesc.c
|
--- a/src/ibusenginedesc.c
|
||||||
+++ b/src/ibusenginedesc.c
|
+++ b/src/ibusenginedesc.c
|
||||||
@@ -22,6 +22,7 @@
|
@@ -22,6 +22,7 @@
|
||||||
@ -1079,7 +897,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define IBUS_ENGINE_DESC_GET_PRIVATE(o) \
|
#define IBUS_ENGINE_DESC_GET_PRIVATE(o) \
|
||||||
@@ -79,9 +82,20 @@ static gboolean ibus_engine_desc_cop
|
@@ -79,9 +82,20 @@ static gboolean ibus_engine_desc_copy (IBusEngineDesc *des
|
||||||
const IBusEngineDesc *src);
|
const IBusEngineDesc *src);
|
||||||
static gboolean ibus_engine_desc_parse_xml_node (IBusEngineDesc *desc,
|
static gboolean ibus_engine_desc_parse_xml_node (IBusEngineDesc *desc,
|
||||||
XMLNode *node);
|
XMLNode *node);
|
||||||
@ -1100,7 +918,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
ibus_engine_desc_class_init (IBusEngineDescClass *class)
|
ibus_engine_desc_class_init (IBusEngineDescClass *class)
|
||||||
@@ -232,6 +246,21 @@ ibus_engine_desc_class_init (IBusEngineD
|
@@ -232,6 +246,21 @@ ibus_engine_desc_class_init (IBusEngineDescClass *class)
|
||||||
"The hotkeys of engine description",
|
"The hotkeys of engine description",
|
||||||
"",
|
"",
|
||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||||
@ -1122,7 +940,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -249,6 +278,7 @@ ibus_engine_desc_init (IBusEngineDesc *d
|
@@ -249,6 +278,7 @@ ibus_engine_desc_init (IBusEngineDesc *desc)
|
||||||
desc->priv->layout = NULL;
|
desc->priv->layout = NULL;
|
||||||
desc->priv->rank = 0;
|
desc->priv->rank = 0;
|
||||||
desc->priv->hotkeys = NULL;
|
desc->priv->hotkeys = NULL;
|
||||||
@ -1130,7 +948,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -313,6 +343,9 @@ ibus_engine_desc_set_property (IBusEngin
|
@@ -313,6 +343,9 @@ ibus_engine_desc_set_property (IBusEngineDesc *desc,
|
||||||
g_assert (desc->priv->hotkeys == NULL);
|
g_assert (desc->priv->hotkeys == NULL);
|
||||||
desc->priv->hotkeys = g_value_dup_string (value);
|
desc->priv->hotkeys = g_value_dup_string (value);
|
||||||
break;
|
break;
|
||||||
@ -1140,7 +958,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (desc, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (desc, prop_id, pspec);
|
||||||
}
|
}
|
||||||
@@ -355,6 +388,9 @@ ibus_engine_desc_get_property (IBusEngin
|
@@ -355,6 +388,9 @@ ibus_engine_desc_get_property (IBusEngineDesc *desc,
|
||||||
case PROP_HOTKEYS:
|
case PROP_HOTKEYS:
|
||||||
g_value_set_string (value, ibus_engine_desc_get_hotkeys (desc));
|
g_value_set_string (value, ibus_engine_desc_get_hotkeys (desc));
|
||||||
break;
|
break;
|
||||||
@ -1150,7 +968,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (desc, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (desc, prop_id, pspec);
|
||||||
}
|
}
|
||||||
@@ -382,9 +418,28 @@ ibus_engine_desc_serialize (IBusEngineDe
|
@@ -382,9 +418,28 @@ ibus_engine_desc_serialize (IBusEngineDesc *desc,
|
||||||
g_variant_builder_add (builder, "u", desc->priv->rank);
|
g_variant_builder_add (builder, "u", desc->priv->rank);
|
||||||
g_variant_builder_add (builder, "s", NOTNULL (desc->priv->hotkeys));
|
g_variant_builder_add (builder, "s", NOTNULL (desc->priv->hotkeys));
|
||||||
#undef NOTNULL
|
#undef NOTNULL
|
||||||
@ -1179,7 +997,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
static gint
|
static gint
|
||||||
ibus_engine_desc_deserialize (IBusEngineDesc *desc,
|
ibus_engine_desc_deserialize (IBusEngineDesc *desc,
|
||||||
GVariant *variant)
|
GVariant *variant)
|
||||||
@@ -405,6 +460,23 @@ ibus_engine_desc_deserialize (IBusEngine
|
@@ -405,6 +460,23 @@ ibus_engine_desc_deserialize (IBusEngineDesc *desc,
|
||||||
g_variant_get_child (variant, retval++, "u", &desc->priv->rank);
|
g_variant_get_child (variant, retval++, "u", &desc->priv->rank);
|
||||||
g_variant_get_child (variant, retval++, "s", &desc->priv->hotkeys);
|
g_variant_get_child (variant, retval++, "s", &desc->priv->hotkeys);
|
||||||
|
|
||||||
@ -1203,7 +1021,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -428,6 +500,7 @@ ibus_engine_desc_copy (IBusEngineDesc
|
@@ -428,6 +500,7 @@ ibus_engine_desc_copy (IBusEngineDesc *dest,
|
||||||
dest->priv->layout = g_strdup (src->priv->layout);
|
dest->priv->layout = g_strdup (src->priv->layout);
|
||||||
dest->priv->rank = src->priv->rank;
|
dest->priv->rank = src->priv->rank;
|
||||||
dest->priv->hotkeys = g_strdup (src->priv->hotkeys);
|
dest->priv->hotkeys = g_strdup (src->priv->hotkeys);
|
||||||
@ -1211,7 +1029,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -439,6 +512,52 @@ ibus_engine_desc_copy (IBusEngineDesc
|
@@ -439,6 +512,52 @@ ibus_engine_desc_copy (IBusEngineDesc *dest,
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1264,7 +1082,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
void
|
void
|
||||||
ibus_engine_desc_output (IBusEngineDesc *desc,
|
ibus_engine_desc_output (IBusEngineDesc *desc,
|
||||||
GString *output,
|
GString *output,
|
||||||
@@ -467,6 +586,13 @@ ibus_engine_desc_output (IBusEngineDesc
|
@@ -467,6 +586,13 @@ ibus_engine_desc_output (IBusEngineDesc *desc,
|
||||||
OUTPUT_ENTRY_1(hotkeys);
|
OUTPUT_ENTRY_1(hotkeys);
|
||||||
g_string_append_indent (output, indent + 1);
|
g_string_append_indent (output, indent + 1);
|
||||||
g_string_append_printf (output, "<rank>%u</rank>\n", desc->priv->rank);
|
g_string_append_printf (output, "<rank>%u</rank>\n", desc->priv->rank);
|
||||||
@ -1278,7 +1096,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
#undef OUTPUT_ENTRY
|
#undef OUTPUT_ENTRY
|
||||||
#undef OUTPUT_ENTRY_1
|
#undef OUTPUT_ENTRY_1
|
||||||
g_string_append_indent (output, indent);
|
g_string_append_indent (output, indent);
|
||||||
@@ -504,6 +630,11 @@ ibus_engine_desc_parse_xml_node (IBusEng
|
@@ -504,6 +630,11 @@ ibus_engine_desc_parse_xml_node (IBusEngineDesc *desc,
|
||||||
desc->priv->rank = atoi (sub_node->text);
|
desc->priv->rank = atoi (sub_node->text);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1290,7 +1108,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
g_warning ("<engines> element contains invalidate element <%s>", sub_node->name);
|
g_warning ("<engines> element contains invalidate element <%s>", sub_node->name);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -526,6 +657,7 @@ IBUS_ENGINE_DESC_GET_PROPERTY (icon, con
|
@@ -526,6 +657,7 @@ IBUS_ENGINE_DESC_GET_PROPERTY (icon, const gchar *)
|
||||||
IBUS_ENGINE_DESC_GET_PROPERTY (layout, const gchar *)
|
IBUS_ENGINE_DESC_GET_PROPERTY (layout, const gchar *)
|
||||||
IBUS_ENGINE_DESC_GET_PROPERTY (rank, guint)
|
IBUS_ENGINE_DESC_GET_PROPERTY (rank, guint)
|
||||||
IBUS_ENGINE_DESC_GET_PROPERTY (hotkeys, const gchar *)
|
IBUS_ENGINE_DESC_GET_PROPERTY (hotkeys, const gchar *)
|
||||||
@ -1299,10 +1117,10 @@ index 5184278..5dc7fc2 100644
|
|||||||
|
|
||||||
IBusEngineDesc *
|
IBusEngineDesc *
|
||||||
diff --git a/src/ibusenginedesc.h b/src/ibusenginedesc.h
|
diff --git a/src/ibusenginedesc.h b/src/ibusenginedesc.h
|
||||||
index 5184278..5dc7fc2 100644
|
index 9718b15..209d460 100644
|
||||||
--- a/src/ibusenginedesc.h
|
--- a/src/ibusenginedesc.h
|
||||||
+++ b/src/ibusenginedesc.h
|
+++ b/src/ibusenginedesc.h
|
||||||
@@ -90,6 +90,8 @@ typedef struct _IBusEngineDescClass IBus
|
@@ -90,6 +90,8 @@ typedef struct _IBusEngineDescClass IBusEngineDescClass;
|
||||||
* the front.
|
* the front.
|
||||||
* hotkeys: One or more hotkeys for switching to this engine, separated by
|
* hotkeys: One or more hotkeys for switching to this engine, separated by
|
||||||
* semi-colon.
|
* semi-colon.
|
||||||
@ -1311,7 +1129,7 @@ index 5184278..5dc7fc2 100644
|
|||||||
*/
|
*/
|
||||||
struct _IBusEngineDesc {
|
struct _IBusEngineDesc {
|
||||||
IBusSerializable parent;
|
IBusSerializable parent;
|
||||||
@@ -249,6 +251,15 @@ guint ibus_engine_desc_get_ra
|
@@ -249,6 +251,15 @@ guint ibus_engine_desc_get_rank (IBusEngineDesc *info);
|
||||||
const gchar *ibus_engine_desc_get_hotkeys (IBusEngineDesc *info);
|
const gchar *ibus_engine_desc_get_hotkeys (IBusEngineDesc *info);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1327,6 +1145,204 @@ index 5184278..5dc7fc2 100644
|
|||||||
* ibus_engine_desc_output:
|
* ibus_engine_desc_output:
|
||||||
* @info: An IBusEngineDesc
|
* @info: An IBusEngineDesc
|
||||||
* @output: XML-formatted Input method engine description.
|
* @output: XML-formatted Input method engine description.
|
||||||
|
diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c
|
||||||
|
index 3d25f68..097f203 100644
|
||||||
|
--- a/src/ibusinputcontext.c
|
||||||
|
+++ b/src/ibusinputcontext.c
|
||||||
|
@@ -28,6 +28,9 @@
|
||||||
|
#include "ibuslookuptable.h"
|
||||||
|
#include "ibusproplist.h"
|
||||||
|
|
||||||
|
+#define IBUS_INPUT_CONTEXT_GET_PRIVATE(o) \
|
||||||
|
+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_INPUT_CONTEXT, IBusInputContextPrivate))
|
||||||
|
+
|
||||||
|
enum {
|
||||||
|
ENABLED,
|
||||||
|
DISABLED,
|
||||||
|
@@ -49,12 +52,25 @@ enum {
|
||||||
|
CURSOR_DOWN_LOOKUP_TABLE,
|
||||||
|
REGISTER_PROPERTIES,
|
||||||
|
UPDATE_PROPERTY,
|
||||||
|
+ ENGINE_CHANGED,
|
||||||
|
LAST_SIGNAL,
|
||||||
|
};
|
||||||
|
|
||||||
|
+/* BusInputContextPrivate */
|
||||||
|
+struct _IBusInputContextPrivate {
|
||||||
|
+ /* surrounding text */
|
||||||
|
+ IBusText *surrounding_text;
|
||||||
|
+ guint surrounding_cursor_pos;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+typedef struct _IBusInputContextPrivate IBusInputContextPrivate;
|
||||||
|
+
|
||||||
|
static guint context_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
|
+static IBusText *text_empty = NULL;
|
||||||
|
+
|
||||||
|
/* functions prototype */
|
||||||
|
+static void ibus_input_context_real_destroy (IBusProxy *context);
|
||||||
|
static void ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||||
|
const gchar *sender_name,
|
||||||
|
const gchar *signal_name,
|
||||||
|
@@ -65,8 +81,13 @@ G_DEFINE_TYPE (IBusInputContext, ibus_input_context, IBUS_TYPE_PROXY)
|
||||||
|
static void
|
||||||
|
ibus_input_context_class_init (IBusInputContextClass *class)
|
||||||
|
{
|
||||||
|
+ IBusProxyClass *ibus_proxy_class = IBUS_PROXY_CLASS (class);
|
||||||
|
GDBusProxyClass *g_dbus_proxy_class = G_DBUS_PROXY_CLASS (class);
|
||||||
|
|
||||||
|
+ g_type_class_add_private (class, sizeof (IBusInputContextPrivate));
|
||||||
|
+
|
||||||
|
+ ibus_proxy_class->destroy = ibus_input_context_real_destroy;
|
||||||
|
+
|
||||||
|
g_dbus_proxy_class->g_signal = ibus_input_context_g_signal;
|
||||||
|
|
||||||
|
/* install signals */
|
||||||
|
@@ -101,6 +122,21 @@ ibus_input_context_class_init (IBusInputContextClass *class)
|
||||||
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
+ * IBusInputContext::engine-changed:
|
||||||
|
+ * @context: An IBusInputContext.
|
||||||
|
+ *
|
||||||
|
+ * Emitted when an IME is changed.
|
||||||
|
+ */
|
||||||
|
+ context_signals[ENGINE_CHANGED] =
|
||||||
|
+ g_signal_new (I_("engine-changed"),
|
||||||
|
+ G_TYPE_FROM_CLASS (class),
|
||||||
|
+ G_SIGNAL_RUN_LAST,
|
||||||
|
+ 0,
|
||||||
|
+ NULL, NULL,
|
||||||
|
+ _ibus_marshal_VOID__VOID,
|
||||||
|
+ G_TYPE_NONE, 0);
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
* IBusInputContext::commit-text:
|
||||||
|
* @context: An IBusInputContext.
|
||||||
|
* @text: Text to be committed.
|
||||||
|
@@ -429,11 +465,33 @@ ibus_input_context_class_init (IBusInputContextClass *class)
|
||||||
|
G_TYPE_NONE,
|
||||||
|
1,
|
||||||
|
IBUS_TYPE_PROPERTY);
|
||||||
|
+
|
||||||
|
+ text_empty = ibus_text_new_from_static_string ("");
|
||||||
|
+ g_object_ref_sink (text_empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ibus_input_context_init (IBusInputContext *context)
|
||||||
|
{
|
||||||
|
+ IBusInputContextPrivate *priv;
|
||||||
|
+
|
||||||
|
+ priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (context);
|
||||||
|
+ priv->surrounding_text = g_object_ref_sink (text_empty);
|
||||||
|
+ priv->surrounding_cursor_pos = 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+ibus_input_context_real_destroy (IBusProxy *context)
|
||||||
|
+{
|
||||||
|
+ IBusInputContextPrivate *priv;
|
||||||
|
+ priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (IBUS_INPUT_CONTEXT (context));
|
||||||
|
+
|
||||||
|
+ if (priv->surrounding_text) {
|
||||||
|
+ g_object_unref (priv->surrounding_text);
|
||||||
|
+ priv->surrounding_text = NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ IBUS_PROXY_CLASS(ibus_input_context_parent_class)->destroy (context);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
@@ -463,6 +521,7 @@ ibus_input_context_g_signal (GDBusProxy *proxy,
|
||||||
|
{ "PageDownLookupTable", PAGE_DOWN_LOOKUP_TABLE },
|
||||||
|
{ "CursorUpLookupTable", CURSOR_UP_LOOKUP_TABLE },
|
||||||
|
{ "CursorDownLookupTable", CURSOR_DOWN_LOOKUP_TABLE },
|
||||||
|
+ { "EngineChanged", ENGINE_CHANGED },
|
||||||
|
};
|
||||||
|
|
||||||
|
if (g_strcmp0 (signal_name, "CommitText") == 0) {
|
||||||
|
@@ -805,6 +864,38 @@ ibus_input_context_property_hide (IBusInputContext *context,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
+void
|
||||||
|
+ibus_input_context_set_surrounding_text (IBusInputContext *context,
|
||||||
|
+ IBusText *text,
|
||||||
|
+ guint32 cursor_pos)
|
||||||
|
+{
|
||||||
|
+ g_assert (IBUS_IS_INPUT_CONTEXT (context));
|
||||||
|
+ g_assert (IBUS_IS_TEXT (text));
|
||||||
|
+
|
||||||
|
+ IBusInputContextPrivate *priv;
|
||||||
|
+ priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (context);
|
||||||
|
+
|
||||||
|
+ if (priv->surrounding_text == NULL ||
|
||||||
|
+ g_strcmp0 (text->text, priv->surrounding_text->text) != 0 ||
|
||||||
|
+ cursor_pos != priv->surrounding_cursor_pos) {
|
||||||
|
+ GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text);
|
||||||
|
+ if (priv->surrounding_text)
|
||||||
|
+ g_object_unref (priv->surrounding_text);
|
||||||
|
+ priv->surrounding_text = (IBusText *) g_object_ref_sink (text);
|
||||||
|
+ priv->surrounding_cursor_pos = cursor_pos;
|
||||||
|
+
|
||||||
|
+ g_dbus_proxy_call ((GDBusProxy *) context,
|
||||||
|
+ "SetSurroundingText", /* method_name */
|
||||||
|
+ g_variant_new ("(vu)", variant, cursor_pos), /* parameters */
|
||||||
|
+ G_DBUS_CALL_FLAGS_NONE, /* flags */
|
||||||
|
+ -1, /* timeout */
|
||||||
|
+ NULL, /* cancellable */
|
||||||
|
+ NULL, /* callback */
|
||||||
|
+ NULL /* user_data */
|
||||||
|
+ );
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
gboolean
|
||||||
|
ibus_input_context_is_enabled (IBusInputContext *context)
|
||||||
|
{
|
||||||
|
diff --git a/src/ibusinputcontext.h b/src/ibusinputcontext.h
|
||||||
|
index fa7d976..b3e8c96 100644
|
||||||
|
--- a/src/ibusinputcontext.h
|
||||||
|
+++ b/src/ibusinputcontext.h
|
||||||
|
@@ -41,6 +41,7 @@
|
||||||
|
|
||||||
|
#include "ibusproxy.h"
|
||||||
|
#include "ibusenginedesc.h"
|
||||||
|
+#include "ibustext.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type macros.
|
||||||
|
@@ -279,6 +280,16 @@ IBusEngineDesc
|
||||||
|
void ibus_input_context_set_engine (IBusInputContext *context,
|
||||||
|
const gchar *name);
|
||||||
|
|
||||||
|
+/**
|
||||||
|
+ * ibus_input_context_set_surrounding_text:
|
||||||
|
+ * @context: An IBusInputContext.
|
||||||
|
+ * @text: An IBusText surrounding the current cursor on the application.
|
||||||
|
+ * @cursor_po: Current cursor position in characters in @text.
|
||||||
|
+*/
|
||||||
|
+void ibus_input_context_set_surrounding_text
|
||||||
|
+ (IBusInputContext *context,
|
||||||
|
+ IBusText *text,
|
||||||
|
+ guint32 cursor_pos);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
#endif
|
||||||
|
diff --git a/src/ibusmarshalers.list b/src/ibusmarshalers.list
|
||||||
|
index 5184278..5dc7fc2 100644
|
||||||
|
--- a/src/ibusmarshalers.list
|
||||||
|
+++ b/src/ibusmarshalers.list
|
||||||
|
@@ -13,6 +13,7 @@ VOID:INT,INT,INT,INT
|
||||||
|
VOID:UINT,UINT
|
||||||
|
VOID:INT,UINT
|
||||||
|
VOID:UINT,UINT,UINT
|
||||||
|
+VOID:OBJECT,UINT
|
||||||
|
VOID:OBJECT,UINT,BOOL
|
||||||
|
VOID:OBJECT,UINT,BOOL,UINT
|
||||||
|
VOID:OBJECT,BOOL
|
||||||
--
|
--
|
||||||
1.7.3.2
|
1.7.3.2
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
From 6819ae6b980d0c22e498aa367b8d9c0791acf9be Mon Sep 17 00:00:00 2001
|
From aef8d6fa4118336f562f74580f0f1986d8054be5 Mon Sep 17 00:00:00 2001
|
||||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||||
Date: Thu, 9 Dec 2010 15:03:08 +0900
|
Date: Wed, 26 Jan 2011 15:42:56 +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,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,
|
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 | 229 +++++++++++++++++++++++++++++++++++--------------
|
bus/ibusimpl.c | 241 ++++++++++++++++++++++++++++++++++----------------
|
||||||
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, 242 insertions(+), 74 deletions(-)
|
6 files changed, 242 insertions(+), 86 deletions(-)
|
||||||
|
|
||||||
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
|
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
|
||||||
index d7e496d..6f39fac 100644
|
index cbcf7f4..1bb159e 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_previo
|
||||||
static void bus_ibus_impl_set_preload_engines
|
static void bus_ibus_impl_set_preload_engines
|
||||||
(BusIBusImpl *ibus,
|
(BusIBusImpl *ibus,
|
||||||
GVariant *value);
|
GVariant *value);
|
||||||
@ -40,7 +40,7 @@ index d7e496d..6f39fac 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,123 @@ _panel_destroy_cb (BusPanelProxy *panel,
|
@@ -270,6 +273,123 @@ _panel_destroy_cb (BusPanelProxy *panel,
|
||||||
g_object_unref (panel);
|
g_object_unref (panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,16 +164,16 @@ index d7e496d..6f39fac 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 +467,32 @@ static void
|
@@ -354,34 +474,32 @@ static void
|
||||||
bus_ibus_impl_set_preload_engines (BusIBusImpl *ibus,
|
bus_ibus_impl_set_preload_engines (BusIBusImpl *ibus,
|
||||||
GVariant *value)
|
GVariant *value)
|
||||||
{
|
{
|
||||||
- GList *engine_list = NULL;
|
- GList *engine_list = NULL;
|
||||||
-
|
|
||||||
- g_list_foreach (ibus->engine_list, (GFunc) g_object_unref, NULL);
|
|
||||||
- g_list_free (ibus->engine_list);
|
|
||||||
+ gint preload_engine_mode = _get_config_preload_engine_mode (ibus);
|
+ 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);
|
||||||
|
-
|
||||||
- if (value != NULL && g_variant_classify (value) == G_VARIANT_CLASS_ARRAY) {
|
- if (value != NULL && g_variant_classify (value) == G_VARIANT_CLASS_ARRAY) {
|
||||||
- GVariantIter iter;
|
- GVariantIter iter;
|
||||||
- g_variant_iter_init (&iter, value);
|
- g_variant_iter_init (&iter, value);
|
||||||
@ -218,7 +218,7 @@ index d7e496d..6f39fac 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -452,69 +570,47 @@ bus_ibus_impl_set_use_global_engine (BusIBusImpl *ibus,
|
@@ -459,79 +577,47 @@ bus_ibus_impl_set_use_global_engine (Bus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,14 +304,24 @@ index d7e496d..6f39fac 100644
|
|||||||
- if (ibus_engine_desc_get_rank (desc) > 0)
|
- if (ibus_engine_desc_get_rank (desc) > 0)
|
||||||
- g_variant_builder_add (&builder, "s", ibus_engine_desc_get_name (desc));
|
- g_variant_builder_add (&builder, "s", ibus_engine_desc_get_name (desc));
|
||||||
- }
|
- }
|
||||||
|
-
|
||||||
|
- GVariant *value = g_variant_builder_end (&builder);
|
||||||
|
- if (value != NULL) {
|
||||||
|
- if (g_variant_n_children (value) > 0) {
|
||||||
- ibus_config_set_value (ibus->config,
|
- ibus_config_set_value (ibus->config,
|
||||||
- "general", "preload_engines", g_variant_builder_end (&builder));
|
- "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);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
- g_list_free (engines);
|
- g_list_free (engines);
|
||||||
+ _set_language_relative_preload_engines (ibus);
|
+ _set_language_relative_preload_engines (ibus);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The list of config entries that are related to ibus-daemon. */
|
/* The list of config entries that are related to ibus-daemon. */
|
||||||
@@ -527,6 +623,7 @@ const static struct {
|
@@ -544,6 +630,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 },
|
||||||
@ -320,7 +330,7 @@ index d7e496d..6f39fac 100644
|
|||||||
{ "general", "use_global_engine", bus_ibus_impl_set_use_global_engine },
|
{ "general", "use_global_engine", bus_ibus_impl_set_use_global_engine },
|
||||||
{ "general", "embed_preedit_text", bus_ibus_impl_set_embed_preedit_text },
|
{ "general", "embed_preedit_text", bus_ibus_impl_set_embed_preedit_text },
|
||||||
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 aa66aa5..9b82857 100644
|
index 54709ce..2ed0321 100644
|
||||||
--- a/data/ibus.schemas.in
|
--- a/data/ibus.schemas.in
|
||||||
+++ b/data/ibus.schemas.in
|
+++ b/data/ibus.schemas.in
|
||||||
@@ -13,6 +13,19 @@
|
@@ -13,6 +13,19 @@
|
||||||
@ -344,7 +354,7 @@ index aa66aa5..9b82857 100644
|
|||||||
<applyto>/desktop/ibus/general/hotkey/trigger</applyto>
|
<applyto>/desktop/ibus/general/hotkey/trigger</applyto>
|
||||||
<owner>ibus</owner>
|
<owner>ibus</owner>
|
||||||
diff --git a/ibus/common.py b/ibus/common.py
|
diff --git a/ibus/common.py b/ibus/common.py
|
||||||
index cbc8d56..db881fc 100644
|
index 763ed1c..1264787 100644
|
||||||
--- a/ibus/common.py
|
--- a/ibus/common.py
|
||||||
+++ b/ibus/common.py
|
+++ b/ibus/common.py
|
||||||
@@ -33,6 +33,8 @@ __all__ = (
|
@@ -33,6 +33,8 @@ __all__ = (
|
||||||
@ -368,10 +378,10 @@ index cbc8d56..db881fc 100644
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
diff --git a/setup/main.py b/setup/main.py
|
diff --git a/setup/main.py b/setup/main.py
|
||||||
index 96e9456..215670d 100644
|
index 8bac900..c855b86 100644
|
||||||
--- a/setup/main.py
|
--- a/setup/main.py
|
||||||
+++ b/setup/main.py
|
+++ b/setup/main.py
|
||||||
@@ -190,15 +190,22 @@ class Setup(object):
|
@@ -191,15 +191,22 @@ class Setup(object):
|
||||||
self.__checkbutton_use_global_engine.connect("toggled", self.__checkbutton_use_global_engine_toggled_cb)
|
self.__checkbutton_use_global_engine.connect("toggled", self.__checkbutton_use_global_engine_toggled_cb)
|
||||||
|
|
||||||
# init engine page
|
# init engine page
|
||||||
@ -399,7 +409,7 @@ index 96e9456..215670d 100644
|
|||||||
|
|
||||||
self.__treeview = self.__builder.get_object("treeview_engines")
|
self.__treeview = self.__builder.get_object("treeview_engines")
|
||||||
self.__treeview.set_engines(engines)
|
self.__treeview.set_engines(engines)
|
||||||
@@ -240,6 +247,13 @@ class Setup(object):
|
@@ -243,6 +250,13 @@ class Setup(object):
|
||||||
engine_names = map(lambda e: e.name, engines)
|
engine_names = map(lambda e: e.name, engines)
|
||||||
self.__config.set_list("general", "preload_engines", engine_names, "s")
|
self.__config.set_list("general", "preload_engines", engine_names, "s")
|
||||||
|
|
||||||
@ -413,7 +423,7 @@ index 96e9456..215670d 100644
|
|||||||
def __button_engine_add_cb(self, button):
|
def __button_engine_add_cb(self, button):
|
||||||
engine = self.__combobox.get_active_engine()
|
engine = self.__combobox.get_active_engine()
|
||||||
self.__treeview.append_engine(engine)
|
self.__treeview.append_engine(engine)
|
||||||
@@ -251,6 +265,19 @@ class Setup(object):
|
@@ -254,6 +268,19 @@ class Setup(object):
|
||||||
about.run()
|
about.run()
|
||||||
about.destroy()
|
about.destroy()
|
||||||
|
|
||||||
@ -434,10 +444,10 @@ index 96e9456..215670d 100644
|
|||||||
try:
|
try:
|
||||||
self.__bus = ibus.Bus()
|
self.__bus = ibus.Bus()
|
||||||
diff --git a/setup/setup.ui b/setup/setup.ui
|
diff --git a/setup/setup.ui b/setup/setup.ui
|
||||||
index 0e31a78..ef841a0 100644
|
index de58446..71f723d 100644
|
||||||
--- a/setup/setup.ui
|
--- a/setup/setup.ui
|
||||||
+++ b/setup/setup.ui
|
+++ b/setup/setup.ui
|
||||||
@@ -489,7 +489,22 @@
|
@@ -486,7 +486,22 @@
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
@ -461,7 +471,7 @@ index 0e31a78..ef841a0 100644
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkAlignment" id="alignment6">
|
<object class="GtkAlignment" id="alignment6">
|
||||||
@@ -640,7 +655,7 @@
|
@@ -637,7 +652,7 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@ -470,7 +480,7 @@ index 0e31a78..ef841a0 100644
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -679,7 +694,7 @@ You may use up/down buttons to change it.</i></small></property>
|
@@ -676,7 +691,7 @@ You may use up/down buttons to change it.</i></small></property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
From 715f102611ac16ebc8f66f4fc3b4547c983105ea Mon Sep 17 00:00:00 2001
|
From 836f4375531307a4abac4cdbd3cd091413de2b51 Mon Sep 17 00:00:00 2001
|
||||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||||
Date: Thu, 9 Dec 2010 15:03:14 +0900
|
Date: Wed, 26 Jan 2011 15:42:49 +0900
|
||||||
Subject: [PATCH] Add XKB layouts
|
Subject: [PATCH] Add XKB layouts
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -72,7 +72,7 @@ index 02b7163..6cbe82a 100644
|
|||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
diff --git a/configure.ac b/configure.ac
|
||||||
index 1a1e663..ea0d32b 100644
|
index def1986..1347991 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -185,6 +185,57 @@ else
|
@@ -185,6 +185,57 @@ else
|
||||||
@ -133,7 +133,7 @@ index 1a1e663..ea0d32b 100644
|
|||||||
# GObject introspection
|
# GObject introspection
|
||||||
GOBJECT_INTROSPECTION_CHECK([0.6.8])
|
GOBJECT_INTROSPECTION_CHECK([0.6.8])
|
||||||
|
|
||||||
@@ -400,6 +451,7 @@ gconf/Makefile
|
@@ -413,6 +464,7 @@ gconf/Makefile
|
||||||
gconf/gconf.xml.in
|
gconf/gconf.xml.in
|
||||||
bindings/Makefile
|
bindings/Makefile
|
||||||
bindings/vala/Makefile
|
bindings/vala/Makefile
|
||||||
@ -141,7 +141,7 @@ index 1a1e663..ea0d32b 100644
|
|||||||
])
|
])
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
@@ -415,6 +467,7 @@ Build options:
|
@@ -428,6 +480,7 @@ Build options:
|
||||||
Build gtk2 immodule $enable_gtk2
|
Build gtk2 immodule $enable_gtk2
|
||||||
Build gtk3 immodule $enable_gtk3
|
Build gtk3 immodule $enable_gtk3
|
||||||
Build XIM agent server $enable_xim
|
Build XIM agent server $enable_xim
|
||||||
@ -150,10 +150,10 @@ 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 9b82857..3007e08 100644
|
index aa66aa5..54709ce 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 @@
|
@@ -167,6 +167,42 @@
|
||||||
</locale>
|
</locale>
|
||||||
</schema>
|
</schema>
|
||||||
<schema>
|
<schema>
|
||||||
@ -971,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 215670d..c855b86 100644
|
index 96e9456..8bac900 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
|
||||||
@ -982,7 +982,7 @@ index 215670d..c855b86 100644
|
|||||||
from i18n import DOMAINNAME, _, N_, init as i18n_init
|
from i18n import DOMAINNAME, _, N_, init as i18n_init
|
||||||
|
|
||||||
(
|
(
|
||||||
@@ -226,6 +227,8 @@ class Setup(object):
|
@@ -219,6 +220,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)
|
||||||
|
|
||||||
@ -992,7 +992,7 @@ index 215670d..c855b86 100644
|
|||||||
engine = self.__combobox.get_active_engine()
|
engine = self.__combobox.get_active_engine()
|
||||||
button = self.__builder.get_object("button_engine_add")
|
button = self.__builder.get_object("button_engine_add")
|
||||||
diff --git a/setup/setup.ui b/setup/setup.ui
|
diff --git a/setup/setup.ui b/setup/setup.ui
|
||||||
index ef841a0..71f723d 100644
|
index 0e31a78..de58446 100644
|
||||||
--- a/setup/setup.ui
|
--- a/setup/setup.ui
|
||||||
+++ b/setup/setup.ui
|
+++ b/setup/setup.ui
|
||||||
@@ -129,7 +129,6 @@
|
@@ -129,7 +129,6 @@
|
||||||
@ -1019,7 +1019,7 @@ index ef841a0..71f723d 100644
|
|||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
@@ -744,6 +741,7 @@ You may use up/down buttons to change it.</i></small></property>
|
@@ -729,6 +726,7 @@ You may use up/down buttons to change it.</i></small></property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="spacing">6</property>
|
<property name="spacing">6</property>
|
||||||
@ -1027,7 +1027,7 @@ index ef841a0..71f723d 100644
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkCheckButton" id="checkbutton_use_sys_layout">
|
<object class="GtkCheckButton" id="checkbutton_use_sys_layout">
|
||||||
<property name="label" translatable="yes">Use system keyboard layout</property>
|
<property name="label" translatable="yes">Use system keyboard layout</property>
|
||||||
@@ -812,6 +810,57 @@ You may use up/down buttons to change it.</i></small></property>
|
@@ -797,6 +795,57 @@ You may use up/down buttons to change it.</i></small></property>
|
||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@ -1085,7 +1085,7 @@ index ef841a0..71f723d 100644
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
@@ -957,4 +1006,558 @@ Homepage: http://code.google.com/p/ibus
|
@@ -942,4 +991,558 @@ Homepage: http://code.google.com/p/ibus
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
1023
ibus-HEAD.patch
1023
ibus-HEAD.patch
File diff suppressed because it is too large
Load Diff
13
ibus.spec
13
ibus.spec
@ -11,8 +11,8 @@
|
|||||||
%define im_chooser_version 1.2.5
|
%define im_chooser_version 1.2.5
|
||||||
|
|
||||||
Name: ibus
|
Name: ibus
|
||||||
Version: 1.3.99.20101202
|
Version: 1.3.99.20110117
|
||||||
Release: 5%{?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
|
||||||
@ -298,14 +298,11 @@ fi
|
|||||||
%{_datadir}/gtk-doc/html/*
|
%{_datadir}/gtk-doc/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sun Jan 9 2011 Matthias Clasen <mclasen@redhat.com> - 1.3.99.20101202-5
|
* Wed Jan 26 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110117-1
|
||||||
- Rebuild against newer gtk3
|
- Updated to 1.3.99.20110117
|
||||||
|
|
||||||
* Tue Jan 04 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20101202-4
|
|
||||||
- Updated ibus-435880-surrounding-text.patch to support the xml setting.
|
|
||||||
- Updated ibus-530711-preload-sys.patch to set the default lang base.
|
|
||||||
- Updated ibus-HEAD.patch from upstream.
|
- Updated ibus-HEAD.patch from upstream.
|
||||||
- Fixed Bug 666427 - ibus requires dbus-x11
|
- Fixed Bug 666427 - ibus requires dbus-x11
|
||||||
|
- Fixed Bug 670137 - QT_IM_MODULE=xim in ibus.conf without ibus-qt
|
||||||
|
|
||||||
* Thu Dec 09 2010 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20101202-1
|
* Thu Dec 09 2010 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20101202-1
|
||||||
- Updated to 1.3.99.20101202
|
- Updated to 1.3.99.20101202
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
02ca4012ac92aeaba97568591d4d9844 ibus-1.3.99.20101202.tar.gz
|
3720d477051e575918a1694e0e468624 ibus-1.3.99.20110117.tar.gz
|
||||||
|
@ -10,4 +10,6 @@ if test -f /usr/lib/qt4/plugins/inputmethods/libqtim-ibus.so || \
|
|||||||
test -f /usr/lib64/qt4/plugins/inputmethods/libqtim-ibus.so;
|
test -f /usr/lib64/qt4/plugins/inputmethods/libqtim-ibus.so;
|
||||||
then
|
then
|
||||||
QT_IM_MODULE=ibus
|
QT_IM_MODULE=ibus
|
||||||
|
else
|
||||||
|
QT_IM_MODULE=xim
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user