Menus

Biju Chacko botsie at myrealbox.com
Tue Jan 28 07:08:24 CET 2003


Hi,

This is just an attempt to get all my thoughts straight. I figured
expaining them would clarify them for me too. ;-)

I have come to the conclusion that the freedesktop menu spec is a
complicated solution to a real problem. The problem is that distro
makers and application makers need a consistent way to present menus to
users. Unfortunately, the current menu spec is *very* complicated and is
a moving target as well.

However, I don't think we can afford to ignore it completely. We need
*some* way to represent all the applications installed on the system,
and this is the most promising way.

There is also the issue that hierarchical menus are not really
compatible with the way XFce works. Many people (eg tom at unhooked.net)
prefer small simple menus that are easily edited.

So, what needs to be done?

Here is my initial solution:

* Menu parsers are implemented as plugins. Example plugins would be:
xfdeskmenu rcfile, old-style menu directory and freedesktop menu spec.
Distros could implement their own plugins for their own system menus.

* Each parser would have an interface of a minimum of three functions:

	* get_menu() -- returns a data structure representing the menu.
	* add_menu_item(path, data) -- adds or replaces the item at 		'path'
using 'data'
	* del_menu_item(path) -- deletes the item at 'path'

* Menus returned by the plugins would be merged by the parent  
application.

* The parent application would be a library, so that consistent menus
can be displayed by xfdesktop, xftaskbar and xfce-panel.

* Menu editing would be integrated into menu display similar to how  
popups in xfce-panel behave.

OTOH, this may be overly complicated for something as trivial as menu
display. The other alternative would be to have something with similar
functionality to xfdeskmenu. It would be simple to begin with, but
difficult to add features to.

Comments, flames, etc?

-- b


-- 
-----------------------------------------------------------------------
Biju 'botsie' Chacko                        biju_chacko at vsnl dot net
http://www.symonds.net/~botsie          Public Key available on request
-----------------------------------------------------------------------



More information about the Xfce4-dev mailing list