aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-08-17 16:03:32 +0000
committerWeblate <noreply@weblate.org>2017-08-17 16:03:32 +0000
commita47ab10c6ea6057de5567f66292250d187d75ab9 (patch)
treed0cde7717f8fec52697d178dc6ef2a79ce927d68 /src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
parentTranslated using Weblate (Portuguese (Brazil)) (diff)
parentMerge remote-tracking branch 'origin/master' (diff)
downloadlumina-a47ab10c6ea6057de5567f66292250d187d75ab9.tar.gz
lumina-a47ab10c6ea6057de5567f66292250d187d75ab9.tar.bz2
lumina-a47ab10c6ea6057de5567f66292250d187d75ab9.zip
Merge remote-tracking branch 'origin/master'
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