From 7785255470a013c316e9b4ad47cdcf92a992fa39 Mon Sep 17 00:00:00 2001 From: Techjar Date: Fri, 29 Jun 2018 23:27:47 -0400 Subject: [PATCH] Qt: Add titles to various message boxes --- Source/Core/DolphinQt2/Config/ControllersWindow.cpp | 3 +++ Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp | 3 +++ Source/Core/DolphinQt2/GameList/GameList.cpp | 8 +++++++- Source/Core/DolphinQt2/Main.cpp | 1 + Source/Core/DolphinQt2/MenuBar.cpp | 2 ++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp index 6082875920..eea36c2e43 100644 --- a/Source/Core/DolphinQt2/Config/ControllersWindow.cpp +++ b/Source/Core/DolphinQt2/Config/ControllersWindow.cpp @@ -330,6 +330,7 @@ void ControllersWindow::OnBluetoothPassthroughResetPressed() { QMessageBox error(this); error.setIcon(QMessageBox::Warning); + error.setWindowTitle(tr("Warning")); error.setText(tr("Saved Wii Remote pairings can only be reset when a Wii game is running.")); error.exec(); return; @@ -350,6 +351,7 @@ void ControllersWindow::OnBluetoothPassthroughSyncPressed() { QMessageBox error(this); error.setIcon(QMessageBox::Warning); + error.setWindowTitle(tr("Warning")); error.setText(tr("A sync can only be triggered when a Wii game is running.")); error.exec(); return; @@ -462,6 +464,7 @@ void ControllersWindow::UnimplementedButton() QMessageBox error_dialog(this); error_dialog.setIcon(QMessageBox::Warning); + error_dialog.setWindowTitle(tr("Unimplemented")); error_dialog.setText(tr("Not implemented yet.")); error_dialog.exec(); } diff --git a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp index 8c12276c26..c3658a5ea9 100644 --- a/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp +++ b/Source/Core/DolphinQt2/Config/Mapping/MappingWindow.cpp @@ -156,6 +156,7 @@ void MappingWindow::OnDeleteProfilePressed() { QMessageBox error(this); error.setIcon(QMessageBox::Critical); + error.setWindowTitle(tr("Error")); error.setText(tr("The profile '%1' does not exist").arg(profile_name)); error.exec(); return; @@ -164,6 +165,7 @@ void MappingWindow::OnDeleteProfilePressed() QMessageBox confirm(this); confirm.setIcon(QMessageBox::Warning); + confirm.setWindowTitle(tr("Confirm")); confirm.setText(tr("Are you sure that you want to delete '%1'?").arg(profile_name)); confirm.setInformativeText(tr("This cannot be undone!")); confirm.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel); @@ -179,6 +181,7 @@ void MappingWindow::OnDeleteProfilePressed() QMessageBox result(this); result.setIcon(QMessageBox::Information); + result.setWindowTitle(tr("Success")); result.setText(tr("Successfully deleted '%1'.").arg(profile_name)); } diff --git a/Source/Core/DolphinQt2/GameList/GameList.cpp b/Source/Core/DolphinQt2/GameList/GameList.cpp index de27ecbc42..6bcbfb88b9 100644 --- a/Source/Core/DolphinQt2/GameList/GameList.cpp +++ b/Source/Core/DolphinQt2/GameList/GameList.cpp @@ -401,6 +401,7 @@ void GameList::CompressISO(bool decompress) { QMessageBox wii_warning(this); wii_warning.setIcon(QMessageBox::Warning); + wii_warning.setWindowTitle(tr("Confirm")); wii_warning.setText(tr("Are you sure?")); wii_warning.setInformativeText(tr( "Compressing a Wii disc image will irreversibly change the compressed copy by removing " @@ -460,6 +461,7 @@ void GameList::CompressISO(bool decompress) { QMessageBox confirm_replace(this); confirm_replace.setIcon(QMessageBox::Warning); + confirm_replace.setWindowTitle(tr("Confirm")); confirm_replace.setText(tr("The file %1 already exists.\n" "Do you wish to replace it?") .arg(dst_info.fileName())); @@ -501,7 +503,7 @@ void GameList::CompressISO(bool decompress) } } - QMessageBox(QMessageBox::Information, tr("Success!"), + QMessageBox(QMessageBox::Information, tr("Success"), decompress ? tr("Successfully decompressed %n image(s).", "", files.size()) : tr("Successfully compressed %n image(s).", "", files.size()), QMessageBox::Ok, this) @@ -515,6 +517,7 @@ void GameList::InstallWAD() const bool success = WiiUtils::InstallWAD(GetSelectedGame()->GetFilePath()); result_dialog.setIcon(success ? QMessageBox::Information : QMessageBox::Critical); + result_dialog.setWindowTitle(success ? tr("Success") : tr("Failure")); result_dialog.setText(success ? tr("Successfully installed this title to the NAND.") : tr("Failed to install this title to the NAND.")); result_dialog.exec(); @@ -525,6 +528,7 @@ void GameList::UninstallWAD() QMessageBox warning_dialog(this); warning_dialog.setIcon(QMessageBox::Information); + warning_dialog.setWindowTitle(tr("Confirm")); warning_dialog.setText(tr("Uninstalling the WAD will remove the currently installed version of " "this title from the NAND without deleting its save data. Continue?")); warning_dialog.setStandardButtons(QMessageBox::No | QMessageBox::Yes); @@ -537,6 +541,7 @@ void GameList::UninstallWAD() const bool success = WiiUtils::UninstallTitle(GetSelectedGame()->GetTitleID()); result_dialog.setIcon(success ? QMessageBox::Information : QMessageBox::Critical); + result_dialog.setWindowTitle(success ? tr("Success") : tr("Failure")); result_dialog.setText(success ? tr("Successfully removed this title from the NAND.") : tr("Failed to remove this title from the NAND.")); result_dialog.exec(); @@ -589,6 +594,7 @@ void GameList::DeleteFile() QMessageBox error_dialog(this); error_dialog.setIcon(QMessageBox::Critical); + error_dialog.setWindowTitle(tr("Failure")); error_dialog.setText(tr("Failed to delete the selected file.")); error_dialog.setInformativeText(tr("Check whether you have the permissions required to " "delete the file or whether it's still in use.")); diff --git a/Source/Core/DolphinQt2/Main.cpp b/Source/Core/DolphinQt2/Main.cpp index b5b1dd034d..c98b5c99c9 100644 --- a/Source/Core/DolphinQt2/Main.cpp +++ b/Source/Core/DolphinQt2/Main.cpp @@ -187,6 +187,7 @@ int main(int argc, char* argv[]) analytics_prompt.setIcon(QMessageBox::Question); analytics_prompt.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + analytics_prompt.setWindowTitle(QObject::tr("Allow analytics")); analytics_prompt.setText( QObject::tr("Do you authorize Dolphin to report information to Dolphin's developers?")); analytics_prompt.setInformativeText( diff --git a/Source/Core/DolphinQt2/MenuBar.cpp b/Source/Core/DolphinQt2/MenuBar.cpp index fb94d96d25..3487bc85b3 100644 --- a/Source/Core/DolphinQt2/MenuBar.cpp +++ b/Source/Core/DolphinQt2/MenuBar.cpp @@ -941,11 +941,13 @@ void MenuBar::InstallWAD() { Settings::Instance().NANDRefresh(); result_dialog.setIcon(QMessageBox::Information); + result_dialog.setWindowTitle(tr("Success")); result_dialog.setText(tr("Successfully installed this title to the NAND.")); } else { result_dialog.setIcon(QMessageBox::Critical); + result_dialog.setWindowTitle(tr("Failure")); result_dialog.setText(tr("Failed to install this title to the NAND.")); }