Deleted ibus-947318-reconnect-gtk-client.patch
Updated ibus-HEAD.patch for upstream.
This commit is contained in:
parent
add36c8aee
commit
ee58945dcf
22
.gitignore
vendored
22
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
/ibus_master_da.po
|
||||
ibus-1.3.6.tar.gz
|
||||
/ibus-1.3.7.tar.gz
|
||||
/ibus-1.3.8.tar.gz
|
||||
@ -6,25 +5,7 @@ ibus-1.3.6.tar.gz
|
||||
/ibus-1.4.0.tar.gz
|
||||
/ibus-1.4.1.tar.gz
|
||||
/ibus-1.5.1.tar.gz
|
||||
/ibus-1.3.99.20101028.tar.gz
|
||||
/ibus-1.3.99.20101118.tar.gz
|
||||
/ibus-1.3.99.20101202.tar.gz
|
||||
/ibus-1.3.99.20110117.tar.gz
|
||||
/ibus-1.3.99.20110127.tar.gz
|
||||
/ibus-1.3.99.20110206.tar.gz
|
||||
/ibus-1.3.99.20110228.tar.gz
|
||||
/ibus-1.3.99.20110408.tar.gz
|
||||
/ibus-1.3.99.20110419.tar.gz
|
||||
/ibus-1.3.99.20110817.tar.gz
|
||||
/ibus-1.4.99.20120203.tar.gz
|
||||
/ibus-1.4.99.20120304.tar.gz
|
||||
/ibus-1.4.99.20120317.tar.gz
|
||||
/ibus-1.4.99.20120428.tar.gz
|
||||
/ibus-1.4.99.20120712.tar.gz
|
||||
/ibus-1.4.99.20120822.tar.gz
|
||||
/ibus-1.4.99.20120914.tar.gz
|
||||
/ibus-1.4.99.20121006.tar.gz
|
||||
/ibus-1.4.99.20121109.tar.gz
|
||||
/ibus-1.5.2.tar.gz
|
||||
/ibus-gjs-3.0.2.20110823.tar.gz
|
||||
/ibus-gjs-3.1.4.20110823.tar.gz
|
||||
/ibus-gjs-3.0.2.20110908.tar.gz
|
||||
@ -51,7 +32,6 @@ ibus-1.3.6.tar.gz
|
||||
/ibus-gjs-3.4.1.20120518.tar.gz
|
||||
/ibus-gjs-3.4.1.20120815.tar.gz
|
||||
/ibus-gjs-3.4.1.20130115.tar.gz
|
||||
/ibus-1.5.2.tar.gz
|
||||
/ibus.1
|
||||
/ibus-setup.1
|
||||
/ibus-daemon.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
From c907ff38e6f6de6637d79945efb9d1365b15a327 Mon Sep 17 00:00:00 2001
|
||||
From 5c7c6c12daee2ae48d5f1264855445ecc4f38b1d Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Fri, 19 Apr 2013 09:47:18 +0900
|
||||
Date: Wed, 1 May 2013 13:35:01 +0900
|
||||
Subject: [PATCH] Reload preload engines until users customize the list.
|
||||
|
||||
The idea is, if users don't customize the preload_engines with ibus-setup,
|
||||
@ -25,7 +25,7 @@ IBUS_PRELOAD_ENGINE_MODE_USER and users can customize the value
|
||||
5 files changed, 254 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in
|
||||
index 704ba60..136c192 100644
|
||||
index fccab62..184de80 100644
|
||||
--- a/data/ibus.schemas.in
|
||||
+++ b/data/ibus.schemas.in
|
||||
@@ -2,6 +2,30 @@
|
||||
@ -60,7 +60,7 @@ index 704ba60..136c192 100644
|
||||
<applyto>/desktop/ibus/general/preload_engines</applyto>
|
||||
<owner>ibus</owner>
|
||||
diff --git a/setup/main.py b/setup/main.py
|
||||
index 707faa4..4826037 100644
|
||||
index 0281ac7..ba78eeb 100644
|
||||
--- a/setup/main.py
|
||||
+++ b/setup/main.py
|
||||
@@ -190,16 +190,27 @@ class Setup(object):
|
||||
@ -253,19 +253,19 @@ index 737b3e2..8ce5a16 100644
|
||||
* @x: x coordinate.
|
||||
* @y: y coordinate.
|
||||
diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala
|
||||
index 10eaa0c..0a12c0f 100644
|
||||
index 4469963..d6d2228 100644
|
||||
--- a/ui/gtk3/panel.vala
|
||||
+++ b/ui/gtk3/panel.vala
|
||||
@@ -308,6 +308,8 @@ class Panel : IBus.PanelService {
|
||||
@@ -324,6 +324,8 @@ class Panel : IBus.PanelService {
|
||||
if (m_config != null) {
|
||||
m_config.value_changed.connect(config_value_changed_cb);
|
||||
m_config.watch("general", "preload_engines");
|
||||
+ m_config.watch("general", "preload_engines_inited");
|
||||
+ m_config.watch("general", "preload_engine_mode");
|
||||
m_config.watch("general", "embed_preedit_text");
|
||||
m_config.watch("general", "engines_order");
|
||||
m_config.watch("general", "switcher_delay_time");
|
||||
m_config.watch("general", "use_system_keyboard_layout");
|
||||
@@ -379,7 +381,136 @@ class Panel : IBus.PanelService {
|
||||
@@ -397,7 +399,136 @@ class Panel : IBus.PanelService {
|
||||
init_gkbd();
|
||||
}
|
||||
|
||||
@ -402,7 +402,7 @@ index 10eaa0c..0a12c0f 100644
|
||||
}
|
||||
|
||||
private void update_xkb_engines() {
|
||||
@@ -596,6 +727,11 @@ class Panel : IBus.PanelService {
|
||||
@@ -614,6 +745,11 @@ class Panel : IBus.PanelService {
|
||||
string section,
|
||||
string name,
|
||||
Variant variant) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
From 3130e980aafbb1ec025a7ca68559fb83e801cba3 Mon Sep 17 00:00:00 2001
|
||||
From f14ffe9913736019f556e507c1521ef2dee96392 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Fri, 19 Apr 2013 09:46:33 +0900
|
||||
Date: Wed, 1 May 2013 14:28:31 +0900
|
||||
Subject: [PATCH] Add libgnomekbd and load preload engines.
|
||||
|
||||
---
|
||||
@ -39,7 +39,7 @@ index 0000000..661e6fd
|
||||
@@ -0,0 +1 @@
|
||||
+Configuration cheader_filename="libgnomekbd/gkbd-configuration.h"
|
||||
diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am
|
||||
index aba3454..3f93fba 100644
|
||||
index be45e41..44b3e61 100644
|
||||
--- a/bindings/vala/Makefile.am
|
||||
+++ b/bindings/vala/Makefile.am
|
||||
@@ -28,8 +28,6 @@ vapi_deps = \
|
||||
@ -160,7 +160,7 @@ index 3036792..06b6e0c 100644
|
||||
])
|
||||
|
||||
diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in
|
||||
index 54ccb4c..704ba60 100644
|
||||
index 9263adc..fccab62 100644
|
||||
--- a/data/ibus.schemas.in
|
||||
+++ b/data/ibus.schemas.in
|
||||
@@ -42,6 +42,52 @@
|
||||
@ -1251,7 +1251,7 @@ index 0000000..2b78c69
|
||||
+ */
|
||||
+}
|
||||
diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala
|
||||
index 0d7a5b2..10eaa0c 100644
|
||||
index 0c793f4..4469963 100644
|
||||
--- a/ui/gtk3/panel.vala
|
||||
+++ b/ui/gtk3/panel.vala
|
||||
@@ -49,6 +49,13 @@ class Panel : IBus.PanelService {
|
||||
@ -1265,7 +1265,7 @@ index 0d7a5b2..10eaa0c 100644
|
||||
+ private int m_fallback_lock_id = -1;
|
||||
+ private bool m_changed_xkb_option = false;
|
||||
+ private GLib.Timer m_changed_layout_timer;
|
||||
private const string ACCELERATOR_SWITCH_IME_FOREWARD = "<Control>space";
|
||||
private const string ACCELERATOR_SWITCH_IME_FOREWARD = "<Super>space";
|
||||
|
||||
private GLib.List<Keybinding> m_keybindings = new GLib.List<Keybinding>();
|
||||
@@ -91,6 +98,14 @@ class Panel : IBus.PanelService {
|
||||
@ -1283,7 +1283,7 @@ index 0d7a5b2..10eaa0c 100644
|
||||
}
|
||||
|
||||
private void keybinding_manager_bind(KeybindingManager keybinding_manager,
|
||||
@@ -299,6 +314,7 @@ class Panel : IBus.PanelService {
|
||||
@@ -316,6 +331,7 @@ class Panel : IBus.PanelService {
|
||||
m_config.watch("general/hotkey", "triggers");
|
||||
m_config.watch("panel", "custom_font");
|
||||
m_config.watch("panel", "use_custom_font");
|
||||
@ -1291,7 +1291,7 @@ index 0d7a5b2..10eaa0c 100644
|
||||
// Update m_use_system_keyboard_layout before update_engines()
|
||||
// is called.
|
||||
set_use_system_keyboard_layout(null);
|
||||
@@ -314,6 +330,204 @@ class Panel : IBus.PanelService {
|
||||
@@ -332,6 +348,204 @@ class Panel : IBus.PanelService {
|
||||
set_custom_font();
|
||||
}
|
||||
|
||||
@ -1496,7 +1496,7 @@ index 0d7a5b2..10eaa0c 100644
|
||||
private void exec_setxkbmap(IBus.EngineDesc engine) {
|
||||
string layout = engine.get_layout();
|
||||
string variant = engine.get_layout_variant();
|
||||
@@ -374,7 +588,7 @@ class Panel : IBus.PanelService {
|
||||
@@ -392,7 +606,7 @@ class Panel : IBus.PanelService {
|
||||
}
|
||||
// set xkb layout
|
||||
if (!m_use_system_keyboard_layout) {
|
||||
|
@ -1,43 +0,0 @@
|
||||
From ef3aaa7bee7dd4c9ab3ccbe5a62d20be3b06a309 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Thu, 18 Apr 2013 09:48:25 +0900
|
||||
Subject: [PATCH] IBusIMContext needs to reconnect IBusBus when IBusBus is
|
||||
disconnected.
|
||||
|
||||
---
|
||||
client/gtk2/ibusimcontext.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
|
||||
index 49598b4..8c7dbcc 100644
|
||||
--- a/client/gtk2/ibusimcontext.c
|
||||
+++ b/client/gtk2/ibusimcontext.c
|
||||
@@ -1474,6 +1474,25 @@ _ibus_context_destroy_cb (IBusInputContext *ibuscontext,
|
||||
|
||||
g_signal_emit (ibusimcontext, _signal_preedit_changed_id, 0);
|
||||
g_signal_emit (ibusimcontext, _signal_preedit_end_id, 0);
|
||||
+
|
||||
+ /* This destroy callback can be called when the client app connects to
|
||||
+ * IBusBus and the app is disconnected. E.g. gnome-shell connects to
|
||||
+ * IBusBus and it has StEntry input text and ibus can be restarted.
|
||||
+ * And each ibusimcontext also needs to reconnect IBusBus here. */
|
||||
+ if (!ibus_bus_is_connected (_bus)) {
|
||||
+ g_signal_handlers_disconnect_by_func (_bus,
|
||||
+ G_CALLBACK (_bus_connected_cb),
|
||||
+ ibusimcontext);
|
||||
+ g_object_unref (_bus);
|
||||
+ _bus = ibus_bus_new_async ();
|
||||
+
|
||||
+ if (ibus_bus_is_connected (_bus)) {
|
||||
+ _create_input_context (ibusimcontext);
|
||||
+ }
|
||||
+
|
||||
+ g_signal_connect (_bus, "connected", G_CALLBACK (_bus_connected_cb),
|
||||
+ ibusimcontext);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
1.8.0
|
||||
|
620
ibus-HEAD.patch
620
ibus-HEAD.patch
@ -1 +1,621 @@
|
||||
From 667b7f0b96e5a7e1190e606a9c680bcbda8c2a88 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Tue, 30 Apr 2013 21:46:02 +0900
|
||||
Subject: [PATCH] Implement embed_preedit_text.
|
||||
|
||||
BUG=http://code.google.com/p/ibus/issues/detail?id=1606
|
||||
|
||||
Review URL: https://codereview.appspot.com/8112044
|
||||
---
|
||||
bus/ibusimpl.c | 310 ++++++++++++++++++++++++++++++++++++++++++++++-------
|
||||
src/ibusbus.c | 54 ++++++++++
|
||||
src/ibusbus.h | 24 +++++
|
||||
ui/gtk3/panel.vala | 23 ++++
|
||||
4 files changed, 370 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
|
||||
index 6218578..594216a 100644
|
||||
--- a/bus/ibusimpl.c
|
||||
+++ b/bus/ibusimpl.c
|
||||
@@ -51,11 +51,13 @@ struct _BusIBusImpl {
|
||||
/* a fake input context for global engine support */
|
||||
BusInputContext *fake_context;
|
||||
|
||||
- /* a list of engines that are started by a user (without the --ibus command line flag.) */
|
||||
+ /* a list of engines that are started by a user (without the --ibus
|
||||
+ * command line flag.) */
|
||||
GList *register_engine_list;
|
||||
|
||||
- /* if TRUE, ibus-daemon uses a keysym translated by the system (i.e. XKB) as-is.
|
||||
- * otherwise, ibus-daemon itself converts keycode into keysym. */
|
||||
+ /* if TRUE, ibus-daemon uses a keysym translated by the system
|
||||
+ * (i.e. XKB) as-is. otherwise, ibus-daemon itself converts keycode
|
||||
+ * into keysym. */
|
||||
gboolean use_sys_layout;
|
||||
|
||||
gboolean embed_preedit_text;
|
||||
@@ -65,7 +67,8 @@ struct _BusIBusImpl {
|
||||
BusInputContext *focused_context;
|
||||
BusPanelProxy *panel;
|
||||
|
||||
- /* a default keymap of ibus-daemon (usually "us") which is used only when use_sys_layout is FALSE. */
|
||||
+ /* a default keymap of ibus-daemon (usually "us") which is used only
|
||||
+ * when use_sys_layout is FALSE. */
|
||||
IBusKeymap *keymap;
|
||||
|
||||
gboolean use_global_engine;
|
||||
@@ -92,45 +95,70 @@ static guint _signals[LAST_SIGNAL] = { 0 };
|
||||
*/
|
||||
|
||||
/* functions prototype */
|
||||
-static void bus_ibus_impl_destroy (BusIBusImpl *ibus);
|
||||
+static void bus_ibus_impl_destroy (BusIBusImpl *ibus);
|
||||
static void bus_ibus_impl_service_method_call
|
||||
- (IBusService *service,
|
||||
- GDBusConnection *connection,
|
||||
- const gchar *sender,
|
||||
- const gchar *object_path,
|
||||
- const gchar *interface_name,
|
||||
- const gchar *method_name,
|
||||
- GVariant *parameters,
|
||||
- GDBusMethodInvocation
|
||||
- *invocation);
|
||||
-static void bus_ibus_impl_registry_changed (BusIBusImpl *ibus);
|
||||
+ (IBusService *service,
|
||||
+ GDBusConnection *connection,
|
||||
+ const gchar *sender,
|
||||
+ const gchar *object_path,
|
||||
+ const gchar *interface_name,
|
||||
+ const gchar *method_name,
|
||||
+ GVariant *parameters,
|
||||
+ GDBusMethodInvocation
|
||||
+ *invocation);
|
||||
+static GVariant *
|
||||
+ bus_ibus_impl_service_get_property
|
||||
+ (IBusService *service,
|
||||
+ GDBusConnection *connection,
|
||||
+ const gchar *sender,
|
||||
+ const gchar *object_path,
|
||||
+ const gchar *interface_name,
|
||||
+ const gchar *property_name,
|
||||
+ GError **error);
|
||||
+static gboolean
|
||||
+ bus_ibus_impl_service_set_property
|
||||
+ (IBusService *service,
|
||||
+ GDBusConnection *connection,
|
||||
+ const gchar *sender,
|
||||
+ const gchar *object_path,
|
||||
+ const gchar *interface_name,
|
||||
+ const gchar *property_name,
|
||||
+ GVariant *value,
|
||||
+ GError **error);
|
||||
+static void bus_ibus_impl_registry_changed
|
||||
+ (BusIBusImpl *ibus);
|
||||
static void bus_ibus_impl_global_engine_changed
|
||||
- (BusIBusImpl *ibus);
|
||||
+ (BusIBusImpl *ibus);
|
||||
static void bus_ibus_impl_set_context_engine_from_desc
|
||||
- (BusIBusImpl *ibus,
|
||||
- BusInputContext *context,
|
||||
- IBusEngineDesc *desc);
|
||||
+ (BusIBusImpl *ibus,
|
||||
+ BusInputContext *context,
|
||||
+ IBusEngineDesc *desc);
|
||||
static BusInputContext
|
||||
*bus_ibus_impl_create_input_context
|
||||
- (BusIBusImpl *ibus,
|
||||
- BusConnection *connection,
|
||||
- const gchar *client);
|
||||
+ (BusIBusImpl *ibus,
|
||||
+ BusConnection *connection,
|
||||
+ const gchar *client);
|
||||
static IBusEngineDesc
|
||||
- *bus_ibus_impl_get_engine_desc (BusIBusImpl *ibus,
|
||||
- const gchar *engine_name);
|
||||
+ *bus_ibus_impl_get_engine_desc
|
||||
+ (BusIBusImpl *ibus,
|
||||
+ const gchar *engine_name);
|
||||
static void bus_ibus_impl_set_focused_context
|
||||
- (BusIBusImpl *ibus,
|
||||
- BusInputContext *context);
|
||||
+ (BusIBusImpl *ibus,
|
||||
+ BusInputContext *context);
|
||||
/* some callback functions */
|
||||
-static void _context_engine_changed_cb (BusInputContext *context,
|
||||
- BusIBusImpl *ibus);
|
||||
-
|
||||
-/* The interfaces available in this class, which consists of a list of methods this class implements and
|
||||
- * a list of signals this class may emit. Method calls to the interface that are not defined in this XML
|
||||
- * will be automatically rejected by the GDBus library (see src/ibusservice.c for details.) */
|
||||
+static void _context_engine_changed_cb
|
||||
+ (BusInputContext *context,
|
||||
+ BusIBusImpl *ibus);
|
||||
+
|
||||
+/* The interfaces available in this class, which consists of a list of
|
||||
+ * methods this class implements and a list of signals this class may emit.
|
||||
+ * Method calls to the interface that are not defined in this XML will
|
||||
+ * be automatically rejected by the GDBus library (see src/ibusservice.c
|
||||
+ * for details.) */
|
||||
static const gchar introspection_xml[] =
|
||||
"<node>\n"
|
||||
" <interface name='org.freedesktop.IBus'>\n"
|
||||
+ " <property name='EmbedPreeditText' type='b' access='readwrite' />\n"
|
||||
" <method name='GetAddress'>\n"
|
||||
" <arg direction='out' type='s' name='address' />\n"
|
||||
" </method>\n"
|
||||
@@ -193,12 +221,20 @@ G_DEFINE_TYPE (BusIBusImpl, bus_ibus_impl, IBUS_TYPE_SERVICE)
|
||||
static void
|
||||
bus_ibus_impl_class_init (BusIBusImplClass *class)
|
||||
{
|
||||
- IBUS_OBJECT_CLASS (class)->destroy = (IBusObjectDestroyFunc) bus_ibus_impl_destroy;
|
||||
+ IBUS_OBJECT_CLASS (class)->destroy =
|
||||
+ (IBusObjectDestroyFunc) bus_ibus_impl_destroy;
|
||||
|
||||
/* override the parent class's implementation. */
|
||||
- IBUS_SERVICE_CLASS (class)->service_method_call = bus_ibus_impl_service_method_call;
|
||||
- /* register the xml so that bus_ibus_impl_service_method_call will be called on a method call defined in the xml (e.g. 'GetAddress'.) */
|
||||
- ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class), introspection_xml);
|
||||
+ IBUS_SERVICE_CLASS (class)->service_method_call =
|
||||
+ bus_ibus_impl_service_method_call;
|
||||
+ IBUS_SERVICE_CLASS (class)->service_get_property =
|
||||
+ bus_ibus_impl_service_get_property;
|
||||
+ IBUS_SERVICE_CLASS (class)->service_set_property =
|
||||
+ bus_ibus_impl_service_set_property;
|
||||
+ /* register the xml so that bus_ibus_impl_service_method_call will be
|
||||
+ * called on a method call defined in the xml (e.g. 'GetAddress'.) */
|
||||
+ ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class),
|
||||
+ introspection_xml);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1278,9 +1314,49 @@ _ibus_preload_engines (BusIBusImpl *ibus,
|
||||
}
|
||||
|
||||
/**
|
||||
+ * _ibus_get_embed_preedit_text:
|
||||
+ *
|
||||
+ * Implement the "EmbedPreeditText" method call of
|
||||
+ * the org.freedesktop.IBus interface.
|
||||
+ */
|
||||
+static GVariant *
|
||||
+_ibus_get_embed_preedit_text (BusIBusImpl *ibus,
|
||||
+ GDBusConnection *connection,
|
||||
+ GError **error)
|
||||
+{
|
||||
+ if (error) {
|
||||
+ *error = NULL;
|
||||
+ }
|
||||
+
|
||||
+ return g_variant_new_boolean (ibus->embed_preedit_text);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * _ibus_set_embed_preedit_text:
|
||||
+ *
|
||||
+ * Implement the "EmbedPreeditText" method call of
|
||||
+ * the org.freedesktop.IBus interface.
|
||||
+ */
|
||||
+static gboolean
|
||||
+_ibus_set_embed_preedit_text (BusIBusImpl *ibus,
|
||||
+ GDBusConnection *connection,
|
||||
+ GVariant *value,
|
||||
+ GError **error)
|
||||
+{
|
||||
+ if (error) {
|
||||
+ *error = NULL;
|
||||
+ }
|
||||
+
|
||||
+ ibus->embed_preedit_text = g_variant_get_boolean (value);
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* bus_ibus_impl_service_method_call:
|
||||
*
|
||||
- * Handle a D-Bus method call whose destination and interface name are both "org.freedesktop.IBus"
|
||||
+ * Handle a D-Bus method call whose destination and interface name are
|
||||
+ * both "org.freedesktop.IBus"
|
||||
*/
|
||||
static void
|
||||
bus_ibus_impl_service_method_call (IBusService *service,
|
||||
@@ -1294,7 +1370,8 @@ bus_ibus_impl_service_method_call (IBusService *service,
|
||||
{
|
||||
if (g_strcmp0 (interface_name, "org.freedesktop.IBus") != 0) {
|
||||
IBUS_SERVICE_CLASS (bus_ibus_impl_parent_class)->service_method_call (
|
||||
- service, connection, sender, object_path, interface_name, method_name,
|
||||
+ service, connection, sender, object_path,
|
||||
+ interface_name, method_name,
|
||||
parameters, invocation);
|
||||
return;
|
||||
}
|
||||
@@ -1325,13 +1402,164 @@ bus_ibus_impl_service_method_call (IBusService *service,
|
||||
gint i;
|
||||
for (i = 0; i < G_N_ELEMENTS (methods); i++) {
|
||||
if (g_strcmp0 (methods[i].method_name, method_name) == 0) {
|
||||
- methods[i].method_callback ((BusIBusImpl *) service, parameters, invocation);
|
||||
+ methods[i].method_callback ((BusIBusImpl *) service,
|
||||
+ parameters,
|
||||
+ invocation);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
- /* notreached - unknown method calls that are not in the introspection_xml should be handled by the GDBus library. */
|
||||
- g_return_if_reached ();
|
||||
+ g_warning ("service_method_call received an unknown method: %s",
|
||||
+ method_name ? method_name : "(null)");
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * bus_ibus_impl_service_get_property:
|
||||
+ *
|
||||
+ * Handle org.freedesktop.DBus.Properties.Get
|
||||
+ */
|
||||
+static GVariant *
|
||||
+bus_ibus_impl_service_get_property (IBusService *service,
|
||||
+ GDBusConnection *connection,
|
||||
+ const gchar *sender,
|
||||
+ const gchar *object_path,
|
||||
+ const gchar *interface_name,
|
||||
+ const gchar *property_name,
|
||||
+ GError **error)
|
||||
+{
|
||||
+ gint i;
|
||||
+
|
||||
+ static const struct {
|
||||
+ const gchar *method_name;
|
||||
+ GVariant * (* method_callback) (BusIBusImpl *,
|
||||
+ GDBusConnection *,
|
||||
+ GError **);
|
||||
+ } methods [] = {
|
||||
+ { "EmbedPreeditText", _ibus_get_embed_preedit_text },
|
||||
+ };
|
||||
+
|
||||
+ if (g_strcmp0 (interface_name, IBUS_INTERFACE_IBUS) != 0) {
|
||||
+ return IBUS_SERVICE_CLASS (
|
||||
+ bus_ibus_impl_parent_class)->service_get_property (
|
||||
+ service, connection, sender, object_path,
|
||||
+ interface_name, property_name,
|
||||
+ error);
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < G_N_ELEMENTS (methods); i++) {
|
||||
+ if (g_strcmp0 (methods[i].method_name, property_name) == 0) {
|
||||
+ return methods[i].method_callback ((BusIBusImpl *) service,
|
||||
+ connection,
|
||||
+ error);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ g_warning ("service_get_property received an unknown property: %s",
|
||||
+ property_name ? property_name : "(null)");
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+_emit_properties_changed (BusIBusImpl *service,
|
||||
+ GDBusConnection *connection,
|
||||
+ const gchar *object_path,
|
||||
+ const gchar *interface_name,
|
||||
+ const gchar *property_name,
|
||||
+ GVariant *value,
|
||||
+ gboolean is_changed)
|
||||
+{
|
||||
+ GVariantBuilder *builder;
|
||||
+ GVariantBuilder *invalidated_builder;
|
||||
+ GError *error = NULL;
|
||||
+
|
||||
+ builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY);
|
||||
+ invalidated_builder = g_variant_builder_new (G_VARIANT_TYPE ("as"));
|
||||
+
|
||||
+ if (is_changed) {
|
||||
+ g_variant_builder_add (builder, "{sv}", property_name, value);
|
||||
+ } else {
|
||||
+ g_variant_builder_add (invalidated_builder, "s", property_name);
|
||||
+ }
|
||||
+
|
||||
+ g_dbus_connection_emit_signal (connection,
|
||||
+ NULL,
|
||||
+ object_path,
|
||||
+ "org.freedesktop.DBus.Properties",
|
||||
+ "PropertiesChanged",
|
||||
+ g_variant_new ("(sa{sv}as)",
|
||||
+ interface_name,
|
||||
+ builder,
|
||||
+ invalidated_builder),
|
||||
+ &error);
|
||||
+
|
||||
+ if (error) {
|
||||
+ g_warning ("Failed to emit property %s in %s.%s: %s",
|
||||
+ property_name,
|
||||
+ "org.freedesktop.DBus.Properties",
|
||||
+ "PropertiesChanged",
|
||||
+ error->message);
|
||||
+ g_error_free (error);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * bus_ibus_impl_service_set_property:
|
||||
+ *
|
||||
+ * Handle org.freedesktop.DBus.Properties.Set
|
||||
+ */
|
||||
+static gboolean
|
||||
+bus_ibus_impl_service_set_property (IBusService *service,
|
||||
+ GDBusConnection *connection,
|
||||
+ const gchar *sender,
|
||||
+ const gchar *object_path,
|
||||
+ const gchar *interface_name,
|
||||
+ const gchar *property_name,
|
||||
+ GVariant *value,
|
||||
+ GError **error)
|
||||
+{
|
||||
+ gint i;
|
||||
+
|
||||
+ static const struct {
|
||||
+ const gchar *method_name;
|
||||
+ gboolean (* method_callback) (BusIBusImpl *,
|
||||
+ GDBusConnection *,
|
||||
+ GVariant *,
|
||||
+ GError **);
|
||||
+ } methods [] = {
|
||||
+ { "EmbedPreeditText", _ibus_set_embed_preedit_text },
|
||||
+ };
|
||||
+
|
||||
+ if (g_strcmp0 (interface_name, IBUS_INTERFACE_IBUS) != 0) {
|
||||
+ return IBUS_SERVICE_CLASS (
|
||||
+ bus_ibus_impl_parent_class)->service_set_property (
|
||||
+ service, connection, sender, object_path,
|
||||
+ interface_name, property_name,
|
||||
+ value, error);
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < G_N_ELEMENTS (methods); i++) {
|
||||
+ if (g_strcmp0 (methods[i].method_name, property_name) == 0) {
|
||||
+ gboolean retval = methods[i].method_callback (
|
||||
+ (BusIBusImpl *) service,
|
||||
+ connection,
|
||||
+ value,
|
||||
+ error);
|
||||
+
|
||||
+ _emit_properties_changed ((BusIBusImpl *) service,
|
||||
+ connection,
|
||||
+ object_path,
|
||||
+ interface_name,
|
||||
+ property_name,
|
||||
+ value,
|
||||
+ retval);
|
||||
+
|
||||
+ return retval;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ g_warning ("service_set_property received an unknown property: %s",
|
||||
+ property_name ? property_name : "(null)");
|
||||
+ return FALSE;
|
||||
}
|
||||
|
||||
BusIBusImpl *
|
||||
diff --git a/src/ibusbus.c b/src/ibusbus.c
|
||||
index 66a8486..5fa03c3 100644
|
||||
--- a/src/ibusbus.c
|
||||
+++ b/src/ibusbus.c
|
||||
@@ -2068,6 +2068,60 @@ ibus_bus_preload_engines_async_finish (IBusBus *bus,
|
||||
return _async_finish_void (res, error);
|
||||
}
|
||||
|
||||
+GVariant *
|
||||
+ibus_bus_get_ibus_property (IBusBus *bus,
|
||||
+ const gchar *property_name)
|
||||
+{
|
||||
+ GVariant *result;
|
||||
+ GVariant *retval = NULL;
|
||||
+
|
||||
+ g_return_val_if_fail (IBUS_IS_BUS (bus), NULL);
|
||||
+ g_return_val_if_fail (property_name != NULL, NULL);
|
||||
+
|
||||
+ result = ibus_bus_call_sync (bus,
|
||||
+ IBUS_SERVICE_IBUS,
|
||||
+ IBUS_PATH_IBUS,
|
||||
+ "org.freedesktop.DBus.Properties",
|
||||
+ "Get",
|
||||
+ g_variant_new ("(ss)",
|
||||
+ IBUS_INTERFACE_IBUS,
|
||||
+ property_name),
|
||||
+ G_VARIANT_TYPE ("(v)"));
|
||||
+
|
||||
+ if (result) {
|
||||
+ g_variant_get (result, "(v)", &retval);
|
||||
+ g_variant_unref (result);
|
||||
+ }
|
||||
+
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+ibus_bus_set_ibus_property (IBusBus *bus,
|
||||
+ const gchar *property_name,
|
||||
+ GVariant *value)
|
||||
+{
|
||||
+ GVariant *result;
|
||||
+
|
||||
+ g_return_if_fail (IBUS_IS_BUS (bus));
|
||||
+ g_return_if_fail (property_name != NULL);
|
||||
+
|
||||
+ result = ibus_bus_call_sync (bus,
|
||||
+ IBUS_SERVICE_IBUS,
|
||||
+ IBUS_PATH_IBUS,
|
||||
+ "org.freedesktop.DBus.Properties",
|
||||
+ "Set",
|
||||
+ g_variant_new ("(ssv)",
|
||||
+ IBUS_INTERFACE_IBUS,
|
||||
+ property_name,
|
||||
+ value),
|
||||
+ NULL);
|
||||
+
|
||||
+ if (result) {
|
||||
+ g_variant_unref (result);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static GVariant *
|
||||
ibus_bus_call_sync (IBusBus *bus,
|
||||
const gchar *bus_name,
|
||||
diff --git a/src/ibusbus.h b/src/ibusbus.h
|
||||
index 1288317..6344337 100644
|
||||
--- a/src/ibusbus.h
|
||||
+++ b/src/ibusbus.h
|
||||
@@ -1043,5 +1043,29 @@ gboolean ibus_bus_preload_engines_async_finish
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
+/**
|
||||
+ * ibus_bus_get_ibus_property:
|
||||
+ * @bus: An #IBusBus.
|
||||
+ * @property_name: property name in org.freedesktop.DBus.Properties.Get
|
||||
+ * @returns: (transfer full): The value in org.freedesktop.DBus.Properties.Get
|
||||
+ * The returned value must be freed with g_variant_unref().
|
||||
+ *
|
||||
+ * Get org.freedesktop.DBus.Properties.
|
||||
+ */
|
||||
+GVariant * ibus_bus_get_ibus_property (IBusBus *bus,
|
||||
+ const gchar *property_name);
|
||||
+
|
||||
+/**
|
||||
+ * ibus_bus_set_ibus_property:
|
||||
+ * @bus: An #IBusBus.
|
||||
+ * @property_name: property name in org.freedesktop.DBus.Properties.Set
|
||||
+ * @value: value in org.freedesktop.DBus.Properties.Set
|
||||
+ *
|
||||
+ * Set org.freedesktop.DBus.Properties.
|
||||
+ */
|
||||
+void ibus_bus_set_ibus_property (IBusBus *bus,
|
||||
+ const gchar *property_name,
|
||||
+ GVariant *value);
|
||||
+
|
||||
G_END_DECLS
|
||||
#endif
|
||||
diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala
|
||||
index 0d7a5b2..8090a42 100644
|
||||
--- a/ui/gtk3/panel.vala
|
||||
+++ b/ui/gtk3/panel.vala
|
||||
@@ -282,6 +282,22 @@ class Panel : IBus.PanelService {
|
||||
m_use_system_keyboard_layout = var_use_system_kbd_layout.get_boolean();
|
||||
}
|
||||
|
||||
+ private void set_embed_preedit_text(Variant? variant) {
|
||||
+ Variant var_embed_preedit = variant;
|
||||
+
|
||||
+ if (var_embed_preedit == null) {
|
||||
+ var_embed_preedit = m_config.get_value("general",
|
||||
+ "embed_preedit_text");
|
||||
+ }
|
||||
+
|
||||
+ if (var_embed_preedit == null) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ m_bus.set_ibus_property("EmbedPreeditText",
|
||||
+ var_embed_preedit);
|
||||
+ }
|
||||
+
|
||||
public void set_config(IBus.Config config) {
|
||||
if (m_config != null) {
|
||||
m_config.value_changed.disconnect(config_value_changed_cb);
|
||||
@@ -293,6 +309,7 @@ class Panel : IBus.PanelService {
|
||||
if (m_config != null) {
|
||||
m_config.value_changed.connect(config_value_changed_cb);
|
||||
m_config.watch("general", "preload_engines");
|
||||
+ m_config.watch("general", "embed_preedit_text");
|
||||
m_config.watch("general", "engines_order");
|
||||
m_config.watch("general", "switcher_delay_time");
|
||||
m_config.watch("general", "use_system_keyboard_layout");
|
||||
@@ -307,6 +324,7 @@ class Panel : IBus.PanelService {
|
||||
unbind_switch_shortcut();
|
||||
bind_switch_shortcut(null);
|
||||
set_switcher_delay_time(null);
|
||||
+ set_embed_preedit_text(null);
|
||||
} else {
|
||||
update_engines(null, null);
|
||||
}
|
||||
@@ -408,6 +426,11 @@ class Panel : IBus.PanelService {
|
||||
set_use_system_keyboard_layout(variant);
|
||||
return;
|
||||
}
|
||||
+
|
||||
+ if (section == "general" && name == "embed_preedit_text") {
|
||||
+ set_embed_preedit_text(variant);
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
|
||||
private void handle_engine_switch(Gdk.Event event, bool revert) {
|
||||
--
|
||||
1.8.0
|
||||
|
||||
From 4b7b5202bbe89c097233e4252b157052c6e5e846 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Wed, 1 May 2013 12:31:57 +0900
|
||||
Subject: [PATCH] Defalut triggers key is changed to <Super>space.
|
||||
|
||||
We have been used <Control>space as the default triggers key.
|
||||
GNOME3 and Windows7 applied <Super>space as the default trigger key
|
||||
and IBus follows it for the consistent key between desktops.
|
||||
---
|
||||
data/ibus.schemas.in | 2 +-
|
||||
setup/main.py | 2 +-
|
||||
ui/gtk3/panel.vala | 4 ++--
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in
|
||||
index 54ccb4c..9263adc 100644
|
||||
--- a/data/ibus.schemas.in
|
||||
+++ b/data/ibus.schemas.in
|
||||
@@ -59,7 +59,7 @@
|
||||
<owner>ibus</owner>
|
||||
<type>list</type>
|
||||
<list_type>string</list_type>
|
||||
- <default>[<Control>space]</default>
|
||||
+ <default>[<Super>space]</default>
|
||||
<locale name="C">
|
||||
<short>Trigger shortcut keys for gtk_accelerator_parse</short>
|
||||
<long>The shortcut keys for turning input method on or off</long>
|
||||
diff --git a/setup/main.py b/setup/main.py
|
||||
index 707faa4..0281ac7 100644
|
||||
--- a/setup/main.py
|
||||
+++ b/setup/main.py
|
||||
@@ -89,7 +89,7 @@ class Setup(object):
|
||||
if variant != None:
|
||||
shortcuts = variant.unpack()
|
||||
else:
|
||||
- shortcuts = ['<Control>space']
|
||||
+ shortcuts = ['<Super>space']
|
||||
|
||||
button = self.__builder.get_object("button_%s" % label)
|
||||
entry = self.__builder.get_object("entry_%s" % label)
|
||||
diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala
|
||||
index 8090a42..0c793f4 100644
|
||||
--- a/ui/gtk3/panel.vala
|
||||
+++ b/ui/gtk3/panel.vala
|
||||
@@ -49,7 +49,7 @@ class Panel : IBus.PanelService {
|
||||
private Gtk.CssProvider m_css_provider;
|
||||
private int m_switcher_delay_time = 400;
|
||||
private bool m_use_system_keyboard_layout = false;
|
||||
- private const string ACCELERATOR_SWITCH_IME_FOREWARD = "<Control>space";
|
||||
+ private const string ACCELERATOR_SWITCH_IME_FOREWARD = "<Super>space";
|
||||
|
||||
private GLib.List<Keybinding> m_keybindings = new GLib.List<Keybinding>();
|
||||
|
||||
@@ -74,7 +74,7 @@ class Panel : IBus.PanelService {
|
||||
m_candidate_panel.page_down.connect((w) => this.page_down());
|
||||
|
||||
m_switcher = new Switcher();
|
||||
- // The initial shortcut is "<Control>space"
|
||||
+ // The initial shortcut is "<Super>space"
|
||||
bind_switch_shortcut(null);
|
||||
|
||||
if (m_switcher_delay_time >= 0) {
|
||||
--
|
||||
1.8.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 918f22efe0898a6dc87da4d94dadf413e7840e43 Mon Sep 17 00:00:00 2001
|
||||
From 985443696823678f86d2340e2404f7d120fe5688 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Thu, 31 Jan 2013 17:31:55 +0900
|
||||
Subject: [PATCH] Enable ibus-setup to show the frequently used languages
|
||||
@ -11,7 +11,7 @@ Subject: [PATCH] Enable ibus-setup to show the frequently used languages
|
||||
3 files changed, 300 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in
|
||||
index 136c192..bd566ca 100644
|
||||
index 184de80..c02ecde 100644
|
||||
--- a/data/ibus.schemas.in
|
||||
+++ b/data/ibus.schemas.in
|
||||
@@ -325,6 +325,174 @@ se,si,sk,sy,sy(ku),th,tj,tr,ua,uz,vn
|
||||
@ -411,7 +411,7 @@ index 0f8a6ae..9828ee6 100644
|
||||
return self.get_property("active-engine")
|
||||
|
||||
diff --git a/setup/main.py b/setup/main.py
|
||||
index 4826037..42fcb33 100644
|
||||
index ba78eeb..b219771 100644
|
||||
--- a/setup/main.py
|
||||
+++ b/setup/main.py
|
||||
@@ -207,6 +207,7 @@ class Setup(object):
|
||||
|
10
ibus.spec
10
ibus.spec
@ -41,7 +41,7 @@
|
||||
|
||||
Name: ibus
|
||||
Version: 1.5.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Intelligent Input Bus for Linux OS
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
@ -65,8 +65,6 @@ Patch2: %{name}-541492-xkb.patch
|
||||
Patch3: %{name}-530711-preload-sys.patch
|
||||
# Hide minor input method engines on ibus-setup by locale
|
||||
Patch4: %{name}-xx-setup-frequent-lang.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=947318
|
||||
Patch5: %{name}-947318-reconnect-gtk-client.patch
|
||||
|
||||
%if (0%{?fedora} <= 17 && 0%{?rhel} < 7)
|
||||
# Workaround to disable preedit on gnome-shell until bug 658420 is fixed.
|
||||
@ -270,10 +268,10 @@ gzip -dc %SOURCE2 | tar xf -
|
||||
%endif
|
||||
|
||||
# %%patch0 -p1
|
||||
%patch0 -p1
|
||||
%if (0%{?fedora} <= 17 && 0%{?rhel} < 7)
|
||||
%patch92 -p1 -b .g-s-preedit
|
||||
%endif
|
||||
%patch5 -p1 -b .reconnect
|
||||
cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c ||
|
||||
%patch1 -p1 -b .noswitch
|
||||
%if %with_preload_xkb_engine
|
||||
@ -520,6 +518,10 @@ fi
|
||||
%{_datadir}/gtk-doc/html/*
|
||||
|
||||
%changelog
|
||||
* Wed May 01 2013 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.2-3
|
||||
- Updated ibus-HEAD.patch for upstream.
|
||||
- Deleted ibus-947318-reconnect-gtk-client.patch
|
||||
|
||||
* Sun Apr 21 2013 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.2-2
|
||||
- Separate python files in f19 or later.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user