Of xfce menu (and a bit of startup time)

Olivier Fourdan fourdan at xfce.org
Sun Jun 4 23:00:31 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

As Jani noticed [1] a few days ago, the KDE screensavers show in xfce
menu while they don't in either GNOME or KDE menus. However, not all
screensavers show, so I was a bit puzzled and start digging in our code
and on the net.

1) The KDE screensavers do not show because, as stated on the
documentation page of KDE [2], "Screensavers contains a hidden
System/Screensavers menu, whose contents are defined by
kde-screensavers.menu and whose icon and name are defined by
kde-system-screensavers.directory.
$KDEDIR/share/desktop-directories/kde-system-screensavers.directory
contains: NoDisplay=true"

However, according to the standard menu spec, there is not such
directory file. The spec specifies that "The basic format of the desktop
entry file requires that there be a group header named Desktop Entry.
There may be other groups present in the file, but this is the most
important group which explicitly needs to be supported."

The current implementation in libxfce4util [4] only parses the [Desktop
Entry] section, and according to the previously mention specification,
that makes perfectly sense.

The problem is that the KDE screensaver entries do not set the
"NoDisplay=true" in the main [Desktop Entry] section, but rather on
other "[Desktop Action Setup]" and "[Desktop Action InWindow]" which are
not in the scope on the parser.

Therefore, there is nothing in our code that prevents the item to appear
in xfce menu. But should it? And if not, why? Otherwise, if so, why it
doesn't show in KDE or GNOME menus? I didn't find an easy answer here,
bit I'm no fd.o desktop menu specification expert.

2) As I said, not all KDE screensavers are visible, they why? Well, the
answer is fairly simple, xfce menu check for the existence of the
command in the path [5], and xscreensaver is not in the path.

What may look like a feature is somehow inconsistent behavior IMHO.
Also, I find that xfce menu startup is a lot slower than both KDE or
GNOME equivalents (and yes, that strikes me a bit). I do think that we
should not check for the command existence of the executable in the
menu. I see this as a waste of precious resources at startup. I do not
think it's the "job" of the menu to check for that, its the job of the
software installer/uninstaller to install and remove the desktop files
along with the programs.

What do you think?

Cheers,
Olivier.

[1] http://foo-projects.org/pipermail/xfce4-dev/2006-May/020161.html
[2] http://docs.kde.org/development/en/kdebase/userguide/kde-menu.html
[3] http://standards.freedesktop.org/desktop-entry-spec/latest/
[4] libxfce4util/trunk/libxfce4util/xfce-desktopentry.c
[5] xfdesktop/trunk/modules/menu/desktop-menu-dentry.c
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEg0nvFHBtvh5LRUARAnc1AKDu1qhr8Q/5lUvnBp+BMLLdijj9XACgrund
eoBzluNi825mlz6KiuzSp5Y=
=QH3N
-----END PGP SIGNATURE-----



More information about the Xfce4-dev mailing list