Elementary slideshow: Fixed warnings, fixed spacing and removed unnecessary blank lines.

SVN revision: 58826
This commit is contained in:
Daniel Juyung Seo 2011-04-22 12:06:00 +00:00
parent 71bc736a6f
commit 929052b111
1 changed files with 5 additions and 18 deletions

View File

@ -74,8 +74,6 @@ static const Evas_Smart_Cb_Description _signals[] = {
{NULL, NULL} {NULL, NULL}
}; };
static Eina_Bool static Eina_Bool
_event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type type, void *event_info) _event_hook(Evas_Object *obj, Evas_Object *src __UNUSED__, Evas_Callback_Type type, void *event_info)
{ {
@ -185,7 +183,7 @@ static Elm_Slideshow_Item* _item_prev_get(Elm_Slideshow_Item* item)
{ {
Widget_Data *wd = elm_widget_data_get(item->base.widget); Widget_Data *wd = elm_widget_data_get(item->base.widget);
Elm_Slideshow_Item* prev = eina_list_data_get(eina_list_prev(item->l)); Elm_Slideshow_Item* prev = eina_list_data_get(eina_list_prev(item->l));
if((!prev) && (wd->loop)) if ((!prev) && (wd->loop))
prev = eina_list_data_get(eina_list_last(item->l)); prev = eina_list_data_get(eina_list_last(item->l));
return prev; return prev;
} }
@ -194,12 +192,11 @@ static Elm_Slideshow_Item* _item_next_get(Elm_Slideshow_Item* item)
{ {
Widget_Data *wd = elm_widget_data_get(item->base.widget); Widget_Data *wd = elm_widget_data_get(item->base.widget);
Elm_Slideshow_Item* next = eina_list_data_get(eina_list_next(item->l)); Elm_Slideshow_Item* next = eina_list_data_get(eina_list_next(item->l));
if((!next) && (wd->loop)) if ((!next) && (wd->loop))
next = eina_list_data_get(wd->items); next = eina_list_data_get(wd->items);
return next; return next;
} }
static void static void
_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) _changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{ {
@ -289,12 +286,12 @@ _item_realize(Elm_Slideshow_Item *item)
//delete unused items //delete unused items
lc = wd->count_item_pre_before + wd->count_item_pre_after + 1; lc = wd->count_item_pre_before + wd->count_item_pre_after + 1;
while (eina_list_count(wd->items_built) > lc) while ((int)eina_list_count(wd->items_built) > lc)
{ {
item = eina_list_data_get(wd->items_built); item = eina_list_data_get(wd->items_built);
wd->items_built = eina_list_remove_list(wd->items_built, wd->items_built = eina_list_remove_list(wd->items_built,
wd->items_built); wd->items_built);
if(item->itc->func.del) if (item->itc->func.del)
item->itc->func.del((void*)item->base.data, item->base.view); item->itc->func.del((void*)item->base.data, item->base.view);
evas_object_del(item->base.view); evas_object_del(item->base.view);
item->base.view = NULL; item->base.view = NULL;
@ -309,7 +306,7 @@ _end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, c
if (!wd) return; if (!wd) return;
item = wd->previous; item = wd->previous;
if(item) if (item)
{ {
edje_object_part_unswallow(NULL, item->base.view); edje_object_part_unswallow(NULL, item->base.view);
evas_object_hide(item->base.view); evas_object_hide(item->base.view);
@ -328,7 +325,6 @@ _end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, c
edje_object_part_swallow(wd->slideshow, "elm.swallow.1", item->base.view); edje_object_part_swallow(wd->slideshow, "elm.swallow.1", item->base.view);
} }
static Eina_Bool static Eina_Bool
_timer_cb(void *data) _timer_cb(void *data)
{ {
@ -340,8 +336,6 @@ _timer_cb(void *data)
return ECORE_CALLBACK_CANCEL; return ECORE_CALLBACK_CANCEL;
} }
/** /**
* Add a new slideshow to the parent * Add a new slideshow to the parent
* *
@ -758,7 +752,6 @@ elm_slideshow_clear(Evas_Object *obj)
} }
} }
/** /**
* Delete the item * Delete the item
* *
@ -810,7 +803,6 @@ elm_slideshow_items_get(const Evas_Object *obj)
return wd->items; return wd->items;
} }
/** /**
* Returns the current item displayed * Returns the current item displayed
* *
@ -875,8 +867,6 @@ elm_slideshow_cache_before_get(const Evas_Object *obj)
return wd->count_item_pre_before; return wd->count_item_pre_before;
} }
/** /**
* Set max amount of cached items before current * Set max amount of cached items before current
* *
@ -912,8 +902,6 @@ elm_slideshow_cache_after_get(const Evas_Object *obj)
return wd->count_item_pre_after; return wd->count_item_pre_after;
} }
/** /**
* Set max amount of cached items after current * Set max amount of cached items after current
* *
@ -931,4 +919,3 @@ elm_slideshow_cache_after_set(Evas_Object *obj, int count)
if (count < 0) count = 0; if (count < 0) count = 0;
wd->count_item_pre_after = count; wd->count_item_pre_after = count;
} }