-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 Open Dialog Should Support Opening Folders #941
Comments
Moving to 1.3 alongside the other file picker work, @andydotxyz if you think this should be 1.3.x feel free to move over |
Probably requires some discussion, as I have not figured out how we can do this. |
Agreed, moving to 1.3.x |
Idea: this could leverage the proposed file filtering feature, to filter out files and only show directories. |
I agree with @stuartmscott that this would be very good to see in an upcoming release in 1.3.x. Having this implemented would make the file picker implementation more or less complete in my opinion. I think the idea about using the (now implemented as far as I am aware) file filters would be a good idea for this. Looking at the folder selection in Chrome for selecting where downloads should be saved, it looks like they are not showing any files at all and only folders. So in theory (yes it is always harder to do in practice) we could just use the file filtering to turn of showing files and then modify the FileOpen dialog layout to send the callback on the currently viewed folder instead of selecting any files. |
Your scheme seems feasible, but what type should I filter? The folder has no type, can you give the code that can be run |
I think that @stuartmscott was just proposing ways that this could be built internally - even with the right filtering the dialog does not support picking of a folder |
This can be done as soon as we have the dialog.ShowFileOpen(func(dir fyne.ListableURI, err error) {
if err != nil {
dialog.ShowError(err, win)
return
}
loadDir(dir)
}, win) |
But not yet fyne.ListableURI |
Correct. It is being worked on in PR #1233 |
That is a function that I really need now. For my application scenario, is necessary that the user select a folder to watch for changes. Is there any work around that a I can make the folder selection work? |
There is no workaround, it needs support coded into the file picker, desktop driver and mobile drivers to function correctly. |
Will that feature released in the next version? Is there that feature in the road map of the project? |
It’s hard to say at this point. We have it prioritised for 1.4 but a lot of other work has to be crammed in too. And this time we have a hard deadline as Google is making updated Android API support required in 2 weeks time! Of course we always try to accommodate the needs of our sponsors :) https://github.com/sponsors/fyne-io |
I'll sponsor the fyne :) ! |
THanks @angelopolotto ❤️ |
This does open mobile pickers as well, though the lack of ListableURI in mobile means it does not return correctly. Fixes fyne-io#941
If you want a preview you can now test out this functionality from the PR #1449. |
Amazing news!!! I'll test that. The 1.4 release will be a great evolution of Fyne, you will need a wine to celebrate. Is all the milestone on github projetcs? |
Resolved and ready for testing on |
You can see what else is in 1.4 using the milestone link https://github.com/fyne-io/fyne/milestone/11. We may not get all the features in but the blockers will be resolved for sure :) |
Is your feature request related to a problem? Please describe:
It is only possible for the user to open a file, it is not possible for the user to open a folder.
Is it possible to construct a solution with the existing API?
No
Describe the solution you'd like to see:
It should be possible to show a dialog for the user to select a folder, either through the existing ShowOpenDialog, or a new ShowOpenFolderDialog.
The text was updated successfully, but these errors were encountered: