Skip to content

Commit 721acb6

Browse files
committed
Disable Plugin Installer when acquisition is active
1 parent 5ce28a5 commit 721acb6

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

Source/UI/PluginInstaller.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,14 @@ void PluginListBoxComponent::setSelectedVersion (int rowNumber, const String& ve
14791479

14801480
void PluginListBoxComponent::installPluginForRow (int rowNumber)
14811481
{
1482+
if (CoreServices::getAcquisitionStatus())
1483+
{
1484+
AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,
1485+
"Plugin Installation Unavailable",
1486+
"Plugin installation is currently unavailable while acquisition is in progress.");
1487+
return;
1488+
}
1489+
14821490
if (auto* pluginInfo = getPluginForVisibleRow (rowNumber))
14831491
{
14841492
actionRunner->setPluginInfo (*pluginInfo);
@@ -1488,6 +1496,14 @@ void PluginListBoxComponent::installPluginForRow (int rowNumber)
14881496

14891497
void PluginListBoxComponent::uninstallPluginForRow (int rowNumber)
14901498
{
1499+
if (CoreServices::getAcquisitionStatus())
1500+
{
1501+
AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,
1502+
"Plugin Removal Unavailable",
1503+
"Plugin removal is currently unavailable while acquisition is in progress.");
1504+
return;
1505+
}
1506+
14911507
if (auto* pluginInfo = getPluginForVisibleRow (rowNumber))
14921508
{
14931509
actionRunner->setPluginInfo (*pluginInfo);

Source/UI/UIComponent.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,7 @@ void UIComponent::getCommandInfo (CommandID commandID, ApplicationCommandInfo& r
841841
case openPluginInstaller:
842842
result.setInfo ("Plugin Installer", "Launch the plugin installer.", "General", 0);
843843
result.addDefaultKeypress ('P', ModifierKeys::commandModifier);
844+
result.setActive (! acquisitionStarted);
844845
break;
845846

846847
case openDefaultConfigWindow:

0 commit comments

Comments
 (0)