summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2017-08-14 11:08:47 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2017-08-14 04:37:47 +0000
commite055f49f3b9b453dc0d25929d6a918afe0c82b19 (patch)
tree7882159cd877f534a2a2de0a8cb248b59fe776fc
parent65b253846bc0e98eac96cbe8254001e08c933d29 (diff)
downloadinputmethod-setting-e055f49f3b9b453dc0d25929d6a918afe0c82b19.tar.gz
inputmethod-setting-e055f49f3b9b453dc0d25929d6a918afe0c82b19.tar.bz2
inputmethod-setting-e055f49f3b9b453dc0d25929d6a918afe0c82b19.zip
Support visual effect in check widget
Change-Id: Ia31d1782d0a78182c5d2be83fe55d07a64171705 Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
-rw-r--r--im_setting_list/input_method_setting_list_ui.cpp32
1 files changed, 23 insertions, 9 deletions
diff --git a/im_setting_list/input_method_setting_list_ui.cpp b/im_setting_list/input_method_setting_list_ui.cpp
index f9e5d68..507c638 100644
--- a/im_setting_list/input_method_setting_list_ui.cpp
+++ b/im_setting_list/input_method_setting_list_ui.cpp
@@ -224,9 +224,10 @@ im_setting_list_check_popup_cancel_cb(void *data, Evas_Object *obj, void *event_
}
Eina_Bool state = g_gen_item_data[index].chk_status;
- isf_control_set_enable_ime(g_ime_info_list[index].appid, !state);
- g_gen_item_data[index].chk_status = !state;
- elm_genlist_item_update(g_gen_item_data[index].gen_item);
+ if (isf_control_set_enable_ime(g_ime_info_list[index].appid, !state) == 0) {
+ g_gen_item_data[index].chk_status = !state;
+ elm_genlist_item_update(g_gen_item_data[index].gen_item);
+ }
evas_object_del(cb_data->popup);
}
@@ -328,9 +329,18 @@ im_setting_list_popup_ok_cb(void *data, Evas_Object *obj, void *event_info)
}
Eina_Bool state = g_gen_item_data[index].chk_status;
- g_gen_item_data[index].chk_status = !state;
- isf_control_set_enable_ime(g_ime_info_list[index].appid, !state);
- elm_genlist_item_update(g_gen_item_data[index].gen_item);
+ if (isf_control_set_enable_ime(g_ime_info_list[index].appid, !state) == 0) {
+ g_gen_item_data[index].chk_status = !state;
+ Evas_Object *ck = elm_object_item_part_content_get(g_gen_item_data[index].gen_item, "elm.swallow.end");
+ if (ck == NULL) {
+ ck = elm_object_item_part_content_get(g_gen_item_data[index].gen_item, "elm.icon");
+ }
+
+ if (ck) {
+ elm_object_signal_emit(ck, "elm,activate,check,on", "elm");
+ elm_check_state_set(ck, !state);
+ }
+ }
evas_object_del(cb_data->popup);
}
@@ -366,9 +376,13 @@ static void im_setting_list_item_sel_cb(void *data, Evas_Object *obj, void *even
Eina_Bool state = g_gen_item_data[index].chk_status;
if (state) {
- g_gen_item_data[index].chk_status = !state;
- isf_control_set_enable_ime(g_ime_info_list[index].appid, !state);
- elm_genlist_item_update(item);
+ if (isf_control_set_enable_ime(g_ime_info_list[index].appid, !state) == 0) {
+ if (ck) {
+ elm_object_signal_emit(ck, "elm,activate,check,off", "elm");
+ elm_check_state_set(ck, !state);
+ }
+ g_gen_item_data[index].chk_status = !state;
+ }
} else {
im_setting_list_show_popup(data, obj, im_setting_list_popup_ok_cb, im_setting_list_popup_cancel_cb);
}