[Xfce4-commits] <xfce4-appfinder:master> Avoid a single category if the root menu has a directory.
Nick Schermer
noreply at xfce.org
Sun Apr 22 18:06:01 CEST 2012
Updating branch refs/heads/master
to 26389aea18ab966dc960429b9b6c89fb68269a97 (commit)
from 1407f1b1330e93de9defd44045304af6a53137c2 (commit)
commit 26389aea18ab966dc960429b9b6c89fb68269a97
Author: Nick Schermer <nick at xfce.org>
Date: Sun Apr 22 18:04:01 2012 +0200
Avoid a single category if the root menu has a directory.
src/appfinder-model.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/appfinder-model.c b/src/appfinder-model.c
index aaf3a7d..79a4966 100644
--- a/src/appfinder-model.c
+++ b/src/appfinder-model.c
@@ -1333,8 +1333,12 @@ xfce_appfinder_model_collect_items (GarconMenu *menu,
if (!garcon_menu_directory_get_visible (directory))
return FALSE;
- /* this way we only have two levels */
- if (category == NULL)
+ /* this way we only have 1 level of categories, but
+ * skip the directory of the root menu because in some
+ * menu files (gnome-menus for example) this puts
+ * everything under "Applications" */
+ if (category == NULL
+ && garcon_menu_get_parent (menu) != NULL)
category = directory;
}
More information about the Xfce4-commits
mailing list