[patch] xfdesktop menu icons

Brian J. Tarricone bjt23 at cornell.edu
Thu Jan 29 08:13:55 CET 2004


hi all-

this is by no means finished, but i wanted to get out a patch before i 
went to bed tonight so people can play...

patch applies in xfdesktop/ with -p0 against current cvs head.  you'll 
have to rerun autogen.sh.  you'll need the cvs version of libxfce4util 
as well for the desktop entry support.

the goodies:
* desktop menu icon support (obviously)
* menu icons follow current xfce4-panel theme (if themed icons are 
available)
* support for an autogenerated menu (from .desktop files) (thanks danny!)
* menu will regenerate itself a bit more intelligently as needed (and in 
the background, usually)

things you might want to do:
* if you're including another file via "&menu2;" or similar in your 
~/.xfce4/menu.xml file, you should change it to read:
<include type="file" src="menu2.xml" />
using this method, the file you reference must be a fully-validated 
xfdesktop-menu xml file.  the old way will still work (for now), but the 
menu won't get automatically regenerated if the included file changes 
unless you use the new syntax.
* if you want to have a series of menus autogenerated from .desktop 
files in /usr/share/applications, add:
<include type="system" />
to your menu.xml where you want the menus to appear.  note that items 
that are in the menu already will not be duplicated in the system menu; 
the system menu will only include unique icons.

** eventually i'm going to move to using the glib xml parser, so you 
should consider the "&menu2;" syntax deprecated as of now. **

my todo list:
* window list menu icons
* legacy directory-style .desktop menus
* find more .desktop files outside of /usr/share/applications
* conversion (and i18n) of default .desktop category names into better names
* hacks to work around quasi-broken .desktop files with %-ified argument 
placeholders in the command

this patch is still somewhat rough and i need to clean it up quite a 
bit, but i want to see if there's anything i'm doing that's making 
things screwy on various systems.

oh, right.  the patch.  you can get it at
http://kelnos.homelinux.org/xfce4/  (grab the newest patch only)
there's also a perl script to generate some menus with icons from your 
.desktop files (which somewhat negates the purpose of the autogenerated 
menus, but whatever).  otherwise you can just rely on the (somewhat 
incomplete) .desktop file autogenerator support.

enjoy, and let me know what breaks ^_^.

    -brian



More information about the Xfce4-dev mailing list