summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt2/MenuBar.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2018-05-13 15:34:30 +0200
committerLéo Lam <leo@innovatetechnologi.es>2018-05-13 17:42:56 +0200
commit80b3d7ccb8a3199b7f9a98cc2d3e7a92a0b1842e (patch)
tree6bb89b9d49faacb8ba52c23ed86df537d51a8d38 /Source/Core/DolphinQt2/MenuBar.cpp
parent87e5cd73dc38a664f14b89d29dfb2908c84b9a80 (diff)
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.
Diffstat (limited to 'Source/Core/DolphinQt2/MenuBar.cpp')
-rw-r--r--Source/Core/DolphinQt2/MenuBar.cpp11
1 files changed, 8 insertions, 3 deletions
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<size_t, std::string> 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<int>(result.first))
- .arg(QString::fromStdString(result.second)));
+ tr("Exported %n save(s)", "", static_cast<int>(count)));
}
void MenuBar::CheckNAND()