From 08d80338bd184583dcf419ca2c6f7e7c57b94c8b Mon Sep 17 00:00:00 2001 From: xenakios Date: Sun, 7 Oct 2018 14:13:53 +0300 Subject: [PATCH] Moved about dialog code to separate function --- Source/PluginEditor.cpp | 41 ++++++++++++++++++++++++----------------- Source/PluginEditor.h | 1 + 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 97346ac..a83c477 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -534,23 +534,7 @@ void PaulstretchpluginAudioProcessorEditor::showSettingsMenu() } if (r == 3) { - String fftlib = fftwf_version; - String juceversiontxt = String("JUCE ") + String(JUCE_MAJOR_VERSION) + "." + String(JUCE_MINOR_VERSION); - String title = g_plugintitle; -#ifdef JUCE_DEBUG - title += " (DEBUG)"; -#endif - AlertWindow::showMessageBoxAsync(AlertWindow::InfoIcon, - title, - "Plugin for extreme time stretching and other sound processing\nBuilt on " + String(__DATE__) + " " + String(__TIME__) + "\n" - "Copyright (C) 2006-2011 Nasca Octavian Paul, Tg. Mures, Romania\n" - "(C) 2017-2018 Xenakios\n\n" - "Using " + fftlib + " for FFT\n\n" - + juceversiontxt + " (c) Roli. Used under the GPL license.\n\n" - "GPL licensed source code for this plugin at : https://bitbucket.org/xenakios/paulstretchplugin/overview\n" - , "OK", - this); - + showAbout(); } if (r == 6) @@ -570,6 +554,29 @@ void PaulstretchpluginAudioProcessorEditor::showSettingsMenu() } +void PaulstretchpluginAudioProcessorEditor::showAbout() +{ + String fftlib = fftwf_version; + String juceversiontxt = String("JUCE ") + String(JUCE_MAJOR_VERSION) + "." + String(JUCE_MINOR_VERSION); + String title = g_plugintitle; +#ifdef JUCE_DEBUG + title += " (DEBUG)"; +#endif + PluginHostType host; + AlertWindow::showMessageBoxAsync(AlertWindow::InfoIcon, + title, + "Plugin for extreme time stretching and other sound processing\nBuilt on " + String(__DATE__) + " " + String(__TIME__) + "\n" + "Copyright (C) 2006-2011 Nasca Octavian Paul, Tg. Mures, Romania\n" + "(C) 2017-2018 Xenakios\n\n" + "Using " + fftlib + " for FFT\n\n" + + juceversiontxt + " (c) Roli. Used under the GPL license.\n\n" + "GPL licensed source code for this plugin at : https://bitbucket.org/xenakios/paulstretchplugin/overview\n" + "Running in : "+host.getHostDescription()+"\n" + , "OK", + this); + +} + WaveformComponent::WaveformComponent(AudioFormatManager* afm, AudioThumbnail* thumb, StretchAudioSource* sas) : m_sas(sas) { diff --git a/Source/PluginEditor.h b/Source/PluginEditor.h index 19fdb62..20ee0bb 100644 --- a/Source/PluginEditor.h +++ b/Source/PluginEditor.h @@ -335,6 +335,7 @@ private: FreeFilterComponent m_free_filter_component; MyTabComponent m_wavefilter_tab; Component* m_wave_container=nullptr; + void showAbout(); JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessorEditor) };