diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-03-10 18:29:22 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-03-10 18:34:35 +0900 |
commit | 8b8eb61bde425ec8c7443845445f22b91f840a70 (patch) | |
tree | 4e1c9d38b51357752c011d0c2c8300ab76133cbe | |
parent | 905b707f841c468a654005d9f10c33d5df5f8ae6 (diff) | |
download | elementary-8b8eb61bde425ec8c7443845445f22b91f840a70.tar.gz |
elm - genlist item - index get start from 0 - unbreak api break
so in feb 2015 seoz changed elm_genlist_item_index_get to start from 1
rather than 0. going back to elm code in 1.7 - it started at 0. this
is an api break that shouldn't have happend, but did. this fixes that.
yes - it's inconsistent with gengrid's index_get - but gengrid here is
wrong. nth_get starts at 0. this will get fixed with eo api's, and in
fact none of these index/nth api's should be in genlist's eo api.
legacy only. i can see why this was changed - it matches gengrid and
is more consistent, but we can't break things even if stupid.
@fix
-rw-r--r-- | src/lib/elm_genlist.c | 2 | ||||
-rw-r--r-- | src/lib/elm_genlist_item.eo | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index e55687652..8d263c4bb 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -7062,7 +7062,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 = 1; + int cnt = 0; Elm_Gen_Item *tmp; ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, -1); diff --git a/src/lib/elm_genlist_item.eo b/src/lib/elm_genlist_item.eo index 34a6179ca..fdfb6e527 100644 --- a/src/lib/elm_genlist_item.eo +++ b/src/lib/elm_genlist_item.eo @@ -169,7 +169,7 @@ class Elm_Genlist_Item(Elm_Widget_Item) /*@ Get the index of the item. It is only valid once displayed. - The index start from 1. + The index start from 0. @ingroup Genlist */ |