Separate files for PluginRegistrationDialog...
... so that PluginManager can avoid using GUI
This commit is contained in:
parent
710ec976ff
commit
50b384adae
|
@ -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
|
@ -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
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue