From e1b6bf680dc4d021e7f2122841f812975a31985c Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Fri, 10 Dec 2004 15:50:05 +0000 Subject: make be for entries which don't match any 2004-12-08 Mark McLoughlin * menu-spec.xml: make be for entries which don't match any rule rather than entries which don't appear in any menu. --- menu/ChangeLog | 6 ++++++ menu/menu-spec.xml | 29 ++++++++++++++++------------- 2 files changed, 22 insertions(+), 13 deletions(-) (limited to 'menu') diff --git a/menu/ChangeLog b/menu/ChangeLog index 89a9b2f..2406bf7 100644 --- a/menu/ChangeLog +++ b/menu/ChangeLog @@ -1,3 +1,9 @@ +2004-12-08 Mark McLoughlin + + * menu-spec.xml: make be for entries + which don't match any rule rather than entries + which don't appear in any menu. + 2004-09-03 Mark McLoughlin * menu-spec.xml: minor typo - "This specification adds two diff --git a/menu/menu-spec.xml b/menu/menu-spec.xml index 192d53d..b227535 100644 --- a/menu/menu-spec.xml +++ b/menu/menu-spec.xml @@ -4,8 +4,8 @@
Desktop Menu Specification - Version 0.8 - 9 November 2003 + Version 0.9 + 8 December 2004 Waldo @@ -483,12 +483,13 @@ entries: Categories, To handle <OnlyUnallocated>, the menu file must be analyzed in two conceptual passes. The first pass processes <Menu> elements that can match any desktop entry. During - this pass, each desktop entry is marked according to whether it - was included in some <Menu>. The second pass processes - only <Menu> elements that are restricted to unallocated - desktop entries. During the second pass, queries may only match - desktop entries that were not allocated to some menu during the - first pass. See . + this pass, each desktop entry is marked as allocated according + to whether it was matched by an <Include> rule in some + <Menu>. The second pass processes only <Menu> + elements that are restricted to unallocated desktop entries. + During the second pass, queries may only match desktop entries + that were not marked as allocated during the first pass. + See . @@ -1044,13 +1045,15 @@ entries: Categories, Next, walk through all <Include> and <Exclude> statements. For each <Include>, match the rules against the pool of all desktop entries. For each desktop entry that matches one of the rules, - add it to the menu to be displayed. For each <Exclude>, match - the rules against the currently-included desktop entries. For each - desktop entry that matches, remove it again from the menu. + add it to the menu to be displayed and mark it as having been allocated. + For each <Exclude>, match the rules against the currently-included + desktop entries. For each desktop entry that matches, remove it again + from the menu. - Two passes are necessary, once for regular menus, and - once for <OnlyUnallocated> menus. + Two passes are necessary, once for regular menus where any entry may + be matched, and once for <OnlyUnallocated> menus where only entries + which have not been marked as allocated may be matched. The result is a tree of desktop entries, of course. -- cgit v1.2.3-70-g09d2