aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-07-19 17:22:27 -0300
committerLarry Jr <larry.olj@gmail.com>2017-07-27 17:31:47 -0300
commit496a17a20381f4428be6b8dd1b12664a3e73380d (patch)
tree718daf50041c8c6de705e9f2c74e5290566b48f5
parentEio Model fixed children count in initialized children model (diff)
downloadefl-496a17a20381f4428be6b8dd1b12664a3e73380d.tar.gz
efl: Modify documentation in efl model so slice is 0-based, not 1-based
-rw-r--r--src/lib/efl/interfaces/efl_model.eo13
-rw-r--r--src/lib/efl/interfaces/efl_model_common.c2
2 files changed, 7 insertions, 8 deletions
diff --git a/src/lib/efl/interfaces/efl_model.eo b/src/lib/efl/interfaces/efl_model.eo
index 411194542f..e95a099155 100644
--- a/src/lib/efl/interfaces/efl_model.eo
+++ b/src/lib/efl/interfaces/efl_model.eo
@@ -71,19 +71,19 @@ interface Efl.Model ()
[[Get children slice OR full range.
children_slice_get behaves in two different ways, it may
- provide the slice if both $start AND $count are non-zero
+ provide the slice if $count is non-zero
OR full range otherwise.
Since 'slice' is a range, for example if we have 20 childs a
- slice could be the range from 3(start) to 4(count), see:
+ slice could be the range from 3(start) with 4(count), see:
child 0 [no]
child 1 [no]
- child 2 [yes]
+ child 2 [no]
child 3 [yes]
child 4 [yes]
child 5 [yes]
- child 6 [no]
+ child 6 [yes]
child 7 [no]
Optionally the user can call children_count_get to know the
@@ -94,9 +94,8 @@ interface Efl.Model ()
@since 1.14
]]
params {
- @in start: uint; [[Range begin - start from here. If start and
- count are 0 slice is ignored.]]
- @in count: uint; [[Range size. If count and start are 0 slice is
+ @in start: uint; [[Range begin - start from here.]]
+ @in count: uint; [[Range size. If count is 0, start is
ignored.]]
}
return: future<accessor<Efl.Object> >; [[Future of the children]]
diff --git a/src/lib/efl/interfaces/efl_model_common.c b/src/lib/efl/interfaces/efl_model_common.c
index 07134d8bff..6bf825819f 100644
--- a/src/lib/efl/interfaces/efl_model_common.c
+++ b/src/lib/efl/interfaces/efl_model_common.c
@@ -70,7 +70,7 @@ efl_model_list_slice(Eina_List *list, unsigned start, unsigned count)
Eo *child;
Eina_List *l, *ln, *lr = NULL;
- ln = eina_list_nth_list(list, (start-1));
+ ln = eina_list_nth_list(list, (start));
if (!ln)
{
return NULL;