diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2017-08-15 16:28:16 -0400 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2017-08-15 16:29:21 -0400 |
commit | 9fe4993bdc8a166c60c1191292aa353d1937f109 (patch) | |
tree | 382c640cd1aca8dca592365de8fd14495f664c51 /src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp | |
parent | Merge branch 'master' of github.com:trueos/lumina (diff) | |
download | lumina-9fe4993bdc8a166c60c1191292aa353d1937f109.tar.gz lumina-9fe4993bdc8a166c60c1191292aa353d1937f109.tar.bz2 lumina-9fe4993bdc8a166c60c1191292aa353d1937f109.zip |
Added translations to menu buttons and the panel settings dialogue
Diffstat (limited to 'src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp | 12 |
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; |