Update to 1.3.2-1.
This commit is contained in:
parent
76feb1d812
commit
e07dc15417
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
ibus-m17n-1.3.0.tar.gz
|
||||
/ibus-m17n-1.3.0.tar.gz
|
||||
/ibus-m17n-1.3.1.tar.gz
|
||||
/ibus-m17n-1.3.2.tar.gz
|
||||
|
1486
ibus-m17n-HEAD.patch
1486
ibus-m17n-HEAD.patch
File diff suppressed because it is too large
Load Diff
@ -1,343 +0,0 @@
|
||||
From c7acc11b3a8e72efb2479b3d1a6f20abb156994c Mon Sep 17 00:00:00 2001
|
||||
From: Daiki Ueno <ueno@unixuser.org>
|
||||
Date: Fri, 3 Dec 2010 17:05:45 +0900
|
||||
Subject: [PATCH] Fix problem with ibus-1.4
|
||||
|
||||
---
|
||||
src/engine.c | 58 +++++++++++++++++++++++--------------------------
|
||||
src/m17nutil.c | 18 +++++++-------
|
||||
src/main.c | 7 +++--
|
||||
src/setup.c | 65 ++++++++++++++++++++++++++++---------------------------
|
||||
4 files changed, 73 insertions(+), 75 deletions(-)
|
||||
|
||||
diff --git a/src/engine.c b/src/engine.c
|
||||
index f8e7fe5..5fbe46f 100644
|
||||
--- a/src/engine.c
|
||||
+++ b/src/engine.c
|
||||
@@ -58,7 +58,7 @@ static void ibus_m17n_engine_class_finalize (IBusM17NEngineClass *klass);
|
||||
static void ibus_m17n_config_value_changed (IBusConfig *config,
|
||||
const gchar *section,
|
||||
const gchar *name,
|
||||
- GValue *value,
|
||||
+ GVariant *value,
|
||||
IBusM17NEngineClass *klass);
|
||||
static GObject*
|
||||
ibus_m17n_engine_constructor (GType type,
|
||||
@@ -274,7 +274,7 @@ ibus_m17n_engine_class_init (IBusM17NEngineClass *klass)
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass);
|
||||
IBusEngineClass *engine_class = IBUS_ENGINE_CLASS (klass);
|
||||
- GValue value = { 0 };
|
||||
+ GVariant *value = NULL;
|
||||
gchar *engine_name, *lang = NULL, *name = NULL;
|
||||
IBusM17NEngineConfig *engine_config;
|
||||
|
||||
@@ -321,43 +321,39 @@ ibus_m17n_engine_class_init (IBusM17NEngineClass *klass)
|
||||
engine_config = ibus_m17n_get_engine_config (engine_name);
|
||||
g_free (engine_name);
|
||||
|
||||
- if (ibus_config_get_value (config,
|
||||
- klass->config_section,
|
||||
- "preedit_foreground",
|
||||
- &value)) {
|
||||
- const gchar *hex = g_value_get_string (&value);
|
||||
+ if (value = ibus_config_get_value (config,
|
||||
+ klass->config_section,
|
||||
+ "preedit_foreground")) {
|
||||
+ const gchar *hex = g_variant_get_string (value, NULL);
|
||||
|
||||
klass->preedit_foreground = ibus_m17n_parse_color (hex);
|
||||
- g_value_unset (&value);
|
||||
+ g_variant_unref (value);
|
||||
} else if (engine_config->preedit_highlight)
|
||||
klass->preedit_foreground = PREEDIT_FOREGROUND;
|
||||
|
||||
- if (ibus_config_get_value (config,
|
||||
- klass->config_section,
|
||||
- "preedit_background",
|
||||
- &value)) {
|
||||
- const gchar *hex = g_value_get_string (&value);
|
||||
+ if (value = ibus_config_get_value (config,
|
||||
+ klass->config_section,
|
||||
+ "preedit_background")) {
|
||||
+ const gchar *hex = g_variant_get_string (value, NULL);
|
||||
|
||||
klass->preedit_background = ibus_m17n_parse_color (hex);
|
||||
- g_value_unset (&value);
|
||||
+ g_variant_unref (value);
|
||||
} else if (engine_config->preedit_highlight)
|
||||
klass->preedit_background = PREEDIT_BACKGROUND;
|
||||
|
||||
- if (ibus_config_get_value (config,
|
||||
- klass->config_section,
|
||||
- "preedit_underline",
|
||||
- &value)) {
|
||||
- klass->preedit_underline = g_value_get_int (&value);
|
||||
- g_value_unset (&value);
|
||||
+ if (value = ibus_config_get_value (config,
|
||||
+ klass->config_section,
|
||||
+ "preedit_underline")) {
|
||||
+ klass->preedit_underline = g_variant_get_int32 (value);
|
||||
+ g_variant_unref (value);
|
||||
} else
|
||||
klass->preedit_underline = IBUS_ATTR_UNDERLINE_NONE;
|
||||
|
||||
- if (ibus_config_get_value (config,
|
||||
- klass->config_section,
|
||||
- "lookup_table_orientation",
|
||||
- &value)) {
|
||||
- klass->lookup_table_orientation = g_value_get_int (&value);
|
||||
- g_value_unset (&value);
|
||||
+ if (value = ibus_config_get_value (config,
|
||||
+ klass->config_section,
|
||||
+ "lookup_table_orientation")) {
|
||||
+ klass->lookup_table_orientation = g_variant_get_int32 (value);
|
||||
+ g_variant_unref (value);
|
||||
} else
|
||||
klass->lookup_table_orientation = IBUS_ORIENTATION_SYSTEM;
|
||||
|
||||
@@ -372,28 +368,28 @@ static void
|
||||
ibus_m17n_config_value_changed (IBusConfig *config,
|
||||
const gchar *section,
|
||||
const gchar *name,
|
||||
- GValue *value,
|
||||
+ GVariant *value,
|
||||
IBusM17NEngineClass *klass)
|
||||
{
|
||||
if (g_strcmp0 (section, klass->config_section) == 0) {
|
||||
if (g_strcmp0 (name, "preedit_foreground") == 0) {
|
||||
- const gchar *hex = g_value_get_string (value);
|
||||
+ const gchar *hex = g_variant_get_string (value, NULL);
|
||||
guint color;
|
||||
color = ibus_m17n_parse_color (hex);
|
||||
if (color != INVALID_COLOR) {
|
||||
klass->preedit_foreground = color;
|
||||
}
|
||||
} else if (g_strcmp0 (name, "preedit_background") == 0) {
|
||||
- const gchar *hex = g_value_get_string (value);
|
||||
+ const gchar *hex = g_variant_get_string (value, NULL);
|
||||
guint color;
|
||||
color = ibus_m17n_parse_color (hex);
|
||||
if (color != INVALID_COLOR) {
|
||||
klass->preedit_background = color;
|
||||
}
|
||||
} else if (g_strcmp0 (name, "preedit_underline") == 0) {
|
||||
- klass->preedit_underline = g_value_get_int (value);
|
||||
+ klass->preedit_underline = g_variant_get_int32 (value);
|
||||
} else if (g_strcmp0 (name, "lookup_table_orientation") == 0) {
|
||||
- klass->lookup_table_orientation = g_value_get_int (value);
|
||||
+ klass->lookup_table_orientation = g_variant_get_int32 (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/m17nutil.c b/src/m17nutil.c
|
||||
index 6d6961f..c4098c7 100644
|
||||
--- a/src/m17nutil.c
|
||||
+++ b/src/m17nutil.c
|
||||
@@ -113,15 +113,15 @@ ibus_m17n_engine_new (MSymbol lang,
|
||||
engine_icon = ibus_m17n_mtext_to_utf8 (icon);
|
||||
engine_desc = ibus_m17n_mtext_to_utf8 (desc);
|
||||
|
||||
- engine = ibus_engine_desc_new (engine_name,
|
||||
- engine_longname,
|
||||
- engine_desc ? engine_desc : "",
|
||||
- msymbol_name (lang),
|
||||
- "GPL",
|
||||
- "",
|
||||
- engine_icon ? engine_icon : "",
|
||||
- "us");
|
||||
- engine->rank = config->rank;
|
||||
+ engine = ibus_engine_desc_new_varargs ("name", engine_name,
|
||||
+ "longname", engine_longname,
|
||||
+ "description", engine_desc ? engine_desc : "",
|
||||
+ "language", msymbol_name (lang),
|
||||
+ "license", "GPL",
|
||||
+ "icon", engine_icon ? engine_icon : "",
|
||||
+ "layout", "us",
|
||||
+ "rank", config->rank,
|
||||
+ NULL);
|
||||
|
||||
g_free (engine_name);
|
||||
g_free (engine_longname);
|
||||
diff --git a/src/main.c b/src/main.c
|
||||
index e76898d..bba31e1 100644
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -51,13 +51,14 @@ start_component (void)
|
||||
engines = ibus_component_get_engines (component);
|
||||
for (p = engines; p != NULL; p = p->next) {
|
||||
IBusEngineDesc *engine = (IBusEngineDesc *)p->data;
|
||||
- GType type = ibus_m17n_engine_get_type_for_name (engine->name);
|
||||
+ const gchar *engine_name = ibus_engine_desc_get_name (engine);
|
||||
+ GType type = ibus_m17n_engine_get_type_for_name (engine_name);
|
||||
|
||||
if (type == G_TYPE_INVALID) {
|
||||
- g_debug ("Can not create engine type for %s", engine->name);
|
||||
+ g_debug ("Can not create engine type for %s", engine_name);
|
||||
continue;
|
||||
}
|
||||
- ibus_factory_add_engine (factory, engine->name, type);
|
||||
+ ibus_factory_add_engine (factory, engine_name, type);
|
||||
}
|
||||
|
||||
if (ibus) {
|
||||
diff --git a/src/setup.c b/src/setup.c
|
||||
index 0fe6e1b..178190e 100644
|
||||
--- a/src/setup.c
|
||||
+++ b/src/setup.c
|
||||
@@ -210,10 +210,8 @@ color_to_gdk (guint color, GdkColor *color_gdk)
|
||||
static void
|
||||
set_color (ConfigContext *context, const gchar *name, GdkColor *color)
|
||||
{
|
||||
- GValue value = { 0 };
|
||||
gchar buf[8];
|
||||
|
||||
- g_value_init (&value, G_TYPE_STRING);
|
||||
if (color)
|
||||
sprintf (buf, "#%02X%02X%02X",
|
||||
(color->red & 0xFF00) >> 8,
|
||||
@@ -221,8 +219,10 @@ set_color (ConfigContext *context, const gchar *name, GdkColor *color)
|
||||
(color->blue & 0xFF00) >> 8);
|
||||
else
|
||||
strcpy (buf, "none");
|
||||
- g_value_set_string (&value, buf);
|
||||
- ibus_config_set_value (config, context->section, name, &value);
|
||||
+ ibus_config_set_value (config,
|
||||
+ context->section,
|
||||
+ name,
|
||||
+ g_variant_new_string (buf));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -254,17 +254,16 @@ on_underline_changed (GtkComboBox *combo,
|
||||
ConfigContext *context = user_data;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
- GValue value = { 0 };
|
||||
gint active;
|
||||
|
||||
model = gtk_combo_box_get_model (combo);
|
||||
gtk_combo_box_get_active_iter (combo, &iter);
|
||||
gtk_tree_model_get (model, &iter, COLUMN_VALUE, &active, -1);
|
||||
|
||||
- g_value_init (&value, G_TYPE_INT);
|
||||
- g_value_set_int (&value, active);
|
||||
- ibus_config_set_value (config, context->section, "preedit_underline",
|
||||
- &value);
|
||||
+ ibus_config_set_value (config,
|
||||
+ context->section,
|
||||
+ "preedit_underline",
|
||||
+ g_variant_new_int32 (active));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -274,17 +273,16 @@ on_orientation_changed (GtkComboBox *combo,
|
||||
ConfigContext *context = user_data;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
- GValue value = { 0 };
|
||||
gint active;
|
||||
|
||||
model = gtk_combo_box_get_model (combo);
|
||||
gtk_combo_box_get_active_iter (combo, &iter);
|
||||
gtk_tree_model_get (model, &iter, COLUMN_VALUE, &active, -1);
|
||||
|
||||
- g_value_init (&value, G_TYPE_INT);
|
||||
- g_value_set_int (&value, active);
|
||||
- ibus_config_set_value (config, context->section, "lookup_table_orientation",
|
||||
- &value);
|
||||
+ ibus_config_set_value (config,
|
||||
+ context->section,
|
||||
+ "lookup_table_orientation",
|
||||
+ g_variant_new_int32 (active));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -367,7 +365,7 @@ start (const gchar *engine_name)
|
||||
GError *error = NULL;
|
||||
GtkCellRenderer *renderer;
|
||||
ConfigContext context;
|
||||
- GValue value = { 0 };
|
||||
+ GVariant *value = NULL;
|
||||
gboolean is_foreground_set, is_background_set;
|
||||
GdkColor foreground, background;
|
||||
gint underline;
|
||||
@@ -417,15 +415,16 @@ start (const gchar *engine_name)
|
||||
/* foreground color of pre-edit buffer */
|
||||
is_foreground_set = FALSE;
|
||||
color_to_gdk (PREEDIT_FOREGROUND, &foreground);
|
||||
- if (ibus_config_get_value (config, context.section, "preedit_foreground",
|
||||
- &value)) {
|
||||
+ if (value = ibus_config_get_value (config,
|
||||
+ context.section,
|
||||
+ "preedit_foreground")) {
|
||||
const gchar *color;
|
||||
|
||||
- color = g_value_get_string (&value);
|
||||
+ color = g_variant_get_string (value, NULL);
|
||||
if (g_strcmp0 (color, "none") != 0 &&
|
||||
gdk_color_parse (color, &foreground))
|
||||
is_foreground_set = TRUE;
|
||||
- g_value_unset (&value);
|
||||
+ g_variant_unref (value);
|
||||
}
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(checkbutton_foreground),
|
||||
@@ -445,16 +444,17 @@ start (const gchar *engine_name)
|
||||
/* background color of pre-edit buffer */
|
||||
is_background_set = FALSE;
|
||||
color_to_gdk (PREEDIT_BACKGROUND, &background);
|
||||
- if (ibus_config_get_value (config, context.section, "preedit_background",
|
||||
- &value)) {
|
||||
+ if (value = ibus_config_get_value (config,
|
||||
+ context.section,
|
||||
+ "preedit_background")) {
|
||||
const gchar *color;
|
||||
|
||||
- color = g_value_get_string (&value);
|
||||
+ color = g_variant_get_string (value, NULL);
|
||||
if (g_strcmp0 (color, "none") != 0 &&
|
||||
gdk_color_parse (color, &background))
|
||||
is_background_set = TRUE;
|
||||
g_debug ("preedit_background %d", is_background_set);
|
||||
- g_value_unset (&value);
|
||||
+ g_variant_unref (value);
|
||||
}
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(checkbutton_background),
|
||||
is_background_set);
|
||||
@@ -476,10 +476,11 @@ start (const gchar *engine_name)
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT(combobox_underline),
|
||||
renderer, "text", 0, NULL);
|
||||
underline = IBUS_ATTR_UNDERLINE_NONE;
|
||||
- if (ibus_config_get_value (config, context.section, "preedit_underline",
|
||||
- &value)) {
|
||||
- underline = g_value_get_int (&value);
|
||||
- g_value_unset (&value);
|
||||
+ if (value = ibus_config_get_value (config,
|
||||
+ context.section,
|
||||
+ "preedit_underline")) {
|
||||
+ underline = g_variant_get_int32 (value);
|
||||
+ g_variant_unref (value);
|
||||
}
|
||||
|
||||
index = get_combo_box_index_by_value (GTK_COMBO_BOX(combobox_underline),
|
||||
@@ -495,11 +496,11 @@ start (const gchar *engine_name)
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT(combobox_orientation),
|
||||
renderer, "text", 0, NULL);
|
||||
orientation = IBUS_ORIENTATION_SYSTEM;
|
||||
- if (ibus_config_get_value (config, context.section,
|
||||
- "lookup_table_orientation",
|
||||
- &value)) {
|
||||
- orientation = g_value_get_int (&value);
|
||||
- g_value_unset (&value);
|
||||
+ if (value = ibus_config_get_value (config,
|
||||
+ context.section,
|
||||
+ "lookup_table_orientation")) {
|
||||
+ orientation = g_variant_get_int32 (value);
|
||||
+ g_variant_unref (value);
|
||||
}
|
||||
|
||||
index = get_combo_box_index_by_value (GTK_COMBO_BOX(combobox_orientation),
|
||||
--
|
||||
1.7.3.3
|
||||
|
@ -1,25 +1,25 @@
|
||||
From 5eea6bfe70ba1815bda1ba22a28c584f9d5f6a64 Mon Sep 17 00:00:00 2001
|
||||
From c27a0917c26624f1741efeebe20cd5cfb8647a67 Mon Sep 17 00:00:00 2001
|
||||
From: Daiki Ueno <ueno@unixuser.org>
|
||||
Date: Wed, 8 Dec 2010 18:06:11 +0900
|
||||
Subject: [PATCH] Apply iok patch from fedora.
|
||||
Date: Mon, 7 Mar 2011 14:57:32 +0900
|
||||
Subject: [PATCH] Apply iok patch from Fedora.
|
||||
|
||||
---
|
||||
src/engine.c | 43 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 files changed, 43 insertions(+), 0 deletions(-)
|
||||
src/engine.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 files changed, 46 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/engine.c b/src/engine.c
|
||||
index f8e7fe5..3143428 100644
|
||||
index 62359c1..362d347 100644
|
||||
--- a/src/engine.c
|
||||
+++ b/src/engine.c
|
||||
@@ -35,6 +35,7 @@ struct _IBusM17NEngine {
|
||||
IBusProperty *status_prop;
|
||||
@@ -37,6 +37,7 @@ struct _IBusM17NEngine {
|
||||
IBusProperty *setup_prop;
|
||||
#endif /* HAVE_SETUP */
|
||||
IBusPropList *prop_list;
|
||||
+ IBusProperty *show_iok_prop;
|
||||
};
|
||||
|
||||
struct _IBusM17NEngineClass {
|
||||
@@ -46,6 +47,7 @@ struct _IBusM17NEngineClass {
|
||||
@@ -48,6 +49,7 @@ struct _IBusM17NEngineClass {
|
||||
guint preedit_background;
|
||||
gint preedit_underline;
|
||||
gint lookup_table_orientation;
|
||||
@ -27,7 +27,7 @@ index f8e7fe5..3143428 100644
|
||||
|
||||
MInputMethod *im;
|
||||
};
|
||||
@@ -309,6 +311,9 @@ ibus_m17n_engine_class_init (IBusM17NEngineClass *klass)
|
||||
@@ -316,6 +318,9 @@ ibus_m17n_engine_class_init (IBusM17NEngineClass *klass)
|
||||
}
|
||||
engine_name = g_strdup_printf ("m17n:%s:%s", lang, name);
|
||||
klass->config_section = g_strdup_printf ("engine/M17N/%s/%s", lang, name);
|
||||
@ -37,17 +37,17 @@ index f8e7fe5..3143428 100644
|
||||
g_free (lang);
|
||||
g_free (name);
|
||||
|
||||
@@ -411,6 +416,7 @@ ibus_m17n_engine_init (IBusM17NEngine *m17n)
|
||||
@@ -420,6 +425,7 @@ ibus_m17n_engine_init (IBusM17NEngine *m17n)
|
||||
{
|
||||
IBusText* label;
|
||||
IBusText* tooltip;
|
||||
+ IBusM17NEngineClass *klass = (IBusM17NEngineClass *) G_OBJECT_GET_CLASS (m17n);
|
||||
|
||||
m17n->status_prop = ibus_property_new ("status",
|
||||
PROP_TYPE_NORMAL,
|
||||
@@ -436,10 +442,26 @@ ibus_m17n_engine_init (IBusM17NEngine *m17n)
|
||||
NULL);
|
||||
g_object_ref_sink (m17n->setup_prop);
|
||||
m17n->prop_list = ibus_prop_list_new ();
|
||||
g_object_ref_sink (m17n->prop_list);
|
||||
@@ -452,6 +458,23 @@ ibus_m17n_engine_init (IBusM17NEngine *m17n)
|
||||
ibus_prop_list_append (m17n->prop_list, m17n->setup_prop);
|
||||
#endif /* HAVE_SETUP */
|
||||
|
||||
+ label = ibus_text_new_from_string ("iok");
|
||||
+ m17n->show_iok_prop = ibus_property_new ("iok",
|
||||
@ -64,17 +64,14 @@ index f8e7fe5..3143428 100644
|
||||
+ if (klass->use_iok)
|
||||
+ ibus_property_set_visible (m17n->show_iok_prop, TRUE);
|
||||
+
|
||||
m17n->prop_list = ibus_prop_list_new ();
|
||||
g_object_ref_sink (m17n->prop_list);
|
||||
ibus_prop_list_append (m17n->prop_list, m17n->status_prop);
|
||||
ibus_prop_list_append (m17n->prop_list, m17n->setup_prop);
|
||||
+ ibus_prop_list_append (m17n->prop_list, m17n->show_iok_prop);
|
||||
|
||||
+
|
||||
m17n->table = ibus_lookup_table_new (9, 0, TRUE, TRUE);
|
||||
g_object_ref_sink (m17n->table);
|
||||
@@ -524,6 +546,11 @@ ibus_m17n_engine_destroy (IBusM17NEngine *m17n)
|
||||
m17n->setup_prop = NULL;
|
||||
m17n->context = NULL;
|
||||
@@ -537,6 +560,11 @@ ibus_m17n_engine_destroy (IBusM17NEngine *m17n)
|
||||
}
|
||||
#endif /* HAVE_SETUP */
|
||||
|
||||
+ if (m17n->show_iok_prop) {
|
||||
+ g_object_unref (m17n->show_iok_prop);
|
||||
@ -84,11 +81,11 @@ index f8e7fe5..3143428 100644
|
||||
if (m17n->table) {
|
||||
g_object_unref (m17n->table);
|
||||
m17n->table = NULL;
|
||||
@@ -827,6 +854,22 @@ ibus_m17n_engine_property_activate (IBusEngine *engine,
|
||||
LIBEXECDIR, engine_name);
|
||||
g_spawn_command_line_async (setup, NULL);
|
||||
g_free (setup);
|
||||
+ } else if (g_strcmp0 (prop_name, "iok") == 0) {
|
||||
@@ -844,6 +872,24 @@ ibus_m17n_engine_property_activate (IBusEngine *engine,
|
||||
}
|
||||
#endif /* HAVE_SETUP */
|
||||
|
||||
+ if (g_strcmp0 (prop_name, "iok") == 0) {
|
||||
+ const gchar *engine_name;
|
||||
+ gchar *lang = NULL, *name = NULL;
|
||||
+
|
||||
@ -104,9 +101,11 @@ index f8e7fe5..3143428 100644
|
||||
+ }
|
||||
+ g_free (lang);
|
||||
+ g_free (name);
|
||||
}
|
||||
+ }
|
||||
+
|
||||
parent_class->property_activate (engine, prop_name, prop_state);
|
||||
}
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
--
|
||||
1.7.4
|
||||
|
||||
|
@ -1,24 +1,22 @@
|
||||
From e4f14d6d0755dc315c850eaef6f46fd1596b2da7 Mon Sep 17 00:00:00 2001
|
||||
From 589f9dc5998dc5ea620d1e6fa1a64045574b1dc1 Mon Sep 17 00:00:00 2001
|
||||
From: Daiki Ueno <ueno@unixuser.org>
|
||||
Date: Wed, 15 Sep 2010 12:21:35 +0900
|
||||
Date: Mon, 7 Mar 2011 15:06:38 +0900
|
||||
Subject: [PATCH] Support surrounding-text commands.
|
||||
|
||||
---
|
||||
src/engine.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
src/engine.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
src/m17nutil.c | 8 ++++++++
|
||||
2 files changed, 56 insertions(+), 3 deletions(-)
|
||||
2 files changed, 55 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/engine.c b/src/engine.c
|
||||
index 5fbe46f..e5dad3e 100644
|
||||
index 62359c1..ebe7ccc 100644
|
||||
--- a/src/engine.c
|
||||
+++ b/src/engine.c
|
||||
@@ -966,8 +966,53 @@ ibus_m17n_engine_callback (MInputContext *context,
|
||||
@@ -986,8 +986,53 @@ ibus_m17n_engine_callback (MInputContext *context,
|
||||
}
|
||||
else if (command == Minput_reset) {
|
||||
}
|
||||
- else if (command == Minput_get_surrounding_text) {
|
||||
- }
|
||||
- else if (command == Minput_delete_surrounding_text) {
|
||||
+ else if (command == Minput_get_surrounding_text &&
|
||||
+ (((IBusEngine *) m17n)->client_capabilities &
|
||||
+ IBUS_CAP_SURROUNDING_TEXT) != 0) {
|
||||
@ -54,7 +52,8 @@ index 5fbe46f..e5dad3e 100644
|
||||
+ m17n_object_unref (mt);
|
||||
+ mplist_set (m17n->context->plist, Mtext, surround);
|
||||
+ m17n_object_unref (surround);
|
||||
+ }
|
||||
}
|
||||
- else if (command == Minput_delete_surrounding_text) {
|
||||
+ else if (command == Minput_delete_surrounding_text &&
|
||||
+ (((IBusEngine *) m17n)->client_capabilities &
|
||||
+ IBUS_CAP_SURROUNDING_TEXT) != 0) {
|
||||
@ -70,10 +69,10 @@ index 5fbe46f..e5dad3e 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/m17nutil.c b/src/m17nutil.c
|
||||
index 8fac1fe..3865931 100644
|
||||
index 1150cc4..db99686 100644
|
||||
--- a/src/m17nutil.c
|
||||
+++ b/src/m17nutil.c
|
||||
@@ -96,6 +96,13 @@ ibus_m17n_parse_color (const gchar *hex)
|
||||
@@ -91,6 +91,13 @@ ibus_m17n_parse_color (const gchar *hex)
|
||||
return color;
|
||||
}
|
||||
|
||||
@ -87,14 +86,14 @@ index 8fac1fe..3865931 100644
|
||||
static IBusEngineDesc *
|
||||
ibus_m17n_engine_new (MSymbol lang,
|
||||
MSymbol name,
|
||||
@@ -127,6 +134,7 @@ ibus_m17n_engine_new (MSymbol lang,
|
||||
@@ -122,6 +129,7 @@ ibus_m17n_engine_new (MSymbol lang,
|
||||
"icon", engine_icon ? engine_icon : "",
|
||||
"layout", "us",
|
||||
"rank", config->rank,
|
||||
+ "requires", DEFAULT_REQUIRES,
|
||||
NULL);
|
||||
|
||||
g_free (engine_name);
|
||||
#else
|
||||
engine = ibus_engine_desc_new (engine_name,
|
||||
--
|
||||
1.7.3.4
|
||||
1.7.4
|
||||
|
||||
|
@ -1,26 +1,26 @@
|
||||
%define require_ibus_version 1.3.0
|
||||
|
||||
Name: ibus-m17n
|
||||
Version: 1.3.1
|
||||
Release: 18%{?dist}
|
||||
Version: 1.3.2
|
||||
Release: 1%{?dist}
|
||||
Summary: The M17N engine for IBus platform
|
||||
License: GPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://code.google.com/p/ibus/
|
||||
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch0: ibus-m17n-HEAD.patch
|
||||
Patch1: ibus-m17n-ibus-1.4.patch
|
||||
Patch2: ibus-m17n-iok.patch
|
||||
Patch3: ibus-m17n-surrounding-text.patch
|
||||
Patch0: ibus-m17n-iok.patch
|
||||
Patch1: ibus-m17n-surrounding-text.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkgconfig
|
||||
# The following BR is for autogen and not necessary when packging
|
||||
# released tarballs.
|
||||
# BuildRequires: gettext-devel
|
||||
# BuildRequires: libtool
|
||||
# BuildRequires: pkgconfig
|
||||
# BuildRequires: gnome-common
|
||||
BuildRequires: m17n-lib-devel
|
||||
BuildRequires: gtk3-devel
|
||||
BuildRequires: gnome-common
|
||||
BuildRequires: ibus-devel >= %{require_ibus_version}
|
||||
|
||||
Requires: ibus >= %{require_ibus_version}
|
||||
@ -33,18 +33,12 @@ the input table maps from m17n-db.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .HEAD
|
||||
%patch1 -p1 -b .ibus-1.4
|
||||
%patch2 -p1 -b .iok
|
||||
%patch3 -p1 -b .surrounding-text
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
%patch0 -p1 -b .iok
|
||||
%patch1 -p1 -b .surrounding-text
|
||||
# NOCONFIGURE=1 ./autogen.sh
|
||||
|
||||
%build
|
||||
GTK2_CFLAGS=`pkg-config gtk+-3.0 --cflags`
|
||||
export GTK2_CFLAGS
|
||||
GTK2_LIBS=`pkg-config gtk+-3.0 --libs`
|
||||
export GTK2_LIBS
|
||||
%configure --disable-static
|
||||
%configure --disable-static --with-gtk=3.0
|
||||
# make -C po update-gmo
|
||||
make %{?_smp_mflags}
|
||||
|
||||
@ -66,6 +60,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/ibus/component/*
|
||||
|
||||
%changelog
|
||||
* Mon Mar 7 2011 Daiki Ueno <dueno@redhat.com> - 1.3.2-1
|
||||
- New upstream release.
|
||||
|
||||
* Fri Feb 11 2011 Matthias Clasen <mclasen@redhat.com> - 1.3.1-18
|
||||
- Rebuild against newer gtk
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user