Separate files for PluginRegistrationDialog...

... so that PluginManager can avoid using GUI
This commit is contained in:
Paul Licameli 2021-03-01 22:07:43 -05:00
parent 710ec976ff
commit 50b384adae
5 changed files with 26 additions and 3162 deletions

View File

@ -202,6 +202,7 @@ list( APPEND SOURCES
PlaybackSchedule.h
PluginManager.cpp
PluginManager.h
PluginRegistrationDialog.cpp
PluginRegistrationDialog.h
Prefs.cpp
Prefs.h

File diff suppressed because it is too large Load Diff

View File

@ -293,8 +293,6 @@ public:
void CheckForUpdates(bool bFast = false);
bool ShowManager(wxWindow *parent, EffectType type = EffectTypeNone);
//! Used only by Nyquist Workbench module
const PluginID & RegisterPlugin(
std::unique_ptr<EffectDefinitionInterface> effect, PluginType type );

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,7 @@
#include "../CommonCommandFlags.h"
#include "../Menus.h"
#include "../PluginManager.h"
#include "../PluginRegistrationDialog.h"
#include "../Prefs.h"
#include "../Project.h"
#include "../ProjectSettings.h"
@ -36,10 +37,20 @@ AudacityProject::AttachedWindows::RegisteredFactory sMacrosWindowKey{
}
};
bool ShowManager(
PluginManager &pm, wxWindow *parent, EffectType type)
{
pm.CheckForUpdates();
PluginRegistrationDialog dlg(parent, type);
return dlg.ShowModal() == wxID_OK;
}
void DoManagePluginsMenu(AudacityProject &project, EffectType type)
{
auto &window = GetProjectFrame( project );
if (PluginManager::Get().ShowManager(&window, type))
auto &pm = PluginManager::Get();
if (ShowManager(pm, &window, type))
MenuCreator::RebuildAllMenuBars();
}