E17: When searching for an icon in the fdo theme, if we do not find it

in the current theme, check some fallback icon themes (so there is
less chance of a menu item having no icon).



SVN revision: 59314
This commit is contained in:
Christopher Michael 2011-05-11 05:06:08 +00:00
parent bf0920a753
commit 4fb22f6eb3
1 changed files with 17 additions and 0 deletions

View File

@ -450,8 +450,25 @@ _e_util_icon_fdo_set(Evas_Object *obj, const char *icon)
size = e_icon_scale_size_get(obj);
if (size < 16) size = 16;
size = e_util_icon_size_normalize(size * e_scale);
path = efreet_icon_path_find(e_config->icon_theme, icon, size);
if (!path)
{
path = efreet_icon_path_find("default", icon, size);
if (!path)
{
path = efreet_icon_path_find("hicolor", icon, size);
if (!path)
{
path = efreet_icon_path_find("gnome", icon, size);
if (!path)
path = efreet_icon_path_find("Human", icon, size);
}
}
}
if (!path) return 0;
e_icon_file_set(obj, path);
return 1;
}