mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
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.
This commit is contained in:
parent
6568765e8f
commit
27bd2eab22
30 changed files with 109 additions and 135 deletions
|
@ -77,7 +77,7 @@ int main(int argc, char** argv)
|
|||
Vector<String> character_map_files;
|
||||
Core::DirIterator iterator("/res/keymaps/", Core::DirIterator::Flags::SkipDots);
|
||||
if (iterator.has_error()) {
|
||||
GUI::MessageBox::show(String::format("Error on reading mapping file list: %d", iterator.error_string()), "Keyboard settings", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK);
|
||||
GUI::MessageBox::show(nullptr, String::format("Error on reading mapping file list: %d", iterator.error_string()), "Keyboard settings", GUI::MessageBox::Type::Error);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ int main(int argc, char** argv)
|
|||
auto apply_settings = [&](bool quit) {
|
||||
String character_map_file = character_map_file_combo.text();
|
||||
if (character_map_file.is_empty()) {
|
||||
GUI::MessageBox::show("Please select character mapping file.", "Keyboard settings", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK, window);
|
||||
GUI::MessageBox::show(window, "Please select character mapping file.", "Keyboard settings", GUI::MessageBox::Type::Error);
|
||||
return;
|
||||
}
|
||||
pid_t child_pid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue