Merge pull request #72603 from Calinou/os-alert-linuxbsd-use-warning-icon

Use a "warning" icon in `OS.alert()` on Linux/*BSD
This commit is contained in:
Rémi Verschelde 2023-02-02 16:27:43 +01:00
commit 011fa7c9c4
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -81,7 +81,7 @@ void OS_LinuxBSD::alert(const String &p_alert, const String &p_title) {
List<String> args;
if (program.ends_with("zenity")) {
args.push_back("--error");
args.push_back("--warning");
args.push_back("--width");
args.push_back("500");
args.push_back("--title");
@ -91,7 +91,9 @@ void OS_LinuxBSD::alert(const String &p_alert, const String &p_title) {
}
if (program.ends_with("kdialog")) {
args.push_back("--error");
// `--sorry` uses the same icon as `--warning` in Zenity.
// As of KDialog 22.12.1, its `--warning` options are only available for yes/no questions.
args.push_back("--sorry");
args.push_back(p_alert);
args.push_back("--title");
args.push_back(p_title);