# HG changeset patch # User Chris Cannam # Date 1527260980 -3600 # Node ID 9fbaf30a09ab5cdfd8aafbf1108ab3f4238aab8e # Parent 42f89437f70b8504f0827494b51b24f78d5fb1c9 Wire up plugin path settings logic (needs more testing) diff -r 42f89437f70b -r 9fbaf30a09ab main/PreferencesDialog.cpp --- a/main/PreferencesDialog.cpp Fri May 25 13:39:28 2018 +0100 +++ b/main/PreferencesDialog.cpp Fri May 25 16:09:40 2018 +0100 @@ -581,22 +581,13 @@ // Plugins tab - PluginPathConfigurator *pathConfig = new PluginPathConfigurator(this); - QStringList path; - path << "/usr/lib/vamp"; - path << "/usr/local/lib/vamp"; - path << "/home/user/.vamp"; - PluginPathConfigurator::Paths paths; - paths["Vamp"] = { path, "VAMP_PATH", true }; - path.clear(); - path << "/usr/lib/ladspa"; - path << "/usr/local/lib/ladspa"; - path << "/home/user/.ladspa"; - paths["LADSPA"] = { path, "LADSPA_PATH", true }; - pathConfig->setPaths(paths); + m_pluginPathConfigurator = new PluginPathConfigurator(this); + m_pluginPathConfigurator->setPaths(PluginPathSetter::getPaths()); + connect(m_pluginPathConfigurator, SIGNAL(pathsChanged()), + this, SLOT(pluginPathsChanged())); m_tabOrdering[PluginTab] = m_tabs->count(); - m_tabs->addTab(pathConfig, tr("&Plugins")); + m_tabs->addTab(m_pluginPathConfigurator, tr("&Plugins")); // General tab @@ -925,6 +916,13 @@ } void +PreferencesDialog::pluginPathsChanged() +{ + m_applyButton->setEnabled(true); + m_changesOnRestart = true; +} + +void PreferencesDialog::okClicked() { applyClicked(); @@ -1026,6 +1024,8 @@ emit coloursChanged(); m_coloursChanged = false; } + + PluginPathSetter::savePathSettings(m_pluginPathConfigurator->getPaths()); } void diff -r 42f89437f70b -r 9fbaf30a09ab main/PreferencesDialog.h --- a/main/PreferencesDialog.h Fri May 25 13:39:28 2018 +0100 +++ b/main/PreferencesDialog.h Fri May 25 16:09:40 2018 +0100 @@ -13,8 +13,8 @@ COPYING included with this distribution for more information. */ -#ifndef _PREFERENCES_DIALOG_H_ -#define _PREFERENCES_DIALOG_H_ +#ifndef SV_PREFERENCES_DIALOG_H +#define SV_PREFERENCES_DIALOG_H #include #include @@ -27,6 +27,7 @@ class QLineEdit; class QTabWidget; class QComboBox; +class PluginPathConfigurator; class PreferencesDialog : public QDialog { @@ -80,6 +81,7 @@ void localeChanged(int); void networkPermissionChanged(int state); void retinaChanged(int state); + void pluginPathsChanged(); void tempDirButtonClicked(); @@ -99,6 +101,8 @@ QComboBox *m_audioPlaybackDeviceCombo; QComboBox *m_audioRecordDeviceCombo; void rebuildDeviceCombos(); + + PluginPathConfigurator *m_pluginPathConfigurator; QString m_currentTemplate; QStringList m_templates; diff -r 42f89437f70b -r 9fbaf30a09ab main/main.cpp --- a/main/main.cpp Fri May 25 13:39:28 2018 +0100 +++ b/main/main.cpp Fri May 25 16:09:40 2018 +0100 @@ -24,9 +24,10 @@ #include "data/fileio/FileSource.h" #include "widgets/TipDialog.h" #include "widgets/InteractiveFileFinder.h" -#include "svapp/framework/TransformUserConfigurator.h" +#include "framework/TransformUserConfigurator.h" #include "transform/TransformFactory.h" -#include "svcore/plugin/PluginScan.h" +#include "plugin/PluginScan.h" +#include "plugin/PluginPathSetter.h" #include #include @@ -300,6 +301,8 @@ } settings.endGroup(); + PluginPathSetter::setEnvironmentVariables(); + QIcon icon; int sizes[] = { 16, 22, 24, 32, 48, 64, 128 }; for (int i = 0; i < int(sizeof(sizes)/sizeof(sizes[0])); ++i) { diff -r 42f89437f70b -r 9fbaf30a09ab repoint-lock.json --- a/repoint-lock.json Fri May 25 13:39:28 2018 +0100 +++ b/repoint-lock.json Fri May 25 16:09:40 2018 +0100 @@ -4,10 +4,10 @@ "pin": "328cb056da44" }, "svcore": { - "pin": "85e9b7b31a8d" + "pin": "5d7057af0c68" }, "svgui": { - "pin": "41824255ddf2" + "pin": "6dd15b5c14f9" }, "svapp": { "pin": "7da68349a0c5" diff -r 42f89437f70b -r 9fbaf30a09ab repoint-project.json --- a/repoint-project.json Fri May 25 13:39:28 2018 +0100 +++ b/repoint-project.json Fri May 25 16:09:40 2018 +0100 @@ -16,7 +16,8 @@ }, "svcore": { "vcs": "hg", - "service": "soundsoftware" + "service": "soundsoftware", + "branch": "plugin-path-config" }, "svgui": { "vcs": "hg",