summaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-08-28 09:45:47 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-08-28 09:45:47 +0200
commit108c603f91b94100a1adc989316a372f0a6f8989 (patch)
tree9bbc7c1d0c5db672a7b56b218ae021322ea01283 /platform
parent35be8acf60b96852cf98242184cca18b7f14a832 (diff)
parent7b4e3e021ac21b95053dd7c0ed668b0b7b6b344f (diff)
downloadredot-engine-108c603f91b94100a1adc989316a372f0a6f8989.tar.gz
Merge pull request #96203 from bruvzg/fd_all_filter
[Linux] Fix "all files" filter in the native file dialog.
Diffstat (limited to 'platform')
-rw-r--r--platform/linuxbsd/freedesktop_portal_desktop.cpp17
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"));
}