diff options
Diffstat (limited to 'src/modules/theme/SaveThemeDialog.cpp')
| -rw-r--r-- | src/modules/theme/SaveThemeDialog.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/modules/theme/SaveThemeDialog.cpp b/src/modules/theme/SaveThemeDialog.cpp index 00ac0b17f..3043d31ae 100644 --- a/src/modules/theme/SaveThemeDialog.cpp +++ b/src/modules/theme/SaveThemeDialog.cpp @@ -226,8 +226,7 @@ void SaveThemeDialog::imageSelectionChanged(const QString & szImagePath) return; } - QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Failed to load the selected image!", "theme"), - QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); + QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Failed to load the selected image!", "theme")); m_pImageSelector->setSelection(""); m_pImageLabel->setPixmap(QPixmap()); @@ -248,8 +247,7 @@ void SaveThemeDialog::makeScreenshot() g_pApp->getTmpFileName(szFileName, "screenshot.png"); if(!ThemeFunctions::makeKVIrcScreenshot(szFileName)) { - QMessageBox::critical(this, __tr2qs_ctx("Acquire Screenshot - KVIrc", "theme"), __tr2qs_ctx("Failed to make a theme screenshot.", "theme"), - QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); + QMessageBox::critical(this, __tr2qs_ctx("Acquire Screenshot - KVIrc", "theme"), __tr2qs_ctx("Failed to make a theme screenshot.", "theme")); return; } m_pImageSelector->setSelection(szFileName); @@ -264,8 +262,7 @@ bool SaveThemeDialog::saveTheme() sto.setName(m_pThemeNameEdit->text()); if(sto.name().isEmpty()) { - QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("You must choose a theme name.", "theme"), QMessageBox::Ok, - QMessageBox::NoButton, QMessageBox::NoButton); + QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("You must choose a theme name.", "theme")); return false; } @@ -286,8 +283,7 @@ bool SaveThemeDialog::saveTheme() QString szAbsDir = sto.directory(); if(!KviFileUtils::makeDir(szAbsDir)) { - QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Unable to create theme directory.", "theme"), - QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); + QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Unable to create theme directory.", "theme")); return false; } @@ -295,8 +291,7 @@ bool SaveThemeDialog::saveTheme() { QString szErr = sto.lastError(); QString szMsg2 = QString(__tr2qs_ctx("Unable to save theme: %1", "theme")).arg(szErr); - QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), szMsg2, - QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); + QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), szMsg2); return false; } // write down the screenshot, if needed @@ -305,8 +300,7 @@ bool SaveThemeDialog::saveTheme() { if(!KviTheme::saveScreenshots(sto, m_szScreenshotPath)) { - QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Failed to load the selected screenshot image: please fix it", "theme"), - QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); + QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Failed to load the selected screenshot image: please fix it", "theme")); setCurrentPage(m_pImageSelectionPage); return false; } @@ -314,8 +308,7 @@ bool SaveThemeDialog::saveTheme() QString szMsg = __tr2qs_ctx("Theme saved successfully to %1", "theme").arg(szAbsDir); - QMessageBox::information(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), szMsg, QMessageBox::Ok, - QMessageBox::NoButton, QMessageBox::NoButton); + QMessageBox::information(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), szMsg); return true; } |
