retv_if(!item_data || !parent, NULL);
elm_genlist_mode_set(parent, ELM_LIST_COMPRESS); /* resolve abnormal height issue */
Evas_Object *ed_name =
- setting_create_editfiled(parent, _(item_data->keyStr),
- item_data->sub_desc);
+ setting_create_editfiled(parent, _(item_data->keyStr), item_data->sub_desc);
evas_object_pass_events_set(ed_name, 1);
evas_object_propagate_events_set(ed_name, 0);
Evas_Object *entry = elm_object_part_content_get(ed_name, "elm.swallow.content");
item_data->eo_check = entry;
- elm_entry_input_panel_layout_set(entry,
- item_data->input_type);
+ elm_entry_input_panel_layout_set(entry, item_data->input_type);
if (item_data->isSinglelineFlag) {
elm_entry_scrollable_set(entry, EINA_TRUE);
* Create 1entry style item
* @return a pointer to Setting_GenGroupItem_Data
*/
-Setting_GenGroupItem_Data *setting_create_Gendial_field_entry(Evas_Object *
- genlist,
+Setting_GenGroupItem_Data *setting_create_Gendial_field_entry(
+ Evas_Object * genlist,
const Elm_Genlist_Item_Class *itc,
setting_call_back_func gl_sel,
void *sel_data,
- SWALLOW_Type
- swallow_type,
+ SWALLOW_Type swallow_type,
char *l_icon_path,
char *r_icon_path,
int chk_status,
const char *keyStr,
char *sub_desc,
- setting_call_back_func
- chk_change_cb,
- Elm_Input_Panel_Layout
- input_type,
+ setting_call_back_func chk_change_cb,
+ Elm_Input_Panel_Layout input_type,
bool isPasswordFlag,
bool isFocusFlag,
int max_char_count,
char *rejected)
{
/* SETTING_TRACE_BEGIN; */
- Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) calloc(1,
- sizeof (Setting_GenGroupItem_Data));
+ Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) calloc(1, sizeof (Setting_GenGroupItem_Data));
setting_retvm_if(!item_data, NULL, "calloc failed");
item_data->keyStr = (char *)g_strdup(keyStr);
item_data->sub_desc = (char *)g_strdup(sub_desc);
item_data->chk_status = chk_status;
item_data->chk_change_cb = chk_change_cb;
+ //setting_call_back_func chk_focus_out_cb,
+
+
+ item_data->input_type = input_type;
+ item_data->isPasswordFlag = isPasswordFlag;
+ item_data->isFocusFlag = isFocusFlag;
+
+ Elm_Entry_Filter_Accept_Set *digits_filter_data =
+ (Elm_Entry_Filter_Accept_Set *) calloc(1, sizeof (Elm_Entry_Filter_Accept_Set));
+ if(!digits_filter_data) {
+ SETTING_TRACE_ERROR("calloc Elm_Entry_Filter_Accept_Set failed");
+ // free allocated data
+ G_FREE(item_data->keyStr);
+ G_FREE(item_data->sub_desc);
+ G_FREE(item_data->l_swallow_path);
+ G_FREE(item_data->r_swallow_path);
+ FREE(item_data);
+ return NULL;
+ }
+
+
+ Elm_Entry_Filter_Limit_Size *limit_filter_data =
+ (Elm_Entry_Filter_Limit_Size *) calloc(1, sizeof (Elm_Entry_Filter_Limit_Size));
+ if(!limit_filter_data) {
+ SETTING_TRACE_ERROR("calloc Elm_Entry_Filter_Limit_Size failed");
+
+ // free allocated data
+ G_FREE(item_data->keyStr);
+ G_FREE(item_data->sub_desc);
+ G_FREE(item_data->l_swallow_path);
+ G_FREE(item_data->r_swallow_path);
+ FREE(item_data);
+ FREE(digits_filter_data);
+ return NULL;
+ }
+
+ limit_filter_data->max_char_count = max_char_count;
+ limit_filter_data->max_byte_count = max_byte_count;
+ digits_filter_data->accepted = (char *)g_strdup(accepted);
+ digits_filter_data->rejected = (char *)g_strdup(rejected);
+
+ item_data->digits_filter_data = digits_filter_data;
+ item_data->limit_filter_data = limit_filter_data;
+ item_data->userdata = sel_data;
+
+ if (gl_sel) {
+ item_data->item =
+ elm_genlist_item_append(genlist, itc, item_data, NULL,
+ ELM_GENLIST_ITEM_NONE, gl_sel,
+ sel_data);
+ } else {
+ item_data->item =
+ elm_genlist_item_append(genlist, itc, item_data, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ _gl_Gendial_sel, sel_data);
+ }
+ return item_data;
+}
+
+/**
+ * Create 1entry style item
+ * focus out
+ * @return a pointer to Setting_GenGroupItem_Data
+ */
+Setting_GenGroupItem_Data *setting_create_Gendial_field_entry_fo(
+ Evas_Object * genlist,
+ const Elm_Genlist_Item_Class *itc,
+ setting_call_back_func gl_sel,
+ void *sel_data,
+ SWALLOW_Type swallow_type,
+ char *l_icon_path,
+ char *r_icon_path,
+ int chk_status,
+ const char *keyStr,
+ char *sub_desc,
+ setting_call_back_func chk_change_cb,
+ setting_call_back_func chk_focus_out_cb,
+ Elm_Input_Panel_Layout input_type,
+ bool isPasswordFlag,
+ bool isFocusFlag,
+ int max_char_count,
+ int max_byte_count,
+ char *accepted,
+ char *rejected)
+{
+ /* SETTING_TRACE_BEGIN; */
+ Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data *) calloc(1, sizeof (Setting_GenGroupItem_Data));
+ setting_retvm_if(!item_data, NULL, "calloc failed");
+ item_data->keyStr = (char *)g_strdup(keyStr);
+ item_data->sub_desc = (char *)g_strdup(sub_desc);
+ item_data->swallow_type = swallow_type;
+ item_data->l_swallow_path = (char *)g_strdup(l_icon_path);
+ item_data->r_swallow_path = (char *)g_strdup(r_icon_path);
+ item_data->chk_status = chk_status;
+ item_data->chk_change_cb = chk_change_cb;
+ item_data->stop_change_cb = chk_focus_out_cb;
+ item_data->isSinglelineFlag = true;
+ //setting_call_back_func chk_focus_out_cb,
+
item_data->input_type = input_type;
item_data->isPasswordFlag = isPasswordFlag;
item_data->isFocusFlag = isFocusFlag;