retvm_if(NULL == data || NULL == part, NULL);
_view_detail_description_data_t* det =
- (_view_detail_description_data_t*) data;
+ (_view_detail_description_data_t*) data;
- if (g_strcmp0(part, "elm.swallow.content") == 0) {
- Evas_Object *entry = NULL;
- Evas_Object *box1 = NULL;
- Evas_Object *box2 = NULL;
- Evas_Object *tpad = NULL;
- Evas_Object *lpad = NULL;
- Evas_Object *label1 = NULL;
- Evas_Object *label2 = NULL;
- int height = 60;
- char buf[MAX_LABEL_LENGTH] = {0, };
-
- entry = elm_box_add(obj);
- elm_box_align_set(entry, 0.0, 0.0);
-
- tpad = evas_object_rectangle_add(entry);
- evas_object_size_hint_min_set(tpad, 0, ELM_SCALE_SIZE(10));
- evas_object_show(tpad);
- elm_box_pack_end(entry, tpad);
-
- box1 = elm_box_add(entry);
- evas_object_size_hint_align_set(box1, 0.0, 0.0);
- elm_box_horizontal_set(box1, EINA_TRUE);
- elm_box_pack_end(entry, box1);
- evas_object_show(box1);
-
- lpad = evas_object_rectangle_add(box1);
- evas_object_size_hint_min_set(lpad, ELM_SCALE_SIZE(15), 0);
- evas_object_show(lpad);
- elm_box_pack_end(box1, lpad);
- evas_object_show(box1);
-
- label1 = elm_label_add(box1);
- snprintf(buf, MAX_LABEL_LENGTH, "<font_size=30>%s</font_size>",
- dgettext(PACKAGE, det->title));
- elm_object_text_set(label1, buf);
- evas_object_size_hint_align_set(label1, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(label1, 0.9, EVAS_HINT_EXPAND);
- elm_box_pack_end(box1, label1);
- evas_object_show(label1);
-
- box2 = elm_box_add(entry);
- evas_object_size_hint_align_set(box2, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_horizontal_set(box2, EINA_TRUE);
- elm_box_pack_end(entry, box2);
-
- elm_box_pack_end(box2, lpad);
-
- label2 = elm_label_add(box2);
- snprintf(buf, MAX_LABEL_LENGTH, "<font_size=40>%s</font_size>",
- dgettext(PACKAGE, det->description));
- elm_object_text_set(label2, buf);
- evas_object_size_hint_align_set(label2, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(label2, 0.9, EVAS_HINT_EXPAND);
- elm_box_pack_end(box2, label2);
- evas_object_show(label2);
-
- evas_object_show(box2);
- elm_box_pack_end(entry, box2);
-
- evas_object_size_hint_min_set(entry, 0, ELM_SCALE_SIZE(height));
- elm_object_focus_set(entry, EINA_FALSE);
- evas_object_show(entry);
-
- return entry;
- }
+ Evas_Object *layout = NULL;
+ Evas_Object *title_label = NULL;
+ Evas_Object *description_label = NULL;
+ char buf[MAX_LABEL_LENGTH] = {0, };
+
+ layout = elm_layout_add(obj);
+ elm_layout_file_set(layout, CUSTOM_GENLIST_PATH, "gl_custom_item");
+ evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+ title_label = elm_label_add(obj);
+ snprintf(buf, MAX_LABEL_LENGTH, "%s", dgettext(PACKAGE, det->title));
+
+ elm_object_text_set(title_label, buf);
+ evas_object_size_hint_weight_set(title_label, EVAS_HINT_EXPAND, 0);
+ evas_object_size_hint_align_set(title_label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_object_part_content_set(layout, "elm.swallow.label", title_label);
+
+ description_label = elm_label_add(obj);
+ snprintf(buf, MAX_LABEL_LENGTH, "%s", dgettext(PACKAGE, det->description));
+
+ elm_object_text_set(description_label, buf);
+ evas_object_size_hint_weight_set(description_label, EVAS_HINT_EXPAND, 0);
+ evas_object_size_hint_align_set(description_label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_object_part_content_set(layout, "elm.swallow.content", description_label);
__COMMON_FUNC_EXIT__;
- return NULL;
+ return layout;
}
static void _ip_info_entry_key_enter_cb(void *data, Evas_Object *obj, void *event_info)
return NULL;
}
- if (g_strcmp0(part, "elm.swallow.content") == 0) {
- Evas_Object *entry = NULL;
- Evas_Object *box = NULL;
- Evas_Object *tpad = NULL;
- Evas_Object *lpad = NULL;
- Evas_Object *label = NULL;
- Evas_Object *layout = NULL;
- Evas_Object *editfield = NULL;
- char *guide_txt = NULL;
- char *accepted = NULL;
- Elm_Input_Panel_Layout panel_type;
- int return_key_type;
- int height = 60;
- char buf[MAX_LABEL_LENGTH] = {0, };
-
- switch (entry_info->entry_id)
- {
+ Evas_Object *layout = NULL;
+ Evas_Object *label = NULL;
+ Evas_Object *editfield = NULL;
+ char *guide_txt = NULL;
+ char *accepted = NULL;
+ Elm_Input_Panel_Layout panel_type;
+ int return_key_type;
+ char buf[MAX_LABEL_LENGTH] = {0, };
+
+ switch (entry_info->entry_id)
+ {
case ENTRY_TYPE_IP_ADDR:
case ENTRY_TYPE_SUBNET_MASK:
case ENTRY_TYPE_GATEWAY:
break;
default:
return NULL;
- }
-
- entry = elm_box_add(obj);
- elm_box_align_set(entry, 0.0, 0.0);
-
- tpad = evas_object_rectangle_add(entry);
- evas_object_size_hint_min_set(tpad, 0, ELM_SCALE_SIZE(10));
- evas_object_show(tpad);
- elm_box_pack_end(entry, tpad);
-
- box = elm_box_add(entry);
- evas_object_size_hint_align_set(box, 0.0, 0.0);
- elm_box_horizontal_set(box, EINA_TRUE);
- elm_box_pack_end(entry, box);
- evas_object_show(box);
+ }
- lpad = evas_object_rectangle_add(box);
- evas_object_size_hint_min_set(lpad, ELM_SCALE_SIZE(15), 0);
- evas_object_show(lpad);
- elm_box_pack_end(box, lpad);
- evas_object_show(box);
+ layout = elm_layout_add(obj);
+ elm_layout_file_set(layout, CUSTOM_GENLIST_PATH, "gl_custom_item");
+ evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- label = elm_label_add(box);
- snprintf(buf, MAX_LABEL_LENGTH, "<font_size=30>%s</font_size>",
+ snprintf(buf, MAX_LABEL_LENGTH, "%s",
dgettext(PACKAGE, entry_info->title_txt));
- elm_object_text_set(label, buf);
- evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(label, 0.9, EVAS_HINT_EXPAND);
- elm_box_pack_end(box, label);
- evas_object_show(label);
-
- layout = elm_layout_add(entry);
- elm_layout_theme_set(layout, "layout", "editfield", "singleline");
- evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- editfield = elm_entry_add(layout);
- elm_entry_single_line_set(editfield, EINA_TRUE);
- elm_entry_scrollable_set(editfield, EINA_TRUE);
-
- if (!g_strcmp0(entry_info->str_pkg_name, "wifi-qs")) {
- elm_entry_input_panel_imdata_set(editfield, "type=systempopup", 16);
- }
- elm_entry_cnp_mode_set(editfield, ELM_CNP_MODE_PLAINTEXT);
- elm_object_part_text_set(editfield, "elm.guide", guide_txt);
- if (entry_info->entry_txt && (strlen(entry_info->entry_txt) > 0) &&
- g_strcmp0(entry_info->entry_txt, DEFAULT_GUIDE_IP) != 0) {
- elm_entry_entry_set(editfield, entry_info->entry_txt);
- }
+ label = elm_label_add(obj);
+ evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0);
+ evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_object_text_set(label, buf);
+ elm_object_part_content_set(layout, "elm.swallow.label", label);
- elm_entry_input_panel_layout_set(editfield, panel_type);
-
- Elm_Entry_Filter_Accept_Set digits_filter_data;
- memset(&digits_filter_data, 0, sizeof(Elm_Entry_Filter_Accept_Set));
- digits_filter_data.accepted = accepted;
- elm_entry_markup_filter_append(editfield, elm_entry_filter_accept_set, &digits_filter_data);
-
- if (entry_info->input_panel_cb) {
- Ecore_IMF_Context *imf_ctxt = elm_entry_imf_context_get(editfield);
- if (imf_ctxt) {
- ecore_imf_context_input_panel_event_callback_add(
- imf_ctxt,
- ECORE_IMF_INPUT_PANEL_STATE_EVENT,
- entry_info->input_panel_cb,
- entry_info->input_panel_cb_data);
- }
- }
+ editfield = elm_entry_add(obj);
+ elm_entry_single_line_set(editfield, EINA_TRUE);
+ elm_entry_scrollable_set(editfield, EINA_TRUE);
- elm_entry_input_panel_return_key_type_set(editfield, return_key_type);
- _ip_info_entry_add_callbacks(editfield, entry_info);
- elm_object_part_content_set(layout, "elm.swallow.content", editfield);
+ if (!g_strcmp0(entry_info->str_pkg_name, "wifi-qs")) {
+ elm_entry_input_panel_imdata_set(editfield, "type=systempopup", 16);
+ }
+ elm_entry_cnp_mode_set(editfield, ELM_CNP_MODE_PLAINTEXT);
- if (!net_get_device_policy_wifi_profile())
- elm_object_disabled_set(editfield, EINA_TRUE);
- else
- elm_object_disabled_set(editfield, EINA_FALSE);
+ elm_object_part_text_set(editfield, "elm.guide", guide_txt);
+ if (entry_info->entry_txt && (strlen(entry_info->entry_txt) > 0) &&
+ g_strcmp0(entry_info->entry_txt, DEFAULT_GUIDE_IP) != 0) {
+ elm_entry_entry_set(editfield, entry_info->entry_txt);
+ }
- evas_object_show(layout);
- elm_box_pack_end(entry, layout);
+ elm_entry_input_panel_layout_set(editfield, panel_type);
+
+ Elm_Entry_Filter_Accept_Set digits_filter_data;
+ memset(&digits_filter_data, 0, sizeof(Elm_Entry_Filter_Accept_Set));
+ digits_filter_data.accepted = accepted;
+ elm_entry_markup_filter_append(editfield, elm_entry_filter_accept_set, &digits_filter_data);
+
+ if (entry_info->input_panel_cb) {
+ Ecore_IMF_Context *imf_ctxt = elm_entry_imf_context_get(editfield);
+ if (imf_ctxt) {
+ ecore_imf_context_input_panel_event_callback_add(
+ imf_ctxt,
+ ECORE_IMF_INPUT_PANEL_STATE_EVENT,
+ entry_info->input_panel_cb,
+ entry_info->input_panel_cb_data);
+ }
+ }
- evas_object_size_hint_min_set(entry, 0, ELM_SCALE_SIZE(height));
- elm_object_focus_set(entry, EINA_FALSE);
- evas_object_show(entry);
+ elm_entry_input_panel_return_key_type_set(editfield, return_key_type);
+ _ip_info_entry_add_callbacks(editfield, entry_info);
+ elm_object_part_content_set(layout, "elm.swallow.content", editfield);
- return entry;
- }
+ if (!net_get_device_policy_wifi_profile())
+ elm_object_disabled_set(editfield, EINA_TRUE);
+ else
+ elm_object_disabled_set(editfield, EINA_FALSE);
- return NULL;
+ return layout;
}
static void _ip_info_entry_item_del(void *data, Evas_Object *obj)
description_itc = elm_genlist_item_class_new();
description_itc->item_style = WIFI_GENLIST_FULL_STYLE;
- description_itc->func.text_get = _ip_info_detail_description_text_get;
+ 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->func.text_get = _ip_info_entry_item_text_get;
+ 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;
ip_entry_itc->func.del = _ip_info_entry_item_del;