xfdesktop menu stuff

Brian J. Tarricone bjt23 at cornell.edu
Mon Mar 22 21:45:41 CET 2004


ok, so i put the menu gmodule and plugin code into cvs.  i figure it 
will be a lot easier to work off that base while i do my fix-the-crashes 
rewrite, and the code seems stable and workable enough (to me).

the menu-branch icons are specified either in your ~/menu.xml file or in 
the xfce-registered-categories.xml file, which has been moved.  it lives 
in /etc/xfce4 now rather than /usr/share/xfce4.  you can also copy it to 
~/.xfce4 for editing and the menu system will use that instead of the 
systemwide file.  i'm not totally thrilled with how the icon selection 
works for the autogenerated menu.  if you have more than one main 
category that resolves (via the 'replace' attribute) to the same 
friendly menu displayname title thingy, the icon that used will be the 
one specified for whichever category is first looked at that creates the 
menu branch.  this is somewhat annoying, because it means you may have 
to specify the same icon in multiple places.  perhaps i'll just make a 
new tag that's just for mapping displaynames to icons.  we'll see.

notable changes:
* xfdesktop (and the panel plugin) no longer generate and 
  create the menu immediately on startup, so the actual startup time for 
  xfdesktop should be a little shorter (i.e. the time it takes to get 
  from the beginning of main() to calling gtk_main()).
* the menu is generated using XfceAppMenuItem instead of carrying around 
  a bulky GList and GtkItemFactory.  this saves a little memory and runs 
  a little faster.
* menu.xml is parsed with the glib xml parser.  this means that the 
  custom-xml-entity method of including another file won't work anymore.  
  use <include type="file" src="foo" /> now.  xfce4-menueditor needs to 
  ditch libxml2, and then xfdesktop will be libxml2-free!

there's more, but i forget.

as usual, flame away...  or just enjoy ^_~

	-brian




More information about the Xfce4-dev mailing list