Qt: Add titles to various message boxes

This commit is contained in:
Techjar 2018-06-29 23:27:47 -04:00
parent e22c5333ab
commit 7785255470
5 changed files with 16 additions and 1 deletions

View File

@ -330,6 +330,7 @@ void ControllersWindow::OnBluetoothPassthroughResetPressed()
{ {
QMessageBox error(this); QMessageBox error(this);
error.setIcon(QMessageBox::Warning); 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.setText(tr("Saved Wii Remote pairings can only be reset when a Wii game is running."));
error.exec(); error.exec();
return; return;
@ -350,6 +351,7 @@ void ControllersWindow::OnBluetoothPassthroughSyncPressed()
{ {
QMessageBox error(this); QMessageBox error(this);
error.setIcon(QMessageBox::Warning); error.setIcon(QMessageBox::Warning);
error.setWindowTitle(tr("Warning"));
error.setText(tr("A sync can only be triggered when a Wii game is running.")); error.setText(tr("A sync can only be triggered when a Wii game is running."));
error.exec(); error.exec();
return; return;
@ -462,6 +464,7 @@ void ControllersWindow::UnimplementedButton()
QMessageBox error_dialog(this); QMessageBox error_dialog(this);
error_dialog.setIcon(QMessageBox::Warning); error_dialog.setIcon(QMessageBox::Warning);
error_dialog.setWindowTitle(tr("Unimplemented"));
error_dialog.setText(tr("Not implemented yet.")); error_dialog.setText(tr("Not implemented yet."));
error_dialog.exec(); error_dialog.exec();
} }

View File

@ -156,6 +156,7 @@ void MappingWindow::OnDeleteProfilePressed()
{ {
QMessageBox error(this); QMessageBox error(this);
error.setIcon(QMessageBox::Critical); error.setIcon(QMessageBox::Critical);
error.setWindowTitle(tr("Error"));
error.setText(tr("The profile '%1' does not exist").arg(profile_name)); error.setText(tr("The profile '%1' does not exist").arg(profile_name));
error.exec(); error.exec();
return; return;
@ -164,6 +165,7 @@ void MappingWindow::OnDeleteProfilePressed()
QMessageBox confirm(this); QMessageBox confirm(this);
confirm.setIcon(QMessageBox::Warning); confirm.setIcon(QMessageBox::Warning);
confirm.setWindowTitle(tr("Confirm"));
confirm.setText(tr("Are you sure that you want to delete '%1'?").arg(profile_name)); confirm.setText(tr("Are you sure that you want to delete '%1'?").arg(profile_name));
confirm.setInformativeText(tr("This cannot be undone!")); confirm.setInformativeText(tr("This cannot be undone!"));
confirm.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel); confirm.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
@ -179,6 +181,7 @@ void MappingWindow::OnDeleteProfilePressed()
QMessageBox result(this); QMessageBox result(this);
result.setIcon(QMessageBox::Information); result.setIcon(QMessageBox::Information);
result.setWindowTitle(tr("Success"));
result.setText(tr("Successfully deleted '%1'.").arg(profile_name)); result.setText(tr("Successfully deleted '%1'.").arg(profile_name));
} }

View File

@ -401,6 +401,7 @@ void GameList::CompressISO(bool decompress)
{ {
QMessageBox wii_warning(this); QMessageBox wii_warning(this);
wii_warning.setIcon(QMessageBox::Warning); wii_warning.setIcon(QMessageBox::Warning);
wii_warning.setWindowTitle(tr("Confirm"));
wii_warning.setText(tr("Are you sure?")); wii_warning.setText(tr("Are you sure?"));
wii_warning.setInformativeText(tr( wii_warning.setInformativeText(tr(
"Compressing a Wii disc image will irreversibly change the compressed copy by removing " "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); QMessageBox confirm_replace(this);
confirm_replace.setIcon(QMessageBox::Warning); confirm_replace.setIcon(QMessageBox::Warning);
confirm_replace.setWindowTitle(tr("Confirm"));
confirm_replace.setText(tr("The file %1 already exists.\n" confirm_replace.setText(tr("The file %1 already exists.\n"
"Do you wish to replace it?") "Do you wish to replace it?")
.arg(dst_info.fileName())); .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()) : decompress ? tr("Successfully decompressed %n image(s).", "", files.size()) :
tr("Successfully compressed %n image(s).", "", files.size()), tr("Successfully compressed %n image(s).", "", files.size()),
QMessageBox::Ok, this) QMessageBox::Ok, this)
@ -515,6 +517,7 @@ void GameList::InstallWAD()
const bool success = WiiUtils::InstallWAD(GetSelectedGame()->GetFilePath()); const bool success = WiiUtils::InstallWAD(GetSelectedGame()->GetFilePath());
result_dialog.setIcon(success ? QMessageBox::Information : QMessageBox::Critical); 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.") : result_dialog.setText(success ? tr("Successfully installed this title to the NAND.") :
tr("Failed to install this title to the NAND.")); tr("Failed to install this title to the NAND."));
result_dialog.exec(); result_dialog.exec();
@ -525,6 +528,7 @@ void GameList::UninstallWAD()
QMessageBox warning_dialog(this); QMessageBox warning_dialog(this);
warning_dialog.setIcon(QMessageBox::Information); warning_dialog.setIcon(QMessageBox::Information);
warning_dialog.setWindowTitle(tr("Confirm"));
warning_dialog.setText(tr("Uninstalling the WAD will remove the currently installed version of " 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?")); "this title from the NAND without deleting its save data. Continue?"));
warning_dialog.setStandardButtons(QMessageBox::No | QMessageBox::Yes); warning_dialog.setStandardButtons(QMessageBox::No | QMessageBox::Yes);
@ -537,6 +541,7 @@ void GameList::UninstallWAD()
const bool success = WiiUtils::UninstallTitle(GetSelectedGame()->GetTitleID()); const bool success = WiiUtils::UninstallTitle(GetSelectedGame()->GetTitleID());
result_dialog.setIcon(success ? QMessageBox::Information : QMessageBox::Critical); 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.") : result_dialog.setText(success ? tr("Successfully removed this title from the NAND.") :
tr("Failed to remove this title from the NAND.")); tr("Failed to remove this title from the NAND."));
result_dialog.exec(); result_dialog.exec();
@ -589,6 +594,7 @@ void GameList::DeleteFile()
QMessageBox error_dialog(this); QMessageBox error_dialog(this);
error_dialog.setIcon(QMessageBox::Critical); error_dialog.setIcon(QMessageBox::Critical);
error_dialog.setWindowTitle(tr("Failure"));
error_dialog.setText(tr("Failed to delete the selected file.")); error_dialog.setText(tr("Failed to delete the selected file."));
error_dialog.setInformativeText(tr("Check whether you have the permissions required to " error_dialog.setInformativeText(tr("Check whether you have the permissions required to "
"delete the file or whether it's still in use.")); "delete the file or whether it's still in use."));

View File

@ -187,6 +187,7 @@ int main(int argc, char* argv[])
analytics_prompt.setIcon(QMessageBox::Question); analytics_prompt.setIcon(QMessageBox::Question);
analytics_prompt.setStandardButtons(QMessageBox::Yes | QMessageBox::No); analytics_prompt.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
analytics_prompt.setWindowTitle(QObject::tr("Allow analytics"));
analytics_prompt.setText( analytics_prompt.setText(
QObject::tr("Do you authorize Dolphin to report information to Dolphin's developers?")); QObject::tr("Do you authorize Dolphin to report information to Dolphin's developers?"));
analytics_prompt.setInformativeText( analytics_prompt.setInformativeText(

View File

@ -941,11 +941,13 @@ void MenuBar::InstallWAD()
{ {
Settings::Instance().NANDRefresh(); Settings::Instance().NANDRefresh();
result_dialog.setIcon(QMessageBox::Information); result_dialog.setIcon(QMessageBox::Information);
result_dialog.setWindowTitle(tr("Success"));
result_dialog.setText(tr("Successfully installed this title to the NAND.")); result_dialog.setText(tr("Successfully installed this title to the NAND."));
} }
else else
{ {
result_dialog.setIcon(QMessageBox::Critical); result_dialog.setIcon(QMessageBox::Critical);
result_dialog.setWindowTitle(tr("Failure"));
result_dialog.setText(tr("Failed to install this title to the NAND.")); result_dialog.setText(tr("Failed to install this title to the NAND."));
} }