1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

AUP3: First round of updates

!!! THERE WILL NO DOUBT BE BUGS !!!

This is a big one and there's still several things to
complete. Just want to get this in the wild to start
receiving feedback.

One big thing right now is that it will NOT load pre-aup3
files.  An importer is on the way for that.
This commit is contained in:
Leland Lucius
2020-07-01 00:45:17 -05:00
parent b1beb20ae9
commit d39590cf41
74 changed files with 2902 additions and 6057 deletions

View File

@@ -19,6 +19,7 @@
#include "LoadCommands.h"
#include "../Project.h"
#include "../ProjectFileIO.h"
#include "../ProjectFileManager.h"
#include "../ProjectManager.h"
#include "../export/Export.h"
@@ -52,7 +53,9 @@ void OpenProjectCommand::PopulateOrExchange(ShuttleGui & S)
bool OpenProjectCommand::Apply(const CommandContext & context){
auto oldFileName = context.project.GetFileName();
auto &projectFileIO = ProjectFileIO::Get(context.project);
auto oldFileName = projectFileIO.GetFileName();
if(mFileName.empty())
{
auto project = &context.project;
@@ -63,7 +66,7 @@ bool OpenProjectCommand::Apply(const CommandContext & context){
ProjectFileManager::Get( context.project )
.OpenFile(mFileName, mbAddToHistory);
}
const auto &newFileName = context.project.GetFileName();
const auto &newFileName = projectFileIO.GetFileName();
// Because Open does not return a success or failure, we have to guess
// at this point, based on whether the project file name has
@@ -79,7 +82,6 @@ namespace{ BuiltinCommandsModule::Registration< SaveProjectCommand > reg2; }
bool SaveProjectCommand::DefineParams( ShuttleParams & S ){
S.Define( mFileName, wxT("Filename"), "name.aup" );
S.Define( mbAddToHistory, wxT("AddToHistory"), false );
S.Define( mbCompress, wxT("Compress"), false );
return true;
}
@@ -91,7 +93,6 @@ void SaveProjectCommand::PopulateOrExchange(ShuttleGui & S)
{
S.TieTextBox(XXO("File Name:"),mFileName);
S.TieCheckBox(XXO("Add to History"), mbAddToHistory );
S.TieCheckBox(XXO("Compress"), mbCompress );
}
S.EndMultiColumn();
}
@@ -100,8 +101,7 @@ bool SaveProjectCommand::Apply(const CommandContext &context)
{
auto &projectFileManager = ProjectFileManager::Get( context.project );
if ( mFileName.empty() )
return projectFileManager.SaveAs(mbCompress);
return projectFileManager.SaveAs();
else
return projectFileManager.SaveAs(
mFileName, mbCompress, mbAddToHistory);
return projectFileManager.SaveAs(mFileName, mbAddToHistory);
}

View File

@@ -58,7 +58,5 @@ public:
public:
wxString mFileName;
bool mbAddToHistory;
bool mbCompress;
bool bHasAddToHistory;
bool bHasCompress;
};