Closed schirmeier closed 3 years ago
Looks to me like this isn't YAD's fault but GTK+'s. In case I press ENTER instead of clicking OK, gtk_file_chooser_get_filenames() (src/file.c:133
) returns a single-element GSList* instead of multiple entries.
I filed a GTK+ bug report: https://gitlab.gnome.org/GNOME/gtk/-/issues/3700
No, this is not a gtk bug. Yad dialogs is a normal windows, not a GtkDialog. For some kinds of dialogs Return key has a special meaning, that`s why you must use ctrl+enter as a keyboard shortcut for OK button
OK -- that's not really obvious (let's call it a "UI bug"?), but solves my issue. Thanks!
When I confirm a multi-file selection (
yad --file-selection --multiple
) by hitting the ENTER key instead of clicking on OK, yad only returns the most-recently selected file instead of all selected ones.Steps to reproduce:
Expected result:
/tmp/test/a|/tmp/test/b
Actual result (seen when clicking OK instead of pressing ENTER):
/tmp/test/b
I'm using YAD on Ubuntu 20.04 (x86_64):
Edit: I understand Ubuntu 20.04 uses an ancient version of YAD. However, the current git HEAD (v8.0-1-g06d526a) exhibits the same behavior when run with
yad --file --multiple
. (--file-selection
seems to have been renamed to--file
, breaking backward compatibility.)