Hi all, attached patch fixes two issues: (1) If using a non-default prefix, share/pixmaps should be checked before the hard-coded /usr/share/pixmaps fallback. This basically restores symmetry with the other cases like share/icons.
(2) Do a fallback lookup if the theme is not valid or faked. This can happen if only hicolor is installed and e17 decides to use Tango. Before, e.g. gimp's icon wasn't picked up because the short cut was too early. Joerg
$NetBSD$ --- efreet_icon.c.orig 2010-05-18 06:45:13.000000000 +0000 +++ efreet_icon.c @@ -549,14 +549,16 @@ efreet_icon_find_helper(Efreet_Icon_Them efreet_icon_theme_cache_check(theme); - /* go no further if this theme is fake */ - if (theme->fake || !theme->valid) return NULL; /* limit recursion in finding themes and inherited themes to 256 levels */ if (recurse > 256) return NULL; recurse++; - value = efreet_icon_lookup_icon(theme, icon, size); + /* go no further if this theme is fake */ + if (theme->fake || !theme->valid) + value = NULL; + else + value = efreet_icon_lookup_icon(theme, icon, size); /* we didin't find the image check the inherited themes */ if (!value || (value == NON_EXISTING)) @@ -861,6 +863,17 @@ efreet_icon_fallback_icon(const char *ic } } + EINA_LIST_FOREACH(xdg_dirs, l, dir) + { + snprintf(path, PATH_MAX, "%s/pixmaps", dir); + icon = efreet_icon_fallback_dir_scan(path, icon_name); + if (icon) + { + efreet_icon_cache_add(efreet_icon_find_theme_check(NULL), icon_name, 0, icon); + return icon; + } + } + icon = efreet_icon_fallback_dir_scan("/usr/share/pixmaps", icon_name); } @@ -1260,6 +1273,12 @@ efreet_icon_theme_dir_scan_all(const cha efreet_icon_theme_dir_scan(path, theme_name); } + EINA_LIST_FOREACH(xdg_dirs, l, dir) + { + snprintf(path, sizeof(path), "%s/pixmaps", dir); + efreet_icon_theme_dir_scan(path, theme_name); + } + efreet_icon_theme_dir_scan("/usr/share/pixmaps", theme_name); }
------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel