[glib] glocalfileinfo: don't special-case directory icons



commit 8c78fb827b51aa6e48fa20bac3f1ede4c699dd43
Author: Lars Uebernickel <lars uebernic de>
Date:   Mon Mar 10 19:46:23 2014 +0100

    glocalfileinfo: don't special-case directory icons
    
    As of e6af432, g_content_type_get_symbolic_icon() returns non-symbolic
    fallbacks. Thus, we can't append another symbolic icon to the fallbacks.
    
    The special case was a bit of a hack anyway. It was only applied to
    themed icons and there was no generic fallback for mime types that are
    not folders.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726046

 gio/glocalfileinfo.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index f3b565b..52e3df1 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -1639,7 +1639,6 @@ get_icon_name (const char *path,
 static GIcon *
 get_icon (const char *path,
           const char *content_type,
-          gboolean    is_folder,
           gboolean    use_symbolic)
 {
   GIcon *icon = NULL;
@@ -1660,11 +1659,6 @@ get_icon (const char *path,
         icon = g_content_type_get_symbolic_icon (content_type);
       else
         icon = g_content_type_get_icon (content_type);
-
-      if (G_IS_THEMED_ICON (icon) && is_folder)
-        {
-          g_themed_icon_append_name (G_THEMED_ICON (icon), use_symbolic ? "folder-symbolic" : "folder");
-        }
     }
 
   return icon;
@@ -1852,7 +1846,7 @@ _g_local_file_info_get (const char             *basename,
              GIcon *icon;
 
               /* non symbolic icon */
-              icon = get_icon (path, content_type, S_ISDIR (statbuf.st_mode), FALSE);
+              icon = get_icon (path, content_type, FALSE);
               if (icon != NULL)
                 {
                   g_file_info_set_icon (info, icon);
@@ -1860,7 +1854,7 @@ _g_local_file_info_get (const char             *basename,
                 }
 
               /* symbolic icon */
-              icon = get_icon (path, content_type, S_ISDIR (statbuf.st_mode), TRUE);
+              icon = get_icon (path, content_type, TRUE);
               if (icon != NULL)
                 {
                   g_file_info_set_symbolic_icon (info, icon);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]