[Xfce4-commits] <xfce4-panel:devel> Skip invalid or hidden .desktop files in directories.
Nick Schermer
noreply at xfce.org
Sun Feb 14 23:06:06 CET 2010
Updating branch refs/heads/devel
to 84120bebbe6abc1a8aca848ef021aa973ecb55fd (commit)
from 965118bf7a03dca836d481b29d551501301f4d74 (commit)
commit 84120bebbe6abc1a8aca848ef021aa973ecb55fd
Author: Nick Schermer <nick at xfce.org>
Date: Sun Feb 14 23:05:29 2010 +0100
Skip invalid or hidden .desktop files in directories.
plugins/directorymenu/directorymenu.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/plugins/directorymenu/directorymenu.c b/plugins/directorymenu/directorymenu.c
index f1c3d3e..8b065fb 100644
--- a/plugins/directorymenu/directorymenu.c
+++ b/plugins/directorymenu/directorymenu.c
@@ -859,6 +859,16 @@ directory_menu_plugin_menu_load (GtkWidget *menu,
{
display_name = g_app_info_get_name (G_APP_INFO (desktopinfo));
icon = g_app_info_get_icon (G_APP_INFO (desktopinfo));
+
+ /* ignore invalid or hidden files */
+ if (exo_str_is_empty (display_name)
+ || g_desktop_app_info_get_is_hidden (desktopinfo))
+ {
+ g_object_unref (G_OBJECT (desktopinfo));
+ g_object_unref (G_OBJECT (info));
+ g_object_unref (G_OBJECT (file));
+ continue;
+ }
}
}
#endif
More information about the Xfce4-commits
mailing list