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:32:48 +0900
commit2321c0f232f980ae11a18c9efd4d7f42e8b6896a (patch)
tree0ea083db5b1ed3425d4928dc858f1c9a0925160c
parent9fe33f1db5be4e15746f5717ba7af2b593a06078 (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 a706bd947..71009803a 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -7254,7 +7254,7 @@ elm_genlist_item_cursor_engine_only_get(const Elm_Object_Item *eo_it)
7254EOLIAN static int 7254EOLIAN static int
7255_elm_genlist_item_index_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it) 7255_elm_genlist_item_index_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
7256{ 7256{
7257 int cnt = 1; 7257 int cnt = 0;
7258 Elm_Gen_Item *tmp; 7258 Elm_Gen_Item *tmp;
7259 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, -1); 7259 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, -1);
7260 7260
diff --git a/src/lib/elm_genlist_item.eo b/src/lib/elm_genlist_item.eo
index ef35ded79..18b5f4bab 100644
--- a/src/lib/elm_genlist_item.eo
+++ b/src/lib/elm_genlist_item.eo
@@ -163,7 +163,7 @@ class Elm.Genlist_Item(Elm.Widget_Item)
163 get { 163 get {
164 [[Get the index of the item. It is only valid once displayed. 164 [[Get the index of the item. It is only valid once displayed.
165 165
166 The index start from 1. 166 The index start from 0.
167 ]] 167 ]]
168 } 168 }
169 values { 169 values {