XDG menu implementation

Jannis Pohlmann info at sten-net.de
Thu Jul 27 12:42:41 CEST 2006

On Thu, 27 Jul 2006 12:17:11 +0200, Benedikt Meurer wrote:

> Jannis Pohlmann wrote:
> >>>some might have noticed it: I've started to work on the XDG menu
> >>>implementation I was talking about when we discussed Google's SoC.
> >>>
> >>>I'd like to discuss several topics in this mail:
> >>>
> >>>[...]
> >>>
> >>>Please tell me what you think about it - does the concept sound ok
> >>>to you? Personally, I really like it and I think it's a good
> >>>starting point.
> >>
> >>Could this library be used for a menu editor, too? Or will it only
> >>be able to read the menu?
> > 
> > Menu editing is a very complex topic. I'll try to make the library
> > as flexible as possible. E.g. I won't drop menus which are marked
> > as deleted (as the spec says). Instead, there will be a function to
> > check if a menu should be displayed or not. Via GObject properties,
> > it's very easy to change menu details, but the most difficult part
> > is how to save changed menus / directories / desktop entries. 
> > 
> > So it's not completely impossible, but it has low priority at the
> > moment. At least, menu editors can use the library to load a menu
> > structure. If they implement saving the modifications by themselves,
> > that's all they need.
> I'd suggest to implement only trivial editing capabilities (i.e.
> changing the name of an application in the .desktop file) if at all.
> Editing the XDG menu structure is a really complex task and can easily
> decrease the reliability, performance and thereby the usefulness of
> the libxfce4menu.

Indeed. Copying a desktop entry to the user's data dir is rather easy
to handle (also adding a new desktop entry is), but editing (merged)
menus is complex and implies a lot of additional work (serialize back
to XML without loosing elements, splitting up merged menus without
breaking the old structure etc.).

So it's mainly about providing an easy-to-use, stable and fast way for
other applications to display XDG menus (not only the root menu) and -
like Thunar will do - access available desktop entries for applications
and perform MIME queries on them.

- Jannis

More information about the Xfce4-dev mailing list