mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-14 14:41:11 +02:00
PluginManager.cpp does not depend on EffectManager.cpp...
... Taking PluginManager.cpp and ModuleManager.cpp out of other dependency cycles, though still in a small cycle with each other
This commit is contained in:
@@ -46,7 +46,7 @@ for shared and private configs - which need to move out.
|
||||
#include "PlatformCompatibility.h"
|
||||
#include "Prefs.h"
|
||||
#include "ShuttleGui.h"
|
||||
#include "effects/EffectManager.h"
|
||||
#include "wxFileNameWrapper.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
#include "widgets/ProgressDialog.h"
|
||||
|
||||
@@ -2543,8 +2543,6 @@ const PluginDescriptor *PluginManager::GetNextPlugin(int type)
|
||||
|
||||
const PluginDescriptor *PluginManager::GetFirstPluginForEffectType(EffectType type)
|
||||
{
|
||||
EffectManager & em = EffectManager::Get();
|
||||
|
||||
for (mPluginsIter = mPlugins.begin(); mPluginsIter != mPlugins.end(); ++mPluginsIter)
|
||||
{
|
||||
PluginDescriptor & plug = mPluginsIter->second;
|
||||
@@ -2554,11 +2552,6 @@ const PluginDescriptor *PluginManager::GetFirstPluginForEffectType(EffectType ty
|
||||
gPrefs->Read(plug.GetEffectFamily() + wxT("/Enable"), &familyEnabled, true);
|
||||
if (plug.IsValid() && plug.IsEnabled() && plug.GetEffectType() == type && familyEnabled)
|
||||
{
|
||||
if (plug.IsInstantiated() && em.IsHidden(plug.GetID()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
return &plug;
|
||||
}
|
||||
}
|
||||
@@ -2568,8 +2561,6 @@ const PluginDescriptor *PluginManager::GetFirstPluginForEffectType(EffectType ty
|
||||
|
||||
const PluginDescriptor *PluginManager::GetNextPluginForEffectType(EffectType type)
|
||||
{
|
||||
EffectManager & em = EffectManager::Get();
|
||||
|
||||
while (++mPluginsIter != mPlugins.end())
|
||||
{
|
||||
PluginDescriptor & plug = mPluginsIter->second;
|
||||
@@ -2578,11 +2569,6 @@ const PluginDescriptor *PluginManager::GetNextPluginForEffectType(EffectType typ
|
||||
gPrefs->Read(plug.GetEffectFamily() + wxT("/Enable"), &familyEnabled, true);
|
||||
if (plug.IsValid() && plug.IsEnabled() && plug.GetEffectType() == type && familyEnabled)
|
||||
{
|
||||
if (plug.IsInstantiated() && em.IsHidden(plug.GetID()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
return &plug;
|
||||
}
|
||||
}
|
||||
|
@@ -319,9 +319,12 @@ MenuTable::BaseItemPtrs PopulateEffectsMenu(
|
||||
std::vector<const PluginDescriptor*> defplugs;
|
||||
std::vector<const PluginDescriptor*> optplugs;
|
||||
|
||||
EffectManager & em = EffectManager::Get();
|
||||
const PluginDescriptor *plug = pm.GetFirstPluginForEffectType(type);
|
||||
while (plug)
|
||||
{
|
||||
if( plug->IsInstantiated() && em.IsHidden(plug->GetID()) )
|
||||
continue;
|
||||
if ( !plug->IsEnabled() ){
|
||||
;// don't add to menus!
|
||||
}
|
||||
|
Reference in New Issue
Block a user