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

Add all chains into the Tools menu.

This commit is contained in:
James Crook
2018-03-02 21:56:24 +00:00
parent 8cd5d7f4fe
commit e6a2d0f99a
4 changed files with 53 additions and 3 deletions

View File

@@ -161,11 +161,18 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
long item = mChains->GetNextItem(-1,
wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED);
if (item == -1) {
AudacityMessageBox(_("No chain selected"));
return;
}
wxString name = mChains->GetItemText(item);
}
void BatchProcessDialog::ApplyChainToProject( int iChain, bool bHasGui )
{
wxString name = mChains->GetItemText(iChain);
if( name.IsEmpty() )
return;
wxDialog * pD = safenew wxDialogWrapper(this, wxID_ANY, GetTitle());
pD->SetName(pD->GetTitle());
@@ -197,7 +204,8 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
// the 'Hide' converts us from a Modal into a regular dialog,
// as far as closing is concerned. On Linux we can't close with
// EndModal() anymore after this.
Hide();
if( bHasGui )
Hide();
gPrefs->Write(wxT("/Batch/ActiveChain"), name);
gPrefs->Flush();
@@ -213,6 +221,10 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
[this]{ return mBatchCommands.ApplyChain(); } );
}
if( !bHasGui )
return;
if (!success) {
Show();
return;