summaryrefslogtreecommitdiff
path: root/extra/thunar/thunar-1.6.0-show-nodisplay-true-applications.patch
blob: d054180b555f9307158e005793512e9f81cf92bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From 6b5c1c908b60965825407fb4557d024514a4f89a Mon Sep 17 00:00:00 2001
From: Nick Schermer <nick@xfce.org>
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