Desktop Entry patches and clarifications
Vincent Untz
vuntz at gnome.org
Sun Mar 11 09:18:00 PDT 2007
Hi,
I've been working on updating desktop-file-utils for the latest
changes in the desktop entry spec. While doing this, I found that there
are still some issues with the spec.
Here are some patches:
+ trailing-semicolon.patch: clarify that lists should always end with a
semicolon, even if there's only one value. This is currently
ambiguous in the spec.
+ unmounticon.patch: UnmountIcon is a localestring key
+ version-string.patch: this changes the type of the version from
numeric to string. It's needed if we consider the possibility that
there are some desktop entry files out there using 0.9.x as a value
for this key. The change doesn't break anything.
+ typo.patch: small typo
+ context.patch: clarify a bit the text about keys that only makes
sense in a specific context. Also, state that the keys should not be
used outside of this context. For example, the URL key should not be
present if the type is not Link.
+ directory.patch: desktop files of type Directory have a .directory
extension right now (at least in GNOME), but according to the spec,
this is wrong. The patch fixes this. Also, it removes a small part of
text explaining the name of a desktop file describing a directory.
(see also below)
+ required-in-context.patch: IMHO, a desktop file of type Application
should always have an Exec key. Same for Link Type and URL key. This
patch changes this.
And now, some issues that we should fix :-)
+ with trailing-semicolon.patch, a string list key with an empty value
should have ";" for the value. I guess this is broken, right? :-)
+ we never explain what the various types mean. The spec should do
that. It's also where we can put back what I removed about the
.directory name in directory.patch.
+ there are some issues with backslash escaping. How should \j be
handled? Should this only be considered as 'j'? It probably should
since the backslash has to be escaped with a backslash.
Or maybe I'm reading it wrong and \\ means a backslash, but a single
\ also means a backslash?
+ "The %F and %U field codes may only be used as an argument on their
own."
I'm not sure about the "on their own". Does it mean that
Exec=ooffice -math %U
is invalid? (that's how I understand the current text). I have many
desktop files here with similar exec lines.
+ "The executable program can either be specified with its full path or
with the name of the executable only."
If I install a file in /usr/bin/subdir/mybinary, then I can't put only
"subdir/mybinary" in Exec. I believe the intent is to no have ".."
and ".", but this is a bit more restrictive.
(I didn't check if calling execlp with "subdir/mybinary" works, if it
doesn't then we can safely ignore this comment)
Thanks,
Vincent
--
Les gens heureux ne sont pas pressés.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trailing-semicolon.patch
Type: text/x-diff
Size: 999 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20070311/8d618681/attachment.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unmounticon.patch
Type: text/x-diff
Size: 741 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20070311/8d618681/attachment-0001.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: version-string.patch
Type: text/x-diff
Size: 584 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20070311/8d618681/attachment-0002.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typo.patch
Type: text/x-diff
Size: 688 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20070311/8d618681/attachment-0003.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: context.patch
Type: text/x-diff
Size: 877 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20070311/8d618681/attachment-0004.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: directory.patch
Type: text/x-diff
Size: 1371 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20070311/8d618681/attachment-0005.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: required-in-context.patch
Type: text/x-diff
Size: 1309 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20070311/8d618681/attachment-0006.patch
More information about the xdg
mailing list