From f76f433350fe6d73186d82d1937f78bddfa04d6e Mon Sep 17 00:00:00 2001 From: "seolheui,kim" Date: Mon, 7 Nov 2016 14:59:40 +0900 Subject: [PATCH] Modify security page of setup-wizard Change-Id: I8c45c67860be3f0c444cc7afeba0ca6052f575c6 Signed-off-by: seolheui,kim --- tools/apps/setup-wizard/src/security.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tools/apps/setup-wizard/src/security.c b/tools/apps/setup-wizard/src/security.c index 6a75fa5..60ba4cd 100644 --- a/tools/apps/setup-wizard/src/security.c +++ b/tools/apps/setup-wizard/src/security.c @@ -24,6 +24,9 @@ #define PASSPHRASE_STATE_SETUP 1 #define PASSPHRASE_STATE_VERIFY 2 +#define ARRAY_SIZE(_array_) \ + (sizeof(_array_) / sizeof(_array_[0])) + extern uidata_s ud; struct security_lock_type { @@ -31,14 +34,12 @@ struct security_lock_type { int index; }; -struct security_lock_type security_lock_types[2] = { +struct security_lock_type security_lock_types[] = { { "Password", 0 }, - { "PIN", 1 } }; -char* security_group_text[2] = { +char* security_group_text[] = { "Unlock method", - "Security options" }; static char* security_password_setup_data = NULL; @@ -73,6 +74,7 @@ static char *security_group_text_get(void *data, Evas_Object *obj, const char *p return NULL; } +#if 0 static char *security_double_label_text_get(void *data, Evas_Object *obj, const char *part) { char text[PATH_MAX] = "\0"; @@ -85,6 +87,7 @@ static char *security_double_label_text_get(void *data, Evas_Object *obj, const return strdup(text); } +#endif static char *security_lock_type_text_get(void *data, Evas_Object *obj, const char *part) { @@ -311,7 +314,7 @@ void _create_security_view(appdata_s *ad) _append_genlist_item(genlist, itc, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY, security_group_text[0]); itc = _create_genlist_item_class("one_icon", security_lock_type_text_get, security_lock_type_content_get); - for (index = 0; index < 2; index++) { + for (index = 0; index < ARRAY_SIZE(security_lock_types); index++) { item = elm_genlist_item_append(genlist, itc, &security_lock_types[index], @@ -323,7 +326,7 @@ void _create_security_view(appdata_s *ad) elm_object_item_disabled_set(item, EINA_TRUE); } } - +#if 0 /* Timeout list group*/ itc = _create_genlist_item_class("group_index", security_group_text_get, NULL); _append_genlist_item(genlist, itc, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY, security_group_text[1]); @@ -331,7 +334,7 @@ void _create_security_view(appdata_s *ad) itc = _create_genlist_item_class("double_label", security_double_label_text_get, NULL); item = _append_genlist_item(genlist, itc, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY, NULL); elm_object_item_disabled_set(item, EINA_TRUE); /* [TBD] enable timeout options */ - +#endif left_button = _create_button(layout, PREV_BUTTON, security_previous_view_cb, NULL); right_button = _create_button(layout, NEXT_BUTTON, security_password_setup_cb, ad); _create_two_button_layout(layout, left_button, right_button); -- 2.7.4