summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_pager.c38
1 files changed, 25 insertions, 13 deletions
diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c
index e0e3313906..5aac2e0887 100644
--- a/src/lib/elementary/efl_ui_pager.c
+++ b/src/lib/elementary/efl_ui_pager.c
@@ -503,29 +503,41 @@ _efl_ui_pager_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED,
503} 503}
504 504
505EOLIAN static Eina_Bool 505EOLIAN static Eina_Bool
506_efl_ui_pager_efl_pack_linear_pack_at(Eo *obj EINA_UNUSED, 506_efl_ui_pager_efl_pack_linear_pack_at(Eo *obj,
507 Efl_Ui_Pager_Data *pd, 507 Efl_Ui_Pager_Data *pd,
508 Efl_Gfx_Entity *subobj, 508 Efl_Gfx_Entity *subobj,
509 int index) 509 int index)
510{ 510{
511 if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE; 511 if (!EINA_DBL_EQ(pd->curr.pos, 0.0)) return EINA_FALSE;
512 512
513 Efl_Gfx_Entity *existing = NULL; 513 if (index > pd->cnt)
514 {
515 return EINA_FALSE;
516 }
517 else if (index == pd->cnt)
518 {
519 _efl_ui_pager_efl_pack_linear_pack_end(obj, pd, subobj);
520 }
521 else
522 {
523 Efl_Gfx_Entity *existing = NULL;
514 524
515 existing = eina_list_nth(pd->content_list, index); 525 existing = eina_list_nth(pd->content_list, index);
516 pd->content_list = eina_list_prepend_relative(pd->content_list, subobj, existing); 526 pd->content_list = eina_list_prepend_relative(
527 pd->content_list, subobj, existing);
517 528
518 pd->cnt++; 529 pd->cnt++;
519 if (pd->curr.page >= index) pd->curr.page++; 530 if (pd->curr.page >= index) pd->curr.page++;
520 531
521 if (pd->transition) 532 if (pd->transition)
522 efl_page_transition_update(pd->transition, pd->curr.pos); 533 efl_page_transition_update(pd->transition, pd->curr.pos);
523 else efl_canvas_object_clip_set(subobj, pd->backclip); 534 else efl_canvas_object_clip_set(subobj, pd->backclip);
524 535
525 if (pd->indicator) 536 if (pd->indicator)
526 { 537 {
527 efl_page_indicator_pack(pd->indicator, index); 538 efl_page_indicator_pack(pd->indicator, index);
528 efl_page_indicator_update(pd->indicator, pd->curr.pos); 539 efl_page_indicator_update(pd->indicator, pd->curr.pos);
540 }
529 } 541 }
530 542
531 return EINA_TRUE; 543 return EINA_TRUE;