1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 15:49:36 +02:00

Bug 1304 - Starting Save or Export directory is not set, so is unwritable or requires authentication for most users

Covers the case of Export Multiple too.
This commit is contained in:
James Crook 2017-01-18 14:19:06 +00:00
parent 292a74f5c6
commit 97bf72ddb4

View File

@ -237,6 +237,17 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S)
} }
} }
// Bug 1304: Set the default file path. It's used if none stored in config.
wxFileName filename("foo");
filename.AssignHomeDir();
#ifdef __WIN32__
filename.SetPath(filename.GetPath() + "\\Documents");
#else
filename.SetPath(filename.GetPath() + "/Documents");
#endif
wxString DefaultPath = filename.GetPath();
if (mPluginIndex == -1) if (mPluginIndex == -1)
{ {
mPluginIndex = 0; mPluginIndex = 0;
@ -255,7 +266,7 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S)
mDir = S.Id(DirID) mDir = S.Id(DirID)
.TieTextBox(_("Folder:"), .TieTextBox(_("Folder:"),
wxT("/Export/MultiplePath"), wxT("/Export/MultiplePath"),
gPrefs->Read(wxT("/Export/Path"), ::wxGetCwd()), gPrefs->Read(wxT("/Export/Path"), DefaultPath ),
64); 64);
S.Id(ChooseID).AddButton(_("Choose...")); S.Id(ChooseID).AddButton(_("Choose..."));
S.Id(CreateID).AddButton(_("Create")); S.Id(CreateID).AddButton(_("Create"));