forked from enlightenment/efl
genlist: Fix elm_genlist_item_index_get.
The first item's index is 1 not 0. @fix
This commit is contained in:
parent
2fdfbd5aac
commit
a3200cc02c
|
@ -211,7 +211,8 @@ Eina_Bool gl_state_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, con
|
|||
static void
|
||||
gl_sel(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
printf("sel item data [%p] on genlist obj [%p], item pointer [%p]\n", data, obj, event_info);
|
||||
printf("sel item data [%p] on genlist obj [%p], item pointer [%p], index [%d]\n",
|
||||
data, obj, event_info, elm_genlist_item_index_get(event_info));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -7037,7 +7037,7 @@ elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *eo_it)
|
|||
EOLIAN static int
|
||||
_elm_genlist_item_index_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
|
||||
{
|
||||
int cnt = 0;
|
||||
int cnt = 1;
|
||||
Elm_Gen_Item *tmp;
|
||||
ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, -1);
|
||||
|
||||
|
|
|
@ -169,6 +169,8 @@ class Elm_Genlist_Item(Elm_Widget_Item)
|
|||
/*@
|
||||
Get the index of the item. It is only valid once displayed.
|
||||
|
||||
The index start from 1.
|
||||
|
||||
@ingroup Genlist
|
||||
*/
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue