mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
Playground: Ask to save file contents on quit action
Prior this change, activating the action instantly closed the program.
This commit is contained in:
parent
acf3e230b0
commit
c0709c4447
Notes:
sideshowbarker
2024-07-19 17:13:32 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/c0709c44471 Pull-request: https://github.com/SerenityOS/serenity/pull/9996
1 changed files with 2 additions and 1 deletions
|
@ -221,7 +221,8 @@ int main(int argc, char** argv)
|
|||
file_menu.add_separator();
|
||||
|
||||
file_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) {
|
||||
app->quit();
|
||||
if (window->on_close_request() == GUI::Window::CloseRequestDecision::Close)
|
||||
app->quit();
|
||||
}));
|
||||
|
||||
auto& edit_menu = window->add_menu("&Edit");
|
||||
|
|
Loading…
Add table
Reference in a new issue