diff --git a/include/audacity/IdentInterface.h b/include/audacity/IdentInterface.h index 1b0791fbe..0339a44d6 100644 --- a/include/audacity/IdentInterface.h +++ b/include/audacity/IdentInterface.h @@ -109,13 +109,10 @@ public: // These should return an untranslated value virtual wxString GetPath() = 0; - // This string persists in configuration files - // So config compatibility will break if it is changed across Audacity versions - virtual wxString GetSymbol() = 0; - // These should return an untranslated value whose translation - // will be determined at runtime (if available) - virtual wxString GetName() = 0; + // The internal string persists in configuration files + // So config compatibility will break if it is changed across Audacity versions + virtual IdentInterfaceSymbol GetSymbol() = 0; virtual IdentInterfaceSymbol GetVendor() = 0; diff --git a/src/PluginManager.cpp b/src/PluginManager.cpp index 337d2c23d..a3071370a 100644 --- a/src/PluginManager.cpp +++ b/src/PluginManager.cpp @@ -1845,7 +1845,7 @@ bool PluginManager::DropFile(const wxString &fileName) auto &id = PluginManagerInterface::DefaultRegistrationCallback( provider, ident); ids.push_back(id); - names.push_back( wxGetTranslation( ident->GetName() ) ); + names.push_back( ident->GetSymbol().Translation() ); return id; }); if ( ! nPlugIns ) { @@ -2609,7 +2609,7 @@ PluginID PluginManager::GetID(ModuleInterface *module) GetPluginTypeString(PluginTypeModule), wxEmptyString, module->GetVendor().Internal(), - module->GetName(), + module->GetSymbol().Translation(), module->GetPath()); } @@ -2619,7 +2619,7 @@ PluginID PluginManager::GetID(CommandDefinitionInterface *command) GetPluginTypeString(PluginTypeAudacityCommand), wxEmptyString, command->GetVendor().Internal(), - command->GetName(), + command->GetSymbol().Translation(), command->GetPath()); } @@ -2629,7 +2629,7 @@ PluginID PluginManager::GetID(EffectDefinitionInterface *effect) GetPluginTypeString(PluginTypeEffect), effect->GetFamilyId().Internal(), effect->GetVendor().Internal(), - effect->GetName(), + effect->GetSymbol().Translation(), effect->GetPath()); } @@ -2639,7 +2639,7 @@ PluginID PluginManager::GetID(ImporterInterface *importer) GetPluginTypeString(PluginTypeImporter), wxEmptyString, importer->GetVendor().Internal(), - importer->GetName(), + importer->GetSymbol().Translation(), importer->GetPath()); } @@ -2689,7 +2689,7 @@ PluginDescriptor & PluginManager::CreatePlugin(const PluginID & id, plug.SetID(id); plug.SetPath(ident->GetPath()); - plug.SetSymbol( { ident->GetSymbol(), ident->GetName() } ); + plug.SetSymbol(ident->GetSymbol()); plug.SetVendor(ident->GetVendor().Internal()); plug.SetVersion(ident->GetVersion()); @@ -3150,5 +3150,5 @@ int PluginManager::b64decode(const wxString &in, void *out) // #include directives. const wxString& IdentInterface::GetTranslatedName() { - return wxGetTranslation( GetName() ); + return GetSymbol().Translation(); } diff --git a/src/commands/AudacityCommand.cpp b/src/commands/AudacityCommand.cpp index 7aeb5a675..39a2e690a 100644 --- a/src/commands/AudacityCommand.cpp +++ b/src/commands/AudacityCommand.cpp @@ -81,8 +81,7 @@ AudacityCommand::~AudacityCommand() } -wxString AudacityCommand::GetPath(){ return BUILTIN_GENERIC_COMMAND_PREFIX + GetSymbol();} -wxString AudacityCommand::GetName(){ return GetSymbol();} +wxString AudacityCommand::GetPath(){ return BUILTIN_GENERIC_COMMAND_PREFIX + GetSymbol().Internal(); } IdentInterfaceSymbol AudacityCommand::GetVendor(){ return XO("Audacity");} wxString AudacityCommand::GetVersion(){ return AUDACITY_VERSION_STRING;} diff --git a/src/commands/AudacityCommand.h b/src/commands/AudacityCommand.h index 6792bcba4..a6385de71 100644 --- a/src/commands/AudacityCommand.h +++ b/src/commands/AudacityCommand.h @@ -64,14 +64,12 @@ class AUDACITY_DLL_API AudacityCommand /* not final */ : public wxEvtHandler, //These four can be defaulted.... wxString GetPath() override; - wxString GetName() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; // virtual wxString GetFamily(); //These two must be implemented by instances. - virtual wxString GetSymbol() override - { wxFAIL_MSG( "Implement a Symbol for this command");return "FAIL";}; + IdentInterfaceSymbol GetSymbol() override = 0; virtual wxString GetDescription() override {wxFAIL_MSG( "Implement a Description for this command");return "FAIL";}; diff --git a/src/commands/CommandDirectory.cpp b/src/commands/CommandDirectory.cpp index 84ad41bd8..a22b324c1 100644 --- a/src/commands/CommandDirectory.cpp +++ b/src/commands/CommandDirectory.cpp @@ -81,7 +81,7 @@ void CommandDirectory::AddCommand(movable_ptr &&type) { wxASSERT(type != NULL); // Internal string is shown but only in assertion message - auto cmdName = type->GetName(); + auto cmdName = type->GetSymbol().Internal(); wxASSERT_MSG(mCmdMap.find(cmdName) == mCmdMap.end() , wxT("A command named ") + cmdName + wxT(" already exists.")); diff --git a/src/commands/CommandType.cpp b/src/commands/CommandType.cpp index 72ba50a06..77967f80b 100644 --- a/src/commands/CommandType.cpp +++ b/src/commands/CommandType.cpp @@ -31,11 +31,11 @@ OldStyleCommandType::~OldStyleCommandType() { } -wxString OldStyleCommandType::GetName() +IdentInterfaceSymbol OldStyleCommandType::GetSymbol() { if (mSymbol.empty()) mSymbol = BuildName(); - return mSymbol.Internal(); + return mSymbol; } CommandSignature &OldStyleCommandType::GetSignature() @@ -52,7 +52,7 @@ wxString OldStyleCommandType::Describe() { // PRL: Is this intended for end-user visibility or just debugging? It did not // use _(""), so I assume it is meant to use internal strings - wxString desc = GetName() + wxT("\nParameters:"); + wxString desc = GetSymbol().Internal() + wxT("\nParameters:"); GetSignature(); ParamValueMap::iterator iter; ParamValueMap defaults = mSignature->GetDefaults(); diff --git a/src/commands/CommandType.h b/src/commands/CommandType.h index 3d0fb4b75..0c7253c61 100644 --- a/src/commands/CommandType.h +++ b/src/commands/CommandType.h @@ -50,7 +50,7 @@ private: public: OldStyleCommandType(); virtual ~OldStyleCommandType(); - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; CommandSignature &GetSignature(); wxString Describe(); // for debugging only ? diff --git a/src/commands/CompareAudioCommand.h b/src/commands/CompareAudioCommand.h index f724ff471..1979a8680 100644 --- a/src/commands/CompareAudioCommand.h +++ b/src/commands/CompareAudioCommand.h @@ -23,13 +23,13 @@ classes class WaveTrack; -#define COMPARE_AUDIO_PLUGIN_SYMBOL XO("Compare Audio") +#define COMPARE_AUDIO_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Compare Audio") } class CompareAudioCommand final : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return XO("Compare Audio");} + IdentInterfaceSymbol GetSymbol() override {return XO("Compare Audio");} wxString GetDescription() override {return _("Compares a range on two tracks.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/Demo.h b/src/commands/Demo.h index fc8fafaa0..113272bdb 100644 --- a/src/commands/Demo.h +++ b/src/commands/Demo.h @@ -20,13 +20,13 @@ class ShuttleGui; -#define DEMO_PLUGIN_SYMBOL XO("Demo") +#define DEMO_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Demo") } class DemoCommand final : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return DEMO_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return DEMO_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Does the demo action.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/DragCommand.h b/src/commands/DragCommand.h index 2895b0539..39df28970 100644 --- a/src/commands/DragCommand.h +++ b/src/commands/DragCommand.h @@ -19,14 +19,14 @@ #include "Command.h" #include "CommandType.h" -#define DRAG_PLUGIN_SYMBOL XO("Drag") +#define DRAG_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Drag") } class DragCommand : public AudacityCommand { public: DragCommand(); // CommandDefinitionInterface overrides - wxString GetSymbol() override {return DRAG_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return DRAG_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Drags mouse from one place to another.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/GetInfoCommand.h b/src/commands/GetInfoCommand.h index b3972d8f4..7b822bb74 100644 --- a/src/commands/GetInfoCommand.h +++ b/src/commands/GetInfoCommand.h @@ -26,13 +26,13 @@ channel. class wxMenuBar; class wxPoint; -#define GET_INFO_PLUGIN_SYMBOL XO("Get Info") +#define GET_INFO_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Get Info") } class GetInfoCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return GET_INFO_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return GET_INFO_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Gets information in JSON format.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/GetTrackInfoCommand.h b/src/commands/GetTrackInfoCommand.h index c94323439..549b7ee82 100644 --- a/src/commands/GetTrackInfoCommand.h +++ b/src/commands/GetTrackInfoCommand.h @@ -19,14 +19,14 @@ #include "Command.h" #include "CommandType.h" -#define GET_TRACK_INFO_PLUGIN_SYMBOL XO("Get Track Info") +#define GET_TRACK_INFO_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Get Track Info") } class GetTrackInfoCommand final : public AudacityCommand { public: GetTrackInfoCommand(); // CommandDefinitionInterface overrides - wxString GetSymbol() override {return GET_TRACK_INFO_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return GET_TRACK_INFO_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Gets track values as JSON.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/HelpCommand.h b/src/commands/HelpCommand.h index 71ffe2a64..9df02b3a7 100644 --- a/src/commands/HelpCommand.h +++ b/src/commands/HelpCommand.h @@ -23,13 +23,13 @@ #include "CommandType.h" #include "Command.h" -#define HELP_PLUGIN_SYMBOL XO("Help") +#define HELP_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Help") } class HelpCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return HELP_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return HELP_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Gives help on a command.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/ImportExportCommands.h b/src/commands/ImportExportCommands.h index f229053df..6fab62fac 100644 --- a/src/commands/ImportExportCommands.h +++ b/src/commands/ImportExportCommands.h @@ -23,13 +23,13 @@ // Import -#define IMPORT_PLUGIN_SYMBOL XO("Import2") +#define IMPORT_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Import2") } class ImportCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return IMPORT_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return IMPORT_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Imports from a file.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; @@ -41,13 +41,13 @@ public: wxString mFileName; }; -#define EXPORT_PLUGIN_SYMBOL XO("Export2") +#define EXPORT_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Export2") } class ExportCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return EXPORT_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return EXPORT_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Exports to a file.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/LoadCommands.cpp b/src/commands/LoadCommands.cpp index a792b9bb1..380dce1dc 100644 --- a/src/commands/LoadCommands.cpp +++ b/src/commands/LoadCommands.cpp @@ -100,7 +100,7 @@ enum // Redefine COMMAND() to add the COMMAND's name to an array // #undef COMMAND -#define COMMAND(n, i, args) n ## _PLUGIN_SYMBOL, +#define COMMAND(n, i, args) (n ## _PLUGIN_SYMBOL).Internal(), // // Create the COMMAND name array @@ -176,12 +176,7 @@ wxString BuiltinCommandsModule::GetPath() return mPath; } -wxString BuiltinCommandsModule::GetSymbol() -{ - return XO("Builtin Commands"); -} - -wxString BuiltinCommandsModule::GetName() +IdentInterfaceSymbol BuiltinCommandsModule::GetSymbol() { return XO("Builtin Commands"); } diff --git a/src/commands/LoadCommands.h b/src/commands/LoadCommands.h index 5af2f3de1..4dfc1e485 100644 --- a/src/commands/LoadCommands.h +++ b/src/commands/LoadCommands.h @@ -31,8 +31,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/commands/MessageCommand.h b/src/commands/MessageCommand.h index 28dafb320..2494eb249 100644 --- a/src/commands/MessageCommand.h +++ b/src/commands/MessageCommand.h @@ -24,13 +24,13 @@ #include "CommandType.h" #include "Command.h" -#define MESSAGE_PLUGIN_SYMBOL XO("Message") +#define MESSAGE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Message") } class MessageCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return MESSAGE_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return MESSAGE_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Echos a message.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/OpenSaveCommands.h b/src/commands/OpenSaveCommands.h index 0cd65d1ff..7dba2c1a1 100644 --- a/src/commands/OpenSaveCommands.h +++ b/src/commands/OpenSaveCommands.h @@ -21,13 +21,13 @@ #include "Command.h" #include "CommandType.h" -#define OPEN_PROJECT_PLUGIN_SYMBOL XO("Open Project2") +#define OPEN_PROJECT_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Open Project2") } class OpenProjectCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return OPEN_PROJECT_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return OPEN_PROJECT_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Opens a project.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; @@ -41,13 +41,13 @@ public: bool bHasAddToHistory; }; -#define SAVE_PROJECT_PLUGIN_SYMBOL XO("Save Project2") +#define SAVE_PROJECT_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Save Project2") } class SaveProjectCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SAVE_PROJECT_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SAVE_PROJECT_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Saves a project.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/PreferenceCommands.h b/src/commands/PreferenceCommands.h index c53e520df..89c728467 100644 --- a/src/commands/PreferenceCommands.h +++ b/src/commands/PreferenceCommands.h @@ -26,14 +26,14 @@ // GetPreference -#define GET_PREFERENCE_PLUGIN_SYMBOL XO("Get Preference") -#define SET_PREFERENCE_PLUGIN_SYMBOL XO("Set Preference") +#define GET_PREFERENCE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Get Preference") } +#define SET_PREFERENCE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Set Preference") } class GetPreferenceCommand final : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return GET_PREFERENCE_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return GET_PREFERENCE_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Gets the value of a single preference.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; @@ -51,7 +51,7 @@ class SetPreferenceCommand final : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SET_PREFERENCE_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SET_PREFERENCE_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Sets the value of a single preference.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/ScreenshotCommand.h b/src/commands/ScreenshotCommand.h index 7054d478d..37b983b13 100644 --- a/src/commands/ScreenshotCommand.h +++ b/src/commands/ScreenshotCommand.h @@ -28,7 +28,7 @@ class AdornedRulerPanel; class AudacityProject; class CommandContext; -#define SCREENSHOT_PLUGIN_SYMBOL XO("Screenshot") +#define SCREENSHOT_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Screenshot") } class ScreenshotCommand : public AudacityCommand { @@ -80,7 +80,7 @@ public: ScreenshotCommand(){ mbBringToTop=true;}; // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SCREENSHOT_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SCREENSHOT_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Takes screenshots.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/SelectCommand.h b/src/commands/SelectCommand.h index ec73be1b8..94ba80466 100644 --- a/src/commands/SelectCommand.h +++ b/src/commands/SelectCommand.h @@ -25,16 +25,16 @@ //#include "../commands/AudacityCommand.h" -#define SELECT_TIME_PLUGIN_SYMBOL XO("Select Time") -#define SELECT_FREQUENCIES_PLUGIN_SYMBOL XO("Select Frequencies") -#define SELECT_TRACKS_PLUGIN_SYMBOL XO("Select Tracks") -#define SELECT_PLUGIN_SYMBOL XO("Select") +#define SELECT_TIME_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Select Time") } +#define SELECT_FREQUENCIES_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Select Frequencies") } +#define SELECT_TRACKS_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Select Tracks") } +#define SELECT_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Select") } class SelectTimeCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SELECT_TIME_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SELECT_TIME_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Selects a time range.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; @@ -58,7 +58,7 @@ class SelectFrequenciesCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SELECT_FREQUENCIES_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SELECT_FREQUENCIES_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Selects a frequency range.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; @@ -79,7 +79,7 @@ class SelectTracksCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SELECT_TRACKS_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SELECT_TRACKS_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Selects a range of tracks.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; @@ -101,7 +101,7 @@ class SelectCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SELECT_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SELECT_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Selects Audio.");}; bool DefineParams( ShuttleParams & S ) override { return diff --git a/src/commands/SetClipCommand.h b/src/commands/SetClipCommand.h index 554dd8e31..bd5578bc9 100644 --- a/src/commands/SetClipCommand.h +++ b/src/commands/SetClipCommand.h @@ -20,14 +20,14 @@ #include "CommandType.h" #include "SetTrackInfoCommand.h" -#define SET_CLIP_PLUGIN_SYMBOL XO("Set Clip") +#define SET_CLIP_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Set Clip") } class SetClipCommand : public SetTrackBase { public: SetClipCommand(); // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SET_CLIP_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SET_CLIP_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Sets various values for a clip.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/SetEnvelopeCommand.h b/src/commands/SetEnvelopeCommand.h index 115a6265b..0cd89d08e 100644 --- a/src/commands/SetEnvelopeCommand.h +++ b/src/commands/SetEnvelopeCommand.h @@ -20,14 +20,14 @@ #include "CommandType.h" #include "SetTrackInfoCommand.h" -#define SET_ENVELOPE_PLUGIN_SYMBOL XO("Set Envelope") +#define SET_ENVELOPE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Set Envelope") } class SetEnvelopeCommand : public SetTrackBase { public: SetEnvelopeCommand(); // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SET_ENVELOPE_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SET_ENVELOPE_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Sets an envelope point position.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/SetLabelCommand.h b/src/commands/SetLabelCommand.h index 02b65a13f..caaeb17be 100644 --- a/src/commands/SetLabelCommand.h +++ b/src/commands/SetLabelCommand.h @@ -19,14 +19,14 @@ #include "Command.h" #include "CommandType.h" -#define SET_LABEL_PLUGIN_SYMBOL XO("Set Label") +#define SET_LABEL_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Set Label") } class SetLabelCommand : public AudacityCommand { public: SetLabelCommand(); // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SET_LABEL_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SET_LABEL_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Sets various values for a label.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/SetProjectCommand.h b/src/commands/SetProjectCommand.h index 7a69aced1..1c57e42b0 100644 --- a/src/commands/SetProjectCommand.h +++ b/src/commands/SetProjectCommand.h @@ -20,14 +20,14 @@ #include "Command.h" #include "CommandType.h" -#define SET_PROJECT_PLUGIN_SYMBOL XO("Set Project") +#define SET_PROJECT_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Set Project") } class SetProjectCommand : public AudacityCommand { public: SetProjectCommand(); // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SET_PROJECT_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SET_PROJECT_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Sets various values for a project.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; diff --git a/src/commands/SetTrackInfoCommand.h b/src/commands/SetTrackInfoCommand.h index bc6a4d3c0..9ee0f927a 100644 --- a/src/commands/SetTrackInfoCommand.h +++ b/src/commands/SetTrackInfoCommand.h @@ -20,10 +20,10 @@ #include "Command.h" #include "CommandType.h" -#define SET_TRACK_PLUGIN_SYMBOL XO("Set Track") -#define SET_TRACK_STATUS_PLUGIN_SYMBOL XO("Set Track Status") -#define SET_TRACK_AUDIO_PLUGIN_SYMBOL XO("Set Track Audio") -#define SET_TRACK_VISUALS_PLUGIN_SYMBOL XO("Set Track Visuals") +#define SET_TRACK_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Set Track") } +#define SET_TRACK_STATUS_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Set Track Status") } +#define SET_TRACK_AUDIO_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Set Track Audio") } +#define SET_TRACK_VISUALS_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Set Track Visuals") } class Track; @@ -51,7 +51,7 @@ class SetTrackStatusCommand : public SetTrackBase public: //SetTrackStatusCommand(); // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SET_TRACK_STATUS_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SET_TRACK_STATUS_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Sets various values for a track.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; @@ -76,7 +76,7 @@ class SetTrackAudioCommand : public SetTrackBase public: //SetTrackAudioCommand(); // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SET_TRACK_AUDIO_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SET_TRACK_AUDIO_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Sets various values for a track.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; @@ -103,7 +103,7 @@ class SetTrackVisualsCommand : public SetTrackBase public: //SetTrackVisualsCommand(); // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SET_TRACK_VISUALS_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SET_TRACK_VISUALS_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Sets various values for a track.");}; bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override; @@ -140,7 +140,7 @@ class SetTrackCommand : public SetTrackBase public: SetTrackCommand(); // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SET_TRACK_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override {return SET_TRACK_PLUGIN_SYMBOL;}; wxString GetDescription() override {return _("Sets various values for a track.");}; // AudacityCommand overrides wxString ManualPage() override {return wxT("Extra_Menu:_Tools#set_track");}; diff --git a/src/effects/Amplify.cpp b/src/effects/Amplify.cpp index fb99ff778..f09abe374 100644 --- a/src/effects/Amplify.cpp +++ b/src/effects/Amplify.cpp @@ -80,7 +80,7 @@ EffectAmplify::~EffectAmplify() // IdentInterface implementation -wxString EffectAmplify::GetSymbol() +IdentInterfaceSymbol EffectAmplify::GetSymbol() { return AMPLIFY_PLUGIN_SYMBOL; } diff --git a/src/effects/Amplify.h b/src/effects/Amplify.h index a12967fd9..9be30329c 100644 --- a/src/effects/Amplify.h +++ b/src/effects/Amplify.h @@ -23,7 +23,7 @@ #include "Effect.h" -#define AMPLIFY_PLUGIN_SYMBOL XO("Amplify") +#define AMPLIFY_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Amplify") } class ShuttleGui; @@ -35,7 +35,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/AutoDuck.cpp b/src/effects/AutoDuck.cpp index 99eaf39dd..1ed7f6437 100644 --- a/src/effects/AutoDuck.cpp +++ b/src/effects/AutoDuck.cpp @@ -102,7 +102,7 @@ EffectAutoDuck::~EffectAutoDuck() // IdentInterface implementation -wxString EffectAutoDuck::GetSymbol() +IdentInterfaceSymbol EffectAutoDuck::GetSymbol() { return AUTODUCK_PLUGIN_SYMBOL; } diff --git a/src/effects/AutoDuck.h b/src/effects/AutoDuck.h index 357b31225..3f09c7a9c 100644 --- a/src/effects/AutoDuck.h +++ b/src/effects/AutoDuck.h @@ -26,7 +26,7 @@ class ShuttleGui; #define AUTO_DUCK_PANEL_NUM_CONTROL_POINTS 5 -#define AUTODUCK_PLUGIN_SYMBOL XO("Auto Duck") +#define AUTODUCK_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Auto Duck") } class EffectAutoDuck final : public Effect { @@ -36,7 +36,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/BassTreble.cpp b/src/effects/BassTreble.cpp index ecfaa0371..5aa9ec156 100644 --- a/src/effects/BassTreble.cpp +++ b/src/effects/BassTreble.cpp @@ -79,7 +79,7 @@ EffectBassTreble::~EffectBassTreble() // IdentInterface implementation -wxString EffectBassTreble::GetSymbol() +IdentInterfaceSymbol EffectBassTreble::GetSymbol() { return BASSTREBLE_PLUGIN_SYMBOL; } diff --git a/src/effects/BassTreble.h b/src/effects/BassTreble.h index 6fc41f523..aa6cb4d45 100644 --- a/src/effects/BassTreble.h +++ b/src/effects/BassTreble.h @@ -23,7 +23,7 @@ class ShuttleGui; -#define BASSTREBLE_PLUGIN_SYMBOL XO("Bass and Treble") +#define BASSTREBLE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Bass and Treble") } class EffectBassTrebleState { @@ -47,7 +47,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/ChangePitch.cpp b/src/effects/ChangePitch.cpp index 0a65832a5..651baee3d 100644 --- a/src/effects/ChangePitch.cpp +++ b/src/effects/ChangePitch.cpp @@ -115,7 +115,7 @@ EffectChangePitch::~EffectChangePitch() // IdentInterface implementation -wxString EffectChangePitch::GetSymbol() +IdentInterfaceSymbol EffectChangePitch::GetSymbol() { return CHANGEPITCH_PLUGIN_SYMBOL; } diff --git a/src/effects/ChangePitch.h b/src/effects/ChangePitch.h index 69e736bf3..8d886daeb 100644 --- a/src/effects/ChangePitch.h +++ b/src/effects/ChangePitch.h @@ -36,7 +36,7 @@ the pitch without changing the tempo. class ShuttleGui; -#define CHANGEPITCH_PLUGIN_SYMBOL XO("Change Pitch") +#define CHANGEPITCH_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Change Pitch") } class EffectChangePitch final : public EffectSoundTouch { @@ -46,7 +46,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/ChangeSpeed.cpp b/src/effects/ChangeSpeed.cpp index 1f68df8c9..3c7d00003 100644 --- a/src/effects/ChangeSpeed.cpp +++ b/src/effects/ChangeSpeed.cpp @@ -105,7 +105,7 @@ EffectChangeSpeed::~EffectChangeSpeed() // IdentInterface implementation -wxString EffectChangeSpeed::GetSymbol() +IdentInterfaceSymbol EffectChangeSpeed::GetSymbol() { return CHANGESPEED_PLUGIN_SYMBOL; } diff --git a/src/effects/ChangeSpeed.h b/src/effects/ChangeSpeed.h index a02fe3f13..9f655feb1 100644 --- a/src/effects/ChangeSpeed.h +++ b/src/effects/ChangeSpeed.h @@ -25,7 +25,7 @@ class ShuttleGui; -#define CHANGESPEED_PLUGIN_SYMBOL XO("Change Speed") +#define CHANGESPEED_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Change Speed") } class EffectChangeSpeed final : public Effect { @@ -35,7 +35,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/ChangeTempo.cpp b/src/effects/ChangeTempo.cpp index 76311ea9f..cac09cd4a 100644 --- a/src/effects/ChangeTempo.cpp +++ b/src/effects/ChangeTempo.cpp @@ -92,7 +92,7 @@ EffectChangeTempo::~EffectChangeTempo() // IdentInterface implementation -wxString EffectChangeTempo::GetSymbol() +IdentInterfaceSymbol EffectChangeTempo::GetSymbol() { return CHANGETEMPO_PLUGIN_SYMBOL; } diff --git a/src/effects/ChangeTempo.h b/src/effects/ChangeTempo.h index 0a5a92304..2e6cf2a99 100644 --- a/src/effects/ChangeTempo.h +++ b/src/effects/ChangeTempo.h @@ -30,7 +30,7 @@ class ShuttleGui; -#define CHANGETEMPO_PLUGIN_SYMBOL XO("Change Tempo") +#define CHANGETEMPO_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Change Tempo") } class EffectChangeTempo final : public EffectSoundTouch { @@ -40,7 +40,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/ClickRemoval.cpp b/src/effects/ClickRemoval.cpp index f44d8a86e..823bbf0fd 100644 --- a/src/effects/ClickRemoval.cpp +++ b/src/effects/ClickRemoval.cpp @@ -75,7 +75,7 @@ EffectClickRemoval::~EffectClickRemoval() // IdentInterface implementation -wxString EffectClickRemoval::GetSymbol() +IdentInterfaceSymbol EffectClickRemoval::GetSymbol() { return CLICKREMOVAL_PLUGIN_SYMBOL; } diff --git a/src/effects/ClickRemoval.h b/src/effects/ClickRemoval.h index b160e13d9..3cba7e7b0 100644 --- a/src/effects/ClickRemoval.h +++ b/src/effects/ClickRemoval.h @@ -26,7 +26,7 @@ class Envelope; class ShuttleGui; -#define CLICKREMOVAL_PLUGIN_SYMBOL XO("Click Removal") +#define CLICKREMOVAL_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Click Removal") } class EffectClickRemoval final : public Effect { @@ -36,7 +36,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Compressor.cpp b/src/effects/Compressor.cpp index dbf78fd26..5a15ed157 100644 --- a/src/effects/Compressor.cpp +++ b/src/effects/Compressor.cpp @@ -96,7 +96,7 @@ EffectCompressor::~EffectCompressor() // IdentInterface implementation -wxString EffectCompressor::GetSymbol() +IdentInterfaceSymbol EffectCompressor::GetSymbol() { return COMPRESSOR_PLUGIN_SYMBOL; } diff --git a/src/effects/Compressor.h b/src/effects/Compressor.h index 16c00027d..112ad3348 100644 --- a/src/effects/Compressor.h +++ b/src/effects/Compressor.h @@ -27,7 +27,7 @@ class EffectCompressorPanel; class ShuttleGui; -#define COMPRESSOR_PLUGIN_SYMBOL XO("Compressor") +#define COMPRESSOR_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Compressor") } class EffectCompressor final : public EffectTwoPassSimpleMono { @@ -38,7 +38,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Distortion.cpp b/src/effects/Distortion.cpp index 5e1a047ab..cd20e1f43 100644 --- a/src/effects/Distortion.cpp +++ b/src/effects/Distortion.cpp @@ -190,7 +190,7 @@ EffectDistortion::~EffectDistortion() // IdentInterface implementation -wxString EffectDistortion::GetSymbol() +IdentInterfaceSymbol EffectDistortion::GetSymbol() { return DISTORTION_PLUGIN_SYMBOL; } diff --git a/src/effects/Distortion.h b/src/effects/Distortion.h index 79fd5ab35..0c3ec014d 100644 --- a/src/effects/Distortion.h +++ b/src/effects/Distortion.h @@ -23,7 +23,7 @@ class ShuttleGui; -#define DISTORTION_PLUGIN_SYMBOL XO("Distortion") +#define DISTORTION_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Distortion") } #define STEPS 1024 // number of +ve or -ve steps in lookup tabe #define TABLESIZE 2049 // size of lookup table (steps * 2 + 1) @@ -64,7 +64,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/DtmfGen.cpp b/src/effects/DtmfGen.cpp index 9953232a6..52fef3d0d 100644 --- a/src/effects/DtmfGen.cpp +++ b/src/effects/DtmfGen.cpp @@ -91,7 +91,7 @@ EffectDtmf::~EffectDtmf() // IdentInterface implementation -wxString EffectDtmf::GetSymbol() +IdentInterfaceSymbol EffectDtmf::GetSymbol() { return DTMFTONES_PLUGIN_SYMBOL; } diff --git a/src/effects/DtmfGen.h b/src/effects/DtmfGen.h index 86ea6aa0c..4c79248de 100644 --- a/src/effects/DtmfGen.h +++ b/src/effects/DtmfGen.h @@ -25,7 +25,7 @@ class ShuttleGui; -#define DTMFTONES_PLUGIN_SYMBOL XO("DTMF Tones") +#define DTMFTONES_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("DTMF Tones") } class EffectDtmf final : public Effect { @@ -35,7 +35,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Echo.cpp b/src/effects/Echo.cpp index 0daa8ea11..b97f68037 100644 --- a/src/effects/Echo.cpp +++ b/src/effects/Echo.cpp @@ -52,7 +52,7 @@ EffectEcho::~EffectEcho() // IdentInterface implementation -wxString EffectEcho::GetSymbol() +IdentInterfaceSymbol EffectEcho::GetSymbol() { return ECHO_PLUGIN_SYMBOL; } diff --git a/src/effects/Echo.h b/src/effects/Echo.h index 18f08a178..3115c2734 100644 --- a/src/effects/Echo.h +++ b/src/effects/Echo.h @@ -21,7 +21,7 @@ class ShuttleGui; -#define ECHO_PLUGIN_SYMBOL XO("Echo") +#define ECHO_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Echo") } class EffectEcho final : public Effect { @@ -31,7 +31,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Effect.cpp b/src/effects/Effect.cpp index 88b13c5ff..9bb6a3659 100644 --- a/src/effects/Effect.cpp +++ b/src/effects/Effect.cpp @@ -164,27 +164,17 @@ wxString Effect::GetPath() return mClient->GetPath(); } - return BUILTIN_EFFECT_PREFIX + GetSymbol(); + return BUILTIN_EFFECT_PREFIX + GetSymbol().Internal(); } -wxString Effect::GetSymbol() +IdentInterfaceSymbol Effect::GetSymbol() { if (mClient) { return mClient->GetSymbol(); } - return wxEmptyString; -} - -wxString Effect::GetName() -{ - if (mClient) - { - return mClient->GetName(); - } - - return GetSymbol(); + return {}; } IdentInterfaceSymbol Effect::GetVendor() diff --git a/src/effects/Effect.h b/src/effects/Effect.h index 69cab859d..ab3d61154 100644 --- a/src/effects/Effect.h +++ b/src/effects/Effect.h @@ -80,11 +80,8 @@ class AUDACITY_DLL_API Effect /* not final */ : public wxEvtHandler, wxString GetPath() override; - // This string persists in configuration files - // So config compatibility will break if it is changed across Audacity versions - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; - wxString GetName() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/effects/Equalization.cpp b/src/effects/Equalization.cpp index 9c04181d6..cde68f482 100644 --- a/src/effects/Equalization.cpp +++ b/src/effects/Equalization.cpp @@ -282,7 +282,7 @@ EffectEqualization::~EffectEqualization() // IdentInterface implementation -wxString EffectEqualization::GetSymbol() +IdentInterfaceSymbol EffectEqualization::GetSymbol() { return EQUALIZATION_PLUGIN_SYMBOL; } diff --git a/src/effects/Equalization.h b/src/effects/Equalization.h index 3a625296e..b2b9520f2 100644 --- a/src/effects/Equalization.h +++ b/src/effects/Equalization.h @@ -43,7 +43,7 @@ #include "../RealFFTf.h" #include "../SampleFormat.h" -#define EQUALIZATION_PLUGIN_SYMBOL XO("Equalization") +#define EQUALIZATION_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Equalization") } class Envelope; @@ -105,7 +105,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Fade.cpp b/src/effects/Fade.cpp index b0243fbae..0b2dc7aa4 100644 --- a/src/effects/Fade.cpp +++ b/src/effects/Fade.cpp @@ -30,7 +30,7 @@ EffectFade::~EffectFade() // IdentInterface implementation -wxString EffectFade::GetSymbol() +IdentInterfaceSymbol EffectFade::GetSymbol() { return mFadeIn ? FADEIN_PLUGIN_SYMBOL diff --git a/src/effects/Fade.h b/src/effects/Fade.h index 48cbd059c..5125e23ac 100644 --- a/src/effects/Fade.h +++ b/src/effects/Fade.h @@ -15,8 +15,8 @@ #include "Effect.h" -#define FADEIN_PLUGIN_SYMBOL XO("Fade In") -#define FADEOUT_PLUGIN_SYMBOL XO("Fade Out") +#define FADEIN_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Fade In") } +#define FADEOUT_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Fade Out") } class EffectFade final : public Effect { @@ -26,7 +26,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; // EffectDefinitionInterface implementation diff --git a/src/effects/FindClipping.cpp b/src/effects/FindClipping.cpp index b5e8b4efd..23eb4fec4 100644 --- a/src/effects/FindClipping.cpp +++ b/src/effects/FindClipping.cpp @@ -52,7 +52,7 @@ EffectFindClipping::~EffectFindClipping() // IdentInterface implementation -wxString EffectFindClipping::GetSymbol() +IdentInterfaceSymbol EffectFindClipping::GetSymbol() { return FINDCLIPPING_PLUGIN_SYMBOL; } diff --git a/src/effects/FindClipping.h b/src/effects/FindClipping.h index c9af30ecc..e2cadb4dd 100644 --- a/src/effects/FindClipping.h +++ b/src/effects/FindClipping.h @@ -20,7 +20,7 @@ class LabelTrack; #include "Effect.h" -#define FINDCLIPPING_PLUGIN_SYMBOL XO("Find Clipping") +#define FINDCLIPPING_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Find Clipping") } class EffectFindClipping final : public Effect { @@ -30,7 +30,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Invert.cpp b/src/effects/Invert.cpp index 3ef894f6d..0181a720f 100644 --- a/src/effects/Invert.cpp +++ b/src/effects/Invert.cpp @@ -30,7 +30,7 @@ EffectInvert::~EffectInvert() // IdentInterface implementation -wxString EffectInvert::GetSymbol() +IdentInterfaceSymbol EffectInvert::GetSymbol() { return INVERT_PLUGIN_SYMBOL; } diff --git a/src/effects/Invert.h b/src/effects/Invert.h index b6e991719..cecec020d 100644 --- a/src/effects/Invert.h +++ b/src/effects/Invert.h @@ -17,7 +17,7 @@ #include "Effect.h" -#define INVERT_PLUGIN_SYMBOL XO("Invert") +#define INVERT_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Invert") } class EffectInvert final : public Effect { @@ -27,7 +27,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; // EffectDefinitionInterface implementation diff --git a/src/effects/LoadEffects.cpp b/src/effects/LoadEffects.cpp index 744a85586..ca40f209a 100644 --- a/src/effects/LoadEffects.cpp +++ b/src/effects/LoadEffects.cpp @@ -164,7 +164,7 @@ enum // Redefine EFFECT() to add the effect's name to an array // #undef EFFECT -#define EFFECT(n, i, args) n ## _PLUGIN_SYMBOL, +#define EFFECT(n, i, args) (n ## _PLUGIN_SYMBOL).Internal(), // // Create the effect name array @@ -239,12 +239,7 @@ wxString BuiltinEffectsModule::GetPath() return mPath; } -wxString BuiltinEffectsModule::GetSymbol() -{ - return XO("Builtin Effects"); -} - -wxString BuiltinEffectsModule::GetName() +IdentInterfaceSymbol BuiltinEffectsModule::GetSymbol() { return XO("Builtin Effects"); } diff --git a/src/effects/LoadEffects.h b/src/effects/LoadEffects.h index b4ca3f072..412bbb5c2 100644 --- a/src/effects/LoadEffects.h +++ b/src/effects/LoadEffects.h @@ -30,8 +30,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/effects/Noise.cpp b/src/effects/Noise.cpp index 53978b043..36769ffea 100644 --- a/src/effects/Noise.cpp +++ b/src/effects/Noise.cpp @@ -69,7 +69,7 @@ EffectNoise::~EffectNoise() // IdentInterface implementation -wxString EffectNoise::GetSymbol() +IdentInterfaceSymbol EffectNoise::GetSymbol() { return NOISE_PLUGIN_SYMBOL; } diff --git a/src/effects/Noise.h b/src/effects/Noise.h index 495cf8561..2c48c9472 100644 --- a/src/effects/Noise.h +++ b/src/effects/Noise.h @@ -21,7 +21,7 @@ class ShuttleGui; -#define NOISE_PLUGIN_SYMBOL XO("Noise") +#define NOISE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Noise") } class EffectNoise final : public Effect { @@ -31,7 +31,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/NoiseReduction.cpp b/src/effects/NoiseReduction.cpp index e9facd8d6..14f8057fa 100644 --- a/src/effects/NoiseReduction.cpp +++ b/src/effects/NoiseReduction.cpp @@ -429,7 +429,7 @@ EffectNoiseReduction::~EffectNoiseReduction() // IdentInterface implementation -wxString EffectNoiseReduction::GetSymbol() +IdentInterfaceSymbol EffectNoiseReduction::GetSymbol() { return NOISEREDUCTION_PLUGIN_SYMBOL; } diff --git a/src/effects/NoiseReduction.h b/src/effects/NoiseReduction.h index ccfa4893c..a4898eb40 100644 --- a/src/effects/NoiseReduction.h +++ b/src/effects/NoiseReduction.h @@ -17,7 +17,7 @@ #include "../MemoryX.h" -#define NOISEREDUCTION_PLUGIN_SYMBOL XO("Noise Reduction") +#define NOISEREDUCTION_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Noise Reduction") } class EffectNoiseReduction final : public Effect { public: @@ -29,7 +29,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; // EffectDefinitionInterface implementation diff --git a/src/effects/NoiseRemoval.cpp b/src/effects/NoiseRemoval.cpp index 11d8ca3c1..54c08bf78 100644 --- a/src/effects/NoiseRemoval.cpp +++ b/src/effects/NoiseRemoval.cpp @@ -110,7 +110,7 @@ EffectNoiseRemoval::~EffectNoiseRemoval() // IdentInterface implementation -wxString EffectNoiseRemoval::GetSymbol() +IdentInterfaceSymbol EffectNoiseRemoval::GetSymbol() { return XO("Noise Removal"); } diff --git a/src/effects/NoiseRemoval.h b/src/effects/NoiseRemoval.h index d82968a98..c47c02a98 100644 --- a/src/effects/NoiseRemoval.h +++ b/src/effects/NoiseRemoval.h @@ -37,7 +37,7 @@ class wxTextCtrl; #include "../RealFFTf.h" -#define NOISEREMOVAL_PLUGIN_SYMBOL XO("Noise Removal") +#define NOISEREMOVAL_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Noise Removal") } class EffectNoiseRemoval final : public Effect { @@ -47,7 +47,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; // EffectDefinitionInterface implementation diff --git a/src/effects/Normalize.cpp b/src/effects/Normalize.cpp index 109bb1213..1558964ce 100644 --- a/src/effects/Normalize.cpp +++ b/src/effects/Normalize.cpp @@ -58,7 +58,7 @@ EffectNormalize::~EffectNormalize() // IdentInterface implementation -wxString EffectNormalize::GetSymbol() +IdentInterfaceSymbol EffectNormalize::GetSymbol() { return NORMALIZE_PLUGIN_SYMBOL; } diff --git a/src/effects/Normalize.h b/src/effects/Normalize.h index c681b10f7..d0bd8b36e 100644 --- a/src/effects/Normalize.h +++ b/src/effects/Normalize.h @@ -22,7 +22,7 @@ class ShuttleGui; -#define NORMALIZE_PLUGIN_SYMBOL XO("Normalize") +#define NORMALIZE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Normalize") } class EffectNormalize final : public Effect { @@ -32,7 +32,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Paulstretch.cpp b/src/effects/Paulstretch.cpp index 9f8cc3a3d..067209af9 100644 --- a/src/effects/Paulstretch.cpp +++ b/src/effects/Paulstretch.cpp @@ -98,7 +98,7 @@ EffectPaulstretch::~EffectPaulstretch() // IdentInterface implementation -wxString EffectPaulstretch::GetSymbol() +IdentInterfaceSymbol EffectPaulstretch::GetSymbol() { return PAULSTRETCH_PLUGIN_SYMBOL; } diff --git a/src/effects/Paulstretch.h b/src/effects/Paulstretch.h index cb895183c..387a749be 100644 --- a/src/effects/Paulstretch.h +++ b/src/effects/Paulstretch.h @@ -16,7 +16,7 @@ class ShuttleGui; -#define PAULSTRETCH_PLUGIN_SYMBOL XO("Paulstretch") +#define PAULSTRETCH_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Paulstretch") } class EffectPaulstretch final : public Effect { @@ -26,7 +26,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Phaser.cpp b/src/effects/Phaser.cpp index 2b8c9daa9..8afe5c548 100644 --- a/src/effects/Phaser.cpp +++ b/src/effects/Phaser.cpp @@ -99,7 +99,7 @@ EffectPhaser::~EffectPhaser() // IdentInterface implementation -wxString EffectPhaser::GetSymbol() +IdentInterfaceSymbol EffectPhaser::GetSymbol() { return PHASER_PLUGIN_SYMBOL; } diff --git a/src/effects/Phaser.h b/src/effects/Phaser.h index 512b0d0f7..1af18227a 100644 --- a/src/effects/Phaser.h +++ b/src/effects/Phaser.h @@ -27,7 +27,7 @@ class ShuttleGui; #define NUM_STAGES 24 -#define PHASER_PLUGIN_SYMBOL XO("Phaser") +#define PHASER_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Phaser") } class EffectPhaserState { @@ -52,7 +52,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Repair.cpp b/src/effects/Repair.cpp index 5c506ca80..9d6f18f76 100644 --- a/src/effects/Repair.cpp +++ b/src/effects/Repair.cpp @@ -43,7 +43,7 @@ EffectRepair::~EffectRepair() // IdentInterface implementation -wxString EffectRepair::GetSymbol() +IdentInterfaceSymbol EffectRepair::GetSymbol() { return REPAIR_PLUGIN_SYMBOL; } diff --git a/src/effects/Repair.h b/src/effects/Repair.h index 40028554e..e964c484f 100644 --- a/src/effects/Repair.h +++ b/src/effects/Repair.h @@ -15,7 +15,7 @@ #include "Effect.h" -#define REPAIR_PLUGIN_SYMBOL XO("Repair") +#define REPAIR_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Repair") } class WaveTrack; @@ -27,7 +27,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; // EffectDefinitionInterface implementation diff --git a/src/effects/Repeat.cpp b/src/effects/Repeat.cpp index 4eb4526df..bc83c3445 100644 --- a/src/effects/Repeat.cpp +++ b/src/effects/Repeat.cpp @@ -57,7 +57,7 @@ EffectRepeat::~EffectRepeat() // IdentInterface implementation -wxString EffectRepeat::GetSymbol() +IdentInterfaceSymbol EffectRepeat::GetSymbol() { return REPEAT_PLUGIN_SYMBOL; } diff --git a/src/effects/Repeat.h b/src/effects/Repeat.h index dd04732ce..040c11e08 100644 --- a/src/effects/Repeat.h +++ b/src/effects/Repeat.h @@ -20,7 +20,7 @@ class ShuttleGui; -#define REPEAT_PLUGIN_SYMBOL XO("Repeat") +#define REPEAT_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Repeat") } class EffectRepeat final : public Effect { @@ -30,7 +30,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Reverb.cpp b/src/effects/Reverb.cpp index 78c661c12..0fb1eb7ea 100644 --- a/src/effects/Reverb.cpp +++ b/src/effects/Reverb.cpp @@ -130,7 +130,7 @@ EffectReverb::~EffectReverb() // IdentInterface implementation -wxString EffectReverb::GetSymbol() +IdentInterfaceSymbol EffectReverb::GetSymbol() { return REVERB_PLUGIN_SYMBOL; } diff --git a/src/effects/Reverb.h b/src/effects/Reverb.h index 85c7cadd5..94d17ca0f 100644 --- a/src/effects/Reverb.h +++ b/src/effects/Reverb.h @@ -22,7 +22,7 @@ class ShuttleGui; -#define REVERB_PLUGIN_SYMBOL XO("Reverb") +#define REVERB_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Reverb") } struct Reverb_priv_t; @@ -48,7 +48,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Reverse.cpp b/src/effects/Reverse.cpp index bb157b3bd..0c361defc 100644 --- a/src/effects/Reverse.cpp +++ b/src/effects/Reverse.cpp @@ -38,7 +38,7 @@ EffectReverse::~EffectReverse() // IdentInterface implementation -wxString EffectReverse::GetSymbol() +IdentInterfaceSymbol EffectReverse::GetSymbol() { return REVERSE_PLUGIN_SYMBOL; } diff --git a/src/effects/Reverse.h b/src/effects/Reverse.h index 4b98be806..603b84343 100644 --- a/src/effects/Reverse.h +++ b/src/effects/Reverse.h @@ -17,7 +17,7 @@ #include "Effect.h" -#define REVERSE_PLUGIN_SYMBOL XO("Reverse") +#define REVERSE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Reverse") } class EffectReverse final : public Effect { @@ -27,7 +27,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; // EffectDefinitionInterface implementation diff --git a/src/effects/SBSMSEffect.h b/src/effects/SBSMSEffect.h index 20bf758b2..cb62a0b47 100644 --- a/src/effects/SBSMSEffect.h +++ b/src/effects/SBSMSEffect.h @@ -36,7 +36,10 @@ public: protected: wxString mProxyEffectName { XO("SBSMS Time / Pitch Stretch") }; - wxString GetName() override { return mProxyEffectName; }; + // This supplies the abstract virtual function, but in fact this symbol + // does not get used: this class is either a temporary helper, or else + // GetSymbol() is overridden further in derived classes. + IdentInterfaceSymbol GetSymbol() override { return mProxyEffectName; } private: bool ProcessLabelTrack(LabelTrack *track); diff --git a/src/effects/ScienFilter.cpp b/src/effects/ScienFilter.cpp index 78ee013d0..d04dde516 100644 --- a/src/effects/ScienFilter.cpp +++ b/src/effects/ScienFilter.cpp @@ -180,7 +180,7 @@ EffectScienFilter::~EffectScienFilter() // IdentInterface implementation -wxString EffectScienFilter::GetSymbol() +IdentInterfaceSymbol EffectScienFilter::GetSymbol() { return CLASSICFILTERS_PLUGIN_SYMBOL; } diff --git a/src/effects/ScienFilter.h b/src/effects/ScienFilter.h index d5f20afbe..034f4d60a 100644 --- a/src/effects/ScienFilter.h +++ b/src/effects/ScienFilter.h @@ -31,7 +31,7 @@ Vaughan Johnson (Preview) class wxTextCtrl; class ShuttleGui; -#define CLASSICFILTERS_PLUGIN_SYMBOL XO("Classic Filters") +#define CLASSICFILTERS_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Classic Filters") } class EffectScienFilterPanel; @@ -43,7 +43,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/Silence.cpp b/src/effects/Silence.cpp index fb94790ea..56c678107 100644 --- a/src/effects/Silence.cpp +++ b/src/effects/Silence.cpp @@ -32,7 +32,7 @@ EffectSilence::~EffectSilence() // IdentInterface implementation -wxString EffectSilence::GetSymbol() +IdentInterfaceSymbol EffectSilence::GetSymbol() { return SILENCE_PLUGIN_SYMBOL; } diff --git a/src/effects/Silence.h b/src/effects/Silence.h index eec8e84a7..64e82a6a9 100644 --- a/src/effects/Silence.h +++ b/src/effects/Silence.h @@ -19,7 +19,7 @@ #include "Generator.h" -#define SILENCE_PLUGIN_SYMBOL XO("Silence") +#define SILENCE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Silence") } class EffectSilence final : public Generator { @@ -29,7 +29,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/SimpleMono.cpp b/src/effects/SimpleMono.cpp index 7e38bbb3b..2e91fbda6 100644 --- a/src/effects/SimpleMono.cpp +++ b/src/effects/SimpleMono.cpp @@ -14,7 +14,7 @@ it gets at a time. Your derived class only needs to implement - GetCommandName, GetEffectAction, and ProcessSimpleMono. + GetSymbol, GetEffectAction, and ProcessSimpleMono. *//*******************************************************************/ diff --git a/src/effects/SimpleMono.h b/src/effects/SimpleMono.h index 1694bcd9c..1f2f8a766 100644 --- a/src/effects/SimpleMono.h +++ b/src/effects/SimpleMono.h @@ -10,7 +10,7 @@ monaural effect. Inherit from it if your effect doesn't just modifies a track in place and doesn't care how many samples it gets at a time. Your derived class only needs to implement - GetCommandName, GetEffectAction, and ProcessSimpleMono. + GetSymbol, GetEffectAction, and ProcessSimpleMono. **********************************************************************/ diff --git a/src/effects/StereoToMono.cpp b/src/effects/StereoToMono.cpp index 7d52b6612..3f44b052b 100644 --- a/src/effects/StereoToMono.cpp +++ b/src/effects/StereoToMono.cpp @@ -31,7 +31,7 @@ EffectStereoToMono::~EffectStereoToMono() // IdentInterface implementation -wxString EffectStereoToMono::GetSymbol() +IdentInterfaceSymbol EffectStereoToMono::GetSymbol() { return STEREOTOMONO_PLUGIN_SYMBOL; } diff --git a/src/effects/StereoToMono.h b/src/effects/StereoToMono.h index 07db4aac1..3f7889a5f 100644 --- a/src/effects/StereoToMono.h +++ b/src/effects/StereoToMono.h @@ -15,7 +15,7 @@ #include "Effect.h" -#define STEREOTOMONO_PLUGIN_SYMBOL XO("Stereo To Mono") +#define STEREOTOMONO_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Stereo To Mono") } class EffectStereoToMono final : public Effect { @@ -25,7 +25,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; // EffectDefinitionInterface implementation diff --git a/src/effects/TimeScale.cpp b/src/effects/TimeScale.cpp index 829936b93..e34bf8727 100644 --- a/src/effects/TimeScale.cpp +++ b/src/effects/TimeScale.cpp @@ -84,16 +84,11 @@ EffectTimeScale::~EffectTimeScale() // IdentInterface implementation -wxString EffectTimeScale::GetSymbol() +IdentInterfaceSymbol EffectTimeScale::GetSymbol() { return TIMESCALE_PLUGIN_SYMBOL; } -wxString EffectTimeScale::GetName() -{ - return XO("Sliding Time Scale/Pitch Shift"); -} - wxString EffectTimeScale::GetDescription() { return _("Allows continuous changes to the tempo and/or pitch"); diff --git a/src/effects/TimeScale.h b/src/effects/TimeScale.h index d4d4be0b2..8125dbd1e 100644 --- a/src/effects/TimeScale.h +++ b/src/effects/TimeScale.h @@ -24,7 +24,11 @@ class ShuttleGui; -#define TIMESCALE_PLUGIN_SYMBOL XO("Time Scale") +// two strings here +// unusual case +#define TIMESCALE_PLUGIN_SYMBOL \ + IdentInterfaceSymbol{ wxT("Time Scale"), \ + XO("Sliding Time Scale/Pitch Shift") } class EffectTimeScale final : public EffectSBSMS { @@ -34,8 +38,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/ToneGen.cpp b/src/effects/ToneGen.cpp index a78363b09..71db1c483 100644 --- a/src/effects/ToneGen.cpp +++ b/src/effects/ToneGen.cpp @@ -111,7 +111,7 @@ EffectToneGen::~EffectToneGen() // IdentInterface implementation -wxString EffectToneGen::GetSymbol() +IdentInterfaceSymbol EffectToneGen::GetSymbol() { return mChirp ? CHIRP_PLUGIN_SYMBOL diff --git a/src/effects/ToneGen.h b/src/effects/ToneGen.h index e52e2b88b..142cacf90 100644 --- a/src/effects/ToneGen.h +++ b/src/effects/ToneGen.h @@ -22,8 +22,8 @@ class ShuttleGui; -#define CHIRP_PLUGIN_SYMBOL XO("Chirp") -#define TONE_PLUGIN_SYMBOL XO("Tone") +#define CHIRP_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Chirp") } +#define TONE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Tone") } class EffectToneGen final : public Effect { @@ -33,7 +33,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/TruncSilence.cpp b/src/effects/TruncSilence.cpp index aa824bc73..3db3bfea2 100644 --- a/src/effects/TruncSilence.cpp +++ b/src/effects/TruncSilence.cpp @@ -151,7 +151,7 @@ EffectTruncSilence::~EffectTruncSilence() // IdentInterface implementation -wxString EffectTruncSilence::GetSymbol() +IdentInterfaceSymbol EffectTruncSilence::GetSymbol() { return TRUNCATESILENCE_PLUGIN_SYMBOL; } diff --git a/src/effects/TruncSilence.h b/src/effects/TruncSilence.h index eecd3754f..5ba7e9797 100644 --- a/src/effects/TruncSilence.h +++ b/src/effects/TruncSilence.h @@ -29,7 +29,7 @@ class wxChoice; class wxTextCtrl; class wxCheckBox; -#define TRUNCATESILENCE_PLUGIN_SYMBOL XO("Truncate Silence") +#define TRUNCATESILENCE_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Truncate Silence") } class RegionList; @@ -41,7 +41,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/VST/VSTEffect.cpp b/src/effects/VST/VSTEffect.cpp index 04b848eac..7cec5e9a3 100644 --- a/src/effects/VST/VSTEffect.cpp +++ b/src/effects/VST/VSTEffect.cpp @@ -231,16 +231,11 @@ public: return mPath; } - wxString GetSymbol() override + IdentInterfaceSymbol GetSymbol() override { return mName; } - wxString GetName() override - { - return GetSymbol(); - } - IdentInterfaceSymbol GetVendor() override { return { mVendor }; @@ -331,16 +326,11 @@ wxString VSTEffectsModule::GetPath() return mPath; } -wxString VSTEffectsModule::GetSymbol() +IdentInterfaceSymbol VSTEffectsModule::GetSymbol() { return XO("VST Effects"); } -wxString VSTEffectsModule::GetName() -{ - return GetSymbol(); -} - IdentInterfaceSymbol VSTEffectsModule::GetVendor() { return XO("The Audacity Team"); @@ -577,7 +567,8 @@ unsigned VSTEffectsModule::DiscoverPluginsAtPath( if (idCnt > 3) { progress.create( _("Scanning Shell VST"), - wxString::Format(_("Registering %d of %d: %-64.64s"), 0, idCnt, proc.GetName()), + wxString::Format(_("Registering %d of %d: %-64.64s"), 0, idCnt, + proc.GetSymbol().Translation()), static_cast(idCnt), nullptr, wxPD_APP_MODAL | @@ -651,7 +642,8 @@ unsigned VSTEffectsModule::DiscoverPluginsAtPath( { idNdx++; cont = progress->Update(idNdx, - wxString::Format(_("Registering %d of %d: %-64.64s"), idNdx, idCnt, proc.GetName())); + wxString::Format(_("Registering %d of %d: %-64.64s"), idNdx, idCnt, + proc.GetSymbol().Translation() )); } if (!skip && cont) @@ -734,7 +726,7 @@ void VSTEffectsModule::Check(const wxChar *path) { out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyBegin, wxEmptyString); out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyPath, effect.GetPath()); - out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyName, effect.GetName()); + out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyName, effect.GetSymbol().Internal()); out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyVendor, effect.GetVendor().Internal()); out += wxString::Format(wxT("%s%d=%s\n"), OUTPUTKEY, kKeyVersion, effect.GetVersion()); @@ -1198,16 +1190,11 @@ wxString VSTEffect::GetPath() return mPath; } -wxString VSTEffect::GetSymbol() +IdentInterfaceSymbol VSTEffect::GetSymbol() { return mName; } -wxString VSTEffect::GetName() -{ - return GetSymbol(); -} - IdentInterfaceSymbol VSTEffect::GetVendor() { return { mVendor }; @@ -3634,7 +3621,8 @@ void VSTEffect::SaveXML(const wxFileName & fn) xmlFile.WriteAttr(wxT("version"), wxT("2")); xmlFile.StartTag(wxT("effect")); - xmlFile.WriteAttr(wxT("name"), GetName()); + // Use internal name only in persistent information + xmlFile.WriteAttr(wxT("name"), GetSymbol().Internal()); xmlFile.WriteAttr(wxT("uniqueID"), mAEffect->uniqueID); xmlFile.WriteAttr(wxT("version"), mAEffect->version); xmlFile.WriteAttr(wxT("numParams"), mAEffect->numParams); @@ -3746,7 +3734,7 @@ bool VSTEffect::HandleXMLTag(const wxChar *tag, const wxChar **attrs) return false; } - if (value != GetName()) + if (value != GetSymbol().Internal()) { wxString msg; msg.Printf(_("This parameter file was saved from %s. Continue?"), value); diff --git a/src/effects/VST/VSTEffect.h b/src/effects/VST/VSTEffect.h index 8264af354..072760ba1 100644 --- a/src/effects/VST/VSTEffect.h +++ b/src/effects/VST/VSTEffect.h @@ -88,8 +88,7 @@ class VSTEffect final : public wxEvtHandler, // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; @@ -382,8 +381,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/effects/Wahwah.cpp b/src/effects/Wahwah.cpp index ccbd45385..c5be8bfa8 100644 --- a/src/effects/Wahwah.cpp +++ b/src/effects/Wahwah.cpp @@ -90,7 +90,7 @@ EffectWahwah::~EffectWahwah() // IdentInterface implementation -wxString EffectWahwah::GetSymbol() +IdentInterfaceSymbol EffectWahwah::GetSymbol() { return WAHWAH_PLUGIN_SYMBOL; } diff --git a/src/effects/Wahwah.h b/src/effects/Wahwah.h index 9bbd99491..f95d02d5c 100644 --- a/src/effects/Wahwah.h +++ b/src/effects/Wahwah.h @@ -25,7 +25,7 @@ class ShuttleGui; -#define WAHWAH_PLUGIN_SYMBOL XO("Wahwah") +#define WAHWAH_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Wahwah") } class EffectWahwahState { @@ -49,7 +49,7 @@ public: // IdentInterface implementation - wxString GetSymbol() override; + IdentInterfaceSymbol GetSymbol() override; wxString GetDescription() override; wxString ManualPage() override; diff --git a/src/effects/audiounits/AudioUnitEffect.cpp b/src/effects/audiounits/AudioUnitEffect.cpp index e68196c59..df9bd7be7 100644 --- a/src/effects/audiounits/AudioUnitEffect.cpp +++ b/src/effects/audiounits/AudioUnitEffect.cpp @@ -111,12 +111,7 @@ wxString AudioUnitEffectsModule::GetPath() return mPath; } -wxString AudioUnitEffectsModule::GetSymbol() -{ - return wxT("Audio Unit Effects"); -} - -wxString AudioUnitEffectsModule::GetName() +IdentInterfaceSymbol AudioUnitEffectsModule::GetSymbol() { /* 18n-hint: Audio Unit is the name of an Apple audio software protocol */ return XO("Audio Unit Effects"); @@ -885,16 +880,11 @@ wxString AudioUnitEffect::GetPath() return mPath; } -wxString AudioUnitEffect::GetSymbol() +IdentInterfaceSymbol AudioUnitEffect::GetSymbol() { return mName; } -wxString AudioUnitEffect::GetName() -{ - return GetSymbol(); -} - IdentInterfaceSymbol AudioUnitEffect::GetVendor() { return { mVendor }; @@ -1966,7 +1956,9 @@ bool AudioUnitEffect::SetRateAndChannels() sizeof(Float64)); if (result != noErr) { - wxPrintf("%ls Didn't accept sample rate on global\n", GetName().wx_str()); + wxPrintf("%ls Didn't accept sample rate on global\n", + // Exposing internal name only in debug printf + GetSymbol().Internal().wx_str()); return false; } @@ -1980,7 +1972,9 @@ bool AudioUnitEffect::SetRateAndChannels() sizeof(Float64)); if (result != noErr) { - wxPrintf("%ls Didn't accept sample rate on input\n", GetName().wx_str()); + wxPrintf("%ls Didn't accept sample rate on input\n", + // Exposing internal name only in debug printf + GetSymbol().Internal().wx_str()); return false; } @@ -1992,7 +1986,9 @@ bool AudioUnitEffect::SetRateAndChannels() sizeof(AudioStreamBasicDescription)); if (result != noErr) { - wxPrintf("%ls didn't accept stream format on input\n", GetName().wx_str()); + wxPrintf("%ls didn't accept stream format on input\n", + // Exposing internal name only in debug printf + GetSymbol().Internal().wx_str()); return false; } } @@ -2007,7 +2003,9 @@ bool AudioUnitEffect::SetRateAndChannels() sizeof(Float64)); if (result != noErr) { - wxPrintf("%ls Didn't accept sample rate on output\n", GetName().wx_str()); + wxPrintf("%ls Didn't accept sample rate on output\n", + // Exposing internal name only in debug printf + GetSymbol().Internal().wx_str()); return false; } @@ -2021,7 +2019,9 @@ bool AudioUnitEffect::SetRateAndChannels() if (result != noErr) { - wxPrintf("%ls didn't accept stream format on output\n", GetName().wx_str()); + wxPrintf("%ls didn't accept stream format on output\n", + // Exposing internal name only in debug printf + GetSymbol().Internal().wx_str()); return false; } } diff --git a/src/effects/audiounits/AudioUnitEffect.h b/src/effects/audiounits/AudioUnitEffect.h index 8ffc59d06..565419864 100644 --- a/src/effects/audiounits/AudioUnitEffect.h +++ b/src/effects/audiounits/AudioUnitEffect.h @@ -53,8 +53,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; @@ -233,8 +232,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/effects/ladspa/LadspaEffect.cpp b/src/effects/ladspa/LadspaEffect.cpp index 774192c15..6827d581b 100644 --- a/src/effects/ladspa/LadspaEffect.cpp +++ b/src/effects/ladspa/LadspaEffect.cpp @@ -116,7 +116,7 @@ wxString LadspaEffectsModule::GetPath() return mPath; } -wxString LadspaEffectsModule::GetSymbol() +IdentInterfaceSymbol LadspaEffectsModule::GetSymbol() { /* i8n-hint: abbreviates "Linux Audio Developer's Simple Plugin API" (Application programming interface) @@ -124,11 +124,6 @@ wxString LadspaEffectsModule::GetSymbol() return XO("LADSPA Effects"); } -wxString LadspaEffectsModule::GetName() -{ - return GetSymbol(); -} - IdentInterfaceSymbol LadspaEffectsModule::GetVendor() { return XO("The Audacity Team"); @@ -626,16 +621,11 @@ wxString LadspaEffect::GetPath() return wxString::Format(wxT("%s;%d"), mPath, mIndex); } -wxString LadspaEffect::GetSymbol() +IdentInterfaceSymbol LadspaEffect::GetSymbol() { return LAT1CTOWX(mData->Name); } -wxString LadspaEffect::GetName() -{ - return GetSymbol(); -} - IdentInterfaceSymbol LadspaEffect::GetVendor() { return { LAT1CTOWX(mData->Maker) }; diff --git a/src/effects/ladspa/LadspaEffect.h b/src/effects/ladspa/LadspaEffect.h index 2f1a52d4b..4fb4e03f5 100644 --- a/src/effects/ladspa/LadspaEffect.h +++ b/src/effects/ladspa/LadspaEffect.h @@ -50,8 +50,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; @@ -213,8 +212,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/effects/lv2/LV2Effect.cpp b/src/effects/lv2/LV2Effect.cpp index 919b2bd0e..37aa7dd43 100644 --- a/src/effects/lv2/LV2Effect.cpp +++ b/src/effects/lv2/LV2Effect.cpp @@ -330,16 +330,11 @@ wxString LV2Effect::GetPath() return LilvString(lilv_plugin_get_uri(mPlug)); } -wxString LV2Effect::GetSymbol() +IdentInterfaceSymbol LV2Effect::GetSymbol() { return LilvString(lilv_plugin_get_name(mPlug), true); } -wxString LV2Effect::GetName() -{ - return GetSymbol(); -} - IdentInterfaceSymbol LV2Effect::GetVendor() { wxString vendor = LilvString(lilv_plugin_get_author_name(mPlug), true); diff --git a/src/effects/lv2/LV2Effect.h b/src/effects/lv2/LV2Effect.h index 6a9aca862..0006641ae 100644 --- a/src/effects/lv2/LV2Effect.h +++ b/src/effects/lv2/LV2Effect.h @@ -112,8 +112,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/effects/lv2/LoadLV2.cpp b/src/effects/lv2/LoadLV2.cpp index d8b2dbf14..de4a1aad0 100644 --- a/src/effects/lv2/LoadLV2.cpp +++ b/src/effects/lv2/LoadLV2.cpp @@ -100,16 +100,11 @@ wxString LV2EffectsModule::GetPath() return mPath; } -wxString LV2EffectsModule::GetSymbol() +IdentInterfaceSymbol LV2EffectsModule::GetSymbol() { return XO("LV2 Effects"); } -wxString LV2EffectsModule::GetName() -{ - return GetSymbol(); -} - IdentInterfaceSymbol LV2EffectsModule::GetVendor() { return XO("The Audacity Team"); diff --git a/src/effects/lv2/LoadLV2.h b/src/effects/lv2/LoadLV2.h index eb448d6bb..f050d102b 100644 --- a/src/effects/lv2/LoadLV2.h +++ b/src/effects/lv2/LoadLV2.h @@ -77,8 +77,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/effects/nyquist/LoadNyquist.cpp b/src/effects/nyquist/LoadNyquist.cpp index abb10789f..1fe7ada49 100644 --- a/src/effects/nyquist/LoadNyquist.cpp +++ b/src/effects/nyquist/LoadNyquist.cpp @@ -101,16 +101,11 @@ wxString NyquistEffectsModule::GetPath() return mPath; } -wxString NyquistEffectsModule::GetSymbol() +IdentInterfaceSymbol NyquistEffectsModule::GetSymbol() { return XO("Nyquist Effects"); } -wxString NyquistEffectsModule::GetName() -{ - return GetSymbol(); -} - IdentInterfaceSymbol NyquistEffectsModule::GetVendor() { return XO("The Audacity Team"); diff --git a/src/effects/nyquist/LoadNyquist.h b/src/effects/nyquist/LoadNyquist.h index 04e897378..907392d02 100644 --- a/src/effects/nyquist/LoadNyquist.h +++ b/src/effects/nyquist/LoadNyquist.h @@ -27,8 +27,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 7cb4898d4..43f1b72ea 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -192,7 +192,7 @@ wxString NyquistEffect::GetPath() return mFileName.GetFullPath(); } -wxString NyquistEffect::GetSymbol() +IdentInterfaceSymbol NyquistEffect::GetSymbol() { if (mIsPrompt) return (mType == EffectTypeTool) ? @@ -202,11 +202,6 @@ wxString NyquistEffect::GetSymbol() return mName; } -wxString NyquistEffect::GetName() -{ - return GetSymbol(); -} - IdentInterfaceSymbol NyquistEffect::GetVendor() { if (mIsPrompt) diff --git a/src/effects/nyquist/Nyquist.h b/src/effects/nyquist/Nyquist.h index 0bb785b77..3666819f8 100644 --- a/src/effects/nyquist/Nyquist.h +++ b/src/effects/nyquist/Nyquist.h @@ -84,8 +84,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/effects/vamp/LoadVamp.cpp b/src/effects/vamp/LoadVamp.cpp index 7ba57938d..7137f0d34 100644 --- a/src/effects/vamp/LoadVamp.cpp +++ b/src/effects/vamp/LoadVamp.cpp @@ -75,12 +75,7 @@ wxString VampEffectsModule::GetPath() return mPath; } -wxString VampEffectsModule::GetSymbol() -{ - return wxT("Vamp Effects"); -} - -wxString VampEffectsModule::GetName() +IdentInterfaceSymbol VampEffectsModule::GetSymbol() { return XO("Vamp Effects"); } diff --git a/src/effects/vamp/LoadVamp.h b/src/effects/vamp/LoadVamp.h index 10ec0c02f..444e0f4e0 100644 --- a/src/effects/vamp/LoadVamp.h +++ b/src/effects/vamp/LoadVamp.h @@ -31,8 +31,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/effects/vamp/VampEffect.cpp b/src/effects/vamp/VampEffect.cpp index 34a26ce95..c6273859b 100644 --- a/src/effects/vamp/VampEffect.cpp +++ b/src/effects/vamp/VampEffect.cpp @@ -96,16 +96,11 @@ wxString VampEffect::GetPath() return mPath; } -wxString VampEffect::GetSymbol() +IdentInterfaceSymbol VampEffect::GetSymbol() { return mName; } -wxString VampEffect::GetName() -{ - return GetSymbol(); -} - IdentInterfaceSymbol VampEffect::GetVendor() { return { wxString::FromUTF8(mPlugin->getMaker().c_str()) }; @@ -442,7 +437,7 @@ bool VampEffect::Process() } } - const auto effectName = GetCustomTranslation( GetName() ); + const auto effectName = GetSymbol().Translation(); addedTracks.push_back(AddAnalysisTrack( multiple ? wxString::Format( _("%s: %s"), left->GetName(), effectName ) diff --git a/src/effects/vamp/VampEffect.h b/src/effects/vamp/VampEffect.h index 45f6483b5..bc7e0a566 100644 --- a/src/effects/vamp/VampEffect.h +++ b/src/effects/vamp/VampEffect.h @@ -47,8 +47,7 @@ public: // IdentInterface implementation wxString GetPath() override; - wxString GetSymbol() override; - wxString GetName() override; + IdentInterfaceSymbol GetSymbol() override; IdentInterfaceSymbol GetVendor() override; wxString GetVersion() override; wxString GetDescription() override; diff --git a/src/tracks/ui/TrackControls.cpp b/src/tracks/ui/TrackControls.cpp index 90867b0e7..2647f96f7 100644 --- a/src/tracks/ui/TrackControls.cpp +++ b/src/tracks/ui/TrackControls.cpp @@ -160,7 +160,7 @@ END_POPUP_MENU() -#define SET_TRACK_NAME_PLUGIN_SYMBOL XO("Set Track Name") +#define SET_TRACK_NAME_PLUGIN_SYMBOL IdentInterfaceSymbol{ XO("Set Track Name") } // An example of using an AudacityCommand simply to create a dialog. // We can add additional functions later, if we want to make it @@ -170,7 +170,8 @@ class SetTrackNameCommand : public AudacityCommand { public: // CommandDefinitionInterface overrides - wxString GetSymbol() override {return SET_TRACK_NAME_PLUGIN_SYMBOL;}; + IdentInterfaceSymbol GetSymbol() override + {return SET_TRACK_NAME_PLUGIN_SYMBOL;}; //wxString GetDescription() override {return _("Sets the track name.");}; //bool DefineParams( ShuttleParams & S ) override; void PopulateOrExchange(ShuttleGui & S) override;