Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use %F field code in .desktop entry #798

Merged
merged 1 commit into from
May 8, 2024

Conversation

naglis
Copy link
Contributor

@naglis naglis commented May 3, 2024

On Linux, the %u field code results in multiple Dangerzone instances being launched when opening multiple documents with Dangerzone from e.g. Nautilus, as %u signifies that the application (in this case - Dangerzone) can only open a single file/URL at once.

This changes the field code to %F as Dangerzone (now) supports converting multiple files at once. We use %F (multiple local files) instead of %U (multiple files and/or URLs) since Dangerzone does not support opening URLs.

See also the Desktop Entry Specification for more information on the field codes.

Fixes #797

Copy link
Contributor

@deeplow deeplow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find, as always. This was totally overlooked when I first implemented multiple-docs support.

Again, I'll wait for @apyrgio for merging.

On Linux, the `%u` field code results in multiple Dangerzone instances
being launched when opening multiple documents with Dangerzone from
e.g. Nautilus, as `%u` signifies that the application (in this case -
Dangerzone) can only open a single file/URL at once.

This changes the field code to `%F` as Dangerzone (now) supports
converting multiple files at once. We use `%F` (multiple local files)
instead of `%U` (multiple files and/or URLs) since Dangerzone does not
support opening URLs.

See also the Desktop Entry Specification [1] for more information on the
field codes.

Fixes freedomofpress#797

[1]: https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html
@apyrgio apyrgio merged commit c3a570e into freedomofpress:main May 8, 2024
5 of 10 checks passed
@apyrgio
Copy link
Contributor

apyrgio commented May 8, 2024

Merged, with an additional changelog item:

  • Linux: Allow opening multiple files at once, when selecting them from the user's file manager (issue #797)

(I'll add proper attribution after prior to the release, sorry for missing that...)

Also, I tested on macOS and it seems that it's bitten by a similar problem, albeit in a different way (see #800). If the fix is trivial, I'll try to include it in the 0.6.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Open With Dangerzone" with 2 PDFs results in 2 instances of Dangerzone being opened on Linux
3 participants