Bug 528320 - Incorrect icons displayed for files with custom mimetype
authorAlexander Larsson <alexl@redhat.com>
Thu, 23 Oct 2008 09:10:01 +0000 (09:10 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Thu, 23 Oct 2008 09:10:01 +0000 (09:10 +0000)
2008-10-23  Alexander Larsson  <alexl@redhat.com>

Bug 528320 - Incorrect icons displayed for files with custom mimetype icons

        * glocalfileinfo.c:
        (_g_local_file_info_get):
Don't return the fallback icon (text-x-generic) for all files.
This is causing problems with theme icon lookup and custom mime
icons, as the generic fallback overrides custom mime icons in
inherited themes.

This is a slight change as applications might not get an icon wher
they previously did. But there is no guarantee to get on neither before
or after this change, so it should not break applications. Changes
to nautilus and gtk+ will be done to manually use the generic fallback
icon if no icon is found, but this is only required for rare cases.

svn path=/trunk/; revision=7620

gio/ChangeLog
gio/glocalfileinfo.c

index 7e7978bf58ba0fa2d186ad39efd5324e42395378..a7f3f3adab0a8a0132fe1f50c4b2ca0212b6c880 100644 (file)
@@ -1,3 +1,20 @@
+2008-10-23  Alexander Larsson  <alexl@redhat.com>
+
+       Bug 528320 - Incorrect icons displayed for files with custom mimetype icons
+       
+        * glocalfileinfo.c:
+        (_g_local_file_info_get):
+       Don't return the fallback icon (text-x-generic) for all files.
+       This is causing problems with theme icon lookup and custom mime
+       icons, as the generic fallback overrides custom mime icons in
+       inherited themes.
+
+       This is a slight change as applications might not get an icon wher
+       they previously did. But there is no guarantee to get on neither before
+       or after this change, so it should not break applications. Changes
+       to nautilus and gtk+ will be done to manually use the generic fallback
+       icon if no icon is found, but this is only required for rare cases.
+
 2008-10-21  Alexander Larsson  <alexl@redhat.com>
 
         * gfileinfo.h:
index 0c38e17c46de8a676b7a94f5dbdddbfcc3f12206..60d4686a231ae64469a6a29a81cef19fdaf426d2 100644 (file)
@@ -1577,12 +1577,8 @@ _g_local_file_info_get (const char             *basename,
 
                       if (S_ISDIR (statbuf.st_mode)) 
                         type_icon = "folder";
-                      else if (statbuf.st_mode & S_IXUSR)
-                        type_icon = "application-x-executable";
-                      else
-                        type_icon = "text-x-generic";
-
-                      g_themed_icon_append_name (G_THEMED_ICON (icon), type_icon);
+                      if (type_icon)
+                        g_themed_icon_append_name (G_THEMED_ICON (icon), type_icon);
                     }
                 }