summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-08-05 02:35:51 +0200
committerRobin Gareus <robin@gareus.org>2016-08-05 02:35:51 +0200
commit836f48457d443b72db2f0630f277718278735e65 (patch)
tree92af5a41c808fe07003822ed8efeebf3c0b22bf3 /gtk2_ardour
parent65c2e089ab263c83bff7d2e945b80c53f80b749b (diff)
add a "Pin Management" button to the plugin UI-header
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/au_pluginui.mm1
-rw-r--r--gtk2_ardour/generic_pluginui.cc1
-rw-r--r--gtk2_ardour/lv2_plugin_ui.cc1
-rw-r--r--gtk2_ardour/plugin_ui.cc18
-rw-r--r--gtk2_ardour/plugin_ui.h3
-rw-r--r--gtk2_ardour/vst_plugin_ui.cc1
6 files changed, 25 insertions, 0 deletions
diff --git a/gtk2_ardour/au_pluginui.mm b/gtk2_ardour/au_pluginui.mm
index d601b84436..fc73b9b748 100644
--- a/gtk2_ardour/au_pluginui.mm
+++ b/gtk2_ardour/au_pluginui.mm
@@ -403,6 +403,7 @@ AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert)
HBox* smaller_hbox = manage (new HBox);
smaller_hbox->set_spacing (6);
+ smaller_hbox->pack_start (pin_management_button, false, false, 4);
smaller_hbox->pack_start (preset_label, false, false, 4);
smaller_hbox->pack_start (_preset_modified, false, false);
smaller_hbox->pack_start (_preset_combo, false, false);
diff --git a/gtk2_ardour/generic_pluginui.cc b/gtk2_ardour/generic_pluginui.cc
index 0caf475afa..8ccce2e751 100644
--- a/gtk2_ardour/generic_pluginui.cc
+++ b/gtk2_ardour/generic_pluginui.cc
@@ -87,6 +87,7 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
set_latency_label ();
smaller_hbox->pack_start (latency_button, false, false, 4);
+ smaller_hbox->pack_start (pin_management_button, false, false, 4);
smaller_hbox->pack_start (_preset_combo, false, false);
smaller_hbox->pack_start (_preset_modified, false, false);
smaller_hbox->pack_start (add_button, false, false);
diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc
index 75b3ff0bb8..7f735dfcc5 100644
--- a/gtk2_ardour/lv2_plugin_ui.cc
+++ b/gtk2_ardour/lv2_plugin_ui.cc
@@ -241,6 +241,7 @@ LV2PluginUI::LV2PluginUI(boost::shared_ptr<PluginInsert> pi,
_ardour_buttons_box.pack_end (add_button, false, false);
_ardour_buttons_box.pack_end (_preset_combo, false, false);
_ardour_buttons_box.pack_end (_preset_modified, false, false);
+ _ardour_buttons_box.pack_end (pin_management_button, false, false);
plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&LV2PluginUI::queue_port_update, this), gui_context ());
}
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index 1f70537a41..19ea8ebc6c 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -64,6 +64,7 @@
#include "utils.h"
#include "gui_thread.h"
#include "public_editor.h"
+#include "processor_box.h"
#include "keyboard.h"
#include "latency_gui.h"
#include "plugin_eq_gui.h"
@@ -420,6 +421,7 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
, delete_button (_("Delete"))
, reset_button (_("Reset"))
, bypass_button (ArdourButton::led_default_elements)
+ , pin_management_button (_("Pin Connections...")) // TODO use a shorter label once the string-freeze is over.
, description_expander (_("Description"))
, plugin_analysis_expander (_("Plugin analysis"))
, latency_gui (0)
@@ -433,6 +435,9 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
set_tooltip (save_button, _("Save the current preset"));
set_tooltip (delete_button, _("Delete the current preset"));
set_tooltip (reset_button, _("Reset parameters to default (if no parameters are in automation play mode)"));
+#if 0 // string freeze is over
+ set_tooltip (pin_management_button, _("Show Plugin Pin Management Dialog"));
+#endif
set_tooltip (bypass_button, _("Disable signal processing by the plugin"));
_no_load_preset = 0;
@@ -451,6 +456,8 @@ PlugUIBase::PlugUIBase (boost::shared_ptr<PluginInsert> pi)
reset_button.set_name ("generic button");
reset_button.signal_clicked.connect (sigc::mem_fun (*this, &PlugUIBase::reset_plugin_parameters));
+ pin_management_button.set_name ("generic button");
+ pin_management_button.signal_clicked.connect (sigc::mem_fun (*this, &PlugUIBase::manage_pins));
insert->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&PlugUIBase::processor_active_changed, this, boost::weak_ptr<Processor>(insert)), gui_context());
@@ -658,6 +665,17 @@ PlugUIBase::reset_plugin_parameters ()
insert->reset_parameters_to_default ();
}
+void
+PlugUIBase::manage_pins ()
+{
+ PluginPinWindowProxy* proxy = insert->pinmgr_proxy ();
+ if (proxy) {
+ proxy->get (true);
+ proxy->present ();
+ proxy->get ()->raise();
+ }
+}
+
bool
PlugUIBase::bypass_button_release (GdkEventButton*)
{
diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h
index d534a99d70..046890aa52 100644
--- a/gtk2_ardour/plugin_ui.h
+++ b/gtk2_ardour/plugin_ui.h
@@ -129,6 +129,8 @@ class PlugUIBase : public virtual sigc::trackable, public PBD::ScopedConnectionL
ArdourButton reset_button;
/** a button to bypass the plugin */
ArdourButton bypass_button;
+ /** and self-explaining button :) */
+ ArdourButton pin_management_button;
/** a button to acquire keyboard focus */
Gtk::EventBox focus_button;
/** an expander containing the plugin description */
@@ -162,6 +164,7 @@ class PlugUIBase : public virtual sigc::trackable, public PBD::ScopedConnectionL
void save_plugin_setting ();
void delete_plugin_setting ();
void reset_plugin_parameters ();
+ void manage_pins ();
bool focus_toggled(GdkEventButton*);
bool bypass_button_release(GdkEventButton*);
void toggle_description ();
diff --git a/gtk2_ardour/vst_plugin_ui.cc b/gtk2_ardour/vst_plugin_ui.cc
index a964e96b4e..c2bf2c6faf 100644
--- a/gtk2_ardour/vst_plugin_ui.cc
+++ b/gtk2_ardour/vst_plugin_ui.cc
@@ -45,6 +45,7 @@ VSTPluginUI::VSTPluginUI (boost::shared_ptr<ARDOUR::PluginInsert> insert, boost:
box->pack_end (save_button, false, false);
box->pack_end (add_button, false, false);
box->pack_end (_preset_combo, false, false);
+ box->pack_end (pin_management_button, false, false);
bypass_button.set_active (!insert->active ());