Add plugin-prefs and paths to plugin-manager-ui
This commit is contained in:
parent
e4bdb99f60
commit
ab86884ca4
|
@ -341,6 +341,7 @@ public:
|
||||||
|
|
||||||
void show_ui_prefs ();
|
void show_ui_prefs ();
|
||||||
void show_mixer_prefs ();
|
void show_mixer_prefs ();
|
||||||
|
void show_plugin_prefs ();
|
||||||
|
|
||||||
bool check_audioengine(Gtk::Window&);
|
bool check_audioengine(Gtk::Window&);
|
||||||
|
|
||||||
|
|
|
@ -909,6 +909,7 @@ ARDOUR_UI::show_ui_prefs ()
|
||||||
rc_option_editor->set_current_page (_("Appearance"));
|
rc_option_editor->set_current_page (_("Appearance"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::show_mixer_prefs ()
|
ARDOUR_UI::show_mixer_prefs ()
|
||||||
{
|
{
|
||||||
|
@ -918,6 +919,15 @@ ARDOUR_UI::show_mixer_prefs ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ARDOUR_UI::show_plugin_prefs ()
|
||||||
|
{
|
||||||
|
if (rc_option_editor) {
|
||||||
|
show_tabbable (rc_option_editor);
|
||||||
|
rc_option_editor->set_current_page (_("Plugins"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ARDOUR_UI::click_button_clicked (GdkEventButton* ev)
|
ARDOUR_UI::click_button_clicked (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,9 @@
|
||||||
|
|
||||||
#include "ardour_message.h"
|
#include "ardour_message.h"
|
||||||
#include "plugin_manager_ui.h"
|
#include "plugin_manager_ui.h"
|
||||||
|
#include "ardour_ui.h"
|
||||||
#include "plugin_scan_dialog.h"
|
#include "plugin_scan_dialog.h"
|
||||||
|
#include "rc_option_editor.h"
|
||||||
|
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
|
|
||||||
|
@ -43,6 +45,7 @@ PluginManagerUI::PluginManagerUI ()
|
||||||
, _btn_rescan_err (_("Re-scan Faulty"))
|
, _btn_rescan_err (_("Re-scan Faulty"))
|
||||||
, _btn_rescan_sel (_("Re-scan Selected"))
|
, _btn_rescan_sel (_("Re-scan Selected"))
|
||||||
, _btn_clear (_("Clear Stale Scan Log"))
|
, _btn_clear (_("Clear Stale Scan Log"))
|
||||||
|
, _btn_prefs (_("Show Plugin Prefs"))
|
||||||
, _in_row_change (false)
|
, _in_row_change (false)
|
||||||
{
|
{
|
||||||
plugin_model = Gtk::ListStore::create (plugin_columns);
|
plugin_model = Gtk::ListStore::create (plugin_columns);
|
||||||
|
@ -127,11 +130,14 @@ PluginManagerUI::PluginManagerUI ()
|
||||||
|
|
||||||
Gtk::Label* lbl = Gtk::manage (new Gtk::Label ("")); // spacer
|
Gtk::Label* lbl = Gtk::manage (new Gtk::Label ("")); // spacer
|
||||||
Gtk::Frame* f_info = Gtk::manage (new Gtk::Frame (_("Plugin Count")));
|
Gtk::Frame* f_info = Gtk::manage (new Gtk::Frame (_("Plugin Count")));
|
||||||
|
Gtk::Frame* f_paths = Gtk::manage (new Gtk::Frame (_("Preferences")));
|
||||||
|
Gtk::VBox* b_paths = Gtk::manage (new Gtk::VBox ());
|
||||||
Gtk::Frame* f_actions = Gtk::manage (new Gtk::Frame (_("Scan Actions")));
|
Gtk::Frame* f_actions = Gtk::manage (new Gtk::Frame (_("Scan Actions")));
|
||||||
Gtk::VBox* b_actions = Gtk::manage (new Gtk::VBox ());
|
Gtk::VBox* b_actions = Gtk::manage (new Gtk::VBox ());
|
||||||
|
|
||||||
f_info->add (_tbl_nfo);
|
f_info->add (_tbl_nfo);
|
||||||
f_actions->add (*b_actions);
|
f_actions->add (*b_actions);
|
||||||
|
f_paths->add (*b_paths);
|
||||||
|
|
||||||
_tbl_nfo.set_border_width (4);
|
_tbl_nfo.set_border_width (4);
|
||||||
|
|
||||||
|
@ -142,11 +148,31 @@ PluginManagerUI::PluginManagerUI ()
|
||||||
b_actions->set_spacing (4);
|
b_actions->set_spacing (4);
|
||||||
b_actions->set_border_width (4);
|
b_actions->set_border_width (4);
|
||||||
|
|
||||||
|
#if defined LXVST_SUPPORT
|
||||||
|
ArdourWidgets::ArdourButton* btn_lxvst = manage (new ArdourWidgets::ArdourButton (_("Linux VST2 Path")));
|
||||||
|
btn_lxvst->signal_clicked.connect (sigc::bind (sigc::mem_fun (*this, &PluginManagerUI::edit_vst_path), LXVST));
|
||||||
|
b_paths->pack_start (*btn_lxvst);
|
||||||
|
#endif
|
||||||
|
#ifdef WINDOWS_VST_SUPPORT
|
||||||
|
ArdourWidgets::ArdourButton* btn_winvst = manage (new ArdourWidgets::ArdourButton (_("Windows VST2 Path")));
|
||||||
|
btn_winvst->signal_clicked.connect (sigc::bind (sigc::mem_fun (*this, &PluginManagerUI::edit_vst_path), Windows_VST));
|
||||||
|
b_paths->pack_start (*btn_winvst);
|
||||||
|
#endif
|
||||||
|
#ifdef VST3_SUPPORT
|
||||||
|
ArdourWidgets::ArdourButton* btn_vst3 = manage (new ArdourWidgets::ArdourButton (_("VST3 Path")));
|
||||||
|
btn_vst3->signal_clicked.connect (sigc::bind (sigc::mem_fun (*this, &PluginManagerUI::edit_vst_path), VST3));
|
||||||
|
b_paths->pack_start (*btn_vst3);
|
||||||
|
#endif
|
||||||
|
b_paths->pack_start (_btn_prefs);
|
||||||
|
b_paths->set_spacing (4);
|
||||||
|
b_paths->set_border_width (4);
|
||||||
|
|
||||||
/* top level packing */
|
/* top level packing */
|
||||||
_top.attach (*lbl, 0, 1, 0, 1, Gtk::SHRINK, Gtk::EXPAND | Gtk::FILL, 4, 0);
|
_top.attach (*lbl, 0, 1, 0, 1, Gtk::SHRINK, Gtk::EXPAND | Gtk::FILL, 4, 0);
|
||||||
_top.attach (*f_info, 0, 1, 1, 2, Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 4, 4);
|
_top.attach (*f_info, 0, 1, 1, 2, Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 4, 4);
|
||||||
_top.attach (*f_actions, 0, 1, 2, 3, Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 4, 4);
|
_top.attach (*f_actions, 0, 1, 2, 3, Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 4, 4);
|
||||||
_top.attach (_pane, 1, 2, 0, 3, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 4, 0);
|
_top.attach (*f_paths, 0, 1, 3, 4, Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 4, 4);
|
||||||
|
_top.attach (_pane, 1, 2, 0, 4, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL, 4, 0);
|
||||||
|
|
||||||
add (_top);
|
add (_top);
|
||||||
_top.show_all ();
|
_top.show_all ();
|
||||||
|
@ -163,6 +189,7 @@ PluginManagerUI::PluginManagerUI ()
|
||||||
_btn_rescan_err.signal_clicked.connect (sigc::mem_fun (*this, &PluginManagerUI::rescan_faulty));
|
_btn_rescan_err.signal_clicked.connect (sigc::mem_fun (*this, &PluginManagerUI::rescan_faulty));
|
||||||
_btn_rescan_sel.signal_clicked.connect (sigc::mem_fun (*this, &PluginManagerUI::rescan_selected));
|
_btn_rescan_sel.signal_clicked.connect (sigc::mem_fun (*this, &PluginManagerUI::rescan_selected));
|
||||||
_btn_clear.signal_clicked.connect (sigc::mem_fun (*this, &PluginManagerUI::clear_log));
|
_btn_clear.signal_clicked.connect (sigc::mem_fun (*this, &PluginManagerUI::clear_log));
|
||||||
|
_btn_prefs.signal_clicked.connect (sigc::mem_fun (*this, &PluginManagerUI::show_plugin_prefs));
|
||||||
|
|
||||||
cell_fav->signal_toggled().connect (sigc::mem_fun (*this, &PluginManagerUI::favorite_changed));
|
cell_fav->signal_toggled().connect (sigc::mem_fun (*this, &PluginManagerUI::favorite_changed));
|
||||||
cell_hidden->signal_toggled().connect (sigc::mem_fun (*this, &PluginManagerUI::hidden_changed));
|
cell_hidden->signal_toggled().connect (sigc::mem_fun (*this, &PluginManagerUI::hidden_changed));
|
||||||
|
@ -397,6 +424,54 @@ PluginManagerUI::blacklist_changed (std::string const& path)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PluginManagerUI::show_plugin_prefs ()
|
||||||
|
{
|
||||||
|
ARDOUR_UI::instance()->show_plugin_prefs ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PluginManagerUI::edit_vst_path (ARDOUR::PluginType t)
|
||||||
|
{
|
||||||
|
RCOptionEditor* rc_option_editor = ARDOUR_UI::instance()->get_rc_option_editor();
|
||||||
|
if (rc_option_editor) {
|
||||||
|
switch (t) {
|
||||||
|
#ifdef WINDOWS_VST_SUPPORT
|
||||||
|
case Windows_VST:
|
||||||
|
rc_option_editor->edit_vst_path (
|
||||||
|
_("Set Windows VST2 Search Path"),
|
||||||
|
PluginManager::instance()..get_default_windows_vst_path (),
|
||||||
|
sigc::mem_fun (*Config, &RCConfiguration::get_plugin_path_vst),
|
||||||
|
sigc::mem_fun (*Config, &RCConfiguration::set_plugin_path_vst)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef LXVST_SUPPORT
|
||||||
|
case LXVST:
|
||||||
|
rc_option_editor->edit_vst_path (
|
||||||
|
_("Set Linux VST2 Search Path"),
|
||||||
|
PluginManager::instance().get_default_lxvst_path (),
|
||||||
|
sigc::mem_fun (*Config, &RCConfiguration::get_plugin_path_lxvst),
|
||||||
|
sigc::mem_fun (*Config, &RCConfiguration::set_plugin_path_lxvst)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef VST3_SUPPORT
|
||||||
|
case VST3:
|
||||||
|
rc_option_editor->edit_vst_path (
|
||||||
|
_("Set Additional VST3 Search Path"),
|
||||||
|
"", /* default is blank */
|
||||||
|
sigc::mem_fun (*Config, &RCConfiguration::get_plugin_path_vst3),
|
||||||
|
sigc::mem_fun (*Config, &RCConfiguration::set_plugin_path_vst3)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PluginManagerUI::rescan_all ()
|
PluginManagerUI::rescan_all ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,6 +54,8 @@ private:
|
||||||
void rescan_faulty ();
|
void rescan_faulty ();
|
||||||
void rescan_selected ();
|
void rescan_selected ();
|
||||||
void clear_log ();
|
void clear_log ();
|
||||||
|
void show_plugin_prefs ();
|
||||||
|
void edit_vst_path (ARDOUR::PluginType);
|
||||||
|
|
||||||
void plugin_status_changed (ARDOUR::PluginType, std::string, ARDOUR::PluginManager::PluginStatusType);
|
void plugin_status_changed (ARDOUR::PluginType, std::string, ARDOUR::PluginManager::PluginStatusType);
|
||||||
|
|
||||||
|
@ -97,6 +99,7 @@ private:
|
||||||
ArdourWidgets::ArdourButton _btn_rescan_err;
|
ArdourWidgets::ArdourButton _btn_rescan_err;
|
||||||
ArdourWidgets::ArdourButton _btn_rescan_sel;
|
ArdourWidgets::ArdourButton _btn_rescan_sel;
|
||||||
ArdourWidgets::ArdourButton _btn_clear;
|
ArdourWidgets::ArdourButton _btn_clear;
|
||||||
|
ArdourWidgets::ArdourButton _btn_prefs;
|
||||||
Gtk::Table _tbl_nfo;
|
Gtk::Table _tbl_nfo;
|
||||||
|
|
||||||
Gtk::Table _top;
|
Gtk::Table _top;
|
||||||
|
|
|
@ -47,6 +47,7 @@ public:
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
|
|
||||||
bool on_key_release_event (GdkEventKey*);
|
bool on_key_release_event (GdkEventKey*);
|
||||||
|
void edit_vst_path (std::string const& title, std::string const& dflt, sigc::slot<std::string>, sigc::slot<bool, std::string>);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void parameter_changed (std::string const &);
|
void parameter_changed (std::string const &);
|
||||||
|
@ -77,7 +78,6 @@ private:
|
||||||
void clear_vst3_blacklist ();
|
void clear_vst3_blacklist ();
|
||||||
void clear_au_cache ();
|
void clear_au_cache ();
|
||||||
void clear_au_blacklist ();
|
void clear_au_blacklist ();
|
||||||
void edit_vst_path (std::string const& title, std::string const& dflt, sigc::slot<std::string>, sigc::slot<bool, std::string>);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __gtk_ardour_rc_option_editor_h__ */
|
#endif /* __gtk_ardour_rc_option_editor_h__ */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user