1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 09:54:57 +00:00

LibGUI+Userland: Make Dialog::ExecResult an enum class

This commit is contained in:
Sam Atkins 2022-05-13 13:10:27 +01:00 committed by Linus Groh
parent 1f82beded3
commit cdffe556c8
90 changed files with 232 additions and 232 deletions

View file

@ -329,13 +329,13 @@ void OutOfProcessWebView::notify_server_did_request_alert(Badge<WebContentClient
bool OutOfProcessWebView::notify_server_did_request_confirm(Badge<WebContentClient>, String const& message)
{
auto confirm_result = GUI::MessageBox::show(window(), message, "Confirm", GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::OKCancel);
return confirm_result == GUI::Dialog::ExecResult::ExecOK;
return confirm_result == GUI::Dialog::ExecResult::OK;
}
String OutOfProcessWebView::notify_server_did_request_prompt(Badge<WebContentClient>, String const& message, String const& default_)
{
String response { default_ };
if (GUI::InputBox::show(window(), response, message, "Prompt") == GUI::InputBox::ExecOK)
if (GUI::InputBox::show(window(), response, message, "Prompt") == GUI::InputBox::ExecResult::OK)
return response;
return {};
}