Annotation of pkgsrc/inputmethod/ibus-array/patches/patch-src_engine.c, revision 1.2
1.2 ! joerg 1: $NetBSD: patch-src_engine.c,v 1.1 2012/04/22 14:09:10 obache Exp $
1.1 obache 2:
3: * for ibus-1.4
4:
5: --- src/engine.c.orig 2009-10-18 17:06:12.000000000 +0000
6: +++ src/engine.c
7: @@ -79,7 +79,7 @@ static void ibus_array_engine_show_speci
8: static void ibus_config_value_changed (IBusConfig *config,
9: const gchar *section,
10: const gchar *name,
11: - GValue *value,
12: + GVariant *value,
13: gpointer user_data);
14:
15: static IBusEngineClass *parent_class = NULL;
16: @@ -120,7 +120,7 @@ void
17: ibus_array_init (IBusBus *bus)
18: {
19: gboolean res;
20: - GValue value = { 0, };
21: + GVariant *value = NULL;
22:
23: array_context = array_create_context();
24:
25: @@ -129,20 +129,22 @@ ibus_array_init (IBusBus *bus)
26: is_special_notify = FALSE;
27: is_special_only = FALSE;
28:
29: - res = ibus_config_get_value (config, "engine/Array",
30: - "SpecialNotify", &value);
31: + res = ((value = ibus_config_get_value (config, "engine/Array",
32: + "SpecialNotify")) != NULL);
33: if (res) {
34: - const gchar* str = g_value_get_string(&value);
35: + const gchar* str = g_variant_get_string(value, NULL);
36: if (g_strcmp0(str, "1") == 0)
37: is_special_notify = TRUE;
38: + g_variant_unref(value);
39: }
40:
41: - res = ibus_config_get_value (config, "engine/Array",
42: - "SpecialOnly", &value);
43: + res = ((value = ibus_config_get_value (config, "engine/Array",
44: + "SpecialOnly")) != NULL);
45: if (res) {
46: - const gchar* str = g_value_get_string(&value);
47: + const gchar* str = g_variant_get_string(value, NULL);
48: if (g_strcmp0(str, "1") == 0)
49: is_special_only = TRUE;
50: + g_variant_unref(value);
51: }
52: }
53:
1.2 ! joerg 54: @@ -349,7 +351,7 @@ ibus_array_engine_update_symbol_lookup_t
! 55:
! 56: if (arrayeng->preedit->len == 0) {
! 57: ibus_engine_hide_lookup_table ((IBusEngine *) arrayeng);
! 58: - return;
! 59: + return FALSE;
! 60: }
! 61:
! 62: ibus_lookup_table_clear (arrayeng->table);
! 63: @@ -360,12 +362,12 @@ ibus_array_engine_update_symbol_lookup_t
! 64:
! 65: if (candidates == NULL) {
! 66: ibus_engine_hide_lookup_table ((IBusEngine *) arrayeng);
! 67: - return;
! 68: + return FALSE;
! 69: }
! 70: else if (candidates->len == 0) {
! 71: array_release_candidates(candidates);
! 72: ibus_engine_hide_lookup_table ((IBusEngine *) arrayeng);
! 73: - return;
! 74: + return FALSE;
! 75: }
! 76:
! 77: for (i = 0; i < candidates->len; i++) {
1.1 obache 78: @@ -754,14 +756,14 @@ static void ibus_array_engine_property_a
79: static void ibus_config_value_changed (IBusConfig *config,
80: const gchar *section,
81: const gchar *name,
82: - GValue *value,
83: + GVariant *value,
84: gpointer user_data)
85: {
86: IBusArrayEngine *arrayeng = (IBusArrayEngine*)user_data;
87:
88: if (g_strcmp0(section, "engine/Array") == 0) {
89: if (g_strcmp0(name, "SpecialNotify") == 0) {
90: - const gchar* str = g_value_get_string(value);
91: + const gchar* str = g_variant_get_string(value, NULL);
92: if (g_strcmp0(str, "1") == 0) {
93: is_special_notify = TRUE;
94: }
95: @@ -770,7 +772,7 @@ static void ibus_config_value_changed (I
96: }
97: }
98: else if (g_strcmp0(name, "SpecialOnly") == 0) {
99: - const gchar* str = g_value_get_string(value);
100: + const gchar* str = g_variant_get_string(value, NULL);
101: if (g_strcmp0(str, "1") == 0) {
102: is_special_only = TRUE;
103: }
CVSweb <webmaster@jp.NetBSD.org>