1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:28:11 +00:00

ThemeEditor: Show a message box if saving fails

This commit is contained in:
Sam Atkins 2022-04-28 17:14:13 +01:00 committed by Andreas Kling
parent e15427c5ba
commit e05d5df6aa

View file

@ -26,6 +26,7 @@
#include <LibGUI/ItemListModel.h>
#include <LibGUI/Menu.h>
#include <LibGUI/Menubar.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/SpinBox.h>
#include <LibGUI/TextBox.h>
#include <LibGUI/Window.h>
@ -312,8 +313,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
}
if (auto sync_result = theme->sync(); sync_result.is_error()) {
// FIXME: Expose this to the user, since failing to save is important to know about!
dbgln("Failed to save theme file: {}", sync_result.error());
GUI::MessageBox::show_error(window, String::formatted("Failed to save theme file: {}", sync_result.error()));
}
};