mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-24 19:21:37 +00: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:
parent
41c4486c65
commit
a93d816c28
4 changed files with 31 additions and 30 deletions
|
@ -896,13 +896,21 @@ void MenuBar::ImportWiiSave()
|
|||
tr("Wii save files (*.bin);;"
|
||||
"All Files (*)"));
|
||||
|
||||
if (!file.isEmpty())
|
||||
WiiSave::Import(file.toStdString());
|
||||
if (file.isEmpty())
|
||||
return;
|
||||
|
||||
if (WiiSave::Import(file.toStdString()))
|
||||
QMessageBox::information(this, tr("Save Import"), tr("Successfully imported save files."));
|
||||
else
|
||||
QMessageBox::critical(this, tr("Save Import"), tr("Failed to import save files."));
|
||||
}
|
||||
|
||||
void MenuBar::ExportWiiSaves()
|
||||
{
|
||||
WiiSave::ExportAll();
|
||||
const std::pair<size_t, std::string> result = WiiSave::ExportAll();
|
||||
QMessageBox::information(this, tr("Save Export"),
|
||||
tr("Exported %n save(s) to %1", "", static_cast<int>(result.first))
|
||||
.arg(QString::fromStdString(result.second)));
|
||||
}
|
||||
|
||||
void MenuBar::CheckNAND()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue