add a "Pin Management" button to the plugin UI-header
authorRobin Gareus <robin@gareus.org>
Fri, 5 Aug 2016 00:35:51 +0000 (02:35 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 5 Aug 2016 00:35:51 +0000 (02:35 +0200)
gtk2_ardour/au_pluginui.mm
gtk2_ardour/generic_pluginui.cc
gtk2_ardour/lv2_plugin_ui.cc
gtk2_ardour/plugin_ui.cc
gtk2_ardour/plugin_ui.h
gtk2_ardour/vst_plugin_ui.cc

index d601b84436c9512f124700946c349de4d331a23d..fc73b9b74877c8b0a5229d450249aa2a8dab7007 100644 (file)
@@ -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);
index 0caf475afac3cfd494d4ff217032c3e22d1dbbf0..8ccce2e75196c1500552efbe2c85b6204549423f 100644 (file)
@@ -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);
index 75b3ff0bb89f7823e97f855972335611b8513f80..7f735dfcc54f9dd479480cfa9121567370cddd6d 100644 (file)
@@ -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 ());
 }
index 1f70537a41dc4cc402c09a7e47faba3dc1e593b4..19ea8ebc6c0c178c340b87dd58f667067fe1d6bc 100644 (file)
@@ -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*)
 {
index d534a99d707126aefc3ab873086c869dabb5e01d..046890aa5227abd1d96b406aa22b870d8b0dd05a 100644 (file)
@@ -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 ();
index a964e96b4ee920ecb08f233c6e8cb8f779ade326..c2bf2c6faf754f58c61a0dc59d8d14ffb3cc9617 100644 (file)
@@ -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 ());