diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-08-28 09:45:47 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-08-28 09:45:47 +0200 |
commit | 108c603f91b94100a1adc989316a372f0a6f8989 (patch) | |
tree | 9bbc7c1d0c5db672a7b56b218ae021322ea01283 | |
parent | 35be8acf60b96852cf98242184cca18b7f14a832 (diff) | |
parent | 7b4e3e021ac21b95053dd7c0ed668b0b7b6b344f (diff) | |
download | redot-engine-108c603f91b94100a1adc989316a372f0a6f8989.tar.gz |
Merge pull request #96203 from bruvzg/fd_all_filter
[Linux] Fix "all files" filter in the native file dialog.
-rw-r--r-- | platform/linuxbsd/freedesktop_portal_desktop.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/platform/linuxbsd/freedesktop_portal_desktop.cpp b/platform/linuxbsd/freedesktop_portal_desktop.cpp index 671da7fc2a..2b98fda0d5 100644 --- a/platform/linuxbsd/freedesktop_portal_desktop.cpp +++ b/platform/linuxbsd/freedesktop_portal_desktop.cpp @@ -377,17 +377,26 @@ Error FreeDesktopPortalDesktop::file_dialog_show(DisplayServer::WindowID p_windo String flt = tokens[0].strip_edges(); if (!flt.is_empty()) { if (tokens.size() == 2) { - filter_exts.push_back(flt); + if (flt == "*.*") { + filter_exts.push_back("*"); + } else { + filter_exts.push_back(flt); + } filter_names.push_back(tokens[1]); } else { - filter_exts.push_back(flt); - filter_names.push_back(flt); + if (flt == "*.*") { + filter_exts.push_back("*"); + filter_names.push_back(RTR("All Files")); + } else { + filter_exts.push_back(flt); + filter_names.push_back(flt); + } } } } } if (filter_names.is_empty()) { - filter_exts.push_back("*.*"); + filter_exts.push_back("*"); filter_names.push_back(RTR("All Files")); } |