From 8d0301505ad5320a88a667e0420938c159ab7bba Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Tue, 6 Dec 2011 01:23:55 +0000 Subject: [PATCH] elm genlist/gengrid: Added documentation. Fixed documentation. Fixed formatting. SVN revision: 65931 --- legacy/elementary/src/lib/elm_gengrid.c | 8 ++++---- legacy/elementary/src/lib/elm_genlist.c | 14 +++++++------- legacy/elementary/src/lib/elm_genlist.h | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/legacy/elementary/src/lib/elm_gengrid.c b/legacy/elementary/src/lib/elm_gengrid.c index e0d16e7cba..2b35fb9dcf 100644 --- a/legacy/elementary/src/lib/elm_gengrid.c +++ b/legacy/elementary/src/lib/elm_gengrid.c @@ -159,10 +159,10 @@ static const Evas_Smart_Cb_Description _signals[] = { }; 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) { if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; Evas_Event_Key_Down *ev = event_info; diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c index d3e4bd9c3b..9abd13d328 100644 --- a/legacy/elementary/src/lib/elm_genlist.c +++ b/legacy/elementary/src/lib/elm_genlist.c @@ -1329,7 +1329,7 @@ _mouse_up(void *data, Elm_Gen_Item *it2; EINA_LIST_FOREACH_SAFE(it->wd->selected, l, l_next, it2) - if (it2 != it) + if (it2 != it) { _item_unhighlight(it2); _item_unselect(it2); @@ -2972,7 +2972,7 @@ _item_auto_scroll(Widget_Data *wd) if (wd->expanded_item->item->scrl_y > (oh + oy) / 2) { EINA_LIST_FOREACH(wd->expanded_item->item->items, l, it) - elm_genlist_item_bring_in(it); + elm_genlist_item_bring_in(it); } wd->auto_scroll_enabled = EINA_FALSE; } @@ -3290,12 +3290,12 @@ newblock: { /* NOTE: for a strange reason eina_list and eina_inlist don't have the same property on sorted insertion order, so the queue is not always ordered like the item list. - This lead to issue where we depend on a item that is not yet created. As a quick + This lead to issue where we depend on an item that is not yet created. As a quick work around, we reschedule the calc of the item and stop reordering the list to prevent any nasty issue to show up here. */ wd->queue = eina_list_append(wd->queue, it); - wd->requeue = EINA_TRUE; + wd->requeued = EINA_TRUE; it->item->queued = EINA_TRUE; return EINA_FALSE; } @@ -3483,7 +3483,7 @@ _item_queue(Widget_Data *wd, { if (it->item->queued) return; it->item->queued = EINA_TRUE; - if (cb && !wd->requeue) + if (cb && !wd->requeued) wd->queue = eina_list_sorted_insert(wd->queue, cb, it); else wd->queue = eina_list_append(wd->queue, it); @@ -3781,7 +3781,7 @@ elm_genlist_item_direct_sorted_insert(Evas_Object *obj, { wd->state = eina_inlist_sorted_state_new(); eina_inlist_sorted_state_init(wd->state, wd->items); - wd->requeue = EINA_FALSE; + wd->requeued = EINA_FALSE; } if (it->group) @@ -3817,7 +3817,7 @@ EAPI Elm_Gen_Item * elm_genlist_item_sorted_insert(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, - Elm_Gen_Item *parent, + Elm_Gen_Item *parent, Elm_Genlist_Item_Flags flags, Eina_Compare_Cb comp, Evas_Smart_Cb func, diff --git a/legacy/elementary/src/lib/elm_genlist.h b/legacy/elementary/src/lib/elm_genlist.h index e8432d93d5..f22c84e2a9 100644 --- a/legacy/elementary/src/lib/elm_genlist.h +++ b/legacy/elementary/src/lib/elm_genlist.h @@ -133,6 +133,7 @@ struct _Widget_Data Eina_Bool reorder_pan_move : 1; Eina_Bool auto_scroll_enabled : 1; Eina_Bool pan_resized : 1; + Eina_Bool requeued : 1; /* this is set to EINA_TRUE when the item is re-queued. this happens when the item is un-queued but the rel item is still in the queue. this item will be processed later. */ struct { Evas_Coord x, y; @@ -147,7 +148,6 @@ struct _Widget_Data Eina_Compare_Cb item_compare_cb; Eina_Compare_Cb item_compare_data_cb; - Eina_Bool requeue : 1; /* The stuff below directly come from gengrid without any thinking */ unsigned int nmax;