mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:37:34 +00:00
Spreadsheet: Use the system-wide unsaved changes dialog
This commit is contained in:
parent
42d19977b3
commit
410254dbe2
1 changed files with 1 additions and 2 deletions
|
@ -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";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue