WiiSave: Move dialogs to UI code
This moves the result dialogs to DolphinQt2, since WiiSave should not really be responsible for interacting with the user as a simple Wii save importing/exporting class. This also fixes Wii save import/export showing result dialogs twice, once from WiiSave, and another time from DolphinQt2.
This commit is contained in:
1 parent
41c4486c65
commit
a93d816c28
4 files changed
+31
-30
No files matched your search
@@ -260,11 +260,13 @@ void GameList::ExportWiiSave()
|
||||
{
|
||||
QMessageBox result_dialog(this);
|
||||
|
||||
const bool success = WiiSave::Export(GetSelectedGame()->GetTitleID());
|
||||
const QString bin_path = QString::fromStdString(WiiSave::Export(GetSelectedGame()->GetTitleID()));
|
||||
|
||||
result_dialog.setIcon(success ? QMessageBox::Information : QMessageBox::Critical);
|
||||
result_dialog.setText(success ? tr("Successfully exported save files") :
|
||||
tr("Failed to export save files!"));
|
||||
result_dialog.setIcon(!bin_path.isEmpty() ? QMessageBox::Information : QMessageBox::Critical);
|
||||
if (!bin_path.isEmpty())
|
||||
result_dialog.setText(tr("Successfully exported save files to %1").arg(bin_path));
|
||||
else
|
||||
result_dialog.setText(tr("Failed to export save files."));
|
||||
result_dialog.exec();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user