summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJiwon Kim <jwkim0000@gmail.com>2017-03-02 15:36:00 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-03-02 16:43:47 +0900
commite6a1e456cb3ca7587bd7c1c2dc822af035bf6f42 (patch)
tree61316a34a603cf43ecc304f026cb03f02a58e4c8 /src/lib/elementary
parent9f535a3f3c3dfae6abff50a4472b6422cfaa7b2e (diff)
genlist: Remove weird behavior about item_show, bring_in
Summary: When if item_show / bring_in is proceeded as 'deferred_show' sequence, Scrollto_Type does not be checked perfectly. As a result, ELM_GENLIST_ITEM_SCROLLTO_NONE and any other integer values are worked such as ELM_GENLIST_ITEM_SCROLLTO_BRING_IN. As doxygen of Elm_Genlist_Item_Scrollto_Type, ELM_GENLIST_ITEM_SCROLLTO_NONE and other incorrect number should not work. Fixes T4854 @fix Reviewers: SanghyeonLee, woohyun, jpeg Reviewed By: jpeg Subscribers: id213sin, conr2d, cedric Maniphest Tasks: T4854 Differential Revision: https://phab.enlightenment.org/D4684
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/elm_genlist.c11
-rw-r--r--src/lib/elementary/elm_genlist_item.eo4
2 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 09a9c7abe8..7b3e284440 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -7094,6 +7094,17 @@ _elm_genlist_item_coordinates_calc(Elm_Gen_Item *it,
7094 7094
7095 Eina_Bool deferred_show = EINA_FALSE; 7095 Eina_Bool deferred_show = EINA_FALSE;
7096 7096
7097 switch (type)
7098 {
7099 case ELM_GENLIST_ITEM_SCROLLTO_IN:
7100 case ELM_GENLIST_ITEM_SCROLLTO_TOP:
7101 case ELM_GENLIST_ITEM_SCROLLTO_MIDDLE:
7102 case ELM_GENLIST_ITEM_SCROLLTO_BOTTOM:
7103 break;
7104 default: /* Filters unsupported type */
7105 return EINA_FALSE;
7106 }
7107
7097 //Can't goto the item right now. Reserve it instead. 7108 //Can't goto the item right now. Reserve it instead.
7098 if (sd->queue || !(sd->homogeneous && (sd->mode == ELM_LIST_COMPRESS))) 7109 if (sd->queue || !(sd->homogeneous && (sd->mode == ELM_LIST_COMPRESS)))
7099 { 7110 {
diff --git a/src/lib/elementary/elm_genlist_item.eo b/src/lib/elementary/elm_genlist_item.eo
index a0830b8c5e..0ecd147430 100644
--- a/src/lib/elementary/elm_genlist_item.eo
+++ b/src/lib/elementary/elm_genlist_item.eo
@@ -29,7 +29,7 @@ enum Elm.Genlist.Item.Scrollto_Type
29{ 29{
30 [[Defines where to position the item in the genlist.]] 30 [[Defines where to position the item in the genlist.]]
31 legacy: elm_genlist_item_scrollto; 31 legacy: elm_genlist_item_scrollto;
32 none = 0, [[No scrollto.]] 32 none = 0, [[Nothing will happen, Don't use this value.]]
33 in = (1 << 0), [[To the nearest viewport.]] 33 in = (1 << 0), [[To the nearest viewport.]]
34 top = (1 << 1), [[To the top of viewport.]] 34 top = (1 << 1), [[To the top of viewport.]]
35 middle = (1 << 2), [[To the middle of viewport.]] 35 middle = (1 << 2), [[To the middle of viewport.]]
@@ -50,7 +50,7 @@ class Elm.Genlist.Item(Elm.Widget.Item)
50 50
51 This returns the item placed before the $item, on 51 This returns the item placed before the $item, on
52 the container genlist. 52 the container genlist.
53 53
54 If filter is set on genlist, this returns the filtered 54 If filter is set on genlist, this returns the filtered
55 item placed before $item in the list. 55 item placed before $item in the list.
56 ]] 56 ]]