Question on menus

Brian J. Tarricone bjt23 at cornell.edu
Thu Nov 1 19:00:39 CET 2007


RommeDeSerieux wrote:
> On Wed, 31 Oct 2007 19:28:13 -0700 "Brian J. Tarricone" 
> <bjt23 at cornell.edu> wrote:
> 
>> Then that's your problem: non-standard categories aren't allowed 
>> ^_~.
> 
> Why? Isn't that a bug?

Not really.  The fd.o standard doesn't specify what to do with any
non-standard categories found, so they can be ignored.  The menu in 4.4 
isn't really a fd.o-compliant menu, anyway; it just cherry-picks the 
stuff that fit into Xfce's old menu system well.

As another poster found, though, you can add them to the
xfce-registered-categories.xml file.  You should first copy it to
~/.config/xfce4/desktop/, though, as the system-installed file will get
overwritten after an update.

Cross-replying because I'm lazy:

Ryan Daly wrote:

> BUT, I did find that if you do not include the system menu (via the 
> include tag), the above menu will not show up.

Of course it won't.  The system menu is what parses .desktop files.
Without the system menu, you just have whatever's in your menu.xml, and
nothing else.

> Also, if the above menu is added as a submenu, it does not show up.

You need to not set toplevel="true" on your new category, and then add a 
<subcategory> tag to the parent menu category's <category> tag. 
Experiment a bit: it's been a long time since I wrote this code (a good 
3 years), so I don't quite remember how it works (and it may not 
actually work, but I can't be bothered to fix it).

> It appears that there still needs to be some work on including menus 
> of this type, unless I'm missing something, which is entirely 
> possible.

4.6 will feature a brand-new menu system that actually conforms to the 
fd.o spec rather than just the parts of it that fit into our existing 
menu system from 4.0.  If you'd like a preview, go and fetch 
libxfce4menu and xfdesktop from Xfce SVN.  Though it's somewhat buggy 
and not all features are supported yet.

	-brian




More information about the Xfce mailing list