[Xfce4-commits] <thunar:master> Drop unused check for icons of executables.

Nick Schermer noreply at xfce.org
Sat Nov 10 17:04:06 CET 2012


Updating branch refs/heads/master
         to d01b728e6d0d886497698fdc9da0b138bb95a0f0 (commit)
       from 4d0efd73cd1f3d241fa2b9eb6c9fd2be2acaf8b4 (commit)

commit d01b728e6d0d886497698fdc9da0b138bb95a0f0
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Nov 10 15:52:49 2012 +0100

    Drop unused check for icons of executables.
    
    The icon name is never null, so this pass is useless.

 thunar/thunar-file.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index a99e7bb..3a5710e 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -3392,24 +3392,6 @@ thunar_file_get_icon_name (const ThunarFile   *file,
             icon_name = g_file_get_path (icon_file);
         }
     }
-  
-  if (icon_name == NULL)
-    {
-      /* try to be smart when determining icons for executable files
-       * in that we use the name of the file as icon name (which will
-       * work for quite a lot of binaries, e.g. 'Terminal', 'mousepad',
-       * 'Thunar', 'xfmedia', etc.).
-       */
-      if (G_UNLIKELY (thunar_file_is_executable (file)))
-        {g_message("exect crap");
-          icon_name = g_file_get_basename (file->gfile);
-          if (G_LIKELY (!gtk_icon_theme_has_icon (icon_theme, icon_name)))
-            {
-              g_free (icon_name);
-              icon_name = NULL;
-            }
-        }
-    }
 
   /* check if we have an accept icon for the icon we found */
   if (icon_name != NULL


More information about the Xfce4-commits mailing list