static Eina_Bool _hash_keys(Eina_Hash *hash, const char *key, void *list);
static void ef_icon_theme_themes_find(const char *search_dir,
Eina_Hash *themes);
-static void ef_icons_find(Efreet_Icon_Theme *theme, Eina_List *themes,
- Eina_Hash *icons);
+static void ef_icons_find(Efreet_Icon_Theme *theme, Eina_Hash *icons);
static void ef_read_dir(const char *dir, Eina_Hash *icons);
int
int i, ret = 1;
Eina_Hash *icon_hash;
Efreet_Icon_Theme *theme;
- Eina_List *themes;
- Eina_List *l;
-
- themes = efreet_icon_theme_list_get();
- EINA_LIST_FOREACH(themes, l, theme)
- {
- if (!strcmp(theme->name.internal, THEME))
- break;
- }
-
- if (!theme)
- {
- printf("Theme not installed, SKIPPED.\n");
- while (themes)
- themes = eina_list_remove_list(themes, themes);
- return 1;
- }
+ theme = efreet_icon_theme_find(THEME);
icon_hash = eina_hash_string_superfast_new(free);
- ef_icons_find(theme, themes, icon_hash);
- while (themes)
- themes = eina_list_remove_list(themes, themes);
+ ef_icons_find(theme, icon_hash);
double start = ecore_time_get();
for (i = 0; system_icons[i]; i++)
}
static void
-ef_icons_find(Efreet_Icon_Theme *theme, Eina_List *themes, Eina_Hash *icons)
+ef_icons_find(Efreet_Icon_Theme *theme, Eina_Hash *icons)
{
Eina_List *l, *ll;
char path[PATH_MAX];
EINA_LIST_FOREACH(theme->inherits, l, parent)
{
- EINA_LIST_FOREACH(themes, ll, parent_theme)
- {
- if (!strcmp(parent_theme->name.internal, parent))
- ef_icons_find(parent_theme, themes, icons);
- }
+ parent_theme = efreet_icon_theme_find(parent);
+ if (parent_theme)
+ ef_icons_find(parent_theme, icons);
}
}
- else
+ else if (strcmp(theme->name.internal, "hicolor"))
{
Efreet_Icon_Theme *parent_theme;
- EINA_LIST_FOREACH(themes, l, parent_theme)
- {
- if (!strcmp(parent_theme->name.internal, "hicolor"))
- ef_icons_find(parent_theme, themes, icons);
- }
+ parent_theme = efreet_icon_theme_find("hicolor");
+ if (parent_theme)
+ ef_icons_find(parent_theme, icons);
}
ef_read_dir("/usr/share/pixmaps", icons);