From 1a8119c04561f32b4be42a81761454de321924b7 Mon Sep 17 00:00:00 2001 From: yoz Date: Tue, 10 May 2011 08:38:02 +0000 Subject: [PATCH] elementary: fix slideshow with loop attribute set to false git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@59307 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_slideshow.c | 68 +++++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/src/lib/elm_slideshow.c b/src/lib/elm_slideshow.c index 5b638cd..073ff39 100644 --- a/src/lib/elm_slideshow.c +++ b/src/lib/elm_slideshow.c @@ -241,46 +241,54 @@ _item_realize(Elm_Slideshow_Item *item) { --ac; --lc; - _item_next = _item_next_get(_item_next); - if ((_item_next) - && (!_item_next->base.view) - && (_item_next->itc->func.get)) + if (_item_next) { - _item_next->base.view = - _item_next->itc->func.get((void*)_item_next->base.data, - obj); - evas_object_smart_member_add(_item_next->base.view, obj); - _item_next->l_built = eina_list_append(NULL, _item_next); - wd->items_built = eina_list_merge(wd->items_built, - _item_next->l_built); - evas_object_hide(_item_next->base.view); + _item_next = _item_next_get(_item_next); + if ((_item_next) + && (!_item_next->base.view) + && (_item_next->itc->func.get)) + { + _item_next->base.view = + _item_next->itc->func.get( + (void*)_item_next->base.data, obj); + evas_object_smart_member_add(_item_next->base.view, obj); + _item_next->l_built = eina_list_append(NULL, _item_next); + wd->items_built = eina_list_merge(wd->items_built, + _item_next->l_built); + evas_object_hide(_item_next->base.view); + } + else if (_item_next && _item_next->l_built) + wd->items_built = + eina_list_demote_list(wd->items_built, + _item_next->l_built); } - else if (_item_next && _item_next->l_built) - wd->items_built = eina_list_demote_list(wd->items_built, - _item_next->l_built); } if (lc > 0 && bc > 0) { --bc; --lc; - _item_prev = _item_prev_get(_item_prev); - if ((_item_prev) - && (!_item_prev->base.view) - && (_item_prev->itc->func.get)) + if (_item_prev) { - _item_prev->base.view = - _item_prev->itc->func.get((void*)_item_prev->base.data, - obj); - evas_object_smart_member_add(_item_prev->base.view, obj); - _item_prev->l_built = eina_list_append(NULL, _item_prev); - wd->items_built = eina_list_merge(wd->items_built, - _item_prev->l_built); - evas_object_hide(_item_prev->base.view); + _item_prev = _item_prev_get(_item_prev); + if ((_item_prev) + && (!_item_prev->base.view) + && (_item_prev->itc->func.get)) + { + _item_prev->base.view = + _item_prev->itc->func.get( + (void*)_item_prev->base.data, obj); + evas_object_smart_member_add(_item_prev->base.view, obj); + _item_prev->l_built = eina_list_append(NULL, _item_prev); + wd->items_built = eina_list_merge(wd->items_built, + _item_prev->l_built); + evas_object_hide(_item_prev->base.view); + } + else if (_item_prev && _item_prev->l_built) + wd->items_built = + eina_list_demote_list(wd->items_built, + _item_prev->l_built); } - else if (_item_prev && _item_prev->l_built) - wd->items_built = eina_list_demote_list(wd->items_built, - _item_prev->l_built); } } -- 2.7.4