|
@@ -243,6 +243,18 @@ void PluginListComponent::filesDropped (const StringArray& files, int, int) |
|
|
list.scanAndAddDragAndDroppedFiles (formatManager, files, typesFound);
|
|
|
list.scanAndAddDragAndDroppedFiles (formatManager, files, typesFound);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FileSearchPath PluginListComponent::getLastSearchPath (PropertiesFile& properties, AudioPluginFormat& format)
|
|
|
|
|
|
{
|
|
|
|
|
|
return properties.getValue ("lastPluginScanPath_" + format.getName(),
|
|
|
|
|
|
format.getDefaultLocationsToSearch().toString());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PluginListComponent::setLastSearchPath (PropertiesFile& properties, AudioPluginFormat& format,
|
|
|
|
|
|
const FileSearchPath& newPath)
|
|
|
|
|
|
{
|
|
|
|
|
|
properties.setValue ("lastPluginScanPath_" + format.getName(), newPath.toString());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
//==============================================================================
|
|
|
class PluginListComponent::Scanner : private Timer
|
|
|
class PluginListComponent::Scanner : private Timer
|
|
|
{
|
|
|
{
|
|
@@ -262,7 +274,7 @@ public: |
|
|
if (path.getNumPaths() > 0) // if the path is empty, then paths aren't used for this format.
|
|
|
if (path.getNumPaths() > 0) // if the path is empty, then paths aren't used for this format.
|
|
|
{
|
|
|
{
|
|
|
if (propertiesToUse != nullptr)
|
|
|
if (propertiesToUse != nullptr)
|
|
|
path = propertiesToUse->getValue ("lastPluginScanPath_" + formatToScan.getName(), path.toString());
|
|
|
|
|
|
|
|
|
path = getLastSearchPath (*propertiesToUse, formatToScan);
|
|
|
|
|
|
|
|
|
pathList.setSize (500, 300);
|
|
|
pathList.setSize (500, 300);
|
|
|
pathList.setPath (path);
|
|
|
pathList.setPath (path);
|
|
@@ -311,7 +323,7 @@ private: |
|
|
|
|
|
|
|
|
if (propertiesToUse != nullptr)
|
|
|
if (propertiesToUse != nullptr)
|
|
|
{
|
|
|
{
|
|
|
propertiesToUse->setValue ("lastPluginScanPath_" + formatToScan.getName(), pathList.getPath().toString());
|
|
|
|
|
|
|
|
|
setLastSearchPath (*propertiesToUse, formatToScan, pathList.getPath());
|
|
|
propertiesToUse->saveIfNeeded();
|
|
|
propertiesToUse->saveIfNeeded();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|