summaryrefslogtreecommitdiff
path: root/src/lib/efl
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-09-07 12:05:24 +0900
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-09-07 12:36:48 +0900
commit743f52a05ba3c5985d9660cec09a4fcc43c55900 (patch)
treef438c12a0c5fb3aabc2887b3761944990adf5014 /src/lib/efl
parent25444568192d5cd5228311f47ecaf9a5abc9fc8d (diff)
efl: Make models 0-based index, not 1-based
Diffstat (limited to 'src/lib/efl')
-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 ()
71 [[Get children slice OR full range. 71 [[Get children slice OR full range.
72 72
73 children_slice_get behaves in two different ways, it may 73 children_slice_get behaves in two different ways, it may
74 provide the slice if both $start AND $count are non-zero 74 provide the slice if $count is non-zero
75 OR full range otherwise. 75 OR full range otherwise.
76 76
77 Since 'slice' is a range, for example if we have 20 childs a 77 Since 'slice' is a range, for example if we have 20 childs a
78 slice could be the range from 3(start) to 4(count), see: 78 slice could be the range from 3(start) with 4(count), see:
79 79
80 child 0 [no] 80 child 0 [no]
81 child 1 [no] 81 child 1 [no]
82 child 2 [yes] 82 child 2 [no]
83 child 3 [yes] 83 child 3 [yes]
84 child 4 [yes] 84 child 4 [yes]
85 child 5 [yes] 85 child 5 [yes]
86 child 6 [no] 86 child 6 [yes]
87 child 7 [no] 87 child 7 [no]
88 88
89 Optionally the user can call children_count_get to know the 89 Optionally the user can call children_count_get to know the
@@ -94,9 +94,8 @@ interface Efl.Model ()
94 @since 1.14 94 @since 1.14
95 ]] 95 ]]
96 params { 96 params {
97 @in start: uint; [[Range begin - start from here. If start and 97 @in start: uint; [[Range begin - start from here.]]
98 count are 0 slice is ignored.]] 98 @in count: uint; [[Range size. If count is 0, start is
99 @in count: uint; [[Range size. If count and start are 0 slice is
100 ignored.]] 99 ignored.]]
101 } 100 }
102 return: future<accessor<Efl.Object> >; [[Future of the children]] 101 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)
70 70
71 Eo *child; 71 Eo *child;
72 Eina_List *l, *ln, *lr = NULL; 72 Eina_List *l, *ln, *lr = NULL;
73 ln = eina_list_nth_list(list, (start-1)); 73 ln = eina_list_nth_list(list, (start));
74 if (!ln) 74 if (!ln)
75 { 75 {
76 return NULL; 76 return NULL;