summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2019-04-02 16:29:11 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2019-04-02 16:34:31 +0900
commitf652bf932837846c5911c26992196213780394df (patch)
tree380ffc4dfae7269cf12f6cabd7b973098dbd7ad7 /src/bin
parentd2eebb6f5faebc76a1a13494fd0721e8d63af410 (diff)
Revert "test/efl_ui_pager: fix demo"
This reverts commit d3bb1a7342b2725c585d90557926e0c433058e50. The commit is reverted to revert the following commits. 74c48f029632d2260816b4cb3de6dbb40a29f040 913a5bff66dd7a58753ccae1474657ec33350e43 The above commits will be restored after release and then d3bb1a7342b2725c585d90557926e0c433058e50 will be also restored.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/elementary/test_ui_pager.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/bin/elementary/test_ui_pager.c b/src/bin/elementary/test_ui_pager.c
index 32bc1d775a..78fb1b598e 100644
--- a/src/bin/elementary/test_ui_pager.c
+++ b/src/bin/elementary/test_ui_pager.c
@@ -36,8 +36,7 @@ typedef enum _Pack_Type {
36 PACK_BEFORE, 36 PACK_BEFORE,
37 PACK_AFTER, 37 PACK_AFTER,
38 PACK_AT, 38 PACK_AT,
39 UNPACK_AT, 39 UNPACK_AT
40 CLEAR
41} Pack_Type; 40} Pack_Type;
42 41
43typedef struct _Params { 42typedef struct _Params {
@@ -219,7 +218,7 @@ static void pack_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
219 Eo *page = NULL, *curr_page; 218 Eo *page = NULL, *curr_page;
220 int index, cnt; 219 int index, cnt;
221 220
222 if ((param->type != UNPACK_AT) && (param->type != CLEAR)) { 221 if (param->type != UNPACK_AT) {
223 index = efl_content_count(pager); 222 index = efl_content_count(pager);
224 223
225 switch (index % 3) { 224 switch (index % 3) {
@@ -261,12 +260,10 @@ static void pack_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
261 break; 260 break;
262 case UNPACK_AT: 261 case UNPACK_AT:
263 index = efl_ui_range_value_get(param->unpack_sp); 262 index = efl_ui_range_value_get(param->unpack_sp);
264 page = efl_pack_unpack_at(pager, index); 263 page = efl_pack_content_get(pager, index);
264 efl_pack_unpack(pager, page);
265 efl_del(page); 265 efl_del(page);
266 break; 266 break;
267 case CLEAR:
268 efl_pack_clear(pager);
269 break;
270 } 267 }
271 268
272 cnt = efl_content_count(pager); 269 cnt = efl_content_count(pager);
@@ -590,25 +587,6 @@ static void pack_cb(void *data,
590 efl_pack_end(box, in_box2); 587 efl_pack_end(box, in_box2);
591 efl_pack_end(in_box2, btn); 588 efl_pack_end(in_box2, btn);
592 efl_pack_end(in_box2, sp2); 589 efl_pack_end(in_box2, sp2);
593
594 // Clear
595 pack_param = calloc(1, sizeof(Pack_Params));
596 if (!pack_param) return;
597
598 pack_param->pager = pager;
599 pack_param->pack_sp = sp1;
600 pack_param->unpack_sp = sp2;
601 pack_param->unpack_btn = btn;
602 pack_param->type = CLEAR;
603
604 efl_add(EFL_UI_BUTTON_CLASS, box,
605 efl_text_set(efl_added, "Clear"),
606 efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
607 pack_btn_cb, pack_param),
608 efl_event_callback_add(efl_added, EFL_EVENT_DEL,
609 pack_btn_del_cb, pack_param),
610 efl_pack_end(box, efl_added));
611
612} 590}
613 591
614static void current_page_cb(void *data, 592static void current_page_cb(void *data,