mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 07:39:42 +02:00
Eliminate duplications of string literal "Nyquist Prompt"
This commit is contained in:
parent
9e70fa71ba
commit
cf948ece52
@ -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.
|
||||
|
@ -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__ */
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "Nyquist.h"
|
||||
|
||||
#include "../../FileNames.h"
|
||||
#include "../../PluginManager.h"
|
||||
|
||||
// ============================================================================
|
||||
// List of effects that ship with Audacity. These will be autoregistered.
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user