menu editing

Havoc Pennington hp at redhat.com
Tue May 13 07:00:37 EEST 2003


On Tue, May 13, 2003 at 09:01:40AM +0530, Biju Chacko wrote:
> 
> When I implemented the menuing system for XFce4, I was fairly unhappy
> with the complexity of this spec, especially the lack of clarity w.r.t
> editing. In addition, a significant component of my users said that they
> *didn't* want to see a system-generated menu.
> 
> I finally decided to provide a simple xml based single file format with
> the VFolder menu as a (yet to be implemented) optional plugin. The
> system menu is read-only, all user editing happens on our simple
> format.

You can use my code in XFCE if you want, it only depends on GLib. It's
also reasonably fast (constructs Red Hat system menu in around 0.04
seconds or so, said menu uses order of 250 .desktop files). See
desktop-file-utils in CVS where I'm working on it.

The spec is somewhat complex but I consider my implementation
overengineered and it's around 2000 lines of C, which isn't horrible.

In the end the question is, is it as simple as it can be and no
simpler, and I think it is about right in those terms.  Simpler specs
were leaving important problems unsolved. See the original threads on
the topic.

There are even some requests to extend the spec further, see archives
(things like titles for submenus or menu groups, and ordering items
within menus).

If you don't do editing via this spec, or don't do editing via a VFS,
I would say the spec is almost trivial to implement. Editing via a VFS
is the hard part implementation-wise.

Havoc



More information about the xdg mailing list