Opened 7 years ago

Closed 7 years ago

#210 closed defect (fixed)

.desktop files do not validate

Reported by: onlyjob Owned by: Antoine Martin
Priority: minor Milestone:
Component: UI Keywords: patch
Cc:

Description

Two .desktop files have the following problems:

 * error: value "Network;TrayIcon" for string list key "Categories" in group "Desktop Entry" does not have a semicolon (';') as trailing character
 * error: value "TrayIcon" in key "Categories" in group "Desktop Entry" is a reserved category, so a "OnlyShowIn" key must be included
 * warning: key "Encoding" in group "Desktop Entry" is deprecated

This can be fix by the attached patch.

Attachments (1)

fix-desktop-file.patch (1.2 KB) - added by onlyjob 7 years ago.
patch

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by onlyjob

Attachment: fix-desktop-file.patch added

patch

comment:1 Changed 7 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

added missing semi-colon and removed deprecated encoding line in r4929

However:the TrayIcon category should not be removed as this indicates An application that is primarily an icon for the "system tray" or "notification area" (apps that open a normal window and just happen to have a tray icon as well should not list this category) - which is exactly the case here.

What the menu spec does say is Reserved Categories have a specific desktop specific meaning that has not been standardized (yet). Desktop entry files that use a reserved category MUST also include an appropriate OnlyShowIn= entry to restrict themselves to those environments that properly support the reserved category as used. - which is pretty dumb considering that one does not know in advance which DEs will support the tray icon whereas the DEs will know if they support it themselves (which may well change from version to version, or even by changing the DEs' configuration) - this is really dumb/weak part of the menu spec IMNSHO.

So... r4930 adds every single DE entry in the OnlyShownIn field, this will make lintian happy:

OnlyShowIn=GNOME;KDE;LXDE;MATE;Razor;ROX;TDE;Unity;XFCE;Old

The ones I do have do support it and for the others the situation will be unchanged (AFAICT), if and when we do get complaints that it does not show up in a specific DE, then we can take it off the list.

comment:2 Changed 7 years ago by onlyjob

Resolution: fixed
Status: closedreopened

Thanks for the fix but one little warning still there:

winswitch.desktop: error: value "GNOME;KDE;LXDE;MATE;Razor;ROX;TDE;Unity;XFCE;Old" for string list key "OnlyShowIn" in group "Desktop Entry" does not have a semicolon (';') as trailing character

comment:3 Changed 7 years ago by Antoine Martin

oops, fixed in r4933

Thanks!

comment:4 Changed 7 years ago by Antoine Martin

Resolution: fixed
Status: reopenedclosed

forgot to re-close ticket

Note: See TracTickets for help on using tickets.