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

Zenity does not append extensions from filterlist onto return value #95

Open
mlabbe opened this issue Jan 9, 2021 · 1 comment
Open

Comments

@mlabbe
Copy link
Owner

mlabbe commented Jan 9, 2021

As of c0e4910, the GTK build adds an extension to the returned value. This is done to match the behaviour of the other platforms. This affects the dialogs that return filenames.

The extension is derived from the first filter in the selected list. For example, if the user passes in png,jpg;pdf, then the three extensions that will be presented are:

  • png, jpg
  • pdf
  • *.*

If the user enters some_file with the first filter selected, then some_file.png is returned. If the user enters some_file with the second filter selected, then some_file.pdf is returned. With the third filter selected, some_file is returned.

It appears to not be possible to query which filter was selected when Zenity returns, so this functionality cannot be added to Native File Dialog. As a result, it always returns some_file. If anyone knows a way to get the selected filter from Zenity or a way to provide parity, please update this bug.

@mlabbe
Copy link
Owner Author

mlabbe commented Jan 9, 2021

An issue has been raised on Gnome's bug tracker. https://gitlab.gnome.org/GNOME/zenity/-/issues/27

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