[gnome-menus] gmenu-tree: Respect Exclude for allocations
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-menus] gmenu-tree: Respect Exclude for allocations
- Date: Tue, 30 Apr 2013 05:49:08 +0000 (UTC)
commit f0d35aba1e1aa8a30d6a3ccd0fdfe8385f346d19
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Apr 30 01:02:41 2013 -0400
gmenu-tree: Respect Exclude for allocations
If a menu explicitly excludes a desktop file, it shouldn't count
as being allocated in that menu. This effectively makes the set
equal to entries, so just use that instead of duplicating the work.
libmenu/gmenu-tree.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/libmenu/gmenu-tree.c b/libmenu/gmenu-tree.c
index 091a719..5e70e3e 100644
--- a/libmenu/gmenu-tree.c
+++ b/libmenu/gmenu-tree.c
@@ -3413,7 +3413,6 @@ process_layout (GMenuTree *tree,
GMenuTreeDirectory *directory;
DesktopEntrySet *entry_pool;
DesktopEntrySet *entries;
- DesktopEntrySet *allocated_set;
DesktopEntrySet *excluded_set;
gboolean deleted;
gboolean only_unallocated;
@@ -3432,7 +3431,6 @@ process_layout (GMenuTree *tree,
only_unallocated = FALSE;
entries = desktop_entry_set_new ();
- allocated_set = desktop_entry_set_new ();
if (tree->flags & GMENU_TREE_FLAGS_INCLUDE_EXCLUDED)
excluded_set = desktop_entry_set_new ();
@@ -3485,7 +3483,6 @@ process_layout (GMenuTree *tree,
if (rule_set != NULL)
{
desktop_entry_set_union (entries, rule_set);
- desktop_entry_set_union (allocated_set, rule_set);
if (excluded_set != NULL)
desktop_entry_set_subtract (excluded_set, rule_set);
desktop_entry_set_unref (rule_set);
@@ -3609,9 +3606,7 @@ process_layout (GMenuTree *tree,
directory->only_unallocated = only_unallocated;
if (!directory->only_unallocated)
- desktop_entry_set_union (allocated, allocated_set);
-
- desktop_entry_set_unref (allocated_set);
+ desktop_entry_set_union (allocated, entries);
if (directory->directory_entry)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]