xfdesktop menu is getting awesomer

Brian J. Tarricone bjt23 at cornell.edu
Mon Mar 19 03:56:45 CET 2007

Hey all,

Thanks to the tireless efforts of Jannis in building our next-gen menu
system, the new xfdesktop menu is actually working more or less like
the old one used to (at least in the part that's visible to end users).

Jannis - a couple things...

1.  frap_menu_get_layout_items() currently returns a sorted list of
submenus and items if the .menu file doesn't have a <Layout>.  For
flexibility, do you think it could either return NULL in that case, or
maybe add extra API e.g. frap_menu_has_layout() so I can check if
there's a layout.  If not, my preference is to show submenus first
(sorted) and then items (sorted), not having them all together.  Adding
the extra API will let implementors who care decide how they want to
handle the default layout.

2.  Either I'm misunderstanding something, or I've found a
<Layout>-related buglet.  I decided to add a <Layout> element to the
Settings menu as well:

    <Merge type="all"/>

If my reading of the menu spec is correct, I should be able to do this;
each <Menu> element can have a <Layout>.  However, the layout doesn't
seem to work.  The debug output seems to indicate that it does indeed
see and process the <Layout> element:

FrapMenu-DEBUG: frap_menu_layout_add_filename \
FrapMenu-DEBUG: frap_menu_layout_add_separator ()
FrapMenu-DEBUG: frap_menu_layout_add_merge (2)

[tweaked to fix wrapping]

... but the call to _get_layout_items() doesn't seem to notice the

FrapMenu-DEBUG: Menu has layout
FrapMenu-DEBUG: Xfce: 23 layout items
FrapMenu-DEBUG: Settings: 15 layout items
FrapMenu-DEBUG: Accessories: 9 layout items

The separator doesn't appear, and the 'Xfce Settings Manager' item is
sorted with the rest of the items.  (I have 15 items in the menu; it
should say '16 layout items' if you include the separator.)

Any ideas?  Am I doing something wrong?


More information about the Xfce4-dev mailing list