FrapMenu menu/item ordering

Brian J. Tarricone bjt23 at
Wed Feb 21 02:49:44 CET 2007

Hey Jannis,

I'm playing with FrapMenu a bit, trying to see what it takes to
integrate it into xfdesktop and make it generate a menu that sorta
somewhat resembles the default menu we have now.  It actually wasn't
that hard to set up (cool!), but I'm running into a limitation: when a
menu contains both items and menus, I can't seem to figure out how to
define an ordering between the two.  For example, say I want to create
a menu that looks like this:

Foo Application (menu item)
Bar Application (menu item)
Random Stuff (submenu)
More Random Stuff (submenu)
Baz Application (menu item)

How would I do this?  frap_menu_get_menus() and frap_menu_get_items()
returns the list of menus and items, respectively, but there doesn't
seem to be a way to create a mixed ordering.  So I either end up with
all the menus, then all the items, or the reverse, depending on the
order I add them in my code.

Also, how are the items from frap_menu_get_items() returned?  It looks
like they are just pulled in hash table "order", which doesn't seem to
guarantee any kind of ordering at all.

I just committed what I've been doing to xfdesktop trunk, so you can
look at the menu file I'm using here:
(The stuff I'm including with <Filename> blocks is installed to

I also have a more menu-spec-related question, but maybe you'd know
since you've worked with the spec quite a bit.  I want to create a
catch-all "Other" submenu to put everything that wasn't sorted into one
of the other submenus.  I tried using <OnlyUnallocated/> but that didn't
seem to work; then I tried <All/> in conjunction with
<OnlyUnallocated/>, and also both of those inside and <And></And> pair,
but that didn't work either.  Any ideas?

Oh, and on a side note, FrapMenu tends to segfault a lot on things like
bad menu files and whatnot.  I'll file bugs for you later, or something.


More information about the Xfce4-dev mailing list