KDE legacy menu directories

Jannis Pohlmann jannis at xfce.org
Tue Nov 7 02:31:00 EET 2006


Hi all,

I'm an Xfce developer and I'm working on a menu spec implementation for
it at the moment. The most important parts of the specification are
already done and now I started to work on loading legacy menus.

The spec says: Create a menu for each legacy directory, set its <Name>
to the directory path and search for a ".directory" file in the
directory. If there is one, point the <Directory> element to it.

I had a short look at the structure of KDE legacy menus (located
in /opt/lunar/kde/3/share/applnk/ on my machine) and I noticed that
there are no ".directory" files (except in some ".hidden/"
sub directories). What's the best way to handle legacy dirs for which
this is the case (no ".directory" file)?
If I have no ".directory" file, I can't display any useful information
about a menu, right? The most obvious solution for such a menu might be
ignoring it. What's your opinion on this?

Another thing I noticed is that the applications.menu installed by KDE
on my machine (I renamed it to /etc/xdg/menus/kde-applications.menu) is
using <Directory> elements with content like "kde-main.directory". The
root <Menu> is basically looking like this:

  <Name>Applications</Name>
  <Directory>kde-main.directory</Directory>
  <KDELegacyDirs/>
  <DefaultAppDirs/>
  <DefaultDirectoryDirs/>

I searched for "kde-main.directory" and found it in
/opt/lunar/kde/3/share/desktop-directories/. This path obviously isn't
listed anywhere in the specified directory dirs. To me this looks like
KDE is expecting me (as the author of the menu implementation) to
include $KDEDIR/share/desktop-directories/, but unless $KDEDIR/share/ is
defined in $XDG_DATA_DIRS, there's no reason for this, IMHO.

The spec clearly maps <KDELegacyDirs> to "kde-config --path apps" and
<DefaultDirectories> to $XDG_DATA_DIRS/desktop-directories/. Is anyone
able to explain *why* KDE does not respect this? I don't feel like
adding a workaround for this unless someone tells me a good reason for
it - or adds $KDEDIR/desktop-directories/ to the menu spec, hehe.

Thanks in advance.

With regards,
Jannis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20061107/53cf0ce8/attachment.pgp 


More information about the xdg mailing list