aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-08-17 16:11:36 +0000
committerWeblate <noreply@weblate.org>2017-08-17 16:11:36 +0000
commit35915a6a5a72ea5c45af7a787dcad69fee31218b (patch)
tree250dc618a5f8e12f041a1a2166269e3c8c3c4bfa /src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
parentTranslated using Weblate (French) (diff)
parentMerge remote-tracking branch 'origin/master' (diff)
downloadlumina-35915a6a5a72ea5c45af7a787dcad69fee31218b.tar.gz
lumina-35915a6a5a72ea5c45af7a787dcad69fee31218b.tar.bz2
lumina-35915a6a5a72ea5c45af7a787dcad69fee31218b.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
index c894bdf8..48a4ceb4 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
@@ -322,10 +322,14 @@ void MainUI::closeEvent(QCloseEvent *ev){
//qDebug() << "Close Event:" << ui->check_show_popups->isChecked() << picSaved;
if(ui->check_show_popups->isChecked() && !picSaved){
//Ask what to do about the unsaved changed
- const int messageRet = QMessageBox::warning(this, tr("Unsaved Screenshot"),
- tr("The current screenshot has not been saved yet. Do you want to save or discard your changes?"),
- QMessageBox::Discard | QMessageBox::Save |QMessageBox::Cancel, QMessageBox::Cancel);
- switch (messageRet) {
+ QMessageBox dialog( QMessageBox::Warning, tr("Unsaved Screenshot"),
+ tr("The current screenshot has not been saved yet. Do you want to save or discard your changes?"),
+ QMessageBox::Discard | QMessageBox::Save | QMessageBox::Cancel, this);
+ dialog.setDefaultButton(QMessageBox::Cancel);
+ dialog.setButtonText(QMessageBox::Save, tr("Save"));
+ dialog.setButtonText(QMessageBox::Discard, tr("Discard"));
+ dialog.setButtonText(QMessageBox::Cancel, tr("Cancel"));
+ switch (dialog.exec()) {
case QMessageBox::Discard:
// Just close, we don't care about the file.
break;
bgstack15