mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-14 10:36:34 +01:00
Restore option to open a plugin editor built by Ardour,
rather than by the plugin; I erroneously removed this option in a previous commit. git-svn-id: svn://localhost/ardour2/branches/3.0@11295 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
eac552b549
commit
a1ecad4cfe
3 changed files with 45 additions and 2 deletions
|
|
@ -548,6 +548,7 @@
|
||||||
<menuitem action='ab_plugins'/>
|
<menuitem action='ab_plugins'/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<menuitem action='edit'/>
|
<menuitem action='edit'/>
|
||||||
|
<menuitem action='edit-generic'/>
|
||||||
</popup>
|
</popup>
|
||||||
|
|
||||||
<popup name='ShuttleUnitPopup'>
|
<popup name='ShuttleUnitPopup'>
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ RefPtr<Action> ProcessorBox::paste_action;
|
||||||
RefPtr<Action> ProcessorBox::cut_action;
|
RefPtr<Action> ProcessorBox::cut_action;
|
||||||
RefPtr<Action> ProcessorBox::rename_action;
|
RefPtr<Action> ProcessorBox::rename_action;
|
||||||
RefPtr<Action> ProcessorBox::edit_action;
|
RefPtr<Action> ProcessorBox::edit_action;
|
||||||
RefPtr<Action> ProcessorBox::controls_action;
|
RefPtr<Action> ProcessorBox::edit_generic_action;
|
||||||
Glib::RefPtr<Gdk::Pixbuf> ProcessorEntry::_slider_pixbuf;
|
Glib::RefPtr<Gdk::Pixbuf> ProcessorEntry::_slider_pixbuf;
|
||||||
|
|
||||||
ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processor> p, Width w)
|
ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processor> p, Width w)
|
||||||
|
|
@ -876,6 +876,9 @@ ProcessorBox::show_processor_menu (int arg)
|
||||||
pi = boost::dynamic_pointer_cast<PluginInsert> (single_selection->processor ());
|
pi = boost::dynamic_pointer_cast<PluginInsert> (single_selection->processor ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* allow editing with an Ardour-generated UI for plugin inserts with editors */
|
||||||
|
edit_generic_action->set_sensitive (pi && pi->plugin()->has_editor ());
|
||||||
|
|
||||||
/* disallow rename for multiple selections, for plugin inserts and for the fader */
|
/* disallow rename for multiple selections, for plugin inserts and for the fader */
|
||||||
rename_action->set_sensitive (single_selection && !pi && !boost::dynamic_pointer_cast<Amp> (single_selection->processor ()));
|
rename_action->set_sensitive (single_selection && !pi && !boost::dynamic_pointer_cast<Amp> (single_selection->processor ()));
|
||||||
|
|
||||||
|
|
@ -2090,6 +2093,29 @@ ProcessorBox::toggle_edit_processor (boost::shared_ptr<Processor> processor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Toggle a generic (Ardour-generated) plugin UI */
|
||||||
|
void
|
||||||
|
ProcessorBox::toggle_edit_generic_processor (boost::shared_ptr<Processor> processor)
|
||||||
|
{
|
||||||
|
boost::shared_ptr<PluginInsert> plugin_insert
|
||||||
|
= boost::dynamic_pointer_cast<PluginInsert>(processor);
|
||||||
|
if (!plugin_insert) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Container* toplevel = get_toplevel();
|
||||||
|
Window* win = dynamic_cast<Gtk::Window*>(toplevel);
|
||||||
|
PluginUIWindow* plugin_ui = new PluginUIWindow(win, plugin_insert, true, false);
|
||||||
|
plugin_ui->set_title(generate_processor_title (plugin_insert));
|
||||||
|
|
||||||
|
if (plugin_ui->is_visible()) {
|
||||||
|
plugin_ui->hide();
|
||||||
|
} else {
|
||||||
|
plugin_ui->show_all();
|
||||||
|
plugin_ui->present();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ProcessorBox::register_actions ()
|
ProcessorBox::register_actions ()
|
||||||
{
|
{
|
||||||
|
|
@ -2153,9 +2179,23 @@ ProcessorBox::register_actions ()
|
||||||
popup_act_grp, X_("edit"), _("Edit..."),
|
popup_act_grp, X_("edit"), _("Edit..."),
|
||||||
sigc::ptr_fun (ProcessorBox::rb_edit));
|
sigc::ptr_fun (ProcessorBox::rb_edit));
|
||||||
|
|
||||||
|
edit_generic_action = ActionManager::register_action (
|
||||||
|
popup_act_grp, X_("edit-generic"), _("Edit with basic controls..."),
|
||||||
|
sigc::ptr_fun (ProcessorBox::rb_edit_generic));
|
||||||
|
|
||||||
ActionManager::add_action_group (popup_act_grp);
|
ActionManager::add_action_group (popup_act_grp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ProcessorBox::rb_edit_generic ()
|
||||||
|
{
|
||||||
|
if (_current_processor_box == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_current_processor_box->for_selected_processors (&ProcessorBox::toggle_edit_generic_processor);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ProcessorBox::rb_ab_plugins ()
|
ProcessorBox::rb_ab_plugins ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
|
||||||
|
|
||||||
Gtk::Window* get_processor_ui (boost::shared_ptr<ARDOUR::Processor>) const;
|
Gtk::Window* get_processor_ui (boost::shared_ptr<ARDOUR::Processor>) const;
|
||||||
void toggle_edit_processor (boost::shared_ptr<ARDOUR::Processor>);
|
void toggle_edit_processor (boost::shared_ptr<ARDOUR::Processor>);
|
||||||
|
void toggle_edit_generic_processor (boost::shared_ptr<ARDOUR::Processor>);
|
||||||
|
|
||||||
void update_gui_object_state (ProcessorEntry *);
|
void update_gui_object_state (ProcessorEntry *);
|
||||||
|
|
||||||
|
|
@ -357,7 +358,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
|
||||||
static Glib::RefPtr<Gtk::Action> paste_action;
|
static Glib::RefPtr<Gtk::Action> paste_action;
|
||||||
static Glib::RefPtr<Gtk::Action> rename_action;
|
static Glib::RefPtr<Gtk::Action> rename_action;
|
||||||
static Glib::RefPtr<Gtk::Action> edit_action;
|
static Glib::RefPtr<Gtk::Action> edit_action;
|
||||||
static Glib::RefPtr<Gtk::Action> controls_action;
|
static Glib::RefPtr<Gtk::Action> edit_generic_action;
|
||||||
void paste_processor_state (const XMLNodeList&, boost::shared_ptr<ARDOUR::Processor>);
|
void paste_processor_state (const XMLNodeList&, boost::shared_ptr<ARDOUR::Processor>);
|
||||||
|
|
||||||
void activate_processor (boost::shared_ptr<ARDOUR::Processor>);
|
void activate_processor (boost::shared_ptr<ARDOUR::Processor>);
|
||||||
|
|
@ -392,6 +393,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
|
||||||
static void rb_deactivate_all ();
|
static void rb_deactivate_all ();
|
||||||
static void rb_ab_plugins ();
|
static void rb_ab_plugins ();
|
||||||
static void rb_edit ();
|
static void rb_edit ();
|
||||||
|
static void rb_edit_generic ();
|
||||||
|
|
||||||
void route_property_changed (const PBD::PropertyChange&);
|
void route_property_changed (const PBD::PropertyChange&);
|
||||||
std::string generate_processor_title (boost::shared_ptr<ARDOUR::PluginInsert> pi);
|
std::string generate_processor_title (boost::shared_ptr<ARDOUR::PluginInsert> pi);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue