1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:07:45 +00:00

Spreadsheet: Use the system-wide unsaved changes dialog

This commit is contained in:
Karol Kosek 2022-02-14 15:47:37 +01:00 committed by Tim Flynn
parent 42d19977b3
commit 410254dbe2

View file

@ -421,8 +421,7 @@ bool SpreadsheetWidget::request_close()
if (!m_workbook->dirty()) if (!m_workbook->dirty())
return true; return true;
auto result = GUI::MessageBox::show(window(), "The spreadsheet has been modified. Would you like to save?", "Unsaved changes", GUI::MessageBox::Type::Warning, GUI::MessageBox::InputType::YesNoCancel); auto result = GUI::MessageBox::ask_about_unsaved_changes(window(), current_filename());
if (result == GUI::MessageBox::ExecYes) { if (result == GUI::MessageBox::ExecYes) {
if (current_filename().is_empty()) { if (current_filename().is_empty()) {
String name = "workbook"; String name = "workbook";