[icedtea-web] RFC: fix icon names for desktop entries
Omair Majid
omajid at redhat.com
Thu Nov 18 13:12:41 PST 2010
On 11/08/2010 10:36 AM, Omair Majid wrote:
> Hi,
>
> The attached patch removes file extensions from the icon names used in
> desktop entries. As the algorithm in the Icon Theme Specification [1]
> implies, icon names should not have extensions if they are not absolute
> paths.
>
I am attaching an updated patch. The desktop files in icedtea-web have a
number of issues:
The Icon entries in all desktop files contain the icon extension.
According to the Desktop Entry Specification [1] unless the icon is an
absolute path, the algorithm in Icon Theme Specification [2] is to be
used. This algorithm expects the Icon to be a name without any
extensions. The patch removes the extension from all icons.
The Encoding tag in desktop entries is deprecated [1]. This patch
removes it.
The desktop entry for IcedTea Web Start (and not the desktop file
created by netx for JNLP applications) uses the path /usr/bin/javaws
incorrectly. As described in the Mime Action (un)specification [3], a
desktop file is used to figure out mime type associations
(javaws.desktop contains a MimeType= line). Applications like Firefox
use this to decide that "IcedTea Web Start" (the name described by this
desktop file) should be used to run files of mime type
appliaction/x-java-jnlp-file. javaws.desktop sets Exec=/usr/bin/javaws
%f which means that that default javaws is used to run it even if the
user specifically selects "IcedTea Web Start" from the application. The
patch fixes this too. Note that the javaws.desktop file is not directly
visible to the user; it is not installed in any application menus. The
user can, however, indirectly see it (for example the javaws.desktop
file is used if you use nautilus and right click a file and select open
with->other applications), so an Icon is still needed.
ChangeLog
2010-11-18 Omair Majid <omajid at redhat.com>
* Makefile.am (EXTRA_DIST): Replace javaws.desktop with
javaws.desktop.in. (all-local): Add javaws.desktop. (clean-local):
Add dependency on clean-desktop-files. (.PHONY) Add clean-desktop-
files. (clean-desktop-files): New target. (javaws.desktop): New
target. Fix the Exec= line in Makefile.am to create the
javaws.desktop file.
* javaws.desktop: Renamed to...
* javaws.desktop.in: New file. Does not contain Encoding key. Value
for Icon does not contain extension.
* netx/net/sourceforge/jnlp/util/XDesktopEntry.java
(JAVA_ICON_NAME): Set to the icon name without the extension.
Any thoughts or comments?
Thanks,
Omair
[1]
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
[2]
http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
[3] http://www.freedesktop.org/wiki/Specifications/mime-actions-spec
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icedtea-web-fix-desktop-launchers-01.patch
Type: text/x-patch
Size: 3121 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20101118/7b605f5e/icedtea-web-fix-desktop-launchers-01.patch
More information about the distro-pkg-dev
mailing list