return TRUE;
}
+typedef struct {
+ int state;
+ Setting_GenGroupItem_Data* obj;
+} HashArgs;
-static void ___click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info)
+static Eina_Bool _plugin_foreach_cb_check_editfield(const Eina_Hash *hash, const void*key, void* data, void* fdata)
+{
+
+ HashArgs* pret = (HashArgs*)fdata;
+ //int* pret = (int*)fdata;
+
+ Setting_GenGroupItem_Data* node = (Setting_GenGroupItem_Data*) data;
+ //SETTING_TRACE("%s --- %s ", (char*)key, node->keyStr);
+
+ if (node->keyStr && !strcmp(node->keyStr, "string"))
+ {
+ // focus check
+ if (elm_object_focus_get(node->eo_check))
+ {
+ SETTING_TRACE("FOCUS SET !!! ");
+ pret->state = 1;
+ pret->obj= node;
+ return EINA_FALSE;
+ } else {
+ SETTING_TRACE("FOCUS UN -- SET !!! ");
+ pret->state = 0;
+ }
+ }
+
+ return EINA_TRUE;
+}
+
+int setting_plugin_is_editfield_exist(PluginNode* context)
+{
+ int ret = 0;
+ HashArgs arg;
+ arg.state = 0;
+ arg.obj = NULL;
+
+ if (context->ui_list) {
+ eina_hash_foreach(context->ui_list,_plugin_foreach_cb_check_editfield, &arg);
+ }
+ SETTING_TRACE("%d -- (%x)", arg.state, arg.obj);
+
+ if (arg.state )
+ {
+ ret = 0;
+
+ Setting_GenGroupItem_Data* list_item = arg.obj;
+ int min_length = list_item->minlength;
+ //int entry_len = safeStrLen(entry_str_utf8);
+ int entry_len = safeStrLen(list_item->sub_desc);
+ SETTING_TRACE(" >>> entry _ len : %d ", entry_len);
+
+ if ( entry_len < min_length)
+ {
+ if (!list_item->notify) {
+ SETTING_TRACE("notify 1");
+ list_item->notify = setting_create_popup_without_btn(list_item, list_item->win_main,
+ NULL, _(EXCEED_MINLENGTH_LIMITATION_STR),
+ __error_popup_response_cb,
+ POPUP_INTERVAL, FALSE, FALSE);
+ elm_object_focus_set(list_item->eo_check, EINA_FALSE);
+ } else {
+ SETTING_TRACE("notify 0 ");
+ //postpone 2 seconds again
+ elm_popup_timeout_set(list_item->notify, POPUP_INTERVAL);
+ }
+ //elm_object_focus_set(obj, EINA_TRUE);
+
+ ret = 1;
+ }
+ }
+
+ return ret;
+}
+
+
+
+
+static Eina_Bool ___click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info)
{
SETTING_TRACE_BEGIN;
ret_if(!data);
PluginNode* node = (PluginNode*)data;
Draw_Data *pd = node->pd;
+ int is_stop = setting_plugin_is_editfield_exist(node);
+ if (is_stop)
+ return EINA_FALSE;
+ // continue
+
static int work = 0;
if (work == 0)
//pd->root = NULL;
#endif
+ // check callback -----------------------------------------
+
+ //---------------------------------------------------------
+
// ug --> destroy
if(ug)
{
}
work = 0;
}
+ return EINA_TRUE;
}
SETTING_TRACE_BEGIN;
retm_if(!data || !obj, "Data parameter is NULL");
+ //-------------------------------------------------------------------------------------------
+ Evas_Object *entry_container = data;
+ //whe entry unfocused, its guidetext will becomes "Input here"
+ elm_object_part_text_set(entry_container, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT"));
+ if (elm_entry_is_empty(obj))
+ elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm");
+ elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm");
+ //-------------------------------------------------------------------------------------------
+
+
setting_hide_input_pannel_cb(obj);
const char *entry_str = elm_entry_entry_get(obj);
char *entry_str_utf8 = NULL;
int min_length = list_item->minlength;
int entry_len = safeStrLen(entry_str_utf8);
+ SETTING_TRACE(" >>> entry _ len : %d ", entry_len);
+
if (entry_len < min_length) {
if (!list_item->notify) {
//postpone 2 seconds again
elm_popup_timeout_set(list_item->notify, POPUP_INTERVAL);
}
- elm_object_focus_set(obj, EINA_TRUE);
+ // elm_object_focus_set(obj, EINA_TRUE);
return;
}