summaryrefslogtreecommitdiffstats
path: root/platform/linuxbsd/freedesktop_portal_desktop.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2024-08-28 10:14:01 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2024-08-28 10:14:01 +0300
commit7b4e3e021ac21b95053dd7c0ed668b0b7b6b344f (patch)
tree35c980fa878f598c327ca7be0320f4f99f89c2f0 /platform/linuxbsd/freedesktop_portal_desktop.cpp
parentdb24ed4eadf233f75cb1ebbf7552d396fb8b4b80 (diff)
downloadredot-engine-7b4e3e021ac21b95053dd7c0ed668b0b7b6b344f.tar.gz
[Linux] Fix "all files" filter in the native file dialog.
Diffstat (limited to 'platform/linuxbsd/freedesktop_portal_desktop.cpp')
-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"));
}