diff --git a/src/PluginManager.cpp b/src/PluginManager.cpp index 18c20aac6..74f493748 100644 --- a/src/PluginManager.cpp +++ b/src/PluginManager.cpp @@ -1973,7 +1973,7 @@ void PluginManager::Load() // These particular config edits were originally written to fix Bug 1914. if (regver <= "1.0") { // Nyquist prompt is a built-in that has moved to the tools menu. - if (effectSymbol == "Nyquist Prompt") { + if (effectSymbol == NYQUIST_PROMPT_ID) { registry.Write(KEY_EFFECTTYPE, "Tool"); // Old version of SDE was in Analyze menu. Now it is in Tools. // We don't want both the old and the new. diff --git a/src/PluginManager.h b/src/PluginManager.h index 12a23d432..b9f87dc67 100644 --- a/src/PluginManager.h +++ b/src/PluginManager.h @@ -324,4 +324,11 @@ private: friend class PluginRegistrationDialog; }; +// Defining these special names in the low-level PluginManager.h +// is unfortunate +// Internal name should be stable across versions +#define NYQUIST_PROMPT_ID wxT("Nyquist Prompt") +// User-visible name might change in later versions +#define NYQUIST_PROMPT_NAME XO("Nyquist Prompt") + #endif /* __AUDACITY_PLUGINMANAGER_H__ */ diff --git a/src/effects/Effect.h b/src/effects/Effect.h index 8eeb09a8d..4ac97f979 100644 --- a/src/effects/Effect.h +++ b/src/effects/Effect.h @@ -57,7 +57,6 @@ class WaveTrack; name into another alphabet. */ #define NYQUISTEFFECTS_FAMILY ( EffectFamilySymbol{ XO("Nyquist") } ) -#define NYQUIST_PROMPT_ID wxT("Nyquist Prompt") #define NYQUIST_WORKER_ID wxT("Nyquist Worker") // TODO: Apr-06-2015 diff --git a/src/effects/EffectUI.cpp b/src/effects/EffectUI.cpp index 2d2651f8d..6f380f15b 100644 --- a/src/effects/EffectUI.cpp +++ b/src/effects/EffectUI.cpp @@ -1982,7 +1982,7 @@ wxDialog *EffectUI::DialogFactory( wxWindow &parent, EffectHostInterface *pHost, menuManager.mLastTool = ID; menuManager.mLastToolRegistration = MenuCreator::repeattypeplugin; menuManager.mRepeatToolFlags = EffectManager::kConfigured; - if (shortDesc == XO("Nyquist Prompt")) { + if (shortDesc == NYQUIST_PROMPT_NAME) { menuManager.mRepeatToolFlags = EffectManager::kRepeatNyquistPrompt; //Nyquist Prompt is not configured } break; diff --git a/src/effects/nyquist/LoadNyquist.cpp b/src/effects/nyquist/LoadNyquist.cpp index 0a10e7f2c..8634f3626 100644 --- a/src/effects/nyquist/LoadNyquist.cpp +++ b/src/effects/nyquist/LoadNyquist.cpp @@ -17,6 +17,7 @@ #include "Nyquist.h" #include "../../FileNames.h" +#include "../../PluginManager.h" // ============================================================================ // List of effects that ship with Audacity. These will be autoregistered. diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 46ab203a5..f670e405c 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -57,6 +57,7 @@ effects from this one class. #include "../../NoteTrack.h" #include "../../TimeTrack.h" #include "../../prefs/SpectrogramSettings.h" +#include "../../PluginManager.h" #include "../../Project.h" #include "../../ProjectSettings.h" #include "../../ShuttleGetDefinition.h" @@ -164,7 +165,7 @@ NyquistEffect::NyquistEffect(const wxString &fName) // Interactive Nyquist if (fName == NYQUIST_PROMPT_ID) { - mName = XO("Nyquist Prompt"); + mName = NYQUIST_PROMPT_NAME; mType = EffectTypeTool; mIsTool = true; mPromptName = mName; @@ -209,7 +210,7 @@ PluginPath NyquistEffect::GetPath() ComponentInterfaceSymbol NyquistEffect::GetSymbol() { if (mIsPrompt) - return XO("Nyquist Prompt"); + return { NYQUIST_PROMPT_ID, NYQUIST_PROMPT_NAME }; return mName; } diff --git a/src/menus/PluginMenus.cpp b/src/menus/PluginMenus.cpp index eb455834a..8eaeba3da 100644 --- a/src/menus/PluginMenus.cpp +++ b/src/menus/PluginMenus.cpp @@ -316,7 +316,7 @@ MenuTable::BaseItemPtrs PopulateEffectsMenu( && (plug->GetSymbol() != ComponentInterfaceSymbol("Nyquist Effects Prompt")) && (plug->GetSymbol() != ComponentInterfaceSymbol("Nyquist Tools Prompt")) - && (plug->GetSymbol() != ComponentInterfaceSymbol("Nyquist Prompt")) + && (plug->GetSymbol() != ComponentInterfaceSymbol(NYQUIST_PROMPT_ID)) #endif ) defplugs.push_back(plug);