Evas_Object *button = NULL;
Evas_Object *genlist = NULL;
-/*
- char *name_value = NULL;
-
- name_value = elm_entry_utf8_to_markup(dev->name);
-*/
popup = elm_popup_add(ugd->base);
eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, eext_popup_back_cb, NULL);
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
-/*
- layout = elm_layout_add(popup);
- elm_layout_file_set(layout, BT_GENLIST_EDJ, "profile_rename_device_ly");
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-*/
elm_object_domain_translatable_part_text_set(popup,
"title,text",
PKGNAME,
"IDS_ST_HEADER_RENAME_DEVICE");
- genlist = elm_genlist_add(popup);
- evas_object_size_hint_weight_set(genlist,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- elm_scroller_content_min_limit(genlist, EINA_FALSE, EINA_TRUE);
- /* Entry genlist item */
- vd->rename_entry_itc = elm_genlist_item_class_new();
- if (vd->rename_entry_itc) {
- vd->rename_entry_itc->item_style = BT_GENLIST_FULL_CONTENT_STYLE;
- vd->rename_entry_itc->func.text_get = NULL;
- vd->rename_entry_itc->func.content_get = __bt_profile_rename_entry_icon_get;
- vd->rename_entry_itc->func.state_get = NULL;
- vd->rename_entry_itc->func.del = NULL;
+ if (!TIZEN_COMMON) {
+ genlist = elm_genlist_add(popup);
+ evas_object_size_hint_weight_set(genlist,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
+
+ elm_scroller_content_min_limit(genlist, EINA_FALSE, EINA_TRUE);
+
+ /* Entry genlist item */
+ vd->rename_entry_itc = elm_genlist_item_class_new();
+ if (vd->rename_entry_itc) {
+ vd->rename_entry_itc->item_style = BT_GENLIST_FULL_CONTENT_STYLE;
+ vd->rename_entry_itc->func.text_get = NULL;
+ vd->rename_entry_itc->func.content_get = __bt_profile_rename_entry_icon_get;
+ vd->rename_entry_itc->func.state_get = NULL;
+ vd->rename_entry_itc->func.del = NULL;
+
+ vd->rename_entry_item = elm_genlist_item_append(genlist,
+ vd->rename_entry_itc, dev,
+ NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ }
+
+ evas_object_show(genlist);
+
+ elm_object_content_set(popup, genlist);
+ } else {
+ char *name_value = NULL;
+ Evas_Object *entry = NULL;
+ Evas_Object *layout = NULL;
+ Elm_Entry_Filter_Limit_Size limit_filter;
+
+ name_value = elm_entry_utf8_to_markup(dev->name);
+
+ layout = elm_layout_add(popup);
+ elm_layout_theme_set(layout, "layout", "editfield", "singleline");
+
+ evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 0.0);
+
+ entry = elm_entry_add(layout);
+ elm_entry_single_line_set(entry, EINA_TRUE);
+ elm_entry_scrollable_set(entry, EINA_TRUE);
+
+ eext_entry_selection_back_event_allow_set(entry, EINA_TRUE);
+ elm_entry_scrollable_set(entry, EINA_TRUE);
+ elm_object_signal_emit(entry, "elm,action,hide,search_icon", "");
+ elm_object_part_text_set(entry, "elm.guide", BT_STR_DEVICE_NAME);
+ elm_entry_input_panel_imdata_set(entry, "action=disable_emoticons", 24);
+
+ limit_filter.max_char_count = DEVICE_NAME_MAX_CHARACTER;
+ elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size,
+ &limit_filter);
+
+ elm_entry_input_panel_return_key_type_set(entry,
+ ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
+
+ if (name_value)
+ elm_object_text_set(entry, name_value);
+
+ elm_entry_cnp_mode_set(entry, ELM_CNP_MODE_PLAINTEXT);
- vd->rename_entry_item = elm_genlist_item_append(genlist,
- vd->rename_entry_itc, dev,
- NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_NORMAL);
+ elm_entry_prediction_allow_set(entry, EINA_FALSE);
+ elm_entry_autocapital_type_set(entry, ELM_AUTOCAPITAL_TYPE_NONE);
+
+ evas_object_smart_callback_add(entry, "maxlength,reached",
+ _bt_util_max_len_reached_cb, ugd);
+ evas_object_smart_callback_add(entry, "changed",
+ __bt_profile_rename_entry_changed_cb, ugd);
+ evas_object_smart_callback_add(entry, "preedit,changed",
+ __bt_profile_rename_entry_changed_cb, ugd);
+ evas_object_smart_callback_add(entry, "activated",
+ __bt_profile_popup_entry_activated_cb, NULL);
+
+ evas_object_event_callback_add(entry, EVAS_CALLBACK_SHOW,
+ __bt_profile_entry_edit_mode_show_cb, ugd);
+
+ elm_entry_input_panel_show(entry);
+
+ elm_object_part_content_set(layout, "elm.swallow.content", entry);
+
+ evas_object_show(layout);
+
+ elm_object_content_set(popup, layout);
+
+ ugd->rename_entry = entry;
+
+ if (name_value)
+ free(name_value);
}
-/*
- entry = elm_entry_add(obj);
- elm_entry_single_line_set(entry, EINA_TRUE);
- elm_entry_scrollable_set(entry, EINA_TRUE);
-
- eext_entry_selection_back_event_allow_set(entry, EINA_TRUE);
- elm_entry_scrollable_set(entry, EINA_TRUE);
- elm_object_signal_emit(entry, "elm,action,hide,search_icon", "");
- elm_object_part_text_set(entry, "elm.guide", BT_STR_DEVICE_NAME);
- elm_entry_input_panel_imdata_set(entry, "action=disable_emoticons", 24);
-
- limit_filter.max_char_count = DEVICE_NAME_MAX_CHARACTER;
- elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size,
- &limit_filter);
-
- elm_entry_input_panel_return_key_type_set(entry,
- ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
-
- if (name_value)
- elm_entry_entry_set(entry, name_value);
-
- elm_entry_cnp_mode_set(entry, ELM_CNP_MODE_PLAINTEXT);
-
- evas_object_smart_callback_add(entry, "maxlength,reached",
- _bt_util_max_len_reached_cb, ugd);
- evas_object_smart_callback_add(entry, "changed",
- __bt_profile_rename_entry_changed_cb, ugd);
- evas_object_smart_callback_add(entry, "preedit,changed",
- __bt_profile_rename_entry_changed_cb, ugd);
- evas_object_smart_callback_add(entry, "focused",
- __bt_profile_rename_entry_focused_cb, NULL);
- evas_object_event_callback_add(entry, EVAS_CALLBACK_KEY_DOWN,
- __bt_profile_rename_entry_keydown_cb, ugd);
-
- evas_object_show(entry);
- elm_object_part_content_set(layout, "elm.swallow.layout", entry);
-
- elm_object_content_set(popup, layout);
-*/
+
button = elm_button_add(popup);
elm_object_style_set(button, "popup");
elm_object_domain_translatable_text_set(button,
evas_object_smart_callback_add(button, "clicked",
__bt_profile_rename_device_ok_cb, dev);
- evas_object_show(genlist);
-
- elm_object_content_set(popup, genlist);
evas_object_show(popup);
if (ugd->rename_entry)