1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 14:02:57 +02:00

Rename Chains to Macros.

Lots of renaming.
Did not rename the containing files (yet) since that will require makefile updates.
This commit is contained in:
James Crook
2018-03-03 19:08:23 +00:00
parent 8ab69ae5c3
commit c0dcba66dd
16 changed files with 367 additions and 367 deletions

View File

@@ -9,8 +9,8 @@
*******************************************************************//*!
\class BatchCommandDialog
\brief Provides a list of configurable commands for use with BatchCommands
\class MacroCommandDialog
\brief Provides a list of configurable commands for use with MacroCommands
Provides a list of commands, mostly effects, which can be chained
together in a simple linear sequence. Can configure parameters on each
@@ -48,17 +48,17 @@ selected command.
#define EditParamsButtonID 7002
#define UsePresetButtonID 7003
BEGIN_EVENT_TABLE(BatchCommandDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, BatchCommandDialog::OnOk)
EVT_BUTTON(wxID_CANCEL, BatchCommandDialog::OnCancel)
EVT_BUTTON(wxID_HELP, BatchCommandDialog::OnHelp)
EVT_BUTTON(EditParamsButtonID, BatchCommandDialog::OnEditParams)
EVT_BUTTON(UsePresetButtonID, BatchCommandDialog::OnUsePreset)
EVT_LIST_ITEM_ACTIVATED(CommandsListID, BatchCommandDialog::OnItemSelected)
EVT_LIST_ITEM_SELECTED(CommandsListID, BatchCommandDialog::OnItemSelected)
BEGIN_EVENT_TABLE(MacroCommandDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, MacroCommandDialog::OnOk)
EVT_BUTTON(wxID_CANCEL, MacroCommandDialog::OnCancel)
EVT_BUTTON(wxID_HELP, MacroCommandDialog::OnHelp)
EVT_BUTTON(EditParamsButtonID, MacroCommandDialog::OnEditParams)
EVT_BUTTON(UsePresetButtonID, MacroCommandDialog::OnUsePreset)
EVT_LIST_ITEM_ACTIVATED(CommandsListID, MacroCommandDialog::OnItemSelected)
EVT_LIST_ITEM_SELECTED(CommandsListID, MacroCommandDialog::OnItemSelected)
END_EVENT_TABLE();
BatchCommandDialog::BatchCommandDialog(wxWindow * parent, wxWindowID id):
MacroCommandDialog::MacroCommandDialog(wxWindow * parent, wxWindowID id):
wxDialogWrapper(parent, id, _("Select Command"),
wxDefaultPosition, wxDefaultSize,
wxCAPTION | wxRESIZE_BORDER)
@@ -68,7 +68,7 @@ BatchCommandDialog::BatchCommandDialog(wxWindow * parent, wxWindowID id):
Populate();
}
void BatchCommandDialog::Populate()
void MacroCommandDialog::Populate()
{
//------------------------- Main section --------------------
ShuttleGui S(this, eIsCreating);
@@ -76,7 +76,7 @@ void BatchCommandDialog::Populate()
// ----------------------- End of main section --------------
}
void BatchCommandDialog::PopulateOrExchange(ShuttleGui &S)
void MacroCommandDialog::PopulateOrExchange(ShuttleGui &S)
{
S.StartVerticalLay(true);
{
@@ -121,9 +121,9 @@ void BatchCommandDialog::PopulateOrExchange(ShuttleGui &S)
Center();
}
void BatchCommandDialog::PopulateCommandList()
void MacroCommandDialog::PopulateCommandList()
{
mCommandNames = BatchCommands::GetAllCommands();
mCommandNames = MacroCommands::GetAllCommands();
mChoices->DeleteAllItems();
for (size_t ii = 0, size = mCommandNames.size(); ii < size; ++ii)
@@ -131,33 +131,33 @@ void BatchCommandDialog::PopulateCommandList()
mChoices->InsertItem( ii, std::get<0>( mCommandNames[ii] ) );
}
void BatchCommandDialog::ValidateChoices()
void MacroCommandDialog::ValidateChoices()
{
}
void BatchCommandDialog::OnChoice(wxCommandEvent & WXUNUSED(event))
void MacroCommandDialog::OnChoice(wxCommandEvent & WXUNUSED(event))
{
}
void BatchCommandDialog::OnOk(wxCommandEvent & WXUNUSED(event))
void MacroCommandDialog::OnOk(wxCommandEvent & WXUNUSED(event))
{
mSelectedCommand = mInternalCommandName.Strip(wxString::both);
mSelectedParameters = mParameters->GetValue().Strip(wxString::trailing);
EndModal(true);
}
void BatchCommandDialog::OnCancel(wxCommandEvent & WXUNUSED(event))
void MacroCommandDialog::OnCancel(wxCommandEvent & WXUNUSED(event))
{
EndModal(false);
}
void BatchCommandDialog::OnHelp(wxCommandEvent & WXUNUSED(event))
void MacroCommandDialog::OnHelp(wxCommandEvent & WXUNUSED(event))
{
wxString page = GetHelpPageName();
HelpSystem::ShowHelp(this, page, true);
}
void BatchCommandDialog::OnItemSelected(wxListEvent &event)
void MacroCommandDialog::OnItemSelected(wxListEvent &event)
{
const auto &command = mCommandNames[ event.GetIndex() ];
@@ -175,7 +175,7 @@ void BatchCommandDialog::OnItemSelected(wxListEvent &event)
mCommand->SetValue(std::get<0> (command));
mInternalCommandName = std::get<1>( command );
wxString params = BatchCommands::GetCurrentParamsFor(mInternalCommandName);
wxString params = MacroCommands::GetCurrentParamsFor(mInternalCommandName);
if (params.IsEmpty())
{
params = em.GetDefaultPreset(ID);
@@ -187,29 +187,29 @@ void BatchCommandDialog::OnItemSelected(wxListEvent &event)
mParameters->SetValue(params);
}
void BatchCommandDialog::OnEditParams(wxCommandEvent & WXUNUSED(event))
void MacroCommandDialog::OnEditParams(wxCommandEvent & WXUNUSED(event))
{
wxString command = mInternalCommandName;
wxString params = mParameters->GetValue();
params = BatchCommands::PromptForParamsFor(command, params, this).Trim();
params = MacroCommands::PromptForParamsFor(command, params, this).Trim();
mParameters->SetValue(params);
mParameters->Refresh();
}
void BatchCommandDialog::OnUsePreset(wxCommandEvent & WXUNUSED(event))
void MacroCommandDialog::OnUsePreset(wxCommandEvent & WXUNUSED(event))
{
wxString command = mInternalCommandName;
wxString params = mParameters->GetValue();
wxString preset = BatchCommands::PromptForPresetFor(command, params, this).Trim();
wxString preset = MacroCommands::PromptForPresetFor(command, params, this).Trim();
mParameters->SetValue(preset);
mParameters->Refresh();
}
void BatchCommandDialog::SetCommandAndParams(const wxString &Command, const wxString &Params)
void MacroCommandDialog::SetCommandAndParams(const wxString &Command, const wxString &Params)
{
auto item = make_iterator_range(mCommandNames).index_if(
[&](const CommandName &name){ return Command == std::get<1>( name); }