Skip to content

Conversation

@jeremypw
Copy link
Contributor

@jeremypw jeremypw commented Nov 3, 2025

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.

@jeremypw jeremypw added the Bitesize Simple, small diff label Nov 3, 2025
@jeremypw jeremypw added this to the 7.2.0 milestone Nov 3, 2025
@jeremypw jeremypw marked this pull request as ready for review November 3, 2025 10:46
@jeremypw jeremypw requested a review from a team November 3, 2025 11:07

check_default.show ();
var file_type = file_to_open.query_file_type (NOFOLLOW_SYMLINKS, null);
if (file_type == FileType.REGULAR) {
Copy link
Member

@danirabbit danirabbit Nov 3, 2025

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

@jeremypw jeremypw requested a review from danirabbit November 3, 2025 18:54
@jeremypw
Copy link
Contributor Author

jeremypw commented Nov 3, 2025

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

Copy link
Member

@lenemter lenemter left a comment

Choose a reason for hiding this comment

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

LGTM

@lenemter lenemter merged commit f146424 into main Nov 7, 2025
4 checks passed
@lenemter lenemter deleted the jeremypw/folders-no-default-app branch November 7, 2025 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bitesize Simple, small diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should not show "Set as default " option for folders

4 participants