mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
ThemeEditor: Warn about unsaved changes on file open
This commit is contained in:
parent
6b8d351b40
commit
9805cdeaf5
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