From 2403355e486ac6bc972fd150d38e3c44d086960a Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Tue, 22 Mar 2005 20:29:00 +0000 Subject: Added type attribute to element to facilitate menu-editing. (v0.91) --- menu/ChangeLog | 5 +++++ menu/menu-spec.xml | 56 ++++++++++++++++++++++++++++++++++++++++++++++-------- menu/menu.dtd | 2 ++ 3 files changed, 55 insertions(+), 8 deletions(-) (limited to 'menu') diff --git a/menu/ChangeLog b/menu/ChangeLog index 04a5209..c4ff5a5 100644 --- a/menu/ChangeLog +++ b/menu/ChangeLog @@ -1,3 +1,8 @@ +2005-03-22 Waldo Bastian + + * menu-spec.xml, menu.dtd: Added type attribute to + element to facilitate menu-editing. + 2005-02-24 Waldo Bastian * menu-spec.xml: Fixed links to www.freedesktop.org diff --git a/menu/menu-spec.xml b/menu/menu-spec.xml index 4a96308..b61063e 100644 --- a/menu/menu-spec.xml +++ b/menu/menu-spec.xml @@ -4,8 +4,8 @@
Desktop Menu Specification - Version 0.9 - 8 December 2004 + Version 0.91 + 15 March 2005 Waldo @@ -613,25 +613,65 @@ entries: Categories, - <MergeFile> + <MergeFile [type="path"|"parent"] > Any number of <MergeFile> elements may be listed below a <Menu> element, giving the name of another menu file to - be merged into this one. + be merged into this one. specifies how merging is done. The root <Menu> of the merged file will be merged into the immediate parent of the <MergeFile> element. The <Name> element of the - root <Menu> of the merged file are ignored. If the - filename given as a <MergeFile> is not an absolute path, - it should be located relative to the location of the menu file - being parsed. + root <Menu> of the merged file are ignored. + + + If the type attribute is missing or set to "path" then the + contents of the <MergeFile> element indicates the + file to be merged. If this is not an absolute path then the + file to be merged should be located relative to the location + of the menu file that contains this <MergeFile> element. Duplicate <MergeFile> elements (that specify the same file) are handled as with duplicate <AppDir> elements (the last duplicate is used). + + If the type attribute is set to "parent" and the file that + contains this <MergeFile> element is located under one + of the paths specified by $XDG_CONFIG_DIRS, + the contents of the element should be ignored and the remaining + paths specified by $XDG_CONFIG_DIRS are + searched for a file with the same relative filename. The first + file encountered should be merged. There should be no + merging at all if no matching file is found. + + + Compatibility note: The filename specified inside the <MergeFile> + element should be ignored if the type attribute is set to "parent", + it should however be expected that implementations based on + previous versions of this specification will ignore the + type attribute and that such implementations will use the + filename inside the <MergeFile> element instead. + + + Example 1: If $XDG_CONFIG_HOME is "~/.config/" and + $XDG_CONFIG_DIRS is "/opt/gnome/:/etc/xdg/" + and the file ~/.config/menus/applications.menu contains + <MergeFile type="parent">/opt/kde3/etc/xdg/menus/applications.menu</MergeFile> + then the file /opt/gnome/menus/applications.menu + should be merged if it exists. If that file does not exists + then the file /etc/xdg/menus/applications.menu + should be merged instead. + + + Example 2: If $XDG_CONFIG_HOME is "~/.config/" and + $XDG_CONFIG_DIRS is "/opt/gnome/:/etc/xdg/" + and the file /opt/gnome/menus/applications.menu contains + <MergeFile type="parent">/opt/kde3/etc/xdg/menus/applications.menu</MergeFile> + then the file /etc/xdg/menus/applications.menu should be merged + if it exists. + diff --git a/menu/menu.dtd b/menu/menu.dtd index 5793017..1bca3ed 100644 --- a/menu/menu.dtd +++ b/menu/menu.dtd @@ -39,6 +39,8 @@ + + -- cgit v1.2.3-70-g09d2