mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-14 13:32:23 +00:00
ThemeEditor: Warn about unsaved changes on file open
This commit is contained in:
parent
6b8d351b40
commit
9805cdeaf5
Notes:
sideshowbarker
2024-07-17 16:23:06 +09:00
Author: https://github.com/krkk
Commit: 9805cdeaf5
Pull-request: https://github.com/SerenityOS/serenity/pull/15940
1 changed files with 2 additions and 0 deletions
|
@ -208,6 +208,8 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
{
|
||||
auto file_menu = TRY(window.try_add_menu("&File"));
|
||||
TRY(file_menu->try_add_action(GUI::CommonActions::make_open_action([&](auto&) {
|
||||
if (request_close() == GUI::Window::CloseRequestDecision::StayOpen)
|
||||
return;
|
||||
auto response = FileSystemAccessClient::Client::the().try_open_file(&window, "Select theme file", "/res/themes"sv);
|
||||
if (response.is_error())
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue