Commit 05976910 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵
Browse files

when closing a dirty settings window, ask the user chat to do

parent 9f07adda
Pipeline #47687 passed with stage
in 9 minutes and 52 seconds
...@@ -320,4 +320,32 @@ Window { ...@@ -320,4 +320,32 @@ Window {
} }
} }
} }
Dialogs.MessageDialog {
id: dirtyClosingDialog
standardButtons: Dialogs.StandardButton.Save | Dialogs.StandardButton.Discard | Dialogs.StandardButton.Cancel
title: i18n("Warning")
icon: Dialogs.StandardIcon.Warning
text: i18n('You have unsaved changes. Do you want to apply the changes or discard them?')
onDiscard: {
ElisaConfigurationDialog.cancel()
dialog.close()
}
onAccepted: {
ElisaConfigurationDialog.save()
dialog.close()
}
}
onClosing: {
if (ElisaConfigurationDialog.isDirty) {
close.accepted = false
dirtyClosingDialog.open()
}
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment