E17: When searching for an icon in the fdo theme, if we do not find it
authorChristopher Michael <cpmichael1@comcast.net>
Wed, 11 May 2011 05:06:08 +0000 (05:06 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Wed, 11 May 2011 05:06:08 +0000 (05:06 +0000)
in the current theme, check some fallback icon themes (so there is
less chance of a menu item having no icon).

SVN revision: 59314

src/bin/e_utils.c

index e17c00d..36c154f 100644 (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;
 }