Add ibus-m17n-custom-setup-element.patch.

This commit is contained in:
Daiki Ueno 2011-12-06 16:25:47 +09:00
parent 6a2e93ff16
commit d2512db553

View File

@ -0,0 +1,49 @@
From b4e843c27e9d357e915dbe29806f5b33011b4e78 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@unixuser.org>
Date: Tue, 6 Dec 2011 16:15:40 +0900
Subject: [PATCH] Supply custom setup element in EngineDesc (RHBZ#760427).
---
src/m17nutil.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/m17nutil.c b/src/m17nutil.c
index 72fb63d..381e27b 100644
--- a/src/m17nutil.c
+++ b/src/m17nutil.c
@@ -119,6 +119,7 @@ ibus_m17n_engine_new (MSymbol lang,
gchar *engine_title;
gchar *engine_icon;
gchar *engine_desc;
+ gchar *engine_setup;
engine_name = g_strdup_printf ("m17n:%s:%s", msymbol_name (lang), msymbol_name (name));
@@ -126,6 +127,8 @@ ibus_m17n_engine_new (MSymbol lang,
engine_title = ibus_m17n_mtext_to_utf8 (title);
engine_icon = ibus_m17n_mtext_to_utf8 (icon);
engine_desc = ibus_m17n_mtext_to_utf8 (desc);
+ engine_setup = g_strdup_printf ("%s/ibus-setup-m17n --name %s",
+ LIBEXECDIR, engine_name);
#if IBUS_CHECK_VERSION(1,3,99)
engine = ibus_engine_desc_new_varargs ("name", engine_name,
@@ -138,6 +141,7 @@ ibus_m17n_engine_new (MSymbol lang,
"rank", config->rank,
"hotkeys", config->hotkeys ? config->hotkeys : "",
"symbol", config->symbol ? config->symbol : "",
+ "setup", engine_setup,
NULL);
#else
engine = ibus_engine_desc_new (engine_name,
@@ -156,6 +160,7 @@ ibus_m17n_engine_new (MSymbol lang,
g_free (engine_title);
g_free (engine_icon);
g_free (engine_desc);
+ g_free (engine_setup);
return engine;
}
--
1.7.7.3