1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-01 08:29:27 +02:00

Remove another use of cwd for default opening paths

This commit is contained in:
Paul Licameli 2017-08-03 06:41:38 -04:00
parent 5f7353af66
commit af447a87c3

View File

@ -50,6 +50,7 @@
#include "AllThemeResources.h" #include "AllThemeResources.h"
#include "FileDialog.h" #include "FileDialog.h"
#include "FileNames.h"
#include "import/Import.h" #include "import/Import.h"
#define ChainsListID 7001 #define ChainsListID 7001
@ -237,7 +238,6 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
return; return;
} }
wxString path = gPrefs->Read(wxT("/DefaultOpenPath"), ::wxGetCwd());
wxString prompt = _("Select file(s) for batch processing..."); wxString prompt = _("Select file(s) for batch processing...");
FormatList l; FormatList l;
@ -279,6 +279,7 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
} }
} }
auto path = FileNames::FindDefaultPath(FileNames::Operation::Open);
FileDialog dlog(this, FileDialog dlog(this,
prompt, prompt,
path, path,
@ -290,7 +291,7 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
if (dlog.ShowModal() != wxID_OK) { if (dlog.ShowModal() != wxID_OK) {
return; return;
} }
wxArrayString files; wxArrayString files;
dlog.GetPaths(files); dlog.GetPaths(files);