aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-08-17 16:02:53 +0000
committerWeblate <noreply@weblate.org>2017-08-17 16:02:53 +0000
commite22937e90e6be7820e11cc9eba47bd0fb1b394e9 (patch)
treebb65904fd9aeee5e6325d12675e10f58cee25b80 /src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
parentTranslated using Weblate (Spanish) (diff)
parentMerge remote-tracking branch 'origin/master' (diff)
downloadlumina-e22937e90e6be7820e11cc9eba47bd0fb1b394e9.tar.gz
lumina-e22937e90e6be7820e11cc9eba47bd0fb1b394e9.tar.bz2
lumina-e22937e90e6be7820e11cc9eba47bd0fb1b394e9.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