From 1a12537dfda76c9773c3c4aaf425c1a5310fd0fa Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Mon, 25 Oct 2010 20:20:41 +0000 Subject: [PATCH] delay deletion of non valid themes We need to delay deletion of non valid themes until all possible search dirs are scanned. In Ubuntu 10.10 XDG_DATA_DIRS lists /usr/local/share before /usr/share, so when searching for hicolor /usr/local/share is dropped as a valid dir although it exists as it does not contain an index.theme file. SVN revision: 53882 --- legacy/efreet/src/lib/efreet_icon.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/legacy/efreet/src/lib/efreet_icon.c b/legacy/efreet/src/lib/efreet_icon.c index f697aed3f1..084554d274 100644 --- a/legacy/efreet/src/lib/efreet_icon.c +++ b/legacy/efreet/src/lib/efreet_icon.c @@ -1283,6 +1283,17 @@ efreet_icon_theme_dir_scan_all(const char *theme_name) } efreet_icon_theme_dir_scan("/usr/share/pixmaps", theme_name); + + /* if we were given a theme name we want to make sure that that given + * theme is valid before finishing, unless it's a fake theme */ + if (theme_name) + { + Efreet_Icon_Theme *theme; + + theme = eina_hash_find(efreet_icon_themes, theme_name); + if (theme && !theme->valid && !theme->fake) + eina_hash_del(efreet_icon_themes, theme_name, theme); + } } /** @@ -1351,17 +1362,6 @@ efreet_icon_theme_dir_scan(const char *search_dir, const char *theme_name) } error: closedir(dirs); - - /* if we were given a theme name we want to make sure that that given - * theme is valid before finishing, unless it's a fake theme */ - if (theme_name) - { - Efreet_Icon_Theme *theme; - - theme = eina_hash_find(efreet_icon_themes, theme_name); - if (theme && !theme->valid && !theme->fake) - eina_hash_del(efreet_icon_themes, theme_name, theme); - } } /**