FrapMenu menu/item ordering

Stefan Stuhr xfce4devlist at
Wed Feb 21 21:42:13 CET 2007

ons, 21 02 2007 kl. 21:28 +0100, skrev Jannis Pohlmann:
> On Wed, 21 Feb 2007 20:42:36 +0100, Stefan Stuhr wrote:
> > I will admit that I don't know the menu standard, but if the
> > implementation in GNOME follows the standard (I do believe that it
> > does), then the order does matter - and not necessary a sorted order.
> See below. BTW, what GNOME does is not relevant to me. I think their
> implementation sucks (internally), so I prefere to concentrate on the
> specification itself.
> > E.g. in the GNOME menu editor, alacarte, it's possible to manually
> > move menu items around (be it menu directories/submenus, menu
> > entries, or separators), and place them in a manual, non-sorted order
> > of choice.
> I don't know how they do this, but the spec only mentions alphabetical
> order in relation to menu layouts (which have not been implemented in
> FrapMenu yet).

>From the spec[1]:

        The <Layout> element is an optional part of this specification.
        Implementations that do not support the <Layout> element should
        preserve any <Layout> elements and their contents as far as
        possible. Each <Menu> may optionally contain a <Layout> element.
        If multiple elements appear then only the last such element is
        relevant. The purpose of this element is to offer suggestions
        for the presentation of the menu. If a menu does not contain a
        <Layout> element or if it contains an empty <Layout> element
        then the default layout should be used. The <Layout> element may
        contain <Filename>, <Menuname>, <Separator> and <Merge>
        elements. The <Layout> element defines a suggested layout for
        the menu starting from top to bottom. References to desktop
        entries that are not contained in this menu as defined by the
        <Include> and <Exclude> elements should be ignored. References
        to sub-menus that are not directly contained in this menu as
        defined by the <Menu> elements should be ignored. 


        This element may only appear as a child of a <Layout> or
        <DefaultLayout> menu. It indicates a suggestion to draw a visual
        separator at this point in the menu. <Separator> elements at the
        start of a menu, at the end of a menu or that directly follow
        other <Separator> elements may be ignored. 

As far as I can tell, if FrapMenu is going to support <Layout> (which I
can now see is an optional part of the spec) in the future, then it will
have to support manually defined order of items. Otherwise, <Separator>
just wouldn't make sense.


> Regards,
>   Jannis


More information about the Xfce4-dev mailing list