From 6b5c1c908b60965825407fb4557d024514a4f89a Mon Sep 17 00:00:00 2001 From: Nick Schermer Date: Wed, 05 Dec 2012 17:34:38 +0000 Subject: Show NoDisplay=true applications (bug #9595). See http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html --- diff --git a/thunar/thunar-chooser-button.c b/thunar/thunar-chooser-button.c index f7ae355..f2993b8 100644 --- a/thunar/thunar-chooser-button.c +++ b/thunar/thunar-chooser-button.c @@ -453,7 +453,6 @@ thunar_chooser_button_file_changed (ThunarChooserButton *chooser_button, /* add all possible applications */ for (lp = app_infos, i = 0; lp != NULL; lp = lp->next, ++i) { - /* skip infos that have NoDisplay or OnlyShowIn set */ if (thunar_g_app_info_should_show (lp->data)) { /* insert the item into the store */ diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c index d77f72a..1b9026a 100644 --- a/thunar/thunar-gio-extensions.c +++ b/thunar/thunar-gio-extensions.c @@ -569,26 +569,17 @@ gboolean thunar_g_app_info_should_show (GAppInfo *info) { #ifdef HAVE_GIO_UNIX - const gchar *filename; - _thunar_return_val_if_fail (G_IS_APP_INFO (info), FALSE); - /* check if NoDesktop is set or OnlyShowIn is set but - * does not contain XFCE */ - if (g_app_info_should_show (info)) - return TRUE; - if (G_IS_DESKTOP_APP_INFO (info)) { - /* show custom command from the user directory, this to not - * exclude custom commands */ - filename = g_desktop_app_info_get_filename (G_DESKTOP_APP_INFO (info)); - if (filename != NULL - && g_str_has_prefix (filename, g_get_user_data_dir ())) - return TRUE; + /* NoDisplay=true files should be visible in the interface, + * because this key is intent to hide mime-helpers from the + * application menu. Hidden=true is never returned by GIO. */ + return g_desktop_app_info_get_show_in (G_DESKTOP_APP_INFO (info), NULL); } - return FALSE; + return TRUE; #else /* we cannot exclude custom actions, so show everything */ return TRUE; -- cgit v0.9.0.3