1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 08:33:36 +02:00

Bug 1580 - Enh: New default directory for Save and Export .../Documents/Audacity

Fix affects windows only.
In the case of Save and SaveAs creates the directory too, so that the dialog can be positioned there.
For Export Multiple, will prompt if the directory does not exist.
This commit is contained in:
James Crook
2017-02-06 15:37:46 +00:00
parent e4260e9581
commit ec12bc37b5
2 changed files with 6 additions and 2 deletions

View File

@@ -4187,7 +4187,11 @@ bool AudacityProject::SaveAs(bool bWantSaveCompressed /*= false*/)
bHasPath = false;
filename.AssignHomeDir();
#ifdef __WIN32__
filename.SetPath(gPrefs->Read( wxT("/SaveAs/Path"), filename.GetPath() + "\\Documents"));
filename.SetPath(gPrefs->Read( wxT("/SaveAs/Path"), filename.GetPath() + "\\Documents\\Audacity"));
// The path might not exist.
// There is no error if the path could not be created. That's OK.
// The dialog that Audacity offers will allow the user to select a valid directory.
filename.Mkdir(0755, wxPATH_MKDIR_FULL);
#else
filename.SetPath(gPrefs->Read( wxT("/SaveAs/Path"), filename.GetPath() + "/Documents"));
#endif

View File

@@ -242,7 +242,7 @@ void ExportMultiple::PopulateOrExchange(ShuttleGui& S)
wxFileName filename("foo");
filename.AssignHomeDir();
#ifdef __WIN32__
filename.SetPath(filename.GetPath() + "\\Documents");
filename.SetPath(filename.GetPath() + "\\Documents\\Audacity");
#else
filename.SetPath(filename.GetPath() + "/Documents");
#endif