Signed-off-by: falkTX <falktx@falktx.com>main
@@ -1178,7 +1178,9 @@ void PluginListDialog::showEvent(QShowEvent* const event) | |||
p->discovery.dialog->ch_updated->setChecked(true); | |||
p->discovery.dialog->ch_invalid->setChecked(false); | |||
p->discovery.dialog->group->setEnabled(false); | |||
p->discovery.dialog->group_formats->hide(); | |||
p->discovery.dialog->progressBar->setFormat("Starting initial discovery..."); | |||
p->discovery.dialog->adjustSize(); | |||
QObject::connect(p->discovery.dialog->b_skip, &QPushButton::clicked, | |||
this, &PluginListDialog::refreshPluginsSkip); | |||
@@ -1221,73 +1223,109 @@ void PluginListDialog::timerEvent(QTimerEvent* const event) | |||
} | |||
[[fallthrough]]; | |||
case PLUGIN_INTERNAL: | |||
ui.label->setText(tr("Discovering LADSPA plugins...")); | |||
path = p->paths.ladspa; | |||
p->discovery.ptype = PLUGIN_LADSPA; | |||
break; | |||
if (p->discovery.dialog->ch_ladspa->isChecked() || !p->discovery.dialog->group_formats->isVisible()) | |||
{ | |||
ui.label->setText(tr("Discovering LADSPA plugins...")); | |||
path = p->paths.ladspa; | |||
p->discovery.ptype = PLUGIN_LADSPA; | |||
break; | |||
} | |||
[[fallthrough]]; | |||
case PLUGIN_LADSPA: | |||
ui.label->setText(tr("Discovering DSSI plugins...")); | |||
path = p->paths.dssi; | |||
p->discovery.ptype = PLUGIN_DSSI; | |||
break; | |||
if (p->discovery.dialog->ch_dssi->isChecked() || !p->discovery.dialog->group_formats->isVisible()) | |||
{ | |||
ui.label->setText(tr("Discovering DSSI plugins...")); | |||
path = p->paths.dssi; | |||
p->discovery.ptype = PLUGIN_DSSI; | |||
break; | |||
} | |||
[[fallthrough]]; | |||
case PLUGIN_DSSI: | |||
#endif | |||
if (p->discovery.btype == BINARY_NATIVE && p->paths.lv2.isNotEmpty()) | |||
if (p->discovery.dialog->ch_lv2->isChecked() || !p->discovery.dialog->group_formats->isVisible()) | |||
{ | |||
ui.label->setText(tr("Discovering LV2 plugins...")); | |||
path = p->paths.lv2; | |||
p->discovery.ptype = PLUGIN_LV2; | |||
break; | |||
if (p->discovery.btype == BINARY_NATIVE && p->paths.lv2.isNotEmpty()) | |||
{ | |||
ui.label->setText(tr("Discovering LV2 plugins...")); | |||
path = p->paths.lv2; | |||
p->discovery.ptype = PLUGIN_LV2; | |||
break; | |||
} | |||
} | |||
[[fallthrough]]; | |||
case PLUGIN_LV2: | |||
ui.label->setText(tr("Discovering VST2 plugins...")); | |||
path = p->paths.vst2; | |||
p->discovery.ptype = PLUGIN_VST2; | |||
break; | |||
if (p->discovery.dialog->ch_vst2->isChecked() || !p->discovery.dialog->group_formats->isVisible()) | |||
{ | |||
ui.label->setText(tr("Discovering VST2 plugins...")); | |||
path = p->paths.vst2; | |||
p->discovery.ptype = PLUGIN_VST2; | |||
break; | |||
} | |||
[[fallthrough]]; | |||
case PLUGIN_VST2: | |||
ui.label->setText(tr("Discovering VST3 plugins...")); | |||
path = p->paths.vst3; | |||
p->discovery.ptype = PLUGIN_VST3; | |||
break; | |||
if (p->discovery.dialog->ch_vst3->isChecked() || !p->discovery.dialog->group_formats->isVisible()) | |||
{ | |||
ui.label->setText(tr("Discovering VST3 plugins...")); | |||
path = p->paths.vst3; | |||
p->discovery.ptype = PLUGIN_VST3; | |||
break; | |||
} | |||
[[fallthrough]]; | |||
case PLUGIN_VST3: | |||
ui.label->setText(tr("Discovering CLAP plugins...")); | |||
path = p->paths.clap; | |||
p->discovery.ptype = PLUGIN_CLAP; | |||
break; | |||
if (p->discovery.dialog->ch_clap->isChecked() || !p->discovery.dialog->group_formats->isVisible()) | |||
{ | |||
ui.label->setText(tr("Discovering CLAP plugins...")); | |||
path = p->paths.clap; | |||
p->discovery.ptype = PLUGIN_CLAP; | |||
break; | |||
} | |||
[[fallthrough]]; | |||
case PLUGIN_CLAP: | |||
#ifdef CARLA_OS_MAC | |||
ui.label->setText(tr("Discovering AU plugins...")); | |||
path = p->paths.au; | |||
p->discovery.ptype = PLUGIN_AU; | |||
break; | |||
if (p->discovery.dialog->ch_au->isChecked() || !p->discovery.dialog->group_formats->isVisible()) | |||
{ | |||
ui.label->setText(tr("Discovering AU plugins...")); | |||
path = p->paths.au; | |||
p->discovery.ptype = PLUGIN_AU; | |||
break; | |||
} | |||
[[fallthrough]]; | |||
case PLUGIN_AU: | |||
#endif | |||
#ifndef CARLA_FRONTEND_ONLY_EMBEDDABLE_PLUGINS | |||
if (p->discovery.btype == BINARY_NATIVE && p->paths.jsfx.isNotEmpty()) | |||
if (p->discovery.dialog->ch_jsfx->isChecked() || !p->discovery.dialog->group_formats->isVisible()) | |||
{ | |||
ui.label->setText(tr("Discovering JSFX plugins...")); | |||
path = p->paths.jsfx; | |||
p->discovery.ptype = PLUGIN_JSFX; | |||
break; | |||
if (p->discovery.btype == BINARY_NATIVE && p->paths.jsfx.isNotEmpty()) | |||
{ | |||
ui.label->setText(tr("Discovering JSFX plugins...")); | |||
path = p->paths.jsfx; | |||
p->discovery.ptype = PLUGIN_JSFX; | |||
break; | |||
} | |||
} | |||
[[fallthrough]]; | |||
case PLUGIN_JSFX: | |||
if (p->discovery.btype == BINARY_NATIVE && p->paths.sf2.isNotEmpty()) | |||
if (p->discovery.dialog->ch_sf2->isChecked() || !p->discovery.dialog->group_formats->isVisible()) | |||
{ | |||
ui.label->setText(tr("Discovering SF2 kits...")); | |||
path = p->paths.sf2; | |||
p->discovery.ptype = PLUGIN_SF2; | |||
break; | |||
if (p->discovery.btype == BINARY_NATIVE && p->paths.sf2.isNotEmpty()) | |||
{ | |||
ui.label->setText(tr("Discovering SF2 kits...")); | |||
path = p->paths.sf2; | |||
p->discovery.ptype = PLUGIN_SF2; | |||
break; | |||
} | |||
} | |||
[[fallthrough]]; | |||
case PLUGIN_SF2: | |||
if (p->discovery.btype == BINARY_NATIVE && p->paths.sfz.isNotEmpty()) | |||
if (p->discovery.dialog->ch_sfz->isChecked() || !p->discovery.dialog->group_formats->isVisible()) | |||
{ | |||
ui.label->setText(tr("Discovering SFZ kits...")); | |||
path = p->paths.sfz; | |||
p->discovery.ptype = PLUGIN_SFZ; | |||
break; | |||
if (p->discovery.btype == BINARY_NATIVE && p->paths.sfz.isNotEmpty()) | |||
{ | |||
ui.label->setText(tr("Discovering SFZ kits...")); | |||
path = p->paths.sfz; | |||
p->discovery.ptype = PLUGIN_SFZ; | |||
break; | |||
} | |||
} | |||
[[fallthrough]]; | |||
case PLUGIN_SFZ: | |||
@@ -1306,7 +1344,7 @@ void PluginListDialog::timerEvent(QTimerEvent* const event) | |||
if (p->timerId == 0) | |||
break; | |||
if (p->discovery.dialog) | |||
if (p->discovery.dialog != nullptr) | |||
p->discovery.dialog->progressBar->setFormat(ui.label->text()); | |||
p->discovery.handle = carla_plugin_discovery_start(p->discovery.tool.toUtf8().constData(), | |||
@@ -14,8 +14,11 @@ | |||
// Plugin Refresh Dialog | |||
struct PluginRefreshDialog : QDialog, Ui_PluginRefreshDialog { | |||
explicit PluginRefreshDialog(QWidget* const parent) | |||
: QDialog(parent) | |||
const bool _firstInit; | |||
explicit PluginRefreshDialog(QWidget* const parent, bool firstInit = false) | |||
: QDialog(parent), | |||
_firstInit(firstInit) | |||
{ | |||
setupUi(this); | |||
@@ -27,6 +30,9 @@ struct PluginRefreshDialog : QDialog, Ui_PluginRefreshDialog { | |||
b_skip->setEnabled(false); | |||
ch_invalid->setEnabled(false); | |||
if (_firstInit) | |||
return; | |||
// ------------------------------------------------------------------------------------------------------------ | |||
// Load settings | |||
@@ -41,6 +47,18 @@ struct PluginRefreshDialog : QDialog, Ui_PluginRefreshDialog { | |||
ch_updated->setChecked(true); | |||
ch_invalid->setChecked(settings.valueBool("PluginRefreshDialog/CheckInvalid", false)); | |||
group_formats->setChecked(settings.valueBool("PluginRefreshDialog/RestrictFormats", false)); | |||
ch_ladspa->setChecked(settings.valueBool("PluginRefreshDialog/SearchLADSPA", true)); | |||
ch_dssi->setChecked(settings.valueBool("PluginRefreshDialog/SearchDSSI", true)); | |||
ch_lv2->setChecked(settings.valueBool("PluginRefreshDialog/SearchLV2", true)); | |||
ch_vst2->setChecked(settings.valueBool("PluginRefreshDialog/SearchVST2", true)); | |||
ch_vst3->setChecked(settings.valueBool("PluginRefreshDialog/SearchVST3", true)); | |||
ch_clap->setChecked(settings.valueBool("PluginRefreshDialog/SearchCLAP", true)); | |||
ch_au->setChecked(settings.valueBool("PluginRefreshDialog/SearchAU", true)); | |||
ch_jsfx->setChecked(settings.valueBool("PluginRefreshDialog/SearchJSFX", true)); | |||
ch_sf2->setChecked(settings.valueBool("PluginRefreshDialog/SearchSF2", true)); | |||
ch_sfz->setChecked(settings.valueBool("PluginRefreshDialog/SearchSFZ", true)); | |||
} | |||
// ------------------------------------------------------------------------------------------------------------ | |||
@@ -55,10 +73,24 @@ struct PluginRefreshDialog : QDialog, Ui_PluginRefreshDialog { | |||
private Q_SLOTS: | |||
void saveSettings() | |||
{ | |||
if (_firstInit) | |||
return; | |||
QSafeSettings settings; | |||
settings.setValue("PluginRefreshDialog/Geometry", saveGeometry()); | |||
settings.setValue("PluginRefreshDialog/RefreshAll", ch_all->isChecked()); | |||
settings.setValue("PluginRefreshDialog/CheckInvalid", ch_invalid->isChecked()); | |||
settings.setValue("PluginRefreshDialog/RestrictFormats", group_formats->isChecked()); | |||
settings.setValue("PluginRefreshDialog/SearchLADSPA", ch_ladspa->isChecked()); | |||
settings.setValue("PluginRefreshDialog/SearchDSSI", ch_dssi->isChecked()); | |||
settings.setValue("PluginRefreshDialog/SearchLV2", ch_lv2->isChecked()); | |||
settings.setValue("PluginRefreshDialog/SearchVST2", ch_vst2->isChecked()); | |||
settings.setValue("PluginRefreshDialog/SearchVST3", ch_vst3->isChecked()); | |||
settings.setValue("PluginRefreshDialog/SearchCLAP", ch_clap->isChecked()); | |||
settings.setValue("PluginRefreshDialog/SearchAU", ch_au->isChecked()); | |||
settings.setValue("PluginRefreshDialog/SearchJSFX", ch_jsfx->isChecked()); | |||
settings.setValue("PluginRefreshDialog/SearchSF2", ch_sf2->isChecked()); | |||
settings.setValue("PluginRefreshDialog/SearchSFZ", ch_sfz->isChecked()); | |||
} | |||
}; | |||
@@ -6,14 +6,14 @@ | |||
<rect> | |||
<x>0</x> | |||
<y>0</y> | |||
<width>873</width> | |||
<height>179</height> | |||
<width>375</width> | |||
<height>430</height> | |||
</rect> | |||
</property> | |||
<property name="windowTitle"> | |||
<string>Plugin Refresh</string> | |||
</property> | |||
<layout class="QVBoxLayout" name="verticalLayout_5"> | |||
<layout class="QVBoxLayout" name="verticalLayout_2"> | |||
<item> | |||
<layout class="QHBoxLayout" name="horizontalLayout_3"> | |||
<item> | |||
@@ -100,6 +100,152 @@ | |||
</property> | |||
</spacer> | |||
</item> | |||
<item> | |||
<widget class="QGroupBox" name="group_formats"> | |||
<property name="title"> | |||
<string>Restrict search formats</string> | |||
</property> | |||
<property name="alignment"> | |||
<set>Qt::AlignCenter</set> | |||
</property> | |||
<property name="checkable"> | |||
<bool>true</bool> | |||
</property> | |||
<layout class="QGridLayout" name="gridLayout"> | |||
<item row="0" column="3"> | |||
<widget class="QCheckBox" name="ch_jsfx"> | |||
<property name="text"> | |||
<string>JSFX</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="6" column="1"> | |||
<widget class="QCheckBox" name="ch_au"> | |||
<property name="text"> | |||
<string>AU</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="0" column="4"> | |||
<spacer name="horizontalSpacer_4"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeType"> | |||
<enum>QSizePolicy::MinimumExpanding</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>120</width> | |||
<height>1</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item row="1" column="3"> | |||
<widget class="QCheckBox" name="ch_sf2"> | |||
<property name="text"> | |||
<string>SF2/3</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="1" column="1"> | |||
<widget class="QCheckBox" name="ch_dssi"> | |||
<property name="text"> | |||
<string>DSSI</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="5" column="1"> | |||
<widget class="QCheckBox" name="ch_clap"> | |||
<property name="text"> | |||
<string>CLAP</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="2" column="1"> | |||
<widget class="QCheckBox" name="ch_lv2"> | |||
<property name="text"> | |||
<string>LV2</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="4" column="1"> | |||
<widget class="QCheckBox" name="ch_vst3"> | |||
<property name="text"> | |||
<string>VST3</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="0" column="0"> | |||
<spacer name="horizontalSpacer_2"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeType"> | |||
<enum>QSizePolicy::MinimumExpanding</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>120</width> | |||
<height>1</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item row="0" column="1"> | |||
<widget class="QCheckBox" name="ch_ladspa"> | |||
<property name="text"> | |||
<string>LADSPA</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="2" column="3"> | |||
<widget class="QCheckBox" name="ch_sfz"> | |||
<property name="text"> | |||
<string>SFZ</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="3" column="1"> | |||
<widget class="QCheckBox" name="ch_vst2"> | |||
<property name="text"> | |||
<string>VST2</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="0" column="2"> | |||
<spacer name="horizontalSpacer_5"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
<property name="sizeType"> | |||
<enum>QSizePolicy::MinimumExpanding</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>120</width> | |||
<height>1</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
<item> | |||
<spacer name="verticalSpacer_2"> | |||
<property name="orientation"> | |||
<enum>Qt::Vertical</enum> | |||
</property> | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>20</width> | |||
<height>0</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
</item> | |||
<item> | |||
<layout class="QHBoxLayout" name="horizontalLayout"> | |||
<item> | |||