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

Respect default app for zip files #6457

Merged
merged 4 commits into from Oct 12, 2021
Merged

Conversation

gave92
Copy link
Member

@gave92 gave92 commented Oct 12, 2021

Resolved / Related Issues
Items resolved / related issues by this PR.

Details of Changes
Add details of changes here.
This PR adds the option to open zip archives in an external application e.g 7zip instead of Files.
There are 2 possible implementations to choose from:

  1. a59b29b: queries the default application associated with zip files, if it's Files or explorer the internal zip viewer is used
  2. 2565ef9: adds a setting under "Preferences" to use internal zip viewer or not

I'm unsure what's the better option.

Validation
How did you test these changes?

  • Built and ran the app

@yaira2
Copy link
Member

yaira2 commented Oct 12, 2021

Is it possible to allow the user to set the default application for the zip protocol (is that option 1)?

@gave92
Copy link
Member Author

gave92 commented Oct 12, 2021

No, apps can't change the file association. The only thing you can do "programmatically" is open the Apps Settings page (you can't even open the settings page for your app directly). In option [1] users would open Settings app and change file association from there and Files would respect that choice in case it's e.g 7zip.

@yaira2
Copy link
Member

yaira2 commented Oct 12, 2021

No, apps can't change the file association. The only thing you can do is open the Apps Settings page (you can't even open the settings page for your app directly). In option [1] users would open Settings app and change file association from there and Files would respect that choice in case it's e.g 7zip.

Didn't Firefox come up with a way to work around this?

@gave92
Copy link
Member Author

gave92 commented Oct 12, 2021

Didn't Firefox come up with a way to work around this?

Did it? Could you point me to some info on this?

EDIT: Perhaps this can help, I'll take a look -> https://github.com/DanysysTeam/PS-SFTA

@gave92 gave92 marked this pull request as draft October 12, 2021 15:29
@gave92
Copy link
Member Author

gave92 commented Oct 12, 2021

@yaichenbaum In any case I'd like to keep the setting to view zip files in the embedded viewer separated from the default zip program setting. I use both Files and Explorer: when I click a zip file in Files it's ok to open it in Files, but when I click a zip file in explorer I want to open it in explorer. Both options 1 and 2 allow this, your suggestion of changing the default zip program makes me think you have different ideas :)

Could you clarify your expectation on this? Do you expect a switch in Files settings that controls whether to use the embedded zip viewer when browsing with Files and also sets Files as default for zip files?

@yaira2
Copy link
Member

yaira2 commented Oct 12, 2021

@yaichenbaum In any case I'd like to keep the setting to view zip files in the embedded viewer separated from the default zip program setting. I use both Files and Explorer: when I click a zip file in Files it's ok to open it in Files, but when I click a zip file in explorer I want to open it in explorer. Both options 1 and 2 allow this, your suggestion of changing the default zip program makes me think you have different ideas :)

Could you clarify your expectation on this? Do you expect a switch in Files settings that controls whether to use the embedded zip viewer when browsing with Files and also sets Files as default for zip files?

@gave92 option 1 looks good, I was just trying to better understand the different options 👍

@gave92 gave92 marked this pull request as ready for review October 12, 2021 16:48
@gave92
Copy link
Member Author

gave92 commented Oct 12, 2021

Restored option one 👍
For future reference: this thing actually works for changing default programs -> https://github.com/DanysysTeam/PS-SFTA (tested on windows 10)

@yaira2
Copy link
Member

yaira2 commented Oct 12, 2021

Restored option one 👍 For future reference: this thing actually works for changing default programs -> https://github.com/DanysysTeam/PS-SFTA (tested on windows 10)

If only there was a protocol for changing the default file manager 😆

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

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

LGTM

@yaira2 yaira2 merged commit 22e813f into files-community:main Oct 12, 2021
@gave92 gave92 deleted the issue_6110_6381 branch October 12, 2021 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doesn't respect default zip app Only open .zip files if file explorer is set to open them by default
2 participants