mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 13:35:12 +00:00
Application: Fix for reboot on PowerDialog close button click
This commit is contained in:
parent
3152559422
commit
b3bdab8cf7
Notes:
sideshowbarker
2024-07-19 07:12:58 +09:00
Author: https://github.com/asliturk Commit: https://github.com/SerenityOS/serenity/commit/b3bdab8cf77 Pull-request: https://github.com/SerenityOS/serenity/pull/2005
1 changed files with 5 additions and 5 deletions
|
@ -53,10 +53,10 @@ static const Vector<PowerOption> options = {
|
|||
Vector<char const*> PowerDialog::show()
|
||||
{
|
||||
auto rc = PowerDialog::construct()->exec();
|
||||
if (rc < 0)
|
||||
return {};
|
||||
if(rc == ExecResult::ExecOK)
|
||||
return options[rc].cmd;
|
||||
|
||||
return options[rc].cmd;
|
||||
return {};
|
||||
}
|
||||
|
||||
PowerDialog::PowerDialog()
|
||||
|
@ -103,13 +103,13 @@ PowerDialog::PowerDialog()
|
|||
|
||||
auto& ok_button = button_box.add<GUI::Button>();
|
||||
ok_button.on_click = [this] {
|
||||
done(m_selected_option);
|
||||
done(ExecResult::ExecOK);
|
||||
};
|
||||
ok_button.set_text("OK");
|
||||
|
||||
auto& cancel_button = button_box.add<GUI::Button>();
|
||||
cancel_button.on_click = [this] {
|
||||
done(-1);
|
||||
done(ExecResult::ExecCancel);
|
||||
};
|
||||
cancel_button.set_text("Cancel");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue