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

Implement file dialog default extension in mac & gtk #390

Open
xStrom opened this issue Dec 12, 2019 · 0 comments
Open

Implement file dialog default extension in mac & gtk #390

xStrom opened this issue Dec 12, 2019 · 0 comments
Labels
help wanted has no one working on it yet shell/gtk concerns the GTK backend shell/mac concerns the macOS backend

Comments

@xStrom
Copy link
Member

xStrom commented Dec 12, 2019

The FileDialogOptions struct has a field default_type: Option<FileSpec> that specifies which of the types in allowed_types: Option<Vec<FileSpec>> is the default. If no default_type is specified or if default_type isn't actually among allowed_types then the first entry of allowed_types is the default.

PR #387 implemented it for Windows. In Windows allowed_types translate into a dropdown control in the file picker dialog and default_type determines which item in that dropdown is preselected.

This behavior needs to also be implemented in the mac and gtk platform code. If this behavior can't be implemented or doesn't make sense on the platform, then comments describing that are definitely welcome.

@cmyr cmyr added help wanted has no one working on it yet shell/gtk concerns the GTK backend shell/mac concerns the macOS backend labels Dec 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted has no one working on it yet shell/gtk concerns the GTK backend shell/mac concerns the macOS backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants