+ {
+ // type check
+ void* vret = fp(context, cur_node); // draw it
+
+ if (vret)
+ {
+ Setting_GenGroupItem_Data* genlist_node = (Setting_GenGroupItem_Data* )vret;
+ //SETTING_TRACE("add node to Eina List name : %s, id : ", cur_node->name, xmlGetProp(cur_node, "id"));
+ // add it to the hash table create before.
+ // id, object
+ // add list
+ char* key_name = xmlGetProp(cur_node, "id");
+ eina_hash_add(context->ui_list, strdup(key_name),(void*)genlist_node);
+ //context->ui_list= eina_list_append(context->ui_list, genlist_node);
+ }
+ }
+ }
+ __node_walker(context, cur_node->children); /* RECURSIVE */
+ }
+ return 0;
+}
+
+/**
+ * @param id_str [in] "id"
+ * @param value [in] value to be udpated
+ */
+// refer to __expanditem_func_sel_cb
+static int __node_finder(PluginNode* context, xmlNode* cur, char* id_str, char* value)
+{
+ //SETTING_TRACE_BEGIN;
+ xmlNode *cur_node = NULL;
+ for (cur_node = cur; cur_node;cur_node = cur_node->next) {
+ if (cur_node->type == XML_ELEMENT_NODE) {
+
+ //SETTING_TRACE("node type : Element, name=%s id=%s", cur_node->name,xmlGetProp(cur_node, "id"));
+ char* id_name = (char*)xmlGetProp(cur_node, "id");
+ if ( id_name && 0 == strcmp(id_str, id_name))
+ {
+ SETTING_TRACE("FOUND >>>> %s", id_name);
+ // cur_node - update xml code
+ xmlAttrPtr newattr = xmlSetProp(cur_node, "value", value);
+
+ //-----------------------------------------------------------
+ // UI UPDATE
+ // case : slider
+ if ( 0 == strcmp (cur_node->name, "integer"))
+ {
+ SETTING_TRACE(">>>>> UPDATE SLIDER CONTROL %x --- %s ",context->ui_list, id_name);
+ Setting_GenGroupItem_Data* item_to_update = (Setting_GenGroupItem_Data*)eina_hash_find(context->ui_list, id_name);
+ if (item_to_update)
+ {
+ item_to_update->chk_status = atoi(value);
+ SETTING_TRACE(">>> o-------------0 SLIDER VALUE = %d ", item_to_update->chk_status);
+
+ elm_object_item_data_set(item_to_update->item, item_to_update);
+ elm_genlist_item_update(item_to_update->item);
+ } else {
+ SETTING_TRACE("item_to_update is NULL");
+ }
+ }
+ // case : toggle
+ if ( 0 == strcmp (cur_node->name, "bool"))
+ {
+ SETTING_TRACE(">>>>> UPDATE TOGGLE CONTROL %x --- %s ",context->ui_list, id_name);
+ Setting_GenGroupItem_Data* item_to_update = (Setting_GenGroupItem_Data*)eina_hash_find(context->ui_list, id_name);
+ if (item_to_update)
+ {
+ item_to_update->chk_status = atoi(value);
+ SETTING_TRACE(">>> o-------------0 TOGGLE VALUE = %d ", item_to_update->chk_status);
+
+ elm_object_item_data_set(item_to_update->item, item_to_update);
+ elm_genlist_item_update(item_to_update->item);
+ } else {
+ SETTING_TRACE("item_to_update is NULL");
+ }
+ }
+ // case : edit control
+ if ( 0 == strcmp (cur_node->name, "string"))
+ {
+ SETTING_TRACE(">>>>> UPDATE EDIT CONTROL CONTROL %x --- %s ",context->ui_list, id_name);
+ Setting_GenGroupItem_Data* item_to_update = (Setting_GenGroupItem_Data*)eina_hash_find(context->ui_list, id_name);
+ if (item_to_update)
+ {
+ char* old_string = item_to_update->sub_desc;
+ item_to_update->sub_desc = strdup(value);
+ SETTING_TRACE(">>> o-------------0 STRING VALUE = %s ", value);
+
+ // free old string
+
+ elm_object_item_data_set(item_to_update->item, item_to_update);
+ elm_genlist_item_update(item_to_update->item);
+ } else {
+ SETTING_TRACE("item_to_update is NULL");
+ }
+ }
+ // case : expand list
+ // parent
+ // child1
+ // child2
+ // child3
+ // child4
+ //-----------------------------------------------------------
+ if ( 0 == strcmp (cur_node->name, "expandlist"))
+ {
+ SETTING_TRACE(">>>>> UPDATE EXPAND LIST CONTROL %x --- %s ",context->ui_list, id_name);
+ Setting_GenGroupItem_Data* item_to_update = (Setting_GenGroupItem_Data*)eina_hash_find(context->ui_list, id_name);
+ if (item_to_update)
+ {
+ char* old_string = item_to_update->sub_desc;
+ item_to_update->sub_desc = strdup(value);
+ SETTING_TRACE(">>> o-------------0 EXPAND LIST VALUE = %s ", value);
+
+ // free old string
+ elm_object_item_data_set(item_to_update->item, item_to_update);
+ elm_genlist_item_update(item_to_update->item);
+ } else {
+ SETTING_TRACE("item_to_update is NULL");
+ }
+ }
+ }