diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-04-28 23:40:42 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-04-28 23:40:42 +0800 |
commit | 13fca5100f1e28a538e7900d011714d94f6b1b10 (patch) | |
tree | 2034d837473c14f600987134d98f51f0a5ab3c5d /qmidiplayer-desktop/qmpmainwindow.cpp | |
parent | 8eac5088101595422753030b1b259411d63f83a8 (diff) | |
download | QMidiPlayer-13fca5100f1e28a538e7900d011714d94f6b1b10.tar.xz |
Now it is possible to disable plugins in the plugin list.
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r-- | qmidiplayer-desktop/qmpmainwindow.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp index 58b28b7..d25cadd 100644 --- a/qmidiplayer-desktop/qmpmainwindow.cpp +++ b/qmidiplayer-desktop/qmpmainwindow.cpp @@ -80,7 +80,7 @@ void qmpMainWindow::init() ui->lbFileName->addAction(fnA1); ui->lbFileName->addAction(fnA2); ui->lbFileName->addAction(fnA3); - pmgr->scanPlugins();pmgr->initPlugins(); + pmgr->scanPlugins();settingsw->updatePluginList(pmgr);pmgr->initPlugins(); if(singleFS){player->fluidPreInitialize();playerSetup();player->fluidInitialize(); for(int i=settingsw->getSFWidget()->count()-1;i>=0;--i) LOAD_SOUNDFONT;} @@ -655,7 +655,15 @@ void qmpMainWindow::on_pushButton_clicked() void qmpMainWindow::on_pbVisualization_clicked() { if(ui->pbVisualization->isChecked()) - {for(int i=0;i<16;++i)if(VIs[i])VIs[i]->show();} + { + bool havevis=false; + for(int i=0;i<16;++i)if(VIs[i])VIs[i]->show(),havevis=true; + if(!havevis) + { + QMessageBox::information(this,tr("No visualization plugin enabled"),tr("No visualization plugin enabled. Please enable at least one in plugin settings.")); + ui->pbVisualization->setChecked(false); + } + } else {for(int i=0;i<16;++i)if(VIs[i])VIs[i]->close();} } |