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

OpenFile dialog shouldn't include "Open as read-only" by default. #83

Open
gamagan opened this issue Mar 9, 2023 · 0 comments
Open

Comments

@gamagan
Copy link

gamagan commented Mar 9, 2023

By default, on Windows, the OpenFile dialog has the open button with a dropdown with allows selecting of 'Open as read-only'. However, PFD has no way to communicate that this option was selected, when it returns the file path(s). Further, this option shouldn't be the default behavior, as most applications wouldn't make use of that functionality.

image

Changing this behavior is straight forward.

1065)   file_dialog::file_dialog(...) { ...

1187)            if (options & opt::multiselect)
1188)                ofn.Flags |= OFN_ALLOWMULTISELECT;
1189)            ofn.Flags |= OFN_PATHMUSTEXIST;
1190)            ofn.Flags |= OFN_HIDEREADONLY ;       // Add this flag.

The result dialog would look like this:
image

samangh added a commit to samangh/portable-file-dialogs that referenced this issue Mar 10, 2024
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

No branches or pull requests

1 participant