makeDesktopItem: make categories optional
"Application" is deprecated, "Other" is invalid, there are no generic categories, and the Categories fields is optional per the spec. Fixes the defaults after #75729.
This commit is contained in:
parent
d5f9b0199d
commit
7df81361e4
@ -9,7 +9,7 @@
|
|||||||
, desktopName
|
, desktopName
|
||||||
, genericName ? null
|
, genericName ? null
|
||||||
, mimeType ? null
|
, mimeType ? null
|
||||||
, categories ? "Application;Other;"
|
, categories ? null
|
||||||
, startupNotify ? null
|
, startupNotify ? null
|
||||||
, extraEntries ? null
|
, extraEntries ? null
|
||||||
, fileValidation ? true # whether to validate resulting desktop file.
|
, fileValidation ? true # whether to validate resulting desktop file.
|
||||||
@ -20,6 +20,7 @@ let
|
|||||||
{k="Comment"; v=comment;}
|
{k="Comment"; v=comment;}
|
||||||
{k="GenericName"; v=genericName;}
|
{k="GenericName"; v=genericName;}
|
||||||
{k="MimeType"; v=mimeType;}
|
{k="MimeType"; v=mimeType;}
|
||||||
|
{k="Categories"; v=categories;}
|
||||||
{k="StartupNotify"; v=startupNotify;}];
|
{k="StartupNotify"; v=startupNotify;}];
|
||||||
|
|
||||||
valueNotNull = {k, v}: v != null;
|
valueNotNull = {k, v}: v != null;
|
||||||
@ -37,7 +38,6 @@ runCommandLocal "${name}.desktop" {}
|
|||||||
Exec=${exec}
|
Exec=${exec}
|
||||||
Terminal=${terminal}
|
Terminal=${terminal}
|
||||||
Name=${desktopName}
|
Name=${desktopName}
|
||||||
Categories=${categories}
|
|
||||||
${optionalEntriesString}
|
${optionalEntriesString}
|
||||||
${if extraEntries == null then ''EOF'' else ''
|
${if extraEntries == null then ''EOF'' else ''
|
||||||
${extraEntries}
|
${extraEntries}
|
||||||
|
Loading…
Reference in New Issue
Block a user