Annotation of pkgsrc/inputmethod/ibus-array/patches/patch-src_engine.c, revision 1.1
1.1 ! obache 1: $NetBSD$
! 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:
! 54: @@ -754,14 +756,14 @@ static void ibus_array_engine_property_a
! 55: static void ibus_config_value_changed (IBusConfig *config,
! 56: const gchar *section,
! 57: const gchar *name,
! 58: - GValue *value,
! 59: + GVariant *value,
! 60: gpointer user_data)
! 61: {
! 62: IBusArrayEngine *arrayeng = (IBusArrayEngine*)user_data;
! 63:
! 64: if (g_strcmp0(section, "engine/Array") == 0) {
! 65: if (g_strcmp0(name, "SpecialNotify") == 0) {
! 66: - const gchar* str = g_value_get_string(value);
! 67: + const gchar* str = g_variant_get_string(value, NULL);
! 68: if (g_strcmp0(str, "1") == 0) {
! 69: is_special_notify = TRUE;
! 70: }
! 71: @@ -770,7 +772,7 @@ static void ibus_config_value_changed (I
! 72: }
! 73: }
! 74: else if (g_strcmp0(name, "SpecialOnly") == 0) {
! 75: - const gchar* str = g_value_get_string(value);
! 76: + const gchar* str = g_variant_get_string(value, NULL);
! 77: if (g_strcmp0(str, "1") == 0) {
! 78: is_special_only = TRUE;
! 79: }
CVSweb <webmaster@jp.NetBSD.org>