e17:conf_theme: get ilist count first. it's expensive you know. this would have workaround the issue with infinite loop/no reaction on clear all items.

SVN revision: 57790
This commit is contained in:
Hannes Janetzek 2011-03-16 08:29:13 +00:00
parent a1ad9a0f81
commit c83350c141
1 changed files with 6 additions and 3 deletions

View File

@ -970,16 +970,19 @@ _cb_adv_btn_clearall(void *data1, void *data2 __UNUSED__)
E_Config_Theme *t;
Eina_List *themes;
Evas_Object *oc = NULL, *of = NULL;
int n;
int n, cnt;
if (!(cfdata = data1)) return;
if (!(oc = cfdata->o_categories_ilist)) return;
if (!(of = cfdata->o_files_ilist)) return;
for (n = 0; n < e_widget_ilist_count(oc); n++)
cnt = e_widget_ilist_count(oc);
for (n = 0; n < cnt; n++)
e_widget_ilist_nth_icon_set(oc, n, NULL);
for (n = 0; n < e_widget_ilist_count(of); n++)
cnt = e_widget_ilist_count(of);
for (n = 0; n < cnt; n++)
e_widget_ilist_nth_icon_set(of, n, NULL);
EINA_LIST_FOREACH(cfdata->theme_list, themes, t)