From c83350c141a8e341a19ed2f37d7bd907ca912566 Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Wed, 16 Mar 2011 08:29:13 +0000 Subject: [PATCH] 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 --- src/modules/conf_theme/e_int_config_theme.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/conf_theme/e_int_config_theme.c b/src/modules/conf_theme/e_int_config_theme.c index d00d5f474..67985c830 100644 --- a/src/modules/conf_theme/e_int_config_theme.c +++ b/src/modules/conf_theme/e_int_config_theme.c @@ -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)