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

file-chooser: Add "directory" option #456

Merged
merged 1 commit into from
Mar 21, 2020

Conversation

hadess
Copy link
Contributor

@hadess hadess commented Mar 13, 2020

Add a new directory option to "OpenFile" to allow selecting directories
instead of files.

@hadess
Copy link
Contributor Author

hadess commented Mar 13, 2020

WIP for #455

Add a new directory option to "OpenFile" to allow selecting directories
instead of files.
@hadess hadess force-pushed the wip/hadess/filechooser-add-dir branch from 04e0bef to c616b49 Compare March 13, 2020 17:20
@matthiasclasen
Copy link
Contributor

One thing I wondered is: would it be nicer to make this a separate OpenDirectory method ?

@hadess
Copy link
Contributor Author

hadess commented Mar 13, 2020

One thing I wondered is: would it be nicer to make this a separate OpenDirectory method ?

I wondered that as well, but apart from the file filters, you'd probably want pretty much all the same options there. Really up to you, at the end of the day, it'd be hidden behind the GtkFileChooserNative API for app developers. Maybe @grulja strongly prefers a separate method?

@grulja
Copy link
Contributor

grulja commented Mar 15, 2020

One thing I wondered is: would it be nicer to make this a separate OpenDirectory method ?

I wondered that as well, but apart from the file filters, you'd probably want pretty much all the same options there. Really up to you, at the end of the day, it'd be hidden behind the GtkFileChooserNative API for app developers. Maybe @grulja strongly prefers a separate method?

In QFileDialog it's basically same, it's same method, just a different flag so I don't have any preference. The QFileDialog has following flags:
AnyFile, ExistingFile, Directory, ExistingFiles
Which means that even for the "multiple" option, it's just a matter of flag combination.

@matthiasclasen matthiasclasen merged commit 29ab4e7 into master Mar 21, 2020
@hadess
Copy link
Contributor Author

hadess commented Mar 21, 2020

Hopefully it works, because I still haven't had time to test it...

@hadess hadess deleted the wip/hadess/filechooser-add-dir branch September 23, 2020 14:11
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

Successfully merging this pull request may close these issues.

3 participants