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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user