From 205b7d6a02d8a08762b1319532fb4706d835ccc7 Mon Sep 17 00:00:00 2001 From: James Crook Date: Fri, 16 Mar 2018 18:47:39 +0000 Subject: [PATCH] Rename 'chain' to 'macro' in history and comments. --- src/BatchCommands.cpp | 40 ++++++++++++++++++------------------ src/BatchCommands.h | 2 +- src/BatchProcessDialog.h | 8 -------- src/effects/Equalization.cpp | 4 ++-- 4 files changed, 23 insertions(+), 31 deletions(-) diff --git a/src/BatchCommands.cpp b/src/BatchCommands.cpp index b17a94760..09549813d 100644 --- a/src/BatchCommands.cpp +++ b/src/BatchCommands.cpp @@ -10,8 +10,8 @@ ********************************************************************//*! \class MacroCommands -\brief Maintains the chain of commands used in batch processing. -See also MacroCommandDialog and ApplyMacroDialog. +\brief Maintains the list of commands for batch/macro +processing. See also MacrosWindow and ApplyMacroDialog. *//*******************************************************************/ @@ -157,13 +157,13 @@ int MacroCommands::GetCount() return (int)mCommandMacro.GetCount(); } -bool MacroCommands::ReadMacro(const wxString & chain) +bool MacroCommands::ReadMacro(const wxString & macro) { - // Clear any previous chain + // Clear any previous macro ResetMacro(); // Build the filename - wxFileName name(FileNames::MacroDir(), chain, wxT("txt")); + wxFileName name(FileNames::MacroDir(), macro, wxT("txt")); // Set the file name wxTextFile tf(name.GetFullPath()); @@ -203,10 +203,10 @@ bool MacroCommands::ReadMacro(const wxString & chain) } -bool MacroCommands::WriteMacro(const wxString & chain) +bool MacroCommands::WriteMacro(const wxString & macro) { // Build the filename - wxFileName name(FileNames::MacroDir(), chain, wxT("txt")); + wxFileName name(FileNames::MacroDir(), macro, wxT("txt")); // Set the file name wxTextFile tf(name.GetFullPath()); @@ -233,7 +233,7 @@ bool MacroCommands::WriteMacro(const wxString & chain) tf.AddLine(mCommandMacro[i] + wxT(":") + mParamsMacro[ i ]); } - // Write the chain + // Write the macro tf.Write(); // Done with the file @@ -242,10 +242,10 @@ bool MacroCommands::WriteMacro(const wxString & chain) return true; } -bool MacroCommands::AddMacro(const wxString & chain) +bool MacroCommands::AddMacro(const wxString & macro) { // Build the filename - wxFileName name(FileNames::MacroDir(), chain, wxT("txt")); + wxFileName name(FileNames::MacroDir(), macro, wxT("txt")); // Set the file name wxTextFile tf(name.GetFullPath()); @@ -254,26 +254,26 @@ bool MacroCommands::AddMacro(const wxString & chain) return tf.Create(); } -bool MacroCommands::DeleteMacro(const wxString & chain) +bool MacroCommands::DeleteMacro(const wxString & macro) { // Build the filename - wxFileName name(FileNames::MacroDir(), chain, wxT("txt")); + wxFileName name(FileNames::MacroDir(), macro, wxT("txt")); // Delete it...wxRemoveFile will display errors auto result = wxRemoveFile(name.GetFullPath()); // Delete any legacy chain that it shadowed - auto oldPath = wxFileName{ FileNames::LegacyChainDir(), chain, wxT("txt") }; + auto oldPath = wxFileName{ FileNames::LegacyChainDir(), macro, wxT("txt") }; wxRemoveFile(oldPath.GetFullPath()); // Don't care about this return value return result; } -bool MacroCommands::RenameMacro(const wxString & oldchain, const wxString & newchain) +bool MacroCommands::RenameMacro(const wxString & oldmacro, const wxString & newmacro) { // Build the filenames - wxFileName oname(FileNames::MacroDir(), oldchain, wxT("txt")); - wxFileName nname(FileNames::MacroDir(), newchain, wxT("txt")); + wxFileName oname(FileNames::MacroDir(), oldmacro, wxT("txt")); + wxFileName nname(FileNames::MacroDir(), newmacro, wxT("txt")); // Rename it...wxRenameFile will display errors return wxRenameFile(oname.GetFullPath(), nname.GetFullPath()); @@ -808,7 +808,7 @@ bool MacroCommands::ApplyCommandInBatchMode( const wxString &friendlyCommand, static int MacroReentryCount = 0; // ApplyMacro returns true on success, false otherwise. -// Any error reporting to the user in setting up the chain +// Any error reporting to the user in setting up the macro // has already been done. bool MacroCommands::ApplyMacro( const MacroCommandsCatalog &catalog, const wxString & filename) @@ -861,13 +861,13 @@ bool MacroCommands::ApplyMacro( if (name.IsEmpty()) { /* i18n-hint: active verb in past tense */ - longDesc = _("Applied batch chain"); - shortDesc = _("Apply chain"); + longDesc = _("Applied macro"); + shortDesc = _("Apply macro"); } else { /* i18n-hint: active verb in past tense */ - longDesc = wxString::Format(_("Applied batch chain '%s'"), name); + longDesc = wxString::Format(_("Applied macro '%s'"), name); shortDesc = wxString::Format(_("Apply '%s'"), name); } diff --git a/src/BatchCommands.h b/src/BatchCommands.h index 87eb2c7ca..017ef2b85 100644 --- a/src/BatchCommands.h +++ b/src/BatchCommands.h @@ -48,7 +48,7 @@ private: Entries mCommands; }; -// Stores information for one chain +// Stores information for one macro class MacroCommands final { public: // constructors and destructors diff --git a/src/BatchProcessDialog.h b/src/BatchProcessDialog.h index 4fa060285..2936c609a 100644 --- a/src/BatchProcessDialog.h +++ b/src/BatchProcessDialog.h @@ -123,9 +123,6 @@ private: void OnDown(wxCommandEvent &event); void OnDefaults(wxCommandEvent &event); - //void OnApplyToProject(wxCommandEvent &event); - //void OnApplyToFiles(wxCommandEvent &event); - void OnOK(wxCommandEvent &event); void OnKeyDown(wxKeyEvent &event); @@ -133,11 +130,6 @@ private: void InsertCommandAt(int item); bool SaveChanges(); - // These are already provided by ApplyMacroDialog - //wxListCtrl *mList; /// List of commands in current command chain. - //MacroCommands mMacroCommands; /// Provides list of available commands. - //wxListCtrl *mMacros; /// List of chains. - wxButton *mRemove; wxButton *mRename; wxButton *mDefaults; diff --git a/src/effects/Equalization.cpp b/src/effects/Equalization.cpp index 6cd37579f..0a1afe23a 100644 --- a/src/effects/Equalization.cpp +++ b/src/effects/Equalization.cpp @@ -372,14 +372,14 @@ bool EffectEqualization::LoadFactoryDefaults() bool EffectEqualization::ValidateUI() { - // If editing a batch chain, we don't want to be using the unnamed curve so + // If editing a macro, we don't want to be using the unnamed curve so // we offer to save it. if (mDisallowCustom && mCurveName.IsSameAs(wxT("unnamed"))) { // PRL: This is unreachable. mDisallowCustom is always false. - Effect::MessageBox(_("To use this EQ curve in a batch chain, please choose a new name for it.\nChoose the 'Save/Manage Curves...' button and rename the 'unnamed' curve, then use that one."), + Effect::MessageBox(_("To use this EQ curve in a macro, please choose a new name for it.\nChoose the 'Save/Manage Curves...' button and rename the 'unnamed' curve, then use that one."), wxOK | wxCENTRE, _("EQ Curve needs a different name")); return false;