From d774a830e6afe6b554b0cdb31ce04df902b9cf54 Mon Sep 17 00:00:00 2001 From: Choe Hwanjin Date: Fri, 30 Dec 2011 23:13:36 +0900 Subject: [PATCH] use ibus_property_set_state() Direct access to the member of IBusProperty should be avoided beacuse implementation details of IBusProperty may change. --- src/engine.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/engine.c b/src/engine.c index 402740d..9f180c7 100644 --- a/src/engine.c +++ b/src/engine.c @@ -854,9 +854,9 @@ ibus_hangul_engine_focus_in (IBusEngine *engine) IBusHangulEngine *hangul = (IBusHangulEngine *) engine; if (hangul->hanja_mode) { - hangul->prop_hanja_mode->state = PROP_STATE_CHECKED; + ibus_property_set_state (hangul->prop_hanja_mode, PROP_STATE_CHECKED); } else { - hangul->prop_hanja_mode->state = PROP_STATE_UNCHECKED; + ibus_property_set_state (hangul->prop_hanja_mode, PROP_STATE_UNCHECKED); } ibus_engine_register_properties (engine, hangul->prop_list); @@ -975,9 +975,11 @@ ibus_hangul_engine_property_activate (IBusEngine *engine, hangul->hanja_mode = !hangul->hanja_mode; if (hangul->hanja_mode) { - hangul->prop_hanja_mode->state = PROP_STATE_CHECKED; + ibus_property_set_state (hangul->prop_hanja_mode, + PROP_STATE_CHECKED); } else { - hangul->prop_hanja_mode->state = PROP_STATE_UNCHECKED; + ibus_property_set_state (hangul->prop_hanja_mode, + PROP_STATE_UNCHECKED); } ibus_engine_update_property (engine, hangul->prop_hanja_mode); -- 2.7.4