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

Add a filter that allows everything #211

Closed
vjackson725 opened this issue Aug 25, 2024 · 3 comments
Closed

Add a filter that allows everything #211

vjackson725 opened this issue Aug 25, 2024 · 3 comments

Comments

@vjackson725
Copy link

One feature which is common in file pickers is to have a filter that doesn't actually filter anything. This usually is the last filter, used in case the user wants to load a file the application isn't expecting.

This features does not appear possible using this library. I suggest changing the add_filter to take an optional list, or making a new structure for filters, which a to-string list can be .into()'ed into.

@IohannRabeson
Copy link
Contributor

IohannRabeson commented Nov 24, 2024

I have the same need. To me if the user never calls add_filter then the filtering should be disabled and everything should be visible.
@PolyMeilex What do you think about that? Is there any reasons for filtering all the files by default? Would you be interested if I try to change this behavior?
Another question, I'm having the issue on Windows but maybe it's not the same for other plateforms?
Oh I see for Windows I can use the filter "*" to get everything (see example in https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifiledialog-setfiletypes) but will it work for other plateforms?

@PolyMeilex
Copy link
Owner

To me if the user never calls add_filter then the filtering should be disabled and everything should be visible.

Sounds reasonable, I agree. The fact that it does not act like this is a bug IMO.

@PolyMeilex
Copy link
Owner

You have not stated your platform, so I'll have to assume that fixing it on Windows in #224 fixed it for you.
Reopen if you are on a different platform, and it's still broken there.

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

3 participants