nativefiledialog
nativefiledialog copied to clipboard
Zenity does not append extensions from filterlist onto return value
As of c0e491055bba7b6e0326e2d94566b65e6aebc014, 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.
An issue has been raised on Gnome's bug tracker. https://gitlab.gnome.org/GNOME/zenity/-/issues/27