diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2012-01-10 00:52:39 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2012-01-10 00:52:39 +0000 |
commit | 0a66e6819c7a732c76f5912a8e91363f0b485a77 (patch) | |
tree | 6971965f929eb16c9f341f67252199f0706637c4 /korean/ibus-hangul | |
parent | 91b877d378dcf02eac36b68a3631fad0b039e85b (diff) | |
download | ports-0a66e6819c7a732c76f5912a8e91363f0b485a77.tar.gz ports-0a66e6819c7a732c76f5912a8e91363f0b485a77.zip |
Notes
Diffstat (limited to 'korean/ibus-hangul')
-rw-r--r-- | korean/ibus-hangul/Makefile | 1 | ||||
-rw-r--r-- | korean/ibus-hangul/files/patch-src-engine.c | 61 |
2 files changed, 51 insertions, 11 deletions
diff --git a/korean/ibus-hangul/Makefile b/korean/ibus-hangul/Makefile index fc37ae109868..dda9e2591213 100644 --- a/korean/ibus-hangul/Makefile +++ b/korean/ibus-hangul/Makefile @@ -7,6 +7,7 @@ PORTNAME= ibus-hangul PORTVERSION= 1.3.2 +PORTREVISION= 1 CATEGORIES= korean MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} diff --git a/korean/ibus-hangul/files/patch-src-engine.c b/korean/ibus-hangul/files/patch-src-engine.c index c833b41509ce..d6a99cd6d477 100644 --- a/korean/ibus-hangul/files/patch-src-engine.c +++ b/korean/ibus-hangul/files/patch-src-engine.c @@ -1,16 +1,25 @@ --- src/engine.c.orig 2011-10-16 11:20:21.000000000 -0400 -+++ src/engine.c 2012-01-09 13:20:15.000000000 -0500 ++++ src/engine.c 2012-01-09 19:40:48.000000000 -0500 +@@ -130,7 +130,7 @@ + static void ibus_config_value_changed (IBusConfig *config, + const gchar *section, + const gchar *name, +- GValue *value, ++ GVariant *value, + gpointer user_data); + + static void lookup_table_set_visible (IBusLookupTable *table, @@ -194,8 +194,7 @@ void ibus_hangul_init (IBusBus *bus) { - gboolean res; - GValue value = { 0, }; -+ GVariant *var = NULL; ++ GVariant* value; hanja_table = hanja_table_load (NULL); -@@ -206,22 +205,20 @@ +@@ -206,22 +205,22 @@ g_object_ref_sink (config); hangul_keyboard = g_string_new_len ("2", 8); @@ -18,12 +27,13 @@ - "HangulKeyboard", &value); - if (res) { - const gchar* str = g_value_get_string (&value); -+ var = ibus_config_get_value (config, "engine/Hangul", "HangulKeyboard"); -+ if (var) { -+ const gchar* str = g_variant_get_string (var, NULL); ++ value = ibus_config_get_value (config, "engine/Hangul", ++ "HangulKeyboard"); ++ if (value != NULL) { ++ const gchar* str = g_variant_get_string (value, NULL); g_string_assign (hangul_keyboard, str); - g_value_unset(&value); -+ g_variant_unref(var); ++ g_variant_unref(value); } hanja_key_list_init(&hanja_keys); @@ -32,12 +42,41 @@ - "HanjaKeys", &value); - if (res) { - const gchar* str = g_value_get_string (&value); -+ var = ibus_config_get_value (config, "engine/Hangul", "HanjaKeys"); -+ if (var) { -+ const gchar* str = g_variant_get_string (var, NULL); ++ value = ibus_config_get_value (config, "engine/Hangul", ++ "HanjaKeys"); ++ if (value != NULL) { ++ const gchar* str = g_variant_get_string (value, NULL); hanja_key_list_set_from_string(&hanja_keys, str); - g_value_unset(&value); -+ g_variant_unref(var); ++ g_variant_unref(value); } else { hanja_key_list_append(&hanja_keys, IBUS_Hangul_Hanja, 0); hanja_key_list_append(&hanja_keys, IBUS_F9, 0); +@@ -990,23 +989,23 @@ + ibus_config_value_changed (IBusConfig *config, + const gchar *section, + const gchar *name, +- GValue *value, ++ GVariant *value, + gpointer user_data) + { + IBusHangulEngine *hangul = (IBusHangulEngine *) user_data; + + if (strcmp(section, "engine/Hangul") == 0) { + if (strcmp(name, "HangulKeyboard") == 0) { +- const gchar *str = g_value_get_string (value); ++ const gchar *str = g_variant_get_string(value, NULL); + g_string_assign (hangul_keyboard, str); + hangul_ic_select_keyboard (hangul->context, hangul_keyboard->str); + } else if (strcmp(name, "HanjaKeys") == 0) { +- const gchar* str = g_value_get_string (value); ++ const gchar* str = g_variant_get_string(value, NULL); + hanja_key_list_set_from_string(&hanja_keys, str); + } + } else if (strcmp(section, "panel") == 0) { + if (strcmp(name, "lookup_table_orientation") == 0) { +- lookup_table_orientation = g_value_get_int (value); ++ lookup_table_orientation = g_variant_get_int32(value); + } + } + } |