diff options
Diffstat (limited to 'src-qt5/core-utils/lumina-config/mainWindow.cpp')
-rw-r--r-- | src-qt5/core-utils/lumina-config/mainWindow.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src-qt5/core-utils/lumina-config/mainWindow.cpp b/src-qt5/core-utils/lumina-config/mainWindow.cpp index 3e843354..566cd412 100644 --- a/src-qt5/core-utils/lumina-config/mainWindow.cpp +++ b/src-qt5/core-utils/lumina-config/mainWindow.cpp @@ -127,7 +127,12 @@ void mainWindow::pageSetTitle(QString title){ bool mainWindow::page_change(QString id){ if(ui->actionSave->isEnabled()){ //unsaved changed available - prompt to save first - QMessageBox::StandardButton result = QMessageBox::question(this, tr("Unsaved Changes"), tr("This page currently has unsaved changes, do you wish to save them now?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::No); + QMessageBox dialog(QMessageBox::Question, tr("Unsaved Changes"), tr("This page currently has unsaved changes, do you wish to save them now?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, this); + dialog.setDefaultButton(QMessageBox::No); + dialog.setButtonText(QMessageBox::Yes, tr("Yes")); + dialog.setButtonText(QMessageBox::No, tr("No")); + dialog.setButtonText(QMessageBox::Cancel, tr("Cancel")); + const int result = dialog.exec(); if(result == QMessageBox::Yes){ on_actionSave_triggered(); } else if(result == QMessageBox::Cancel){ return false; } //stop now } |