Initialize genlist style when creating app 96/232796/3 accepted/tizen/unified/20200508.051820 submit/tizen/20200508.034642
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 7 May 2020 11:43:15 +0000 (20:43 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Fri, 8 May 2020 03:17:46 +0000 (12:17 +0900)
Some genlist styles are different between profiles.
So, this patch inititializes genlist style according to profile type.

Change-Id: Ia10366ea5e8ade44a58e9216272f143c6d44792b

13 files changed:
packaging/wifi-efl-ug.spec
sources/libraries/Common/common_eap_connect.c
sources/libraries/Common/common_ip_info.c
sources/libraries/Common/common_pswd_popup.c
sources/libraries/Common/common_utils.c
sources/libraries/Common/include/common.h
sources/libraries/Common/include/common_utils.h
sources/ui-gadget/viewers-layout/view_advanced.c
sources/ui-gadget/viewers-layout/view_detail.c
sources/ui-gadget/viewers-layout/viewer_manager.c
sources/ui-gadget/viewers-layout/wifi_viewer_list.c
sources/ui-gadget/wifi-efl-UG.c
sources/wifi-syspopup/viewer-popups/view-main.c

index cc80655..6ff466e 100644 (file)
@@ -1,6 +1,6 @@
 Name:          wifi-efl-ug
 Summary:       Wi-Fi UI Gadget for TIZEN
-Version:       1.0.244
+Version:       1.0.245
 Release:       1
 Group:         App/Network
 License:       Flora-1.1
index 7aa2f93..6f28826 100755 (executable)
@@ -189,6 +189,8 @@ static void _eap_popup_keypad_off_cb(void *data, Evas_Object *obj,
 static void _eap_popup_keypad_on_cb(void *data, Evas_Object *obj,
                void *event_info);
 
+extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+
 static void ctxpopup_dismissed_cb(void *data, Evas_Object *obj,
                void *event_info)
 {
@@ -510,7 +512,7 @@ static char *_gl_eap_user_cert_text_get(void *data, Evas_Object *obj, const char
 {
        eap_connect_data_t *eap_data = (eap_connect_data_t *)data;
 
-       if (!g_strcmp0(part, "elm.text.sub")) {
+       if (!g_strcmp0(part, g_genlist_info[WIFI_GENLIST_2LINE_STYLE].sub_text_part)) {
                return g_strdup(sc(eap_data->str_pkg_name,
                                I18N_TYPE_User_Certificate));
        }
@@ -527,6 +529,7 @@ static Evas_Object *_gl_eap_user_cert_content_get(void *data,
        char buf[100];
        int ug_type;
 
+       // TODO
        if (!strcmp(part, "elm.swallow.icon.0")) {
                ug_type = common_util_get_ug_type();
                if (ug_type != UG_VIEW_OOBE) {
@@ -633,7 +636,7 @@ static char *_gl_eap_type_text_get(void *data, Evas_Object *obj, const char *par
 {
        eap_connect_data_t *eap_data = (eap_connect_data_t *)data;
 
-       if (!g_strcmp0(part, "elm.text.sub"))
+       if (!g_strcmp0(part, g_genlist_info[WIFI_GENLIST_2LINE_STYLE].sub_text_part))
                return g_strdup(sc(eap_data->str_pkg_name, I18N_TYPE_EAP_method));
 
        return NULL;
@@ -649,7 +652,7 @@ static Evas_Object *_gl_eap_type_content_get(void *data,
        char buf[100];
        int ug_type;
 
-       if (!strcmp(part, "elm.swallow.icon.0")) {
+       if (!strcmp(part, "elm.swallow.icon.0")) { // TODO
                ug_type = common_util_get_ug_type();
                if (ug_type != UG_VIEW_OOBE) {
                        ly = elm_layout_add(obj);
@@ -778,7 +781,7 @@ static char *_gl_eap_auth_text_get(void *data, Evas_Object *obj, const char *par
 {
        eap_connect_data_t *eap_data = (eap_connect_data_t *)data;
 
-       if (!g_strcmp0(part, "elm.text.sub")) {
+       if (!g_strcmp0(part, g_genlist_info[WIFI_GENLIST_2LINE_STYLE].sub_text_part)) {
                return g_strdup(sc(eap_data->str_pkg_name,
                                I18N_TYPE_Phase_2_authentication));
        }
@@ -796,7 +799,7 @@ static Evas_Object *_gl_eap_auth_content_get(void *data,
        char buf[100];
        int ug_type;
 
-       if (!strcmp(part, "elm.swallow.icon.0")) {
+       if (!strcmp(part, "elm.swallow.icon.0")) { //TODO
                ug_type = common_util_get_ug_type();
                if (ug_type != UG_VIEW_OOBE) {
                        ly = elm_layout_add(obj);
@@ -983,7 +986,7 @@ static char *_gl_eap_entry_item_text_get(void *data, Evas_Object *obj, const cha
        if (!entry_info)
                return NULL;
 
-       if (!g_strcmp0(part, "elm.text.sub"))
+       if (!g_strcmp0(part, g_genlist_info[WIFI_GENLIST_FULL_STYLE].sub_text_part))
                return g_strdup(dgettext(PACKAGE, entry_info->title_txt));
 
        return NULL;
@@ -995,7 +998,7 @@ static Evas_Object *_gl_eap_entry_item_content_get(void *data, Evas_Object *obj,
        if (!entry_info)
                return NULL;
 
-       if (g_strcmp0(part, "elm.swallow.content") == 0) {
+       if (g_strcmp0(part, g_genlist_info[WIFI_GENLIST_FULL_STYLE].content_part) == 0) {
                Evas_Object *entry = NULL;
                Evas_Object *box = NULL;
                Evas_Object *tpad = NULL;
@@ -1122,7 +1125,7 @@ static Evas_Object *_gl_eap_entry_item_content_get(void *data, Evas_Object *obj,
                        g_pwd_entry = editfield;
 
                return entry;
-       } else if (g_strcmp0(part, "elm.icon.eraser") == 0) {
+       } else if (g_strcmp0(part, "elm.icon.eraser") == 0) { // TODO
                Evas_Object *btn = elm_button_add(obj);
                elm_object_style_set(btn, "editfield_clear");
                evas_object_smart_callback_add(btn, "clicked", _gl_eap_entry_eraser_clicked_cb, entry_info);
@@ -1162,7 +1165,7 @@ static char *_gl_eap_chkbox_item_text_get(void *data, Evas_Object *obj,
 {
        char *str_pkg_name = (char *)data;
 
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
                char buf[1024];
                snprintf(buf, 1023, "%s", sc(str_pkg_name, I18N_TYPE_Show_password));
                return strdup(buf);
@@ -1176,7 +1179,7 @@ static Evas_Object *_gl_eap_chkbox_item_content_get(void *data,
 {
        Evas_Object *check = NULL;
 
-       if (!strcmp("elm.swallow.icon", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].content_part, part)) {
                check = elm_check_add(obj);
                if (common_util_get_ug_type() == UG_VIEW_OOBE)
                        elm_object_style_set(check, "oobe-casual");
@@ -1219,31 +1222,31 @@ static void gl_lang_changed(void *data, Evas_Object *obj, void *event_info)
 
 static void __common_eap_connect_popup_init_item_class(void *data)
 {
-       g_eap_type_itc.item_style = WIFI_GENLIST_2LINE_BOTTOM_SWALLOW_STYLE;
+       g_eap_type_itc.item_style = g_genlist_info[WIFI_GENLIST_2LINE_STYLE].style_name;
        g_eap_type_itc.func.text_get = _gl_eap_type_text_get;
        g_eap_type_itc.func.content_get = _gl_eap_type_content_get;
        g_eap_type_itc.func.state_get = NULL;
        g_eap_type_itc.func.del = NULL;
 
-       g_eap_auth_itc.item_style = WIFI_GENLIST_2LINE_BOTTOM_SWALLOW_STYLE;
+       g_eap_auth_itc.item_style = g_genlist_info[WIFI_GENLIST_2LINE_STYLE].style_name;
        g_eap_auth_itc.func.text_get = _gl_eap_auth_text_get;
        g_eap_auth_itc.func.content_get = _gl_eap_auth_content_get;
        g_eap_auth_itc.func.state_get = NULL;
        g_eap_auth_itc.func.del = NULL;
 
-       g_eap_user_cert_itc.item_style = WIFI_GENLIST_2LINE_BOTTOM_SWALLOW_STYLE;
+       g_eap_user_cert_itc.item_style = g_genlist_info[WIFI_GENLIST_2LINE_STYLE].style_name;
        g_eap_user_cert_itc.func.text_get = _gl_eap_user_cert_text_get;
        g_eap_user_cert_itc.func.content_get = _gl_eap_user_cert_content_get;
        g_eap_user_cert_itc.func.state_get = NULL;
        g_eap_user_cert_itc.func.del = NULL;
 
-       g_eap_entry_itc.item_style = WIFI_GENLIST_FULL_STYLE;
+       g_eap_entry_itc.item_style = g_genlist_info[WIFI_GENLIST_FULL_STYLE].style_name;
        g_eap_entry_itc.func.text_get = _gl_eap_entry_item_text_get;
        g_eap_entry_itc.func.content_get = _gl_eap_entry_item_content_get;
        g_eap_entry_itc.func.state_get = NULL;
        g_eap_entry_itc.func.del = _gl_eap_entry_item_del;
 
-       g_eap_chkbox_itc.item_style = WIFI_GENLIST_1LINE_TEXT_ICON_STYLE;
+       g_eap_chkbox_itc.item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;
        g_eap_chkbox_itc.func.text_get = _gl_eap_chkbox_item_text_get;
        g_eap_chkbox_itc.func.content_get = _gl_eap_chkbox_item_content_get;
        g_eap_chkbox_itc.func.state_get = NULL;
@@ -2335,7 +2338,7 @@ eap_info_list_t *eap_info_append_items(wifi_manager_ap_h ap, Evas_Object* view_l
        auth_type = __common_eap_connect_popup_get_auth_type(ap);
 
        item = common_utils_add_2_line_txt_disabled_item(view_list,
-                       WIFI_GENLIST_2LINE_TOP_TEXT_STYLE,
+                       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
                        sc(str_pkg_name, I18N_TYPE_EAP_method),
                        list_eap_type[eap_type].name);
        eap_info_list_data->eap_method_item = item;
@@ -2363,7 +2366,7 @@ eap_info_list_t *eap_info_append_items(wifi_manager_ap_h ap, Evas_Object* view_l
                                eap_type == EAP_SEC_TYPE_TTLS) {
                        /* Add EAP phase2 authentication */
                        item = common_utils_add_2_line_txt_disabled_item(view_list,
-                                       WIFI_GENLIST_2LINE_TOP_TEXT_STYLE,
+                                       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
                                        sc(str_pkg_name, I18N_TYPE_Phase_2_authentication),
                                        list_eap_auth[auth_type].name);
                        eap_info_list_data->eap_auth_item = item;
@@ -2382,7 +2385,7 @@ eap_info_list_t *eap_info_append_items(wifi_manager_ap_h ap, Evas_Object* view_l
                        }
 
                        item = common_utils_add_2_line_txt_disabled_item(view_list,
-                                       WIFI_GENLIST_2LINE_TOP_TEXT_STYLE,
+                                       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
                                        sc(str_pkg_name, I18N_TYPE_User_Certificate),
                                        temp_str);
                        eap_info_list_data->user_cert_item = item;
@@ -2398,7 +2401,7 @@ eap_info_list_t *eap_info_append_items(wifi_manager_ap_h ap, Evas_Object* view_l
                        return NULL;
                }
                item = common_utils_add_2_line_txt_disabled_item(view_list,
-                               WIFI_GENLIST_2LINE_TOP_TEXT_STYLE,
+                               g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
                                sc(str_pkg_name, I18N_TYPE_Identity),
                                temp_str);
                eap_info_list_data->id_item = item;
index b36b275..759d706 100755 (executable)
@@ -46,6 +46,8 @@ static Evas_Object *curr_unfocus_entry = NULL;
 static int curr_unfocuc_cursor_pos = 0;
 static char *ip_info_text_list[ENTRY_TYPE_MAX];
 
+extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+
 static void _ip_info_set_current_unfocussed_entry(Evas_Object *entry)
 {
        if (entry == NULL)
@@ -780,7 +782,7 @@ static char* _ip_info_iptoggle_text_get(void *data, Evas_Object *obj,
        retvm_if(NULL == data || NULL == part, NULL);
        full_ip_info_t *ip_data = (full_ip_info_t *) data;
 
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
                ip_info_list_t *ip_info_list_data = ip_data->ip_info_list;
 #ifdef ACCESSIBLITY_FEATURE
                char buf[100];
@@ -984,7 +986,7 @@ static Evas_Object *_ip_info_iptoggle_content_get(void *data,
        ip_info_list_t *ip_info_list_data = ip_data->ip_info_list;
        Evas_Object *toggle_btn = NULL;
 
-       if (!strcmp("elm.swallow.end", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part, part)) {
                toggle_btn = elm_check_add(obj);
                elm_object_style_set(toggle_btn, "on&off");
                elm_object_focus_allow_set(toggle_btn, EINA_FALSE);
@@ -1166,21 +1168,21 @@ full_ip_info_t *ip_info_append_items(wifi_manager_ap_h ap, const char *pkg_name,
        ip_info_list_data->input_panel_cb_data = input_panel_cb_data;
 
        ip_toggle_itc = elm_genlist_item_class_new();
-       ip_toggle_itc->item_style = WIFI_GENLIST_1LINE_TEXT_ICON_STYLE;
+       ip_toggle_itc->item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;
        ip_toggle_itc->func.text_get = _ip_info_iptoggle_text_get;
        ip_toggle_itc->func.content_get = _ip_info_iptoggle_content_get;
        ip_toggle_itc->func.state_get = NULL;
        ip_toggle_itc->func.del = NULL;
 
        description_itc = elm_genlist_item_class_new();
-       description_itc->item_style = WIFI_GENLIST_FULL_STYLE;
+       description_itc->item_style = g_genlist_info[WIFI_GENLIST_FULL_STYLE].style_name;
        description_itc->func.text_get = NULL;
        description_itc->func.content_get = _ip_info_detail_description_content_get;
        description_itc->func.state_get = NULL;
        description_itc->func.del = _ip_info_detail_description_del;
 
        ip_entry_itc = elm_genlist_item_class_new();
-       ip_entry_itc->item_style = WIFI_GENLIST_FULL_STYLE;
+       ip_entry_itc->item_style = g_genlist_info[WIFI_GENLIST_FULL_STYLE].style_name;
        ip_entry_itc->func.text_get = NULL;
        ip_entry_itc->func.content_get = _ip_info_entry_item_content_get;
        ip_entry_itc->func.state_get = NULL;
index ba84db8..4f32689 100755 (executable)
@@ -38,6 +38,8 @@ static Elm_Genlist_Item_Class g_pswd_entry_itc;
 static gboolean wps_options_click = FALSE;
 static gboolean keypad_state = FALSE;
 
+extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+
 static void __popup_entry_changed_cb(void* data, Evas_Object* obj, void* event_info)
 {
        Evas_Object *btn_ok = NULL;
@@ -309,7 +311,7 @@ void create_pbc_popup(pswd_popup_t *pswd_popup_data, Evas_Smart_Cb cancel_cb,
 
 static char *_gl_wps_text_get(void *data, Evas_Object *obj, const char *part)
 {
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
                char buf[1024];
                snprintf(buf, 1023, "%s", sc(PACKAGE, (int)data));
                return g_strdup(dgettext(PACKAGE, buf));
@@ -358,7 +360,7 @@ void create_wps_options_popup(Evas_Object *win_main,
        elm_scroller_content_min_limit(genlist, EINA_FALSE, EINA_TRUE);
        evas_object_smart_callback_add(genlist, "realized", _gl_realized, NULL);
 
-       wps_itc.item_style = WIFI_GENLIST_1LINE_TEXT_STYLE;
+       wps_itc.item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;
        wps_itc.func.text_get = _gl_wps_text_get;
        wps_itc.func.content_get = NULL;
        wps_itc.func.state_get = NULL;
@@ -389,7 +391,7 @@ void create_wps_options_popup(Evas_Object *win_main,
 static char *_passwd_popup_wps_item_text_get(void *data, Evas_Object *obj,
                const char *part)
 {
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
                char buf[1024];
                snprintf(buf, 1023, "%s", sc(PACKAGE, I18N_TYPE_WPS));
                return strdup(buf);
@@ -402,7 +404,7 @@ static Evas_Object *_passwd_popup_wps_item_content_get(void *data,
 {
        Evas_Object *icon = NULL;
 
-       if (!strcmp("elm.swallow.icon", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].content_part, part)) {
                /* image */
                icon = elm_image_add(obj);
                retvm_if(NULL == icon, NULL);
@@ -445,7 +447,7 @@ static Evas_Object* _gl_pswd_entry_item_content_get(void *data,
        static Elm_Entry_Filter_Limit_Size limit_filter_data;
        pswd_popup_t *pswd_popup_data = (pswd_popup_t *)data;
 
-       if (!g_strcmp0(part, "elm.swallow.content")) {
+       if (!g_strcmp0(part, g_genlist_info[WIFI_GENLIST_FULL_STYLE].content_part)) {
                editfield = elm_layout_add(obj);
                elm_layout_theme_set(editfield, "layout", "editfield", "singleline");
                evas_object_size_hint_align_set(editfield, EVAS_HINT_FILL, 0.0);
@@ -514,7 +516,7 @@ static void _chk_changed_cb(void *data, Evas_Object *obj, void *ei)
 static char *_gl_pswd_check_box_item_text_get(void *data, Evas_Object *obj,
                const char *part)
 {
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
                char buf[1024];
                snprintf(buf, 1023, "%s", sc(PACKAGE, I18N_TYPE_Show_password));
                return strdup(buf);
@@ -529,7 +531,7 @@ static Evas_Object *_gl_pswd_check_box_item_content_get(void *data,
        Evas_Object *check = NULL;
        pswd_popup_t *pswd_popup_data = (pswd_popup_t *)data;
 
-       if (!strcmp("elm.swallow.icon", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].content_part, part)) {
                check = elm_check_add(obj);
                if (common_util_get_ug_type() == UG_VIEW_OOBE)
                        elm_object_style_set(check, "oobe-casual");
@@ -713,7 +715,7 @@ pswd_popup_t *create_passwd_popup(Evas_Object *conformant, Evas_Object *win_main
        evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
        /* Entry genlist item */
-       g_pswd_entry_itc.item_style = WIFI_GENLIST_SWALLOW_CONTENT_STYLE;
+       g_pswd_entry_itc.item_style = g_genlist_info[WIFI_GENLIST_FULL_STYLE].style_name;
        g_pswd_entry_itc.func.text_get = NULL;
        g_pswd_entry_itc.func.content_get = _gl_pswd_entry_item_content_get;
        g_check_box_itc.func.state_get = NULL;
@@ -724,7 +726,7 @@ pswd_popup_t *create_passwd_popup(Evas_Object *conformant, Evas_Object *win_main
                        NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
 
        /* Checkbox genlist item */
-       g_check_box_itc.item_style = WIFI_GENLIST_1LINE_TEXT_ICON_STYLE;
+       g_check_box_itc.item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;
        g_check_box_itc.func.text_get = _gl_pswd_check_box_item_text_get;
        g_check_box_itc.func.content_get = _gl_pswd_check_box_item_content_get;
        g_check_box_itc.func.state_get = NULL;
@@ -736,7 +738,7 @@ pswd_popup_t *create_passwd_popup(Evas_Object *conformant, Evas_Object *win_main
 
        if (popup_info->show_wps_btn) {
                /* WPS options genlist item */
-               g_wps_itc.item_style = WIFI_GENLIST_1LINE_TEXT_ICON_STYLE;
+               g_wps_itc.item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;
                g_wps_itc.func.text_get = _passwd_popup_wps_item_text_get;
                g_wps_itc.func.content_get = _passwd_popup_wps_item_content_get;
                g_wps_itc.func.state_get = NULL;
index a938520..eadf055 100755 (executable)
@@ -79,12 +79,14 @@ static Eina_Bool is_setting = EINA_FALSE;
 static Eina_Bool is_portrait_mode = EINA_TRUE;
 static Ecore_Timer *scan_update_timer = NULL;
 
+genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+
 static char *__common_utils_2line_text_get(void *data, Evas_Object *obj, const char *part)
 {
        two_line_disp_data_t *item_data = (two_line_disp_data_t *)data;
-       if (!strcmp("elm.text", part))
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part))
                return g_strdup(item_data->title_str);
-       else if (!strcmp("elm.text.sub", part))
+       else if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_text_part, part))
                return g_strdup(item_data->info_str);
 
        return NULL;
@@ -777,6 +779,108 @@ Eina_Bool _is_emulator(void)
        }
 }
 
+bool is_common_profile(void)
+{
+       char *profile = NULL;
+
+       if (system_info_get_platform_string("http://tizen.org/feature/profile", &profile) < 0)
+               return false;
+
+       if (profile == NULL)
+               return false;
+
+       if (strncmp(profile, "common", strlen("common")) == 0) {
+               free(profile);
+               return true;
+       }
+
+       free(profile);
+       return false;
+}
+
+static void _init_genlist_1line_style(void)
+{
+       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name = GENLIST_STYLE_1LINE;
+       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part = GENLIST_PART_ELM_TEXT;
+       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_text_part = GENLIST_PART_ELM_TEXT_END;
+       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].content_part = GENLIST_PART_ELM_ICON;
+       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part = GENLIST_PART_ELM_END;
+}
+
+static void _init_genlist_2line_style(void)
+{
+       g_genlist_info[WIFI_GENLIST_2LINE_STYLE].style_name = GENLIST_STYLE_2LINE;
+       g_genlist_info[WIFI_GENLIST_2LINE_STYLE].text_part = GENLIST_PART_ELM_TEXT;
+       g_genlist_info[WIFI_GENLIST_2LINE_STYLE].sub_text_part = GENLIST_PART_ELM_TEXT_SUB;
+       g_genlist_info[WIFI_GENLIST_2LINE_STYLE].content_part = GENLIST_PART_ELM_ICON;
+       g_genlist_info[WIFI_GENLIST_2LINE_STYLE].sub_content_part = GENLIST_PART_ELM_END;
+}
+
+static void _init_genlist_type1_style(void)
+{
+       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name = GENLIST_STYLE_TYPE1;
+       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part = GENLIST_PART_ELM_TEXT;
+       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_text_part = GENLIST_PART_ELM_TEXT_SUB;
+       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].content_part = GENLIST_PART_ELM_SWALLOW_ICON;
+       g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part = GENLIST_PART_ELM_SWALLOW_END;
+}
+
+// type2
+// -------------------------------------------------------------------------------------------
+// |                  |         elm.text.sub          | elm.text.sub.end   |                 |
+// | elm.swallow.icon |----------------------------------------------------| elm.swallow.end |
+// |                  | elm.swallow.icon.0 | elm.text | elm.swallow.icon.1 |                 |
+// -------------------------------------------------------------------------------------------
+static void _init_genlist_type2_style(void)
+{
+       g_genlist_info[WIFI_GENLIST_2LINE_STYLE].style_name = GENLIST_STYLE_TYPE2;
+       g_genlist_info[WIFI_GENLIST_2LINE_STYLE].text_part = GENLIST_PART_ELM_TEXT_SUB;
+       g_genlist_info[WIFI_GENLIST_2LINE_STYLE].sub_text_part = GENLIST_PART_ELM_TEXT;
+       g_genlist_info[WIFI_GENLIST_2LINE_STYLE].content_part = GENLIST_PART_ELM_SWALLOW_ICON;
+       g_genlist_info[WIFI_GENLIST_2LINE_STYLE].sub_content_part = GENLIST_PART_ELM_SWALLOW_END;
+}
+
+static void _init_genlist_multiline_style(void)
+{
+       g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].style_name = GENLIST_STYLE_MULTILINE;
+       g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].text_part = GENLIST_PART_ELM_TEXT;
+       g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].sub_text_part = GENLIST_PART_ELM_TEXT_MULTILINE;
+       g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].content_part = NULL;
+       g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].sub_content_part = GENLIST_PART_ELM_SWALLOW_END;
+}
+
+static void _init_genlist_group_index_style(void)
+{
+       g_genlist_info[WIFI_GENLIST_GROUP_INDEX_STYLE].style_name = GENLIST_STYLE_GROUP_INDEX;
+       g_genlist_info[WIFI_GENLIST_GROUP_INDEX_STYLE].text_part = GENLIST_PART_ELM_TEXT;
+       g_genlist_info[WIFI_GENLIST_GROUP_INDEX_STYLE].sub_text_part = NULL;
+       g_genlist_info[WIFI_GENLIST_GROUP_INDEX_STYLE].content_part = NULL;
+       g_genlist_info[WIFI_GENLIST_GROUP_INDEX_STYLE].sub_content_part = NULL;
+}
+
+static void _init_genlist_full_style(void)
+{
+       g_genlist_info[WIFI_GENLIST_FULL_STYLE].style_name = GENLIST_STYLE_FULL;
+       g_genlist_info[WIFI_GENLIST_FULL_STYLE].text_part = NULL;
+       g_genlist_info[WIFI_GENLIST_FULL_STYLE].sub_text_part = GENLIST_PART_ELM_TEXT_SUB;
+       g_genlist_info[WIFI_GENLIST_FULL_STYLE].content_part = GENLIST_PART_ELM_SWALLOW_CONTENT;
+       g_genlist_info[WIFI_GENLIST_FULL_STYLE].sub_content_part = NULL;
+}
+
+void common_util_update_genlist_style(void)
+{
+       if (g_ug_type == UG_VIEW_IOT_COMMON) {
+               _init_genlist_1line_style();
+               _init_genlist_2line_style();
+       } else {
+               _init_genlist_type1_style();
+               _init_genlist_type2_style();
+       }
+       _init_genlist_multiline_style();
+       _init_genlist_group_index_style();
+       _init_genlist_full_style();
+}
+
 void common_util_set_ug_type(UG_TYPE type)
 {
        g_ug_type = type;
index a4c4604..bfe16b2 100755 (executable)
@@ -79,20 +79,50 @@ extern "C"
 /* Device-picker width for landscape mode */
 #define DEVICE_PICKER_POPUP_LN_W               600
 
-/* Genlist new style for Tizen 2.4 */
-#define WIFI_GENLIST_1LINE_TEXT_STYLE "type1"
-#define WIFI_GENLIST_1LINE_TEXT_ICON_STYLE "type1"
-#define WIFI_GENLIST_2LINE_TOP_TEXT_STYLE "type1"
-#define WIFI_GENLIST_2LINE_TOP_TEXT_ICON_STYLE "type1"
-#define WIFI_GENLIST_2LINE_BOTTOM_TEXT_STYLE "type2"
-#define WIFI_GENLIST_2LINE_BOTTOM_TEXT_ICON_STYLE "type2"
-#define WIFI_GENLIST_MULTILINE_TEXT_STYLE "multiline"
-#define WIFI_GENLIST_GROUP_INDEX_STYLE "group_index"
-#define WIFI_GENLIST_FULL_STYLE "full"
-
-/* Genlist new style for Tizen 3.0 */
-#define WIFI_GENLIST_2LINE_BOTTOM_SWALLOW_STYLE "type2"
-#define WIFI_GENLIST_SWALLOW_CONTENT_STYLE "full"
+/* Genlist style */
+#define MAX_GENLIST_STYLE_NAME_LEN 16
+#define MAX_GENLIST_PART_NAME_LEN 24
+
+typedef enum {
+       WIFI_GENLIST_1LINE_STYLE = 0,
+       WIFI_GENLIST_2LINE_STYLE,
+       WIFI_GENLIST_MULTILINE_STYLE,
+       WIFI_GENLIST_GROUP_INDEX_STYLE,
+       WIFI_GENLIST_FULL_STYLE,
+       WIFI_GENLIST_STYLE_MAX
+} genlist_style_t;
+
+typedef struct {
+       const char *style_name;
+       const char *text_part;
+       const char *sub_text_part;
+       const char *content_part;
+       const char *sub_content_part;
+} genlist_info_t;
+
+//#if !defined TIZEN_WIFI_QS
+//extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+//genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX] = {0, };
+//#endif
+
+#define GENLIST_STYLE_1LINE "1line"
+#define GENLIST_STYLE_2LINE "2line"
+#define GENLIST_STYLE_TYPE1 "type1"
+#define GENLIST_STYLE_TYPE2 "type2"
+#define GENLIST_STYLE_MULTILINE "multiline"
+#define GENLIST_STYLE_GROUP_INDEX "group_index"
+#define GENLIST_STYLE_FULL "full"
+
+#define GENLIST_PART_ELM_TEXT "elm.text"
+#define GENLIST_PART_ELM_TEXT_SUB "elm.text.sub"
+#define GENLIST_PART_ELM_TEXT_SUB_END "elm.text.sub.end"
+#define GENLIST_PART_ELM_TEXT_END "elm.text.end"
+#define GENLIST_PART_ELM_TEXT_MULTILINE "elm.text.MULTILINE"
+#define GENLIST_PART_ELM_ICON "elm.icon"
+#define GENLIST_PART_ELM_END "elm.end"
+#define GENLIST_PART_ELM_SWALLOW_CONTENT "elm.swallow.content"
+#define GENLIST_PART_ELM_SWALLOW_ICON "elm.swallow.icon"
+#define GENLIST_PART_ELM_SWALLOW_END "elm.swallow.end"
 
 /* Icon Size*/
 #define DEFAULT_BG_SIZE 60
@@ -111,7 +141,8 @@ extern "C"
 typedef enum {
        UG_VIEW_DEFAULT = 0,
        UG_VIEW_SETUP_WIZARD,
-       UG_VIEW_OOBE
+       UG_VIEW_OOBE,
+       UG_VIEW_IOT_COMMON
 } UG_TYPE;
 
 typedef enum {
index 2cd3227..7072c8c 100755 (executable)
@@ -130,6 +130,9 @@ void common_util_manager_ecore_scan_update_timer_reset(void);
 int common_utils_get_sim_state(void);
 Eina_Bool _is_emulator(void);
 
+bool is_common_profile(void);
+void common_util_update_genlist_style(void);
+
 void common_util_set_ug_type(UG_TYPE type);
 UG_TYPE common_util_get_ug_type(void);
 #ifdef __cplusplus
index 497fc03..92bbc5a 100755 (executable)
@@ -55,6 +55,7 @@ struct _private_data {
 };
 
 struct _private_data g_pd;
+extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
 
 /* Prototype */
 static char *_gl_network_notification_text_get(void *data, Evas_Object *obj,   const char *part);
@@ -72,43 +73,50 @@ static Evas_Object *_gl_content_get_keep_wifi_sub(void *data, Evas_Object *obj,
 
 /* Global variables for elm_genlist itc */
 static Elm_Genlist_Item_Class itc_network_noti = {
-               .item_style = WIFI_GENLIST_MULTILINE_TEXT_STYLE,
+//             .item_style = g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].style_name,
+               .item_style = GENLIST_STYLE_MULTILINE,
                .func.text_get = _gl_network_notification_text_get,
                .func.content_get = _gl_content_get_network_noti
 };
 
 #if TIZEN_SLEEP_POLICY
 static Elm_Genlist_Item_Class itc_keep_wifi = {
-               .item_style = WIFI_GENLIST_2LINE_TOP_TEXT_STYLE,
+//             .item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
+               .item_style = GENLIST_STYLE_TYPE1,
                .func.text_get = _gl_keep_wifi_on_during_sleep_text_get,
 };
 
 static Elm_Genlist_Item_Class itc_keep_wifi_sub = {
-               .item_style = WIFI_GENLIST_1LINE_TEXT_ICON_STYLE,
+//             .item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
+               .item_style = GENLIST_STYLE_TYPE1,
                .func.text_get = _gl_text_get,
                .func.content_get = _gl_content_get_keep_wifi_sub,
 };
 
 static Elm_Genlist_Item_Class itc_keep_wifi_sub_never = {
-               .item_style = WIFI_GENLIST_2LINE_TOP_TEXT_ICON_STYLE,
+//             .item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
+               .item_style = GENLIST_STYLE_TYPE1,
                .func.text_get = _gl_never_text_get,
                .func.content_get = _gl_content_get_keep_wifi_sub,
 };
 #endif
 
 static Elm_Genlist_Item_Class itc_sort_by = {
-               .item_style = WIFI_GENLIST_2LINE_TOP_TEXT_STYLE,
+//             .item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
+               .item_style = GENLIST_STYLE_TYPE1,
                .func.text_get = _gl_sort_by_text_get,
 };
 
 static Elm_Genlist_Item_Class itc_sort_by_sub = {
-               .item_style = WIFI_GENLIST_1LINE_TEXT_ICON_STYLE,
+               //.item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
+               .item_style = GENLIST_STYLE_TYPE1,
                .func.text_get = _gl_sort_by_sub_text_get,
                .func.content_get = _gl_content_get_sort_by_sub,
 };
 
 static Elm_Genlist_Item_Class itc_install_cert = {
-               .item_style = WIFI_GENLIST_1LINE_TEXT_STYLE,
+//             .item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
+               .item_style = GENLIST_STYLE_TYPE1,
                .func.text_get = _gl_install_certificate_text_get,
 };
 
@@ -117,7 +125,7 @@ static char *_gl_install_certificate_text_get(void *data, Evas_Object *obj,
 {
        char buf[1024];
 
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
                snprintf(buf, 1023, "%s", sc(PACKAGE, I18N_TYPE_Install_certificate));
                return strdup(buf);
        }
@@ -214,12 +222,12 @@ static char *_gl_sort_by_text_get(void *data, Evas_Object *obj,
                const char *part)
 {
        char buf[1024];
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
                if ((int) data != 0) {
                        snprintf(buf, 1023, "%s", sc(PACKAGE, (int) data));
                        return strdup(buf);
                }
-       } else if (!strcmp("elm.text.sub", part)) {
+       } else if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_text_part, part)) {
                int value;
 
                value = _convert_vconf_to_sort_by_value(
@@ -236,7 +244,7 @@ static char *_gl_sort_by_text_get(void *data, Evas_Object *obj,
 static char *_gl_sort_by_sub_text_get(void *data, Evas_Object *obj, const char *part)
 {
        char buf[1024];
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
                if ((int) data != 0) {
                        snprintf(buf, 1023, "%s", sc(PACKAGE, (int) data));
                        return strdup(buf);
@@ -249,10 +257,10 @@ static char *_gl_network_notification_text_get(void *data, Evas_Object *obj, con
 {
        char buf[1024];
 
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].text_part, part)) {
                snprintf(buf, 1023, "%s", sc(PACKAGE, I18N_TYPE_Network_notification));
                return strdup(buf);
-       } else if (!strcmp("elm.text.multiline", part)) {
+       } else if (!strcmp(g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].sub_text_part, part)) {
                snprintf(buf, 1023, "<font_size=30>%s</font_size>",
                                sc(PACKAGE, I18N_TYPE_Network_notify_me_later));
                return strdup(buf);
@@ -265,7 +273,7 @@ static char *_gl_text_get(void *data, Evas_Object *obj,
                const char *part)
 {
        char buf[1024];
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
                if ((int) data != 0) {
                        snprintf(buf, 1023, "%s", sc(PACKAGE, (int) data));
                        return strdup(buf);
@@ -279,10 +287,10 @@ static char *_gl_keep_wifi_on_during_sleep_text_get(void *data, Evas_Object *obj
 {
        char buf[1024];
 
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
                snprintf(buf, 1023, "%s", sc(PACKAGE, I18N_TYPE_Keep_WIFI_on_during_sleep));
                return strdup(buf);
-       } else if (!strcmp("elm.text.sub", part)) {
+       } else if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_text_part, part)) {
                int value;
                value = _convert_vconf_to_wifi_keep_value(
                                common_util_get_system_registry(VCONF_SLEEP_POLICY));
@@ -302,9 +310,9 @@ static char *_gl_keep_wifi_on_during_sleep_text_get(void *data, Evas_Object *obj
 static char *_gl_never_text_get(void *data, Evas_Object *obj,
                const char *part)
 {
-       if (!strcmp("elm.text", part))
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part))
                return g_strdup(sc(PACKAGE, I18N_TYPE_Donot_Use));
-       else if (!strcmp("elm.text.sub", part))
+       else if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_text_part, part))
                return g_strdup(sc(PACKAGE, I18N_TYPE_Increases_Data_Usage));
 
        return NULL;
@@ -356,7 +364,7 @@ static Evas_Object *_gl_content_get_network_noti(void *data,
        Evas_Object *toggle_btn = NULL;
        int ret;
 
-       if (!strcmp("elm.swallow.end", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].sub_content_part, part)) {
                toggle_btn = elm_check_add(obj);
                evas_object_size_hint_align_set(toggle_btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
                evas_object_size_hint_weight_set(toggle_btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -460,7 +468,7 @@ static Evas_Object *_gl_content_get_keep_wifi_sub(void *data,
                elm_radio_state_value_set(g_pd.keep_wifi_radio_group, -1);
        }
 
-       if (!strcmp("elm.swallow.end", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part, part)) {
                content = elm_layout_add(obj);
 
                elm_layout_theme_set(content, "layout", "list/C/type.2", "default");
@@ -541,7 +549,7 @@ static Evas_Object *_gl_content_get_sort_by_sub(void *data,
                elm_radio_state_value_set(g_pd.sort_by_radio_group, -1);
        }
 
-       if (!strcmp("elm.swallow.end", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part, part)) {
                content = elm_layout_add(obj);
 
                elm_layout_theme_set(content, "layout", "list/C/type.2", "default");
index 6b2bdf9..7de43ad 100755 (executable)
@@ -58,6 +58,8 @@ static void _ctxpopup_delete_cb(void *data, Evas *e, Evas_Object *obj, void *eve
 static void _ctxpopup_rotate_cb(void *data, Evas_Object *obj, void *event_info);
 static void _ctxpopup_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
 
+extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+
 static void _create_ctxpopup_forget_btn_cb(void *data, Evas_Object *obj, void *event_info)
 {
        struct ug_data *ugd = NULL;
@@ -252,7 +254,7 @@ static char *_view_detail_grouptitle_text_get(void *data,
        char *tmp = NULL;
        char *txt = NULL;
 
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_2LINE_STYLE].text_part, part)) {
                _detail_data = (view_detail_data *)data;
                retvm_if(NULL == _detail_data, NULL);
 
@@ -277,7 +279,7 @@ static Evas_Object *_view_detail_grouptitle_content_get(void *data, Evas_Object
        _detail_data = (view_detail_data *)data;
        Evas_Object* icon = NULL;
 
-       if (!strcmp("elm.swallow.end", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_2LINE_STYLE].sub_content_part, part)) {
                char *temp_str = NULL;
 
                /* for strength */
@@ -651,7 +653,7 @@ void view_detail(wifi_device_info_t *device_info, Evas_Object *win_main,
        evas_object_smart_callback_add(detailview_list, "language,changed",
                        gl_lang_changed, NULL);
 
-       grouptitle_itc.item_style = WIFI_GENLIST_2LINE_BOTTOM_TEXT_ICON_STYLE;
+       grouptitle_itc.item_style = g_genlist_info[WIFI_GENLIST_2LINE_STYLE].style_name;
        grouptitle_itc.func.text_get = _view_detail_grouptitle_text_get;
        grouptitle_itc.func.content_get = _view_detail_grouptitle_content_get;
        grouptitle_itc.func.state_get = NULL;
index 5bfa830..2da3a83 100755 (executable)
@@ -97,6 +97,8 @@ int wifi_sample_count = sizeof(wifi_samples) / sizeof(wifi_samples[0]);
 static void _hidden_button_callback(void* data, Evas_Object* obj, void* event_info);
 static void viewer_manager_hidden_confirm_cleanup(void);
 
+extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+
 #ifdef MODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE
 static void _launch_wifi_direct_app(void)
 {
@@ -677,7 +679,7 @@ static char *_gl_wifi_onoff_text_get(void *data, Evas_Object *obj, const char *p
 
        retvm_if(NULL == manager_object, NULL);
 
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
                if (ug_type == UG_VIEW_OOBE) {
                        det = g_strdup_printf("<font_size=%d>%s</font_size>",
                                        OOBE_MID_FONT_SIZE,
@@ -699,7 +701,7 @@ static char *_gl_helper_text_get(void *data, Evas_Object *obj, const char *part)
 
        retvm_if(NULL == manager_object, NULL);
 
-       if (!strcmp("elm.text.multiline", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].sub_text_part, part)) {
                det = g_strdup(manager_object->item_onoff_description_text);
                assertm_if(NULL == det, "NULL!!");
        }
@@ -718,7 +720,7 @@ static Evas_Object *_gl_wifi_onoff_content_get(void *data,
        const char *style;
 
        // On&Off toggle button
-       if (!strcmp("elm.swallow.end", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part, part)) {
                if (ug_type == UG_VIEW_OOBE)
                        style = "onoff";
                else
@@ -740,9 +742,8 @@ static Evas_Object *_gl_wifi_onoff_content_get(void *data,
        }
 
        // OOBE: Progress icon
-       if (ug_type == UG_VIEW_OOBE && !strcmp("elm.swallow.icon", part)) {
-//             if (manager_object->header_mode == HEADER_MODE_ACTIVATING
-//                             || manager_object->header_mode == HEADER_MODE_SEARCHING) {
+       if (ug_type == UG_VIEW_OOBE
+                       && !strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].content_part, part)) {
                if (manager_object->header_mode == HEADER_MODE_SEARCHING) {
                        c = elm_progressbar_add(obj);
                        elm_object_style_set(c, "process_small");
@@ -778,7 +779,7 @@ static void __viewer_manager_wifi_onoff_item_create(Evas_Object* genlist, int ug
 
        manager_object->item_wifi_onoff_text = g_strdup(sc(PACKAGE, I18N_TYPE_Wi_Fi));
 
-       wifi_onoff_itc.item_style = WIFI_GENLIST_1LINE_TEXT_ICON_STYLE;
+       wifi_onoff_itc.item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;
        wifi_onoff_itc.func.text_get = _gl_wifi_onoff_text_get;
        wifi_onoff_itc.func.content_get = _gl_wifi_onoff_content_get;
        wifi_onoff_itc.func.state_get = NULL;
@@ -798,7 +799,7 @@ static void __viewer_manager_onoff_description_item_create(void)
 
        manager_object->item_onoff_description_text = g_strdup(sc(PACKAGE, I18N_TYPE_Turn_on_wifi_to_view_available_networks));
 
-       onoff_description_itc.item_style = WIFI_GENLIST_MULTILINE_TEXT_STYLE;
+       onoff_description_itc.item_style = g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].style_name;
        onoff_description_itc.func.text_get = _gl_helper_text_get;
        onoff_description_itc.func.content_get = NULL;
        onoff_description_itc.func.state_get = NULL;
index eab63dc..4c11e89 100755 (executable)
@@ -50,6 +50,8 @@ struct connecting_cancel_popup_data {
 
 static struct connecting_cancel_popup_data *g_disconnect_popup = NULL;
 
+extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+
 static void _gl_listview_more_btn_cb(void *data, Evas_Object *obj, void *event_info)
 {
        __COMMON_FUNC_ENTER__;
@@ -96,7 +98,7 @@ static char* _gl_listview_text_get(void *data, Evas_Object *obj, const char *par
 
        assertm_if(NULL == gdata->device_info->ssid, "NULL!!");
 
-       if (!strcmp("elm.text", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_2LINE_STYLE].text_part, part)) {
                det = evas_textblock_text_utf8_to_markup(NULL,
                                gdata->device_info->ssid);
                assertm_if(NULL == det, "NULL!!");
@@ -116,7 +118,7 @@ static char* _gl_listview_text_get(void *data, Evas_Object *obj, const char *par
                        g_free(det);
                        return buf;
                }
-       } else if (!strcmp("elm.text.sub", part)
+       } else if (!strcmp(g_genlist_info[WIFI_GENLIST_2LINE_STYLE].sub_text_part, part)
                        && gdata->device_info->ap_status_txt != NULL) {
                det = g_strdup(gdata->device_info->ap_status_txt);
                assertm_if(NULL == det, "NULL!!");
@@ -146,7 +148,7 @@ static Evas_Object *_gl_listview_content_get(void *data, Evas_Object *obj, const
                /* if there is no ap_image_path (NO AP Found situation) */
                DEBUG_LOG(UG_NAME_ERR, "Fatal: Image path is NULL");
 
-       } else if (!strcmp("elm.swallow.icon", part)) {
+       } else if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].content_part, part)) {
                icon = elm_image_add(obj);
                retvm_if(NULL == icon, NULL);
 
@@ -165,7 +167,7 @@ static Evas_Object *_gl_listview_content_get(void *data, Evas_Object *obj, const
                        evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(DEFAULT_BUTTON_CIRCLE_SIZE),
                                        ELM_SCALE_SIZE(DEFAULT_BUTTON_CIRCLE_SIZE));
                }
-       } else if (!strcmp("elm.swallow.end", part)) {
+       } else if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part, part)) {
                if (VIEWER_ITEM_RADIO_MODE_CONNECTING == gdata->radio_mode ||
                                VIEWER_ITEM_RADIO_MODE_CONFIGURATION == gdata->radio_mode) {
 
@@ -212,7 +214,7 @@ static void _gl_listview_del(void *data, Evas_Object *obj)
 static char *_gl_text_available_networks_get(void *data, Evas_Object *obj,
                const char *part)
 {
-       if (!strcmp("elm.text", part))
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_GROUP_INDEX_STYLE].text_part, part))
                return g_strdup(sc(PACKAGE, I18N_TYPE_Available_networks));
 
        return NULL;
@@ -236,7 +238,7 @@ static Evas_Object *_gl_content_scanning_icon_get(void *data, Evas_Object *obj,
 static char *_gl_hidden_network_text_get(void *data, Evas_Object *obj,
                const char *part)
 {
-       if (!strcmp("elm.text", part))
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part))
                return g_strdup_printf("<font_size=%d>%s</font_size>",
                                BIG_FONT_SIZE, sc(PACKAGE, I18N_TYPE_Find_Hidden_Network));
 
@@ -248,7 +250,7 @@ static Evas_Object *_gl_hidden_network_content_get(void *data, Evas_Object *obj,
 {
        Evas_Object *icon = NULL;
 
-       if (!strcmp("elm.swallow.icon", part)) {
+       if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].content_part, part)) {
                icon = elm_image_add(obj);
                retvm_if(NULL == icon, NULL);
                elm_image_file_set(icon, CUSTOM_EDITFIELD_PATH, "find_hidden_network.png");
@@ -995,14 +997,14 @@ Evas_Object* viewer_list_create(Evas_Object *win)
        evas_object_size_hint_align_set(viewer_list, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
        itc = elm_genlist_item_class_new();
-       itc->item_style = WIFI_GENLIST_2LINE_TOP_TEXT_ICON_STYLE;
+       itc->item_style = g_genlist_info[WIFI_GENLIST_2LINE_STYLE].style_name;
        itc->func.text_get = _gl_listview_text_get;
        itc->func.content_get = _gl_listview_content_get;
        itc->func.state_get = NULL;
        itc->func.del = _gl_listview_del;
 
        no_wifi_device_itc = elm_genlist_item_class_new();
-       no_wifi_device_itc->item_style = WIFI_GENLIST_1LINE_TEXT_STYLE;
+       no_wifi_device_itc->item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;
        no_wifi_device_itc->func.text_get = _gl_listview_text_get;
        no_wifi_device_itc->func.content_get = NULL;
        no_wifi_device_itc->func.state_get = NULL;
@@ -1010,7 +1012,7 @@ Evas_Object* viewer_list_create(Evas_Object *win)
 
        if (wifi_get_ug_type() == UG_VIEW_OOBE) {
                last_item_itc = elm_genlist_item_class_new();
-               last_item_itc->item_style = WIFI_GENLIST_1LINE_TEXT_ICON_STYLE;
+               last_item_itc->item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;
                last_item_itc->func.text_get = _gl_hidden_network_text_get;
                last_item_itc->func.content_get = _gl_hidden_network_content_get;
                last_item_itc->func.del = NULL;
@@ -1054,11 +1056,11 @@ void viewer_list_title_item_set(Elm_Object_Item *item_header)
        //memset(&grouptitle_itc, 0, sizeof(grouptitle_itc));
        grouptitle_itc = elm_genlist_item_class_new();
        if (wifi_get_ug_type() == UG_VIEW_OOBE) {
-               grouptitle_itc->item_style = WIFI_GENLIST_FULL_STYLE;
+               grouptitle_itc->item_style = g_genlist_info[WIFI_GENLIST_FULL_STYLE].style_name;
                grouptitle_itc->func.text_get = NULL;
                grouptitle_itc->func.content_get = NULL;
        } else {
-               grouptitle_itc->item_style = WIFI_GENLIST_GROUP_INDEX_STYLE;
+               grouptitle_itc->item_style = g_genlist_info[WIFI_GENLIST_GROUP_INDEX_STYLE].style_name;
                grouptitle_itc->func.text_get = _gl_text_available_networks_get;
                grouptitle_itc->func.content_get = _gl_content_scanning_icon_get;
        }
index a86c002..752f130 100755 (executable)
@@ -89,6 +89,7 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode,
        struct ug_data *ugd;
        ugd = (struct ug_data*)priv;
        ugd->ug = ug;
+       ug_app_state->ug_type = UG_VIEW_DEFAULT;
 
        if (NULL != app_control) {
                INFO_LOG(UG_NAME_NORMAL, "message load from caller");
@@ -108,31 +109,27 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode,
                        if (g_strcmp0(caller, "pwlock") == 0) {
                                ugd->elm_conform = ug_get_conformant();
                                ug_app_state->ug_type = UG_VIEW_OOBE;
-                               common_util_set_ug_type(UG_VIEW_OOBE);
                        } else if (g_strcmp0(caller, "notification") == 0) {
                                /* Remove the "WiFi networks found" from the notification tray.*/
                                common_util_managed_idle_add(__wifi_efl_ug_del_found_ap_noti, NULL);
-                               ug_app_state->ug_type = UG_VIEW_DEFAULT;
                        } else if (g_strcmp0(caller, "lbhome") == 0) {
-                               ug_app_state->ug_type = UG_VIEW_DEFAULT;
                                ug_app_state->app_control = app_control;
                                ug_app_state->is_lbhome = EINA_TRUE;
-                       } else {
-                               ug_app_state->ug_type = UG_VIEW_DEFAULT;
                        }
-
                        free(caller);
                } else {
                        INFO_LOG(UG_NAME_NORMAL, "caller is not defined");
-                       ug_app_state->ug_type = UG_VIEW_DEFAULT;
                }
+       }
 
-
-       } else {
-               INFO_LOG(UG_NAME_NORMAL, "caller is not defined");
-               ug_app_state->ug_type = UG_VIEW_DEFAULT;
+       if (ug_app_state->ug_type == UG_VIEW_DEFAULT
+                       && is_common_profile()) {
+               ug_app_state->ug_type = UG_VIEW_IOT_COMMON;
        }
 
+       common_util_set_ug_type(ug_app_state->ug_type);
+       common_util_update_genlist_style();
+
        Evas_Object *parent_layout = ug_get_parent_layout(ug);
        if (parent_layout == NULL) {
                ERROR_LOG(UG_NAME_NORMAL, "Failed to get parent layout");
index a0cb19c..947b035 100755 (executable)
@@ -703,7 +703,7 @@ static Evas_Object *_create_genlist(Evas_Object* parent)
        evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
-       itc.item_style = WIFI_GENLIST_2LINE_TOP_TEXT_ICON_STYLE;
+       itc.item_style = GENLIST_STYLE_TYPE1;
        itc.func.text_get = _gl_text_get;
        itc.func.content_get = _gl_content_get;
        itc.func.state_get = NULL;
@@ -929,7 +929,7 @@ static char* _gl_text_title_get(void *data, Evas_Object *obj, const char *part)
 
 static void view_main_add_group_title(void)
 {
-       grouptitle_itc.item_style = WIFI_GENLIST_GROUP_INDEX_STYLE;
+       grouptitle_itc.item_style = GENLIST_STYLE_GROUP_INDEX;
        grouptitle_itc.func.text_get = _gl_text_title_get;
        grouptitle_itc.func.content_get = _gl_content_title_get;