1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-07 20:22:13 +01:00

Change ModuleInterface for support of drag-and-drop of plug-in files

This commit is contained in:
Paul Licameli
2017-12-28 18:29:03 -05:00
parent 6463e12576
commit 8cfb8d2400
18 changed files with 194 additions and 92 deletions

View File

@@ -514,7 +514,7 @@ void ModuleManager::FindAllPlugins(PluginIDList & providers, wxArrayString & pat
ModuleInterface *module =
static_cast<ModuleInterface *>(CreateProviderInstance(providerID, modPaths[i]));
wxArrayString newpaths = module->FindPlugins(pm);
wxArrayString newpaths = module->FindPluginPaths(pm);
for (size_t i = 0, cnt = newpaths.size(); i < cnt; i++)
{
providers.push_back(providerID);
@@ -536,7 +536,7 @@ wxArrayString ModuleManager::FindPluginsForProvider(const PluginID & providerID,
}
}
return mDynModules[providerID]->FindPlugins(PluginManager::Get());
return mDynModules[providerID]->FindPluginPaths(PluginManager::Get());
}
bool ModuleManager::RegisterPlugin(const PluginID & providerID, const wxString & path, wxString &errMsg)
@@ -547,8 +547,9 @@ bool ModuleManager::RegisterPlugin(const PluginID & providerID, const wxString &
return false;
}
return mDynModules[providerID]->RegisterPlugin(PluginManager::Get(), path,
errMsg);
auto nFound = mDynModules[providerID]->DiscoverPluginsAtPath(path, errMsg);
return nFound > 0;
}
IdentInterface *ModuleManager::CreateProviderInstance(const PluginID & providerID,