static Ecore_List * _list_keys_order (Ecore_List *keys) { Ecore_List *l; char *key; l = ecore_list_new (); ecore_list_first_goto(keys); while ((key = ecore_list_next(keys))) { char *str; ecore_list_first_goto (l); while ((str = ecore_list_next(l)) && (strcasecmp (key, str) >= 0)) { } if (!str) ecore_list_append (l, key); else { ecore_list_index_goto (l, ecore_list_index (l) - 1); ecore_list_insert (l, key); } } ecore_list_destroy (keys); return l; }
void toc_choicehandler(Evas *e, Evas_Object *parent,int choice, bool lp) { Ecore_List *list=(Ecore_List *)choicebox_get_userdata(e,parent); Epdf_Index_Item *curitem=(Epdf_Index_Item *)ecore_list_index_goto(list,choice); Ecore_List *childlist=epdf_index_item_children_get (curitem); if(!childlist) { Evas_Object *curcb=parent; Evas_Object *nextcb; while((nextcb=choicebox_get_parent(e,curcb))) { fini_choicebox(e,curcb,false); curcb=nextcb; } evas_object_focus_set(curcb,1); goto_page(epdf_index_item_page_get(get_document(),curitem)); } else { TOCDialog(e,parent,childlist); } }