diff options
author | Tom <tomut@yahoo.com> | 2020-07-15 20:45:11 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-16 16:10:21 +0200 |
commit | 27bd2eab2288c79206f3571bc2c46a20fc9a4254 (patch) | |
tree | 2391eb84dc9fc1a7be2bf1391daf13020b1e0076 /Applications/KeyboardMapper/KeyboardMapperWidget.cpp | |
parent | 6568765e8f89563fa76407ce5e369ec1eb09c125 (diff) | |
download | serenity-27bd2eab2288c79206f3571bc2c46a20fc9a4254.zip |
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.
Diffstat (limited to 'Applications/KeyboardMapper/KeyboardMapperWidget.cpp')
-rw-r--r-- | Applications/KeyboardMapper/KeyboardMapperWidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |