Check if a .desktop file contains an Icon entry Closes: #854132 --- checks/menu-format.desc | 14 ++++++++++++++ checks/menu-format.pm | 3 +++ 2 files changed, 17 insertions(+)
diff --git a/checks/menu-format.desc b/checks/menu-format.desc index fd6f523b4..ee5c46f99 100644 --- a/checks/menu-format.desc +++ b/checks/menu-format.desc @@ -317,6 +317,20 @@ Info: The categories for this desktop entry do not contain any Main useful for checking the syntax of desktop entries. Ref: https://specifications.freedesktop.org/menu-spec/1.0/apa.html +Tag: desktop-entry-lacks-icon-entry +Severity: wishlist +Certainty: certain +Info: This .desktop file does not contain an "Icon" entry. + . + "Icon" is the name of the file (without the extension) of the icon displayed + by this .desktop file. The icon will be searched in the different icon themes. + The icon should be unique enough to help the user to recogninse the application. + . + The desktop-file-validate tool in the desktop-file-utils package is + useful for checking the syntax of desktop entries. +Ref: https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s05.html, + #854132 + Tag: desktop-entry-lacks-keywords-entry Severity: wishlist Certainty: certain diff --git a/checks/menu-format.pm b/checks/menu-format.pm index 89ac19154..3de449050 100644 --- a/checks/menu-format.pm +++ b/checks/menu-format.pm @@ -638,6 +638,9 @@ sub verify_desktop_file { # test if missing Keywords (only if NoDisplay is not set) if (!defined $vals{NoDisplay}) { + if (!defined $vals{Icon}) { + tag 'desktop-entry-lacks-icon-entry', $file; + } if (!defined $vals{Keywords}) { tag 'desktop-entry-lacks-keywords-entry', $file; } -- 2.11.0

