Plugin editor now used on all systems
This commit is contained in:
+13
-34
@@ -28,6 +28,7 @@ public:
|
|||||||
deadMansPedalFile,
|
deadMansPedalFile,
|
||||||
getAppProperties().getUserSettings()), true);
|
getAppProperties().getUserSettings()), true);
|
||||||
|
|
||||||
|
setUsingNativeTitleBar(true);
|
||||||
setResizable(true, false);
|
setResizable(true, false);
|
||||||
setResizeLimits(300, 400, 800, 1500);
|
setResizeLimits(300, 400, 800, 1500);
|
||||||
setTopLeftPosition(60, 60);
|
setTopLeftPosition(60, 60);
|
||||||
@@ -200,7 +201,7 @@ void IconMenu::timerCallback()
|
|||||||
menu.addSectionHeader(JUCEApplication::getInstance()->getApplicationName());
|
menu.addSectionHeader(JUCEApplication::getInstance()->getApplicationName());
|
||||||
if (menuIconLeftClicked) {
|
if (menuIconLeftClicked) {
|
||||||
menu.addItem(1, "Preferences");
|
menu.addItem(1, "Preferences");
|
||||||
menu.addItem(2, "Reload Plugins");
|
menu.addItem(2, "Edit Plugins");
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
// Active plugins
|
// Active plugins
|
||||||
int time = 0;
|
int time = 0;
|
||||||
@@ -349,43 +350,21 @@ void IconMenu::showAudioSettings()
|
|||||||
|
|
||||||
void IconMenu::reloadPlugins()
|
void IconMenu::reloadPlugins()
|
||||||
{
|
{
|
||||||
#if JUCE_MAC
|
|
||||||
NativeMessageBox::showOkCancelBox(AlertWindow::AlertIconType::InfoIcon, "Reload Plugins?", "Confirm scan and load of any new or updated plugins.", this, ModalCallbackFunction::forComponent(doReloadWithDefaultLocations, this));
|
|
||||||
#else
|
|
||||||
if (pluginListWindow == nullptr)
|
if (pluginListWindow == nullptr)
|
||||||
pluginListWindow = new PluginListWindow(*this, formatManager);
|
pluginListWindow = new PluginListWindow(*this, formatManager);
|
||||||
pluginListWindow->toFront(true);
|
pluginListWindow->toFront(true);
|
||||||
#endif
|
removePluginsLackingInputOutput();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IconMenu::doReloadWithDefaultLocations(int id, IconMenu* im)
|
void IconMenu::removePluginsLackingInputOutput()
|
||||||
{
|
{
|
||||||
#if JUCE_MAC
|
std::vector<int> removeIndex;
|
||||||
// Canceled
|
for (int i = 0; i < knownPluginList.getNumTypes(); i++)
|
||||||
if (id == 0)
|
{
|
||||||
return Process::setDockIconVisible(false);
|
PluginDescription* plugin = knownPluginList.getType(i);
|
||||||
#endif
|
if (plugin->numInputChannels < 2 || plugin->numOutputChannels < 2)
|
||||||
// Scan
|
removeIndex.push_back(i);
|
||||||
const File deadMansPedalFile (getAppProperties().getUserSettings()->getFile().getSiblingFile("RecentlyCrashedPluginsList"));
|
}
|
||||||
String pluginName;
|
for (int i = 0; i < removeIndex.size(); i++)
|
||||||
for (int i = 0; i < im->formatManager.getNumFormats(); i++)
|
knownPluginList.removeType(removeIndex[i] - i);
|
||||||
{
|
|
||||||
im->scanner = new PluginDirectoryScanner(im->knownPluginList, *im->formatManager.getFormat(i), im->formatManager.getFormat(i)->getDefaultLocationsToSearch(), true, deadMansPedalFile);
|
|
||||||
while (im->scanner->scanNextFile(true, pluginName)) { }
|
|
||||||
}
|
|
||||||
// Remove plugins without inputs and/or outputs
|
|
||||||
std::vector<int> removeIndex;
|
|
||||||
for (int i = 0; i < im->knownPluginList.getNumTypes(); i++)
|
|
||||||
{
|
|
||||||
PluginDescription* plugin = im->knownPluginList.getType(i);
|
|
||||||
if (plugin->numInputChannels < 2 || plugin->numOutputChannels < 2)
|
|
||||||
removeIndex.push_back(i);
|
|
||||||
}
|
|
||||||
for (int i = 0; i < removeIndex.size(); i++)
|
|
||||||
im->knownPluginList.removeType(removeIndex[i] - i);
|
|
||||||
// Finish
|
|
||||||
NativeMessageBox::showMessageBox(AlertWindow::AlertIconType::InfoIcon, "Completed", "Plugins have been refreshed.");
|
|
||||||
#if JUCE_MAC
|
|
||||||
Process::setDockIconVisible(false);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
@@ -31,6 +31,7 @@ private:
|
|||||||
void savePluginStates();
|
void savePluginStates();
|
||||||
void deletePluginStates();
|
void deletePluginStates();
|
||||||
PluginDescription getNextPluginOlderThanTime(int &time);
|
PluginDescription getNextPluginOlderThanTime(int &time);
|
||||||
|
void removePluginsLackingInputOutput();
|
||||||
|
|
||||||
AudioDeviceManager deviceManager;
|
AudioDeviceManager deviceManager;
|
||||||
AudioPluginFormatManager formatManager;
|
AudioPluginFormatManager formatManager;
|
||||||
|
|||||||
Reference in New Issue
Block a user