Only allow setting default app for regular files, not folders#2665
Conversation
|
|
||
| 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.
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.
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.
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 |
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.