mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 16:35:08 +00:00
LibGUI+Userland: Make Dialog::ExecResult an enum class
This commit is contained in:
parent
1f82beded3
commit
cdffe556c8
90 changed files with 232 additions and 232 deletions
|
@ -177,9 +177,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
TRY(file_menu->try_add_action(GUI::CommonActions::make_open_action([&](auto&) {
|
||||
if (window->is_modified()) {
|
||||
auto result = GUI::MessageBox::ask_about_unsaved_changes(window, file_path, editor->document().undo_stack().last_unmodified_timestamp());
|
||||
if (result == GUI::MessageBox::ExecYes)
|
||||
if (result == GUI::MessageBox::ExecResult::Yes)
|
||||
save_action->activate();
|
||||
if (result != GUI::MessageBox::ExecNo && window->is_modified())
|
||||
if (result != GUI::MessageBox::ExecResult::No && window->is_modified())
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -257,14 +257,14 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return GUI::Window::CloseRequestDecision::Close;
|
||||
|
||||
auto result = GUI::MessageBox::ask_about_unsaved_changes(window, file_path, editor->document().undo_stack().last_unmodified_timestamp());
|
||||
if (result == GUI::MessageBox::ExecYes) {
|
||||
if (result == GUI::MessageBox::ExecResult::Yes) {
|
||||
save_action->activate();
|
||||
if (window->is_modified())
|
||||
return GUI::Window::CloseRequestDecision::StayOpen;
|
||||
return GUI::Window::CloseRequestDecision::Close;
|
||||
}
|
||||
|
||||
if (result == GUI::MessageBox::ExecNo)
|
||||
if (result == GUI::MessageBox::ExecResult::No)
|
||||
return GUI::Window::CloseRequestDecision::Close;
|
||||
|
||||
return GUI::Window::CloseRequestDecision::StayOpen;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue