From f4aef4bcac384c466b65fa396f27337d2cd7f812 Mon Sep 17 00:00:00 2001 From: xenakios Date: Thu, 18 Jan 2018 06:56:23 +0200 Subject: [PATCH] Remove redundant code and change about box text --- Source/PluginEditor.cpp | 39 +-------------------------------------- Source/PluginEditor.h | 3 +-- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index e65bf4c..b6f9ef4 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -204,11 +204,6 @@ void PaulstretchpluginAudioProcessorEditor::timerCallback(int id) } if (id == 2) { - if (processor.getAudioFile() != File() && processor.getAudioFile() != m_wavecomponent.getAudioFile()) - { - m_wavecomponent.setAudioFile(processor.getAudioFile()); - } - m_wavecomponent.setTimeSelection(processor.getTimeSelection()); if (processor.m_state_dirty) { @@ -223,11 +218,6 @@ void PaulstretchpluginAudioProcessorEditor::timerCallback(int id) } } -void PaulstretchpluginAudioProcessorEditor::setAudioFile(File f) -{ - m_wavecomponent.setAudioFile(f); -} - bool PaulstretchpluginAudioProcessorEditor::isInterestedInFileDrag(const StringArray & files) { if (files.size() == 0) @@ -270,10 +260,6 @@ void PaulstretchpluginAudioProcessorEditor::chooseFile() } processor.m_propsfile->m_props_file->setValue("importfilefolder", resu.getParentDirectory().getFullPathName()); m_last_err = processor.setAudioFile(resu); - if (processor.getAudioFile() != File()) - { - m_wavecomponent.setAudioFile(processor.getAudioFile()); - } } } @@ -333,7 +319,7 @@ void PaulstretchpluginAudioProcessorEditor::showSettingsMenu() String juceversiontxt = String("JUCE ") + String(JUCE_MAJOR_VERSION) + "." + String(JUCE_MINOR_VERSION); AlertWindow::showMessageBoxAsync(AlertWindow::InfoIcon, g_plugintitle, - "Plugin for extreme time stretching and other processing of sound files\nBuilt on " + String(__DATE__) + " " + String(__TIME__) + "\n" + "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" @@ -473,29 +459,6 @@ void WaveformComponent::paint(Graphics & g) g.drawText(m_curfile.getFullPathName(), 2, m_topmargin + 2, getWidth(), 20, Justification::topLeft); } -void WaveformComponent::setAudioFile(File f) -{ - /* - if (f.existsAsFile()) - { - m_waveimage = Image(); - if (m_thumb != nullptr && f == m_curfile) // reloading same file, might happen that the overview needs to be redone... - m_thumbcache->removeThumb(m_thumb->getHashCode()); - if (m_thumb != nullptr) - m_thumb->reset(0, 0.0); - m_thumb->setSource(new FileInputSource(f)); - m_curfile = f; - m_using_audio_buffer = false; - } - else - { - m_thumb->setSource(nullptr); - m_curfile = File(); - } - repaint(); - */ -} - void WaveformComponent::timerCallback() { repaint(); diff --git a/Source/PluginEditor.h b/Source/PluginEditor.h index bf67772..777285d 100644 --- a/Source/PluginEditor.h +++ b/Source/PluginEditor.h @@ -86,7 +86,6 @@ public: ~WaveformComponent(); void changeListenerCallback(ChangeBroadcaster* cb) override; void paint(Graphics& g) override; - void setAudioFile(File f); const File& getAudioFile() const { return m_curfile; } bool isUsingAudioBuffer() const { return m_using_audio_buffer; } void timerCallback() override; @@ -183,7 +182,7 @@ public: void paint (Graphics&) override; void resized() override; void timerCallback(int id) override; - void setAudioFile(File f); + bool isInterestedInFileDrag(const StringArray &files) override; void filesDropped(const StringArray &files, int x, int y) override;