-
-
Notifications
You must be signed in to change notification settings - Fork 80
Only allow setting default app for regular files, not folders #2665
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
Conversation
src/Dialogs/ChooseAppDialog.vala
Outdated
|
|
||
| check_default.show (); | ||
| var file_type = file_to_open.query_file_type (NOFOLLOW_SYMLINKS, null); | ||
| if (file_type == FileType.REGULAR) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Folks can set defaults for the file browser in System Settings so I agree in principal. But shouldn't the condition here be != DIRECTORY rather than == FileType.REGULAR?
It's probably also worth leaving a comment with a link to the issue report so its clear why this was done in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to have a default app for other file types than REGULAR? I was originally going to do as you say but decided to extend suppressing the checkbox to non-REGULAR files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On reconsideration, I have limited the exclusion to DIRECTORY types. Symlinks are now followed to get the type as this flag is also used for setting the default app.
Comments added
|
In general, the context menu does not include "Open in …" for inappropriate types such as network items or mounts so it is not necessary to worry about those there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #1463
There does not seem to be a good reason to set a default app for anything other than regular files, so in addition to folders, the "Set as Default" checkbox is not displayed for links, mounts etc.