summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Untz <vuntz@gnome.org>2011-12-15 15:02:33 +0100
committerVincent Untz <vuntz@gnome.org>2011-12-15 15:02:33 +0100
commitb4beadb0efba60acfb95fb3036fe9d26b66972cf (patch)
treeccb3c7e87fcf2ca7d241feef0b7297c9dc13824b
parentc1cf441c9797135a9d185fd48441515847b349af (diff)
update-desktop-database: Ignore desktop files with Hidden=true
Those desktop files should be considered as non-existent, according to the spec. https://bugs.freedesktop.org/show_bug.cgi?id=31099
-rw-r--r--src/update-desktop-database.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/update-desktop-database.c b/src/update-desktop-database.c
index 4277fc2..ffc1440 100644
--- a/src/update-desktop-database.c
+++ b/src/update-desktop-database.c
@@ -110,6 +110,13 @@ process_desktop_file (const char *desktop_file,
return;
}
+ /* Hidden=true means that the .desktop file should be completely ignored */
+ if (g_key_file_get_boolean (keyfile, GROUP_DESKTOP_ENTRY, "Hidden", NULL))
+ {
+ g_key_file_free (keyfile);
+ return;
+ }
+
mime_types = g_key_file_get_string_list (keyfile,
GROUP_DESKTOP_ENTRY,
"MimeType", NULL, &load_error);