diff --git a/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp b/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp index adff877481..42c94a38a3 100644 --- a/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp +++ b/modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp @@ -171,6 +171,12 @@ void PluginListComponent::setOptionsButtonText (const String& newText) resized(); } +void PluginListComponent::setScanDialogText (const String& title, const String& content) +{ + dialogTitle = title; + dialogText = content; +} + void PluginListComponent::setNumberOfThreadsForScanning (int num) { numThreads = num; @@ -324,11 +330,11 @@ void PluginListComponent::setLastSearchPath (PropertiesFile& properties, AudioPl class PluginListComponent::Scanner : private Timer { public: - Scanner (PluginListComponent& plc, AudioPluginFormat& format, PropertiesFile* properties, int threads) + Scanner (PluginListComponent& plc, AudioPluginFormat& format, PropertiesFile* properties, + int threads, const String& title, const String& text) : owner (plc), formatToScan (format), propertiesToUse (properties), pathChooserWindow (TRANS("Select folders to scan..."), String::empty, AlertWindow::NoIcon), - progressWindow (TRANS("Scanning for plug-ins..."), - TRANS("Searching for all possible plug-in files..."), AlertWindow::NoIcon), + progressWindow (title, text, AlertWindow::NoIcon), progress (0.0), numThreads (threads), finished (false) { FileSearchPath path (formatToScan.getDefaultLocationsToSearch()); @@ -539,7 +545,9 @@ private: void PluginListComponent::scanFor (AudioPluginFormat& format) { - currentScanner = new Scanner (*this, format, propertiesToUse, numThreads); + currentScanner = new Scanner (*this, format, propertiesToUse, numThreads, + dialogTitle.isNotEmpty() ? dialogTitle : TRANS("Scanning for plug-ins..."), + dialogText.isNotEmpty() ? dialogText : TRANS("Searching for all possible plug-in files...")); } bool PluginListComponent::isScanning() const noexcept diff --git a/modules/juce_audio_processors/scanning/juce_PluginListComponent.h b/modules/juce_audio_processors/scanning/juce_PluginListComponent.h index 2c21c3f756..e0b2a6de78 100644 --- a/modules/juce_audio_processors/scanning/juce_PluginListComponent.h +++ b/modules/juce_audio_processors/scanning/juce_PluginListComponent.h @@ -55,6 +55,10 @@ public: /** Changes the text in the panel's options button. */ void setOptionsButtonText (const String& newText); + /** Changes the text in the progress dialog box that is shown when scanning. */ + void setScanDialogText (const String& textForProgressWindowTitle, + const String& textForProgressWindowDescription); + /** Sets how many threads to simultaneously scan for plugins. If this is 0, then all scanning happens on the message thread (this is the default) */ @@ -91,6 +95,7 @@ private: TableListBox table; TextButton optionsButton; PropertiesFile* propertiesToUse; + String dialogTitle, dialogText; int numThreads; class TableModel;