g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].sub_content_part = GENLIST_PART_ELM_SWALLOW_END;
}
+static void _init_genlist_common_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 = GENLIST_PART_ELM_ICON;
+ g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].sub_content_part = GENLIST_PART_ELM_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;
- if (g_ug_type == UG_VIEW_IOT_COMMON)
- g_genlist_info[WIFI_GENLIST_GROUP_INDEX_STYLE].content_part = GENLIST_PART_ELM_END;
- else
- g_genlist_info[WIFI_GENLIST_GROUP_INDEX_STYLE].content_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_common_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 = GENLIST_PART_ELM_END;
g_genlist_info[WIFI_GENLIST_GROUP_INDEX_STYLE].sub_content_part = NULL;
}
if (g_ug_type == UG_VIEW_IOT_COMMON) {
_init_genlist_1line_style();
_init_genlist_2line_style();
+ _init_genlist_common_multiline_style();
+ _init_genlist_common_group_index_style();
} else {
_init_genlist_type1_style();
_init_genlist_type2_style();
+ _init_genlist_multiline_style();
+ _init_genlist_group_index_style();
}
- _init_genlist_multiline_style();
- _init_genlist_group_index_style();
_init_genlist_full_style();
}
/* Global variables for elm_genlist itc */
static Elm_Genlist_Item_Class itc_network_noti = {
-// .item_style = g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].style_name,
- .item_style = GENLIST_STYLE_MULTILINE,
+ .item_style = NULL,
.func.text_get = _gl_network_notification_text_get,
.func.content_get = _gl_content_get_network_noti
};
#endif
static Elm_Genlist_Item_Class itc_sort_by = {
-// .item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
- .item_style = GENLIST_STYLE_TYPE1,
+ .item_style = NULL,
.func.text_get = _gl_sort_by_text_get,
};
static Elm_Genlist_Item_Class itc_sort_by_sub = {
- //.item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
- .item_style = GENLIST_STYLE_TYPE1,
+ .item_style = NULL,
.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 = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name,
- .item_style = GENLIST_STYLE_TYPE1,
+ .item_style = NULL,
.func.text_get = _gl_install_certificate_text_get,
};
return -1;
}
+static void _gl_realized(void *data, Evas_Object *obj, void *event_info)
+{
+ if (!obj || !event_info)
+ return;
+
+ Evas_Object *genlist = obj;
+ Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+ int index = 0;
+ int count = 0;
+
+ count = elm_genlist_items_count(genlist);
+ index = elm_genlist_item_index_get(item);
+
+ if (index == 1)
+ elm_object_item_signal_emit(item, "elm,state,group,top", "elm");
+ else if (index == count)
+ elm_object_item_signal_emit(item, "elm,state,group,bottom", "elm");
+ else
+ elm_object_item_signal_emit(item, "elm,state,group,middle", "elm");
+}
+
static char *_gl_sort_by_text_get(void *data, Evas_Object *obj,
const char *part)
{
g_pd.sort_by_radio_group = elm_radio_add(genlist);
evas_object_data_set(genlist, "radio", g_pd.sort_by_radio_group);
+ itc_sort_by_sub.item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;
elm_genlist_item_append(genlist, &itc_sort_by_sub,
(const void *) I18N_TYPE_Alphabetical, NULL, ELM_GENLIST_ITEM_NONE,
_gl_changed_sort_by_sub, (const void *)I18N_TYPE_Alphabetical);
elm_genlist_mode_set(gl, ELM_LIST_COMPRESS);
+ evas_object_smart_callback_add(gl, "realized", _gl_realized, NULL);
+
/* Network Notification */
+ itc_network_noti.item_style = g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].style_name;
g_pd.item_network_noti = elm_genlist_item_append(gl, &itc_network_noti,
(const void *) I18N_TYPE_Network_notification, NULL,
ELM_GENLIST_ITEM_NONE, _gl_changed_network_noti, NULL);
#endif
/* Sort By */
+ itc_sort_by.item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;
g_pd.item_sort_by = elm_genlist_item_append(gl, &itc_sort_by,
(const void *) I18N_TYPE_Sort_by, NULL,
ELM_GENLIST_ITEM_NONE, _gl_sort_by, NULL);
/* Install Certificate */
+ itc_install_cert.item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;
g_pd.item_install_cert = elm_genlist_item_append(gl, &itc_install_cert,
NULL, NULL, ELM_GENLIST_ITEM_NONE, _gl_cert_sel_cb, NULL);
return EINA_TRUE;
}
+static void __back_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *navi_frame = (Evas_Object *)data;
+ if (!navi_frame)
+ return;
+
+ elm_naviframe_item_pop(navi_frame);
+}
+
void view_advanced(void)
{
Evas_Object *layout = NULL;
Evas_Object *navi_frame = NULL;
Elm_Object_Item *navi_it = NULL;
+ Evas_Object *back_btn = NULL;
char title[100];
__COMMON_FUNC_ENTER__;
layout = common_utils_create_layout(navi_frame);
evas_object_show(layout);
+ back_btn = elm_button_add(navi_frame);
+ elm_object_style_set(back_btn, "naviframe/back_btn/default");
+ evas_object_smart_callback_add(back_btn, "clicked", __back_btn_cb, navi_frame);
+ elm_object_focus_allow_set(back_btn, EINA_FALSE);
+
g_pd.list = _create_list(layout);
assertm_if(NULL == g_pd.list, "_create_list failed");
elm_object_part_content_set(layout, "elm.swallow.content", g_pd.list);
g_strlcpy(title, "IDS_WIFI_BODY_ADVANCED_SETTINGS", sizeof(title));
- navi_it = elm_naviframe_item_push(navi_frame, title, NULL, NULL,
+ navi_it = elm_naviframe_item_push(navi_frame, title, back_btn, NULL,
layout, NULL);
elm_object_item_domain_text_translatable_set(navi_it, PACKAGE, EINA_TRUE);