From 368f8862e0a0786d796263f69910f6c3efbdb871 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Thu, 17 Dec 2009 00:04:59 +0000 Subject: [PATCH] Update 1.2.0.20091217 --- .cvsignore | 2 +- ibus-m17n-iok.patch | 53 ++++++++++++++++++++------------------------- ibus-m17n.spec | 6 ++++- sources | 2 +- 4 files changed, 31 insertions(+), 32 deletions(-) diff --git a/.cvsignore b/.cvsignore index 04efac4..5e6a1f3 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -ibus-m17n-1.2.0.20091120.tar.gz +ibus-m17n-1.2.0.20091217.tar.gz diff --git a/ibus-m17n-iok.patch b/ibus-m17n-iok.patch index ebde72f..5810dd2 100644 --- a/ibus-m17n-iok.patch +++ b/ibus-m17n-iok.patch @@ -1,5 +1,5 @@ diff --git a/src/engine.c b/src/engine.c -index d6ac852..6427a55 100644 +index 8dc5c46..1f602a1 100644 --- a/src/engine.c +++ b/src/engine.c @@ -17,6 +17,8 @@ struct _IBusM17NEngine { @@ -50,42 +50,36 @@ index d6ac852..6427a55 100644 m17n = (IBusM17NEngine *) G_OBJECT_CLASS (parent_class)->constructor (type, n_construct_params, -@@ -166,6 +184,14 @@ ibus_m17n_engine_constructor (GType type, +@@ -166,6 +184,15 @@ ibus_m17n_engine_constructor (GType type, engine_name = ibus_engine_get_name ((IBusEngine *) m17n); g_assert (engine_name); + m17n->keymap_name = g_strdup (engine_name); + -+ strv = g_strsplit (engine_name, ":", 2); -+ g_assert (g_strv_length (strv) == 2); ++ strv = g_strsplit (engine_name, ":", 3); ++ g_assert (g_strv_length (strv) == 3); ++ g_assert (g_strcmp0 (strv[0], "m17n") == 0); + + /* show iok icon for inscript */ -+ if(strcmp (strv[1], "inscript") == 0 || strcmp (strv[1] , "inscript2") == 0) -+ ibus_property_set_visible (m17n->show_iok_prop,TRUE); ++ if(strcmp (strv[2], "inscript") == 0 || strcmp (strv[2] , "inscript2") == 0) ++ ibus_property_set_visible (m17n->show_iok_prop, TRUE); if (im_table == NULL) { im_table = g_hash_table_new_full (g_str_hash, -@@ -176,18 +202,7 @@ ibus_m17n_engine_constructor (GType type, - - im = (MInputMethod *) g_hash_table_lookup (im_table, engine_name); +@@ -178,12 +205,6 @@ ibus_m17n_engine_constructor (GType type, if (im == NULL) { -- gchar *lang; -- gchar *name; + gchar *lang; + gchar *name; - gchar **strv; - -- strv = g_strsplit (engine_name, ":", 2); +- strv = g_strsplit (engine_name, ":", 3); - -- g_assert (g_strv_length (strv) == 2); -- -- lang = strv[0]; -- name = strv[1]; -- -- im = minput_open_im (msymbol (lang), msymbol (name), NULL); -+ im = minput_open_im (msymbol (strv[0]), msymbol (strv[1]), NULL); - if (im != NULL) { - mplist_put (im->driver.callback_list, Minput_preedit_start, ibus_m17n_engine_callback); - mplist_put (im->driver.callback_list, Minput_preedit_draw, ibus_m17n_engine_callback); -@@ -207,9 +222,9 @@ ibus_m17n_engine_constructor (GType type, +- g_assert (g_strv_length (strv) == 3); +- g_assert (g_strcmp0 (strv[0], "m17n") == 0); + + lang = strv[1]; + name = strv[2]; +@@ -208,9 +229,9 @@ ibus_m17n_engine_constructor (GType type, g_hash_table_insert (im_table, g_strdup (engine_name), im); } @@ -96,7 +90,7 @@ index d6ac852..6427a55 100644 if (im == NULL) { g_warning ("Can not find m17n keymap %s", engine_name); g_object_unref (m17n); -@@ -231,6 +246,7 @@ ibus_m17n_engine_destroy (IBusM17NEngine *m17n) +@@ -232,6 +253,7 @@ ibus_m17n_engine_destroy (IBusM17NEngine *m17n) m17n->prop_list = NULL; } @@ -104,7 +98,7 @@ index d6ac852..6427a55 100644 if (m17n->status_prop) { g_object_unref (m17n->status_prop); m17n->status_prop = NULL; -@@ -383,6 +399,7 @@ ibus_m17n_engine_focus_in (IBusEngine *engine) +@@ -384,6 +406,7 @@ ibus_m17n_engine_focus_in (IBusEngine *engine) IBusM17NEngine *m17n = (IBusM17NEngine *) engine; ibus_engine_register_properties (engine, m17n->prop_list); @@ -112,7 +106,7 @@ index d6ac852..6427a55 100644 ibus_m17n_engine_process_key (m17n, msymbol ("input-focus-in")); parent_class->focus_in (engine); -@@ -468,6 +485,19 @@ ibus_m17n_engine_property_activate (IBusEngine *engine, +@@ -469,6 +492,20 @@ ibus_m17n_engine_property_activate (IBusEngine *engine, const gchar *prop_name, guint prop_state) { @@ -121,10 +115,11 @@ index d6ac852..6427a55 100644 + + IBusM17NEngine *m17n = (IBusM17NEngine *) engine; + -+ strv = g_strsplit (m17n->keymap_name, ":", 2); -+ g_assert (g_strv_length (strv) == 2); ++ strv = g_strsplit (m17n->keymap_name, ":", 3); ++ g_assert (g_strv_length (strv) == 3); ++ g_assert (g_strcmp0 (strv[0], "m17n") == 0); + -+ sprintf (cmd, "/usr/bin/iok -n %s", strv[0]); ++ sprintf (cmd, "/usr/bin/iok -n %s", strv[1]); + g_debug ("keymap name = %s,prop_name=%s, prop_state=%d", m17n->keymap_name, prop_name, prop_state); + g_strfreev (strv); + diff --git a/ibus-m17n.spec b/ibus-m17n.spec index e8431d6..149c237 100644 --- a/ibus-m17n.spec +++ b/ibus-m17n.spec @@ -1,7 +1,7 @@ %define require_ibus_version 1.2.0 Name: ibus-m17n -Version: 1.2.0.20091120 +Version: 1.2.0.20091217 Release: 1%{?dist} Summary: The M17N engine for IBus platform License: GPLv2+ @@ -52,6 +52,10 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ibus/component/* %changelog +* Thu Dec 17 2009 Peng Huang - 1.2.0.20091217-1 +- Update to 1.2.0.20091217. +- Update iok patch. + * Fri Nov 20 2009 Peng Huang - 1.2.0.20091120-1 - Update to 1.2.0.20091120. - Fix bug 530976 diff --git a/sources b/sources index f8814eb..5ddb2ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -49314ce44f3e8a1d2714ca6fdae79cb8 ibus-m17n-1.2.0.20091120.tar.gz +9bcccb93c3385bda01172f846b716048 ibus-m17n-1.2.0.20091217.tar.gz