From f35b6dfbc7a2b6ee622c6ddc37d465350de24a36 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Fri, 3 Sep 2010 17:54:01 +0000 Subject: [PATCH] Fix Ticket # 568: Interrogating contents of ilist may return incorrect response. Check if the we still have not processed the queue, if so return the que list count (as this is the number of items we are adding anyway). If the queue has been processed already, then return the normal e_ilist_count. SVN revision: 51866 --- src/bin/e_widget_ilist.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/bin/e_widget_ilist.c b/src/bin/e_widget_ilist.c index 1289b5369..c52f7b5b4 100644 --- a/src/bin/e_widget_ilist.c +++ b/src/bin/e_widget_ilist.c @@ -9,14 +9,16 @@ struct _E_Widget_Data Evas_Object *o_widget, *o_scrollframe, *o_ilist; Eina_List *callbacks; char **value; - struct { - Eina_List *queue; - Ecore_Timer *timer; - int count; - int show_nth; - int select_nth; - } queue; + struct + { + Eina_List *queue; + Ecore_Timer *timer; + int count; + int show_nth; + int select_nth; + } queue; }; + struct _E_Widget_Callback { void (*func) (void *data); @@ -508,7 +510,10 @@ e_widget_ilist_count(Evas_Object *obj) E_Widget_Data *wd; wd = e_widget_data_get(obj); - return e_ilist_count(wd->o_ilist); + if (wd->queue.queue) + return eina_list_count(wd->queue.queue); + else + return e_ilist_count(wd->o_ilist); } EAPI Eina_List *