mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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:
@ -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