mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Merge pull request #96203 from bruvzg/fd_all_filter
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions
[Linux] Fix "all files" filter in the native file dialog.
This commit is contained in:
commit
108c603f91
@ -377,8 +377,16 @@ Error FreeDesktopPortalDesktop::file_dialog_show(DisplayServer::WindowID p_windo
|
|||||||
String flt = tokens[0].strip_edges();
|
String flt = tokens[0].strip_edges();
|
||||||
if (!flt.is_empty()) {
|
if (!flt.is_empty()) {
|
||||||
if (tokens.size() == 2) {
|
if (tokens.size() == 2) {
|
||||||
|
if (flt == "*.*") {
|
||||||
|
filter_exts.push_back("*");
|
||||||
|
} else {
|
||||||
filter_exts.push_back(flt);
|
filter_exts.push_back(flt);
|
||||||
|
}
|
||||||
filter_names.push_back(tokens[1]);
|
filter_names.push_back(tokens[1]);
|
||||||
|
} else {
|
||||||
|
if (flt == "*.*") {
|
||||||
|
filter_exts.push_back("*");
|
||||||
|
filter_names.push_back(RTR("All Files"));
|
||||||
} else {
|
} else {
|
||||||
filter_exts.push_back(flt);
|
filter_exts.push_back(flt);
|
||||||
filter_names.push_back(flt);
|
filter_names.push_back(flt);
|
||||||
@ -386,8 +394,9 @@ Error FreeDesktopPortalDesktop::file_dialog_show(DisplayServer::WindowID p_windo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (filter_names.is_empty()) {
|
if (filter_names.is_empty()) {
|
||||||
filter_exts.push_back("*.*");
|
filter_exts.push_back("*");
|
||||||
filter_names.push_back(RTR("All Files"));
|
filter_names.push_back(RTR("All Files"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user