diff options
author | Jaehyun Cho <jae_hyun.cho@samsung.com> | 2019-07-31 09:16:51 +0000 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2019-07-31 12:21:06 +0200 |
commit | b218dcbc3f874672fde32cbfca414c39598a8689 (patch) | |
tree | 4386c0ffd5c277b080e1ebab6e364d3e0455924c /src/lib | |
parent | 8dbdcff3cb1e544682eb6c5be6d9ecab618619e4 (diff) |
efl_ui_spotlight: pop() unpacks content although there is one content
Previously, pop() does not unpack content if there is one content.
Now, pop() unpacks content without transition if there is one content.
Since there is no transition, NULL future is returned.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9450
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/elementary/efl_ui_spotlight_container.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_spotlight_container.c b/src/lib/elementary/efl_ui_spotlight_container.c index 45afd99b1b..10c8125709 100644 --- a/src/lib/elementary/efl_ui_spotlight_container.c +++ b/src/lib/elementary/efl_ui_spotlight_container.c | |||
@@ -677,16 +677,40 @@ EOLIAN static Eina_Future* | |||
677 | _efl_ui_spotlight_container_pop(Eo *obj, Efl_Ui_Spotlight_Container_Data *pd, Eina_Bool del) | 677 | _efl_ui_spotlight_container_pop(Eo *obj, Efl_Ui_Spotlight_Container_Data *pd, Eina_Bool del) |
678 | { | 678 | { |
679 | Eina_Future *transition_done; | 679 | Eina_Future *transition_done; |
680 | Eina_Value v; | ||
680 | int new_index; | 681 | int new_index; |
682 | int count; | ||
683 | Eo *content; | ||
681 | 684 | ||
682 | if (eina_list_count(pd->content_list) < 2) | 685 | count = (int)eina_list_count(pd->content_list); |
683 | new_index = -1; | 686 | |
687 | if (count == 0) return NULL; | ||
688 | |||
689 | content = efl_pack_content_get(obj, efl_ui_spotlight_active_index_get(obj)); | ||
690 | |||
691 | //pop() unpacks content without transition if there is one content. | ||
692 | if (count == 1) | ||
693 | { | ||
694 | efl_pack_unpack(obj, content); | ||
695 | pd->curr.page = -1; | ||
696 | |||
697 | if (del) | ||
698 | { | ||
699 | efl_del(content); | ||
700 | v = EINA_VALUE_EMPTY; | ||
701 | } | ||
702 | else | ||
703 | { | ||
704 | v = eina_value_object_init(content); | ||
705 | } | ||
706 | return efl_loop_future_resolved(obj, v); | ||
707 | } | ||
684 | 708 | ||
685 | new_index = efl_ui_spotlight_active_index_get(obj) + 1; | 709 | new_index = efl_ui_spotlight_active_index_get(obj) + 1; |
686 | if (new_index >= (int)eina_list_count(pd->content_list)) | 710 | if (new_index >= count) |
687 | new_index -= 2; | 711 | new_index -= 2; |
688 | 712 | ||
689 | pd->transition_done.content = efl_pack_content_get(obj, efl_ui_spotlight_active_index_get(obj)); | 713 | pd->transition_done.content = content; |
690 | pd->transition_done.transition_done = efl_loop_promise_new(obj); | 714 | pd->transition_done.transition_done = efl_loop_promise_new(obj); |
691 | 715 | ||
692 | transition_done = eina_future_new(pd->transition_done.transition_done); | 716 | transition_done = eina_future_new(pd->transition_done.transition_done); |