Skip to content

Commit 108c603

Browse files
committed
Merge pull request #96203 from bruvzg/fd_all_filter
[Linux] Fix "all files" filter in the native file dialog.
2 parents 35be8ac + 7b4e3e0 commit 108c603

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

platform/linuxbsd/freedesktop_portal_desktop.cpp

+13-4
Original file line numberDiff line numberDiff line change
@@ -377,17 +377,26 @@ Error FreeDesktopPortalDesktop::file_dialog_show(DisplayServer::WindowID p_windo
377377
String flt = tokens[0].strip_edges();
378378
if (!flt.is_empty()) {
379379
if (tokens.size() == 2) {
380-
filter_exts.push_back(flt);
380+
if (flt == "*.*") {
381+
filter_exts.push_back("*");
382+
} else {
383+
filter_exts.push_back(flt);
384+
}
381385
filter_names.push_back(tokens[1]);
382386
} else {
383-
filter_exts.push_back(flt);
384-
filter_names.push_back(flt);
387+
if (flt == "*.*") {
388+
filter_exts.push_back("*");
389+
filter_names.push_back(RTR("All Files"));
390+
} else {
391+
filter_exts.push_back(flt);
392+
filter_names.push_back(flt);
393+
}
385394
}
386395
}
387396
}
388397
}
389398
if (filter_names.is_empty()) {
390-
filter_exts.push_back("*.*");
399+
filter_exts.push_back("*");
391400
filter_names.push_back(RTR("All Files"));
392401
}
393402

0 commit comments

Comments
 (0)