summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunjin Lee <yunjin-.lee@samsung.com>2016-07-05 17:44:28 +0900
committerYunjin Lee <yunjin-.lee@samsung.com>2016-07-05 17:45:23 +0900
commit860a351c72d3a5d22b8f2dc914c72a8dfa9a5b84 (patch)
treea99316bf2ca826c78ad4c45fb808616ab09477ca
parentcabd48b65cbb36cda2aad5e9f7905e60d62b422d (diff)
downloadprivacy-setting-860a351c72d3a5d22b8f2dc914c72a8dfa9a5b84.tar.gz
privacy-setting-860a351c72d3a5d22b8f2dc914c72a8dfa9a5b84.tar.bz2
privacy-setting-860a351c72d3a5d22b8f2dc914c72a8dfa9a5b84.zip
Fix to update RB state when genlist item is selectedsubmit/tizen/20160705.084939accepted/tizen/mobile/20160705.102545
Change-Id: Ib81e67ca577737c1110a89e472647fa00b4d72e5 Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
-rw-r--r--ui/src/privacy_package_list_view.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/ui/src/privacy_package_list_view.c b/ui/src/privacy_package_list_view.c
index cea0fb8..16950ac 100644
--- a/ui/src/privacy_package_list_view.c
+++ b/ui/src/privacy_package_list_view.c
@@ -51,15 +51,6 @@ static void gl_del_cb(void *data, Evas_Object *obj)
free(id);
}
-static void privacy_package_selected_cb(void *data, Evas_Object *obj, void *event_info)
-{
- Elm_Object_Item *ei = event_info;
- /* Unhighlight selected item */
- elm_genlist_item_selected_set(ei, EINA_FALSE);
- /* TBD? Add package's privacy info.
- For example, package's selected privacy related privilege list.
- Or remove. */
-}
static char* gl_text_get_cb(void *data, Evas_Object *obj, const char *part)
{
item_data_s *id = data;
@@ -69,7 +60,6 @@ static char* gl_text_get_cb(void *data, Evas_Object *obj, const char *part)
static void privacy_package_check_changed_cb(void *data, Evas_Object *obj, void *event_info)
{
- struct app_data_s* ad = (struct app_data_s*)data;
item_data_s *id = (item_data_s*)data;
if (id->status)
id->status = EINA_FALSE;
@@ -105,6 +95,24 @@ static void privacy_package_check_changed_cb(void *data, Evas_Object *obj, void
LOGD("save_btn diabled");
}
}
+
+static void privacy_package_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Elm_Object_Item *ei = event_info;
+ /* Unhighlight selected item */
+ elm_genlist_item_selected_set(ei, EINA_FALSE);
+
+ Eina_Bool status;
+ item_data_s *id = (item_data_s*)data;
+ if (id->status)
+ status = EINA_FALSE;
+ else
+ status = EINA_TRUE;
+ Evas_Object *check = elm_object_item_part_content_get(ei, "elm.swallow.end");
+ elm_check_state_set(check, status);
+ evas_object_smart_callback_call(check, "changed", data);
+}
+
static void __get_package_privacy_status(pkg_data_s* pkg_data, char* privilege_name)
{
GList* l;