1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 08:33:36 +02:00

Fix subtle error revealed by the previous commit ...

... A "translated" effect family string, plus "/Enable",  was used as a
registry key for lookup!  It is wrong to key on a translation.

But in fact exhaustive search for "/Enable" shows that the only such strings
for which a written (by EffectsPrefs) registry value could be found were

AudioUnit
Ladspa
LV2
Nyquist
VAMP
VST

And none of these was actually a msgid in audacity.pot.  So nothing bad can
really have happened in other locale settings.
This commit is contained in:
Paul Licameli
2018-01-05 18:17:21 -05:00
parent cafbff9ff8
commit c6bbe4c3da

View File

@@ -2457,7 +2457,8 @@ const PluginDescriptor *PluginManager::GetFirstPlugin(PluginType type)
bool familyEnabled = true;
if (type == PluginTypeEffect)
{
gPrefs->Read(plug.GetTranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true);
// This preference may be written by EffectsPrefs
gPrefs->Read(plug.GetUntranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true);
}
if (plug.IsValid() && plug.IsEnabled() && plug.GetPluginType() == type && familyEnabled)
{
@@ -2476,7 +2477,8 @@ const PluginDescriptor *PluginManager::GetNextPlugin(PluginType type)
bool familyEnabled = true;
if (type == PluginTypeEffect)
{
gPrefs->Read(plug.GetTranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true);
// This preference may be written by EffectsPrefs
gPrefs->Read(plug.GetUntranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true);
}
if (plug.IsValid() && plug.IsEnabled() && plug.GetPluginType() == type && familyEnabled)
{
@@ -2496,6 +2498,7 @@ const PluginDescriptor *PluginManager::GetFirstPluginForEffectType(EffectType ty
PluginDescriptor & plug = mPluginsIter->second;
bool familyEnabled;
// This preference may be written by EffectsPrefs
gPrefs->Read(plug.GetUntranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true);
if (plug.IsValid() && plug.IsEnabled() && plug.GetEffectType() == type && familyEnabled)
{
@@ -2519,7 +2522,8 @@ const PluginDescriptor *PluginManager::GetNextPluginForEffectType(EffectType typ
{
PluginDescriptor & plug = mPluginsIter->second;
bool familyEnabled;
gPrefs->Read(plug.GetTranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true);
// This preference may be written by EffectsPrefs
gPrefs->Read(plug.GetUntranslatedEffectFamily() + wxT("/Enable"), &familyEnabled, true);
if (plug.IsValid() && plug.IsEnabled() && plug.GetEffectType() == type && familyEnabled)
{
if (plug.IsInstantiated() && em.IsHidden(plug.GetID()))