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
This commit is contained in:
Sebastian Dransfeld 2010-10-25 20:20:41 +00:00
parent 9fa3379bf9
commit 1a12537dfd
1 changed files with 11 additions and 11 deletions

View File

@ -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);
}
}
/**