Menu spec: sorting

Waldo Bastian bastian at
Thu Jul 31 14:00:15 EEST 2003

Hash: SHA1

There was a nice thread about menu-sorting and menu-inlining a while ago, see

I don't think it resulted in any actual changes to the spec though.

I think the idea that a sub-menu can be marked as "inline" is a good idea. For 
that we need a single bool entry in the .directory file. Is "showInline" ok 
with everyone? I think the semantics should be "suggestion to inline the 

For the actual sorting we agreed that it was good to have it defined as part 
of the XML file. For that I propose a <Order> element that can be a child of 

Something like:


  <Merge type="menus"/>
  <Merge type="files"/>

There can be only one <Order> element per <Menu>, the last one takes 

Fillenames or Menunames referring to items that are not part of this menu 
should be ignored. 

<Separator> acts as a hint but should not be taken literally. In particular, 
multiple separators in a row should be treated as one and leading or trailing 
separators should be ignored.

The <Merge> type represents the items of this menu that are not explicitly 
mentioned in the <Order> element already and alphabetically sorted on their 
visual title. A <Merge> element can have three types: "menus", "files" or 
"all". An <Order> element must have either:
* exactly one <Merge type="all"> element, or 
* exactly one <Merge type="menus"> and exactly one <Merge type="files">

If no <Order> element is specified for a menu the following default order is 

  <Merge type="menus"/>
  <Merge type="files"/>


Maybe it's nice to be able to specify the default order as well? Something 

  <Merge type="menus"/>
  <Merge type="files"/>

but that also allows for friskyness such as:

  <Merge type="all"/>

Which would make sense if you had a menu-structure like


- -- 
bastian at -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see


More information about the xdg mailing list