mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02: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:
committed by
Andreas Kling
parent
4656198127
commit
2d6edd5898
Notes:
sideshowbarker
2024-07-17 10:41:24 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/2d6edd5898 Pull-request: https://github.com/SerenityOS/serenity/pull/14071 Reviewed-by: https://github.com/kennethmyhra
@@ -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"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user