1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 15:53:52 +02:00

Add code from merging.

This brings more of the code from DarkAudacity into Audacity, though not yet enabled.  This will make cherry picking later easier.
- Changing colour of html displays now possible, as colour links are visible for substitution.  (Can't use css as wxHTML is very limited).
- Export can now be preset to a particular format independent of preferences.
- SnapTo reversion on zoom now a DA controlled option.
- Caching of pinning preference for faster repaint because preferences are slow.
- Record Append now has sensible limit on number of tracks, rather than giving an error, and flipping the meaning of shift is now DA controlled.
This commit is contained in:
James Crook
2016-09-10 21:34:14 +01:00
parent 796b98de8b
commit 923eefaf90
8 changed files with 110 additions and 46 deletions

View File

@@ -265,6 +265,7 @@ Exporter::Exporter()
{
mMixerSpec = NULL;
mBook = NULL;
mFormatName = "";
SetFileDialogTitle( _("Export Audio") );
@@ -488,7 +489,9 @@ bool Exporter::GetFilename()
mFormat = -1;
wxString maskString;
wxString defaultFormat = gPrefs->Read(wxT("/Export/Format"),
wxString defaultFormat = mFormatName;
if( defaultFormat.IsEmpty() )
defaultFormat = gPrefs->Read(wxT("/Export/Format"),
wxT("WAV"));
mFilterIndex = 0;
@@ -678,7 +681,8 @@ bool Exporter::CheckFilename()
if (!mProject->GetDirManager()->EnsureSafeFilename(mFilename))
return false;
gPrefs->Write(wxT("/Export/Format"), mPlugins[mFormat]->GetFormat(mSubFormat));
if( mFormatName.IsEmpty() )
gPrefs->Write(wxT("/Export/Format"), mPlugins[mFormat]->GetFormat(mSubFormat));
gPrefs->Write(wxT("/Export/Path"), mFilename.GetPath());
gPrefs->Flush();

View File

@@ -144,6 +144,7 @@ public:
virtual ~Exporter();
void SetFileDialogTitle( const wxString & DialogTitle );
void SetDefaultFormat( const wxString & Format ){ mFormatName = Format;};
void RegisterPlugin(movable_ptr<ExportPlugin> &&plugin);
bool Process(AudacityProject *project, bool selectedOnly,
@@ -173,7 +174,7 @@ public:
wxFileName GetAutoExportFileName();
private:
wxString mFormatName;
bool ExamineTracks();
bool GetFilename();
bool CheckFilename();