Menu spec: ordering inlined items

Vincent Untz vuntz at gnome.org
Sat May 17 08:03:32 PDT 2008


Hi,

I'm trying to fix a bug in gnome-menus, and it seems to me there's a
underdefined part in the spec when it comes to inlining items in a
layout.

Let's suppose we have this menu structure without inlining:

 MenuA -> SubmenuA1 -> ...
          SubmenuA2 -> ...
          ItemA1
          ItemA2
 MenuB -> ...
 Item1
 Item2

Now suppose MenuA gets inlined and that we have <Merge type="menus">
<Merge type="files"> in the layout.

Not really clear in the spec, but I guess the right thing to do is

MenuB -> ...
SubmenuA1 -> ...
SubmenuA2 -> ...
Item1
Item2
ItemA1
ItemA2

(and sort with alphabetical order, of course)

Then let's suppose we inline MenuA with a header. What looks the most
logical to me is this:

HeaderA
SubmenuA1 -> ...
SubmenuA2 -> ...
ItemA1
ItemA2
MenuB -> ...
Item1
Item2

However, there's a kind of conflict between the way we handle the header
and the inline elements, and the order of the merge we're supposed to
have: we end with ItemA1 before MenuB. But I can't see any other way to
have a header that "works". If everybody is fine with this, we should
probably document it in the spec.

Another related question (if the solution I proposed looks right): when
sorting the items, how do we handle headers? I guess it makes sense to
sort them with the menus (so you could have MenuB, HeaderA or HeaderA,
MenuB depending on the names of the header and menu).

Vincent

-- 
Les gens heureux ne sont pas pressés.


More information about the xdg mailing list