From 27bd2eab2288c79206f3571bc2c46a20fc9a4254 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 15 Jul 2020 20:45:11 -0600 Subject: LibWeb: Require parent window argument for MessageBox Since the vast majority of message boxes should be modal, require the parent window to be passed in, which can be nullptr for the rare case that they don't. By it being the first argument, the default arguments also don't need to be explicitly stated in most cases, and it encourages passing in a parent window handle. Fix up several message boxes that should have been modal. --- Applications/KeyboardMapper/KeyboardMapperWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Applications/KeyboardMapper/KeyboardMapperWidget.cpp') diff --git a/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Applications/KeyboardMapper/KeyboardMapperWidget.cpp index 9c56464c83..c4eca7c29f 100644 --- a/Applications/KeyboardMapper/KeyboardMapperWidget.cpp +++ b/Applications/KeyboardMapper/KeyboardMapperWidget.cpp @@ -205,7 +205,7 @@ void KeyboardMapperWidget::save_to_file(const StringView& file_name) sb.append(" for write. Error: "); sb.append(file->error_string()); - GUI::MessageBox::show(sb.to_string(), "Error", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK, window()); + GUI::MessageBox::show(window(), sb.to_string(), "Error", GUI::MessageBox::Type::Error); return; } @@ -216,7 +216,7 @@ void KeyboardMapperWidget::save_to_file(const StringView& file_name) sb.append("Unable to save file. Error: "); sb.append(strerror(error_number)); - GUI::MessageBox::show(sb.to_string(), "Error", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK, window()); + GUI::MessageBox::show(window(), sb.to_string(), "Error", GUI::MessageBox::Type::Error); return; } -- cgit v1.2.3