From b5d9e659981f84b90bc5e6896d53066272fd28b8 Mon Sep 17 00:00:00 2001 From: Alexander Schwinn Date: Wed, 1 May 2019 23:24:39 +0200 Subject: [PATCH] Hiding filename/extention for .desktop files with execute permission. (Bug #13329) --- thunar/thunar-file.c | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index d9147aa7..2bac0b2b 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -973,7 +973,6 @@ thunar_file_info_reload (ThunarFile *file, const gchar *target_uri; GKeyFile *key_file; gchar *p; - const gchar *display_name; gboolean is_secure = FALSE; gchar *casefold; gchar *path; @@ -1043,48 +1042,13 @@ thunar_file_info_reload (ThunarFile *file, *p = '\0'; } } - - /* read the display name from the .desktop file (will be overwritten later - * if it's undefined here) */ - file->display_name = g_key_file_get_locale_string (key_file, - G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_NAME, - NULL, NULL); - - /* drop the name if it's empty or has invalid encoding */ - if (exo_str_is_empty (file->display_name) - || !g_utf8_validate (file->display_name, -1, NULL)) - { - g_free (file->display_name); - file->display_name = NULL; - } - /* free the key file */ g_key_file_free (key_file); } } - /* determine the display name */ if (file->display_name == NULL) - { - if (G_UNLIKELY (thunar_g_file_is_trash (file->gfile))) - file->display_name = g_strdup (_("Trash")); - else if (G_LIKELY (file->info != NULL)) - { - display_name = g_file_info_get_display_name (file->info); - if (G_LIKELY (display_name != NULL)) - { - if (strcmp (display_name, "/") == 0) - file->display_name = g_strdup (_("File System")); - else - file->display_name = g_strdup (display_name); - } - } - - /* fall back to a name for the gfile */ - if (file->display_name == NULL) - file->display_name = thunar_g_file_get_display_name (file->gfile); - } + file->display_name = thunar_g_file_get_display_name (file->gfile); /* create case sensitive collation key */ file->collate_key = g_utf8_collate_key_for_filename (file->display_name, -1); -- 2.11.0