1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-09 06:06:24 +01:00

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

@@ -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();
}