From 80b3d7ccb8a3199b7f9a98cc2d3e7a92a0b1842e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 13 May 2018 15:34:30 +0200 Subject: WiiSave: Allow users to specify export directory Export and ExportAll now open a directory picker (that defaults to the previous default directory, i.e. the Dolphin user dir). Also removes the need to return the path in the export functions since the user knows which path they chose. --- Source/Core/DolphinQt2/MenuBar.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Source/Core/DolphinQt2/MenuBar.cpp') diff --git a/Source/Core/DolphinQt2/MenuBar.cpp b/Source/Core/DolphinQt2/MenuBar.cpp index 61df3f967c..5f939fb087 100644 --- a/Source/Core/DolphinQt2/MenuBar.cpp +++ b/Source/Core/DolphinQt2/MenuBar.cpp @@ -907,10 +907,15 @@ void MenuBar::ImportWiiSave() void MenuBar::ExportWiiSaves() { - const std::pair result = WiiSave::ExportAll(); + const QString export_dir = QFileDialog::getExistingDirectory( + this, tr("Select Export Directory"), QString::fromStdString(File::GetUserPath(D_USER_IDX)), + QFileDialog::ShowDirsOnly); + if (export_dir.isEmpty()) + return; + + const size_t count = WiiSave::ExportAll(export_dir.toStdString()); QMessageBox::information(this, tr("Save Export"), - tr("Exported %n save(s) to %1", "", static_cast(result.first)) - .arg(QString::fromStdString(result.second))); + tr("Exported %n save(s)", "", static_cast(count))); } void MenuBar::CheckNAND() -- cgit v1.2.3