[Xfce4-commits] <thunar:master> Show NoDisplay=true applications (bug #9595).

Nick Schermer noreply at xfce.org
Wed Dec 5 18:36:01 CET 2012


Updating branch refs/heads/master
         to 6b5c1c908b60965825407fb4557d024514a4f89a (commit)
       from 460ef9a3d3f73f28836ee36ffc2899f04f8eeb7d (commit)

commit 6b5c1c908b60965825407fb4557d024514a4f89a
Author: Nick Schermer <nick at xfce.org>
Date:   Wed Dec 5 18:34:38 2012 +0100

    Show NoDisplay=true applications (bug #9595).
    
    See http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html

 thunar/thunar-chooser-button.c |    1 -
 thunar/thunar-gio-extensions.c |   19 +++++--------------
 2 files changed, 5 insertions(+), 15 deletions(-)

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;


More information about the Xfce4-commits mailing list