From 3dba7ec43491cd83fe3e0b31776049af76a9c7df Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Wed, 10 Oct 2012 20:28:55 +0000 Subject: [PATCH] efreet: find icons with all extension If there are icons in inherited themes which have not already found extensions, add these as alternatives. SVN revision: 77800 --- .../efreet/src/bin/efreet_icon_cache_create.c | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/legacy/efreet/src/bin/efreet_icon_cache_create.c b/legacy/efreet/src/bin/efreet_icon_cache_create.c index c1d9d9e18d..b77a8ce70b 100644 --- a/legacy/efreet/src/bin/efreet_icon_cache_create.c +++ b/legacy/efreet/src/bin/efreet_icon_cache_create.c @@ -247,8 +247,27 @@ cache_scan_path_dir(Efreet_Icon_Theme *theme, } else if (icon->theme && strcmp(icon->theme, theme->name.internal)) { + const char *ext2; + int has_ext = 0; + unsigned int j; + /* Check if we already has this extension */ + for (i = 0; i < icon->icons_count; ++i) + { + for (j = 0; j < icon->icons[i]->paths_count; ++j) + { + ext2 = strrchr(icon->icons[i]->paths[j], '.'); + if (ext2) + { + ext2++; + has_ext = !strcmp((ext + 1), ext2); + if (has_ext) break; + } + } + if (has_ext) break; + } /* We got this icon from a parent theme */ - continue; + if (has_ext) + continue; } /* find if we have the same icon in another type */