xfdesktop right-click menu icons

Brian J. Tarricone bjt23 at ece.cornell.edu
Tue Oct 21 12:20:23 CEST 2003


i'm a recent xfce4 convert from gnome2, and while i don't miss a lot of 
the bloat/cruft/featuritis still present in gnome2, there are a few 
gnome-like features i miss that aren't present in xfce4.  gnome has the 
'gnome menu,' and the closest analogue i can see in xfce is the 
desktop's right-click menu.  i was digging through the sources, and it 
appears that it was intended to add icon support for the menu.  of 
course GtkItemFactory for some unfathomable reason doesn't allow the 
setting of arbitrary icons, so i wrote a patch to generate the menu 
without the GtkItemFactory.  it looks for a new attribute in the title, 
menu, app, and builtin tags in menu.xml - "icon".  so you could, for 
example, do something like:
<app name="Terminal" cmd="Eterm" icon="gnome-eterm.png" />

it's just a rough patch, and probably doesn't do anything great for 
performance, but it's in a working state and works on my system so far.  
i just wanted to touch base here to see if i was going in the right 
direction, and if something like this might ever be accepted into the 
xfce4 tree.  anyway, i've posted the patch, along with a rough hack of a 
perl script to generate an iconified set of menus from .desktop files 
found in some common places (the file it generates is intended not to 
replace ~/.xfce4/menu.xml, but to be included in the file as an xml 
entity).  you can get both here:
http://kelnos.homelinux.org/xfce4/

    -brian

p.s. i noticed after 'cvs diff'-ing for the patch that my indent style 
doesn't match that of the files in the tree.  if anyone shows interest 
in this patch, i'd certainly not mind converting my work to use the 
tree's indent/coding style.




More information about the Xfce4-dev mailing list