diff options
author | Younho Park <younho.park@samsung.com> | 2016-11-02 17:07:13 +0900 |
---|---|---|
committer | Younho Park <younho.park@samsung.com> | 2016-11-02 17:09:08 +0900 |
commit | 633c8103e8430e6e48736a335ae4656a2b44983e (patch) | |
tree | 3d2170577b3b354fcbb6e1861b315887af7ef81d | |
parent | 273632f1132e278299d80518e4d9014158d4c35a (diff) | |
download | settings-adid-633c8103e8430e6e48736a335ae4656a2b44983e.tar.gz settings-adid-633c8103e8430e6e48736a335ae4656a2b44983e.tar.bz2 settings-adid-633c8103e8430e6e48736a335ae4656a2b44983e.zip |
Fixed Opt-out button ux
Change-Id: If44a35ef0866805a1d37f45439a01cddca057e60
Signed-off-by: Younho Park <younho.park@samsung.com>
-rw-r--r-- | packaging/org.tizen.settings-adid.spec (renamed from packaging/adid.spec) | 2 | ||||
-rw-r--r-- | src/ad-id.c | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/packaging/adid.spec b/packaging/org.tizen.settings-adid.spec index f29adc0..2d986ac 100644 --- a/packaging/adid.spec +++ b/packaging/org.tizen.settings-adid.spec @@ -2,7 +2,7 @@ Name: org.tizen.settings-adid Summary: Ad Id Version: 0.0.1 Release: 1 -Group: comm +Group: Network & Connectivity/Service License: Apache-2.0 Source0: %{name}-%{version}.tar.gz BuildRequires: pkgconfig(capi-appfw-application) diff --git a/src/ad-id.c b/src/ad-id.c index 9fcc240..02023b8 100644 --- a/src/ad-id.c +++ b/src/ad-id.c @@ -29,6 +29,7 @@ #define DEFAULT_ID "00000000-0000-0000-0000-000000000000" Elm_Object_Item *id_it = NULL; +Elm_Object_Item *id_it2 = NULL; const char *get_res_path() { @@ -76,10 +77,11 @@ static void _opt_out_popup_ok_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info) { Evas_Object *popup = data; - Evas_Object *chk = (Evas_Object *)evas_object_data_get(popup, "checkobj"); evas_object_del(popup); bool val = elm_check_state_get(chk); + + AI_FUNC_ENTER val = !val; elm_check_state_set(chk, val); elm_object_item_disabled_set(id_it, val); @@ -87,6 +89,9 @@ _opt_out_popup_ok_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info) vconf_set_int(VCONFKEY_SETAPPL_AD_ID_OPT_OUT, 1); else vconf_set_int(VCONFKEY_SETAPPL_AD_ID_OPT_OUT, 0); + + elm_genlist_item_update(id_it2); + } static void @@ -230,12 +235,10 @@ static Evas_Object * _content_get_cb(void *data, Evas_Object *obj, const char *part) { AI_FUNC_ENTER - /* int id = (int) data; */ int val = 0; vconf_get_int(VCONFKEY_SETAPPL_AD_ID_OPT_OUT, &val); - /* ad_id_app_data_s *ad = evas_object_data_get(obj, "ad"); */ - if (!strcmp("elm.icon", part)) { + if (!strcmp("elm.swallow.icon", part)) { Evas_Object *check; check = elm_check_add(obj); elm_object_style_set(check, "on&off"); @@ -264,7 +267,7 @@ void sel_cb(void *data, Evas_Object *obj, void *event_info) _create_reset_id_popup(ad); } else if (id == 4) { - Evas_Object *chk = (Evas_Object *)elm_object_item_part_content_get(it, "elm.icon"); + Evas_Object *chk = (Evas_Object *)elm_object_item_part_content_get(it, "elm.swallow.icon"); if (!elm_check_state_get(chk)) _create_opt_out_popup(ad, chk); else { @@ -343,9 +346,8 @@ create_list_view(ad_id_app_data_s *ad) sel_cb, /* select smart callback */ (void *)3); /* smart callback user data */ - - elm_genlist_item_append(genlist, /* genlist object */ - itc2, /* item class */ + id_it2 = elm_genlist_item_append(genlist, /* genlist object */ + itc, /* item class */ (void *)4, /* item class user data */ NULL, ELM_GENLIST_ITEM_NONE, /* item type */ |