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

PICARD-2679: Fix open folder for Snap install #2250

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

phw
Copy link
Member

@phw phw commented Jul 3, 2023

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

If Picard is installed via Snap all "Open folder" actions do not work. This is for example the case for "Open containing folder" for loaded files, but also for opening the plugin folder or config folder in options.

This is supposed to work via xdg-desktop-portal automatically, and it does work for the Flatpak install. But there seems to be an issue with this on Snap, see https://forum.snapcraft.io/t/xdg-open-or-gvfs-open-qdesktopservices-openurl-file-somelocation-file-txt-wont-open-the-file/16824/14 and https://bugreports.qt.io/browse/QTBUG-83939

Solution

When running as a Snap use xdg-open instead of QDesktopServices. Introduce picard.util.open_local_path helper to wrap this functionality.

Action

When running as a Snap use xdg-open instead of QDesktopServices.
Introduce picard.util.open_local_path helper to wrap this functionality.
@phw phw requested a review from zas July 3, 2023 10:36
Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

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

LGTM

@phw phw merged commit bf9ec7a into metabrainz:master Jul 3, 2023
52 checks passed
@phw phw deleted the PICARD-2679-fix-snap-open-folder branch July 3, 2023 17:48
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.

2 participants