1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-17 22:21:17 +01:00

New attached structure ProjectFileIO handles load and save

This commit is contained in:
Paul Licameli
2019-05-28 14:55:52 -04:00
parent f7e79406ee
commit 7b8bfd1d02
8 changed files with 279 additions and 211 deletions

View File

@@ -184,26 +184,30 @@ void OnClose(const CommandContext &context )
void OnSave(const CommandContext &context )
{
auto &project = context.project;
project.Save();
auto &projectFileIO = ProjectFileIO::Get( project );
projectFileIO.Save();
}
void OnSaveAs(const CommandContext &context )
{
auto &project = context.project;
project.SaveAs();
auto &projectFileIO = ProjectFileIO::Get( project );
projectFileIO.SaveAs();
}
void OnSaveCopy(const CommandContext &context )
{
auto &project = context.project;
project.SaveAs(true, true);
auto &projectFileIO = ProjectFileIO::Get( project );
projectFileIO.SaveAs(true, true);
}
#ifdef USE_LIBVORBIS
void OnSaveCompressed(const CommandContext &context)
{
auto &project = context.project;
project.SaveAs(true);
auto &projectFileIO = ProjectFileIO::Get( project );
projectFileIO.SaveAs(true);
}
#endif

View File

@@ -432,7 +432,7 @@ void OnTimerRecord(const CommandContext &context)
}
// We use this variable to display "Current Project" in the Timer Recording
// save project field
bool bProjectSaved = project.IsProjectSaved();
bool bProjectSaved = ProjectFileIO::Get( project ).IsProjectSaved();
//we break the prompting and waiting dialogs into two sections
//because they both give the user a chance to click cancel