fix icon finding for evry mime types
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 13 Dec 2012 10:34:52 +0000 (10:34 +0000)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 13 Dec 2012 10:34:52 +0000 (10:34 +0000)
ticket #1988

SVN revision: 80810

src/modules/everything/evry_util.c

index ddb45d0..f0072b3 100644 (file)
@@ -430,8 +430,14 @@ evry_icon_theme_get(const char *icon, Evas *e)
      }
    else if (!e_util_icon_theme_set(o, icon))
      {
-        evas_object_del(o);
-        o = NULL;
+        char grp[1024];
+
+        snprintf(grp, sizeof(grp), "fileman/mime/%s", icon);
+        if (!e_util_icon_theme_set(o, grp))
+          {
+             evas_object_del(o);
+             o = NULL;
+          }
      }
 
    return o;
@@ -491,7 +497,7 @@ evry_util_icon_get(Evry_Item *it, Evas *e)
           {
              icon = efreet_mime_type_icon_get(file->mime, e_config->icon_theme, 128);
              /* XXX can do _ref ?*/
-             if ((o = evry_icon_theme_get(icon, e)))
+             if ((o = evry_icon_theme_get(icon, e)) || (o = evry_icon_theme_get(file->mime, e)))
                {
                   /* it->icon = eina_stringshare_add(icon); */
                   return o;