From ec310fc5db9f9694510e323860c8e591c809d5ef Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Thu, 10 Feb 2011 14:26:30 +0000 Subject: [PATCH] Search for theme directly in hash If not found directly in hash, use efreet_cache_icon_theme_find SVN revision: 56916 --- legacy/efreet/src/lib/efreet_cache.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/legacy/efreet/src/lib/efreet_cache.c b/legacy/efreet/src/lib/efreet_cache.c index 7c152f28c4..e7291e1226 100644 --- a/legacy/efreet/src/lib/efreet_cache.c +++ b/legacy/efreet/src/lib/efreet_cache.c @@ -754,10 +754,12 @@ efreet_cache_icon_theme_list(void) { Efreet_Icon_Theme *theme; if (!strncmp(keys[i], "__efreet", 8)) continue; - /* TODO: This could be done more efficient by checking the theme hash - * directly. */ - theme = efreet_cache_icon_theme_find(keys[i]); - if (theme) ret = eina_list_append(ret, theme); + + theme = eina_hash_find(themes, keys[i]); + if (!theme) + theme = efreet_cache_icon_theme_find(keys[i]); + if (theme && theme != NON_EXISTING) + ret = eina_list_append(ret, theme); } free(keys); return ret;