summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-03-10 18:29:22 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-03-10 18:29:22 +0900
commit22eefc9626e15e78612396a9c7adca89ffc228e2 (patch)
tree5a50e6e2de8b0c1ca80c43e92fa49ef8335b3027
parent61c1d27c78c8b8a4b53c78290f920f7d2eff9019 (diff)
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.c2
-rw-r--r--src/lib/elm_genlist_item.eo2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 9bb7c7952..3573492e1 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -7333,7 +7333,7 @@ elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *eo_it)
7333EOLIAN static int 7333EOLIAN static int
7334_elm_genlist_item_index_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it) 7334_elm_genlist_item_index_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
7335{ 7335{
7336 int cnt = 1; 7336 int cnt = 0;
7337 Elm_Gen_Item *tmp; 7337 Elm_Gen_Item *tmp;
7338 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, -1); 7338 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, -1);
7339 7339
diff --git a/src/lib/elm_genlist_item.eo b/src/lib/elm_genlist_item.eo
index 5a966c0af..e8fd4d5e9 100644
--- a/src/lib/elm_genlist_item.eo
+++ b/src/lib/elm_genlist_item.eo
@@ -170,7 +170,7 @@ class Elm.Genlist_Item(Elm.Widget_Item)
170 get { 170 get {
171 [[Get the index of the item. It is only valid once displayed. 171 [[Get the index of the item. It is only valid once displayed.
172 172
173 The index start from 1. 173 The index start from 0.
174 ]] 174 ]]
175 } 175 }
176 values { 176 values {