mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
ThemeEditor: Show unsaved changes prompt also in the quit action
While the app displayed the prompt on the close button press, the quit action from the menu didn't do so.
This commit is contained in:
parent
4656198127
commit
2d6edd5898
1 changed files with 4 additions and 1 deletions
|
@ -231,7 +231,10 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
})));
|
||||
|
||||
TRY(file_menu->try_add_separator());
|
||||
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { GUI::Application::the()->quit(); })));
|
||||
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) {
|
||||
if (request_close() == GUI::Window::CloseRequestDecision::Close)
|
||||
GUI::Application::the()->quit();
|
||||
})));
|
||||
|
||||
auto accessibility_menu = TRY(window.try_add_menu("&Accessibility"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue