From ce79700498ec43a1b42a13bf7376204ed29f9c0b Mon Sep 17 00:00:00 2001 From: "Peter G. (nephros)" Date: Wed, 31 Jan 2024 02:12:19 +0100 Subject: [PATCH 1/8] Improve documentation about launchers --- .../Apps_and_MW/Lipstick/Launchers/README.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md index b53e6d0f..d79d0e26 100644 --- a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md +++ b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md @@ -15,6 +15,27 @@ They are read by [Lipstick](/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/ Desktop Entry Specification allows extending the specification with product specific keys. Sailfish OS uses that to specify some extensions to support certain functions better. +### Launcher and Booster Type +_X-Nemo-Application-Type_, and _X-Nemo-Single-Instance_ can be used instead +of giving the the `--single-instance`, and `--type` options to invoker in the +_Exec_ key. +See the documentation for Invoker, and the +[Harbour FAQ](https://harbour.jolla.com/faq#.desktop-Files) for details. + +### Hiding app from launcher grid +In addition to the _Hidden_, and _NoDisplay_ keys, app developers can use +_NotShowIn=X-MeeGo_, to hide the launcher from the launcher grid. +This is mainly useful for registering a MIME Type launchers. + +### Localization +In addition to the _Name[xx]_ method from the Desktop spec, launcher names can +be localized using the keys _X-MeeGo-Translation-Catalog_, and +_X-MeeGo-Logical-Id_. The former gives the basename (without language suffix, and +without file extension) of a Qt translation (.qm) file. The latter specifies +the translation ID (as used in Qt "id-based" translation). +This way, developers can re-use a translation present in their application also +for the launcher name. + ### Application sandboxing profile Application developers can control their app's [sandbox](https://github.com/sailfishos/sailjail-permissions#sailfish-os-application-sandboxing-and-permissions) @@ -70,3 +91,15 @@ In Sailfish OS 4.3.0 _ExecDBus_ is not considered when validating the arguments launched via D-Bus which limits usefulness of that key. To work around that, the launch arguments used for D-Bus activation must match _Exec_ key in _Desktop Entry_ section. This issue is fixed in Sailfish OS 4.4.0. + +## D-Bus method calls +The keys _X-Maemo-Service_, _X-Maemo-Object-Path_, and _X-Maemo-Method_ can be +used to specify a D-Bus method on a certain object path, which is called when +the launcher is activated. + +This is similar to, but different from D-Bus activation above. The D-Bus +Service must already be registered (using the method above, or from the app +after launch), and `path` and `method` must exist for that service. + +This is used e.g. by MimeType .desktop files to open an app at a certain page. + From 3fa725d52210247583ff7c9abf03ce58a2914ac2 Mon Sep 17 00:00:00 2001 From: "Peter G. (nephros)" Date: Wed, 31 Jan 2024 09:32:47 +0100 Subject: [PATCH 2/8] Add X-Maemo-Fixed-Args --- .../Apps_and_MW/Lipstick/Launchers/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md index d79d0e26..0805cf4f 100644 --- a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md +++ b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md @@ -93,12 +93,14 @@ used for D-Bus activation must match _Exec_ key in _Desktop Entry_ section. This Sailfish OS 4.4.0. ## D-Bus method calls -The keys _X-Maemo-Service_, _X-Maemo-Object-Path_, and _X-Maemo-Method_ can be +The keys _X-Maemo-Service_, _X-Maemo-Object-Path_, _X-Maemo-Method_ can be used to specify a D-Bus method on a certain object path, which is called when the launcher is activated. +The optional _X-Maemo-Fixed-Args_ tag can pass arguments to the call. + This is similar to, but different from D-Bus activation above. The D-Bus -Service must already be registered (using the method above, or from the app +Service must already be registered (e.g. using the method above, or from the app after launch), and `path` and `method` must exist for that service. This is used e.g. by MimeType .desktop files to open an app at a certain page. From ff70a9997583bde334daabf36188f50e79e02fd8 Mon Sep 17 00:00:00 2001 From: "Peter G. (nephros)" Date: Wed, 7 Feb 2024 11:36:25 +0100 Subject: [PATCH 3/8] Rework translations section, iuse Amber variants --- .../Apps_and_MW/Lipstick/Launchers/README.md | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md index 0805cf4f..63d47dc4 100644 --- a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md +++ b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md @@ -29,12 +29,21 @@ This is mainly useful for registering a MIME Type launchers. ### Localization In addition to the _Name[xx]_ method from the Desktop spec, launcher names can -be localized using the keys _X-MeeGo-Translation-Catalog_, and -_X-MeeGo-Logical-Id_. The former gives the basename (without language suffix, and -without file extension) of a Qt translation (.qm) file. The latter specifies -the translation ID (as used in Qt "id-based" translation). -This way, developers can re-use a translation present in their application also -for the launcher name. +be localized using an existing Qt translation (.qm) file. + +The key _X-Amber-Translation-Catalog_ gives the basename (without language +suffix or file extension). + +Keys of the format _X-Amber-Logical-Id-KEYNAME_ specify the translation ID (as +used in Qt "id-based" translation), where KEYNAME is one of the +.desktop keys. + +For example, the following looks up the translations for _Name_ and _Summary_ in the +files `my-app-*.qm`: + + X-Amber-Translation-Catalog: my-app + X-Amber-Logical-Id-Name: l10n-id_name + X-Amber-Logical-Id-Summary: l10n-id_desc ### Application sandboxing profile Application developers can control their app's From 3732bcbb81d896f6ef7199b92210667ba4c9cf3d Mon Sep 17 00:00:00 2001 From: "Peter G. (nephros)" Date: Wed, 7 Feb 2024 11:37:51 +0100 Subject: [PATCH 4/8] Add Legacy section --- .../Apps_and_MW/Lipstick/Launchers/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md index 63d47dc4..f2b3654e 100644 --- a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md +++ b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md @@ -114,3 +114,7 @@ after launch), and `path` and `method` must exist for that service. This is used e.g. by MimeType .desktop files to open an app at a certain page. +## Legacy and Deprecated + + - _X-MeeGo-Translation-Catalog_ and _X-MeeGo-Logical-Id_. Used for translations. Replaced by the _X-Amber-_ variants. + From 36af9d07851928a81499dc293492744244e7b6b9 Mon Sep 17 00:00:00 2001 From: "Peter G. (nephros)" Date: Wed, 7 Feb 2024 11:51:31 +0100 Subject: [PATCH 5/8] Improve "hide" section --- .../Apps_and_MW/Lipstick/Launchers/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md index f2b3654e..6a3229a8 100644 --- a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md +++ b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md @@ -23,10 +23,12 @@ See the documentation for Invoker, and the [Harbour FAQ](https://harbour.jolla.com/faq#.desktop-Files) for details. ### Hiding app from launcher grid -In addition to the _Hidden_, and _NoDisplay_ keys, app developers can use -_NotShowIn=X-MeeGo_, to hide the launcher from the launcher grid. +To hide an desktop entry form the Launcher Grid, use _NoDisplay=true_. This is mainly useful for registering a MIME Type launchers. +In case of multi-platform apps sharing the same .desktop file, app developers +can use _NotShowIn=X-MeeGo_, to hide the launcher only in Sailfish OS. + ### Localization In addition to the _Name[xx]_ method from the Desktop spec, launcher names can be localized using an existing Qt translation (.qm) file. From 6c518c6a7f7591d3151f2c080faab9aa63db7f5d Mon Sep 17 00:00:00 2001 From: "Peter G. (nephros)" Date: Wed, 7 Feb 2024 12:04:49 +0100 Subject: [PATCH 6/8] fixup! Rework translations section, iuse Amber variants --- .../Apps_and_MW/Lipstick/Launchers/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md index 6a3229a8..e1b633d9 100644 --- a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md +++ b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md @@ -43,9 +43,9 @@ used in Qt "id-based" translation), where KEYNAME is one of the For example, the following looks up the translations for _Name_ and _Summary_ in the files `my-app-*.qm`: - X-Amber-Translation-Catalog: my-app - X-Amber-Logical-Id-Name: l10n-id_name - X-Amber-Logical-Id-Summary: l10n-id_desc + X-Amber-Translation-Catalog=my-app + X-Amber-Logical-Id-Name=l10n-id_name + X-Amber-Logical-Id-Summary=l10n-id_desc ### Application sandboxing profile Application developers can control their app's From d8d9a9717b9e7a0594063c8ed2ca28af7fa89bd1 Mon Sep 17 00:00:00 2001 From: "Peter G. (nephros)" Date: Wed, 7 Feb 2024 12:46:10 +0100 Subject: [PATCH 7/8] Drop details about L10N, add reference to existing doc. --- .../Apps_and_MW/Lipstick/Launchers/README.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md index e1b633d9..595814fa 100644 --- a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md +++ b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md @@ -33,19 +33,8 @@ can use _NotShowIn=X-MeeGo_, to hide the launcher only in Sailfish OS. In addition to the _Name[xx]_ method from the Desktop spec, launcher names can be localized using an existing Qt translation (.qm) file. -The key _X-Amber-Translation-Catalog_ gives the basename (without language -suffix or file extension). - -Keys of the format _X-Amber-Logical-Id-KEYNAME_ specify the translation ID (as -used in Qt "id-based" translation), where KEYNAME is one of the -.desktop keys. - -For example, the following looks up the translations for _Name_ and _Summary_ in the -files `my-app-*.qm`: - - X-Amber-Translation-Catalog=my-app - X-Amber-Logical-Id-Name=l10n-id_name - X-Amber-Logical-Id-Summary=l10n-id_desc +See [I18N Documentation](Reference/I18n/I18n_Conventions/#application-names) +about the keys _X-Amber-Translation-Catalog_ and _X-Amber-Logical-Id-*_. ### Application sandboxing profile Application developers can control their app's From 2a88086f0d48cf7889b0bf507dd3ac9ddae96fd3 Mon Sep 17 00:00:00 2001 From: "Peter G. (nephros)" Date: Wed, 7 Feb 2024 12:47:25 +0100 Subject: [PATCH 8/8] Add note about sandboxing and boosters --- .../Apps_and_MW/Lipstick/Launchers/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md index 595814fa..530f2348 100644 --- a/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md +++ b/Reference/Core_Areas_and_APIs/Apps_and_MW/Lipstick/Launchers/README.md @@ -19,8 +19,11 @@ OS uses that to specify some extensions to support certain functions better. _X-Nemo-Application-Type_, and _X-Nemo-Single-Instance_ can be used instead of giving the the `--single-instance`, and `--type` options to invoker in the _Exec_ key. -See the documentation for Invoker, and the -[Harbour FAQ](https://harbour.jolla.com/faq#.desktop-Files) for details. +Note however that _X-Nemo-Application-Type_ will have no effect for sandboxed +apps, which will always be treated as _generic_. + +See the documentation for SailJail, Invoker, and the +[Harbour FAQ](https://harbour.jolla.com/faq#.desktop-Files) for more. ### Hiding app from launcher grid To hide an desktop entry form the Launcher Grid, use _NoDisplay=true_.