Enlightenment CVS committal Author : lok Project : e17 Module : proto
Dir : e17/proto/etk/src/lib Modified Files: etk_combobox.c etk_combobox.h Log Message: [Etk_Combobox] etk_combobox_active_item_nth_get added. =================================================================== RCS file: /cvs/e/e17/proto/etk/src/lib/etk_combobox.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- etk_combobox.c 4 Sep 2006 12:51:42 -0000 1.28 +++ etk_combobox.c 11 Sep 2006 13:45:08 -0000 1.29 @@ -322,6 +322,29 @@ } /** + * @brief Gets the index of the current active item of the combobox + * @param combobox a combobox + * @return Returns the index of the current active item + */ +int etk_combobox_active_item_nth_get(Etk_Combobox *combobox) +{ + Evas_List *list; + int i = 0; + + if (!combobox) + return -1; + + list = evas_list_find_list(combobox->items, combobox->active_item); + while (list) + { + list = evas_list_next(list); + i++; + } + + return evas_list_count(combobox->items) - i; +} + +/** * @brief Gets the nth item of the combobox * @param combobox a combobox * @param index the index of the item to get =================================================================== RCS file: /cvs/e/e17/proto/etk/src/lib/etk_combobox.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- etk_combobox.h 24 Aug 2006 18:09:16 -0000 1.11 +++ etk_combobox.h 11 Sep 2006 13:45:08 -0000 1.12 @@ -117,6 +117,7 @@ void etk_combobox_active_item_set(Etk_Combobox *combobox, Etk_Combobox_Item *item); Etk_Combobox_Item *etk_combobox_active_item_get(Etk_Combobox *combobox); +int etk_combobox_active_item_nth_get(Etk_Combobox *combobox); Etk_Combobox_Item *etk_combobox_nth_item_get(Etk_Combobox *combobox, int index); Etk_Combobox_Item *etk_combobox_item_prepend(Etk_Combobox *combobox, ...); ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs