diff --git a/include/Engine.h b/include/Engine.h index 5106222dc..03314a5d8 100644 --- a/include/Engine.h +++ b/include/Engine.h @@ -58,16 +58,6 @@ public: static bool hasGUI(); - static void setSuppressMessages( bool _on ) - { - s_suppressMessages = _on; - } - - static bool suppressMessages() - { - return !hasGUI() || s_suppressMessages; - } - // core static Mixer *mixer() { @@ -127,7 +117,7 @@ private: delete tmp; } - static bool s_suppressMessages; + static bool s_hasGUI; static float s_framesPerTick; // core diff --git a/plugins/LadspaEffect/LadspaEffect.cpp b/plugins/LadspaEffect/LadspaEffect.cpp index 9dc3774bc..8906b9578 100644 --- a/plugins/LadspaEffect/LadspaEffect.cpp +++ b/plugins/LadspaEffect/LadspaEffect.cpp @@ -39,6 +39,7 @@ #include "ControllerConnection.h" #include "MemoryManager.h" #include "ValueBuffer.h" +#include "MainWindow.h" #include "embed.cpp" @@ -74,12 +75,11 @@ LadspaEffect::LadspaEffect( Model * _parent, Ladspa2LMMS * manager = Engine::getLADSPAManager(); if( manager->getDescription( m_key ) == NULL ) { - if( !Engine::suppressMessages() ) + if ( Engine::hasGUI() ) { - QMessageBox::warning( 0, tr( "Effect" ), - tr( "Unknown LADSPA plugin %1 requested." ). - arg( m_key.second ), - QMessageBox::Ok, QMessageBox::NoButton ); + Engine::mainWindow()->collectError( + tr( "Unknown LADSPA plugin %1 requested." ).arg( + m_key.second ) ); } setOkay( false ); return; diff --git a/src/core/Engine.cpp b/src/core/Engine.cpp index cbe826bed..2f2b3ba1c 100644 --- a/src/core/Engine.cpp +++ b/src/core/Engine.cpp @@ -40,8 +40,7 @@ #include "GuiApplication.h" - -bool Engine::s_suppressMessages = false; +bool Engine::s_hasGUI = true; float Engine::s_framesPerTick; Mixer* Engine::s_mixer = NULL; FxMixer * Engine::s_fxMixer = NULL; diff --git a/src/core/PresetPreviewPlayHandle.cpp b/src/core/PresetPreviewPlayHandle.cpp index 69b550fdc..09ebaca16 100644 --- a/src/core/PresetPreviewPlayHandle.cpp +++ b/src/core/PresetPreviewPlayHandle.cpp @@ -126,8 +126,6 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file, const bool j = Engine::projectJournal()->isJournalling(); Engine::projectJournal()->setJournalling( false ); - Engine::setSuppressMessages( true ); - if( _load_by_plugin ) { Instrument * i = s_previewTC->previewInstrumentTrack()->instrument(); @@ -162,8 +160,6 @@ PresetPreviewPlayHandle::PresetPreviewPlayHandle( const QString & _preset_file, } } - Engine::setSuppressMessages( false ); - // make sure, our preset-preview-track does not appear in any MIDI- // devices list, so just disable receiving/sending MIDI-events at all s_previewTC->previewInstrumentTrack()->