remove "New Return" menu option from processor box; make return toggle processor active status, and / do A/B of plugins; add A/B plugins to processor box menu
git-svn-id: svn://localhost/ardour2/branches/3.0@6211 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
afd9fc30e5
commit
3b4beb03b2
@ -92,7 +92,8 @@ RefPtr<Action> ProcessorBox::paste_action;
|
||||
Glib::RefPtr<Gdk::Pixbuf> SendProcessorEntry::_slider;
|
||||
|
||||
ProcessorEntry::ProcessorEntry (boost::shared_ptr<Processor> p, Width w)
|
||||
: _processor (p), _width (w)
|
||||
: _processor (p)
|
||||
, _width (w)
|
||||
{
|
||||
_hbox.pack_start (_active, false, false);
|
||||
_event_box.add (_name);
|
||||
@ -271,6 +272,7 @@ ProcessorBox::ProcessorBox (ARDOUR::Session& sess, sigc::slot<PluginSelector*> g
|
||||
: _session(sess)
|
||||
, _parent_strip (parent)
|
||||
, _owner_is_mixer (owner_is_mixer)
|
||||
, ab_direction (true)
|
||||
, _get_plugin_selector (get_plugin_selector)
|
||||
, _placement(PreFader)
|
||||
, _rr_selection(rsel)
|
||||
@ -545,18 +547,21 @@ ProcessorBox::processor_key_release_event (GdkEventKey *ev)
|
||||
case GDK_a:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
processor_display.select_all ();
|
||||
ret = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case GDK_c:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
copy_processors (targets);
|
||||
ret = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case GDK_x:
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
cut_processors (targets);
|
||||
ret = true;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -567,16 +572,23 @@ ProcessorBox::processor_key_release_event (GdkEventKey *ev)
|
||||
} else {
|
||||
paste_processors (targets.front());
|
||||
}
|
||||
ret = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case GDK_Up:
|
||||
break;
|
||||
|
||||
case GDK_Down:
|
||||
break;
|
||||
|
||||
case GDK_Delete:
|
||||
case GDK_BackSpace:
|
||||
delete_processors (targets);
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case GDK_slash:
|
||||
case GDK_Return:
|
||||
for (ProcSelection::iterator i = targets.begin(); i != targets.end(); ++i) {
|
||||
if ((*i)->active()) {
|
||||
(*i)->deactivate ();
|
||||
@ -587,6 +599,11 @@ ProcessorBox::processor_key_release_event (GdkEventKey *ev)
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
case GDK_slash:
|
||||
ab_plugins ();
|
||||
ret = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -860,35 +877,6 @@ ProcessorBox::send_io_finished (IOSelector::Result r, boost::weak_ptr<Processor>
|
||||
delete_when_idle (ios);
|
||||
}
|
||||
|
||||
void
|
||||
ProcessorBox::choose_return ()
|
||||
{
|
||||
boost::shared_ptr<Return> retrn (new Return (_session));
|
||||
|
||||
/* assume user just wants a single audio input (sidechain) by default */
|
||||
ChanCount ins(DataType::AUDIO, 1);
|
||||
|
||||
/* XXX need processor lock on route */
|
||||
try {
|
||||
retrn->input()->ensure_io (ins, false, this);
|
||||
} catch (AudioEngine::PortRegistrationFailure& err) {
|
||||
error << string_compose (_("Cannot set up new return: %1"), err.what()) << endmsg;
|
||||
return;
|
||||
}
|
||||
|
||||
/* let the user adjust the IO setup before creation */
|
||||
IOSelectorWindow *ios = new IOSelectorWindow (_session, retrn->input(), true);
|
||||
ios->show_all ();
|
||||
|
||||
/* keep a reference to the return so it doesn't get deleted while
|
||||
the IOSelectorWindow is doing its stuff */
|
||||
_processor_being_created = retrn;
|
||||
|
||||
ios->selector().Finished.connect (bind (
|
||||
mem_fun(*this, &ProcessorBox::return_io_finished),
|
||||
boost::weak_ptr<Processor>(retrn), ios));
|
||||
}
|
||||
|
||||
void
|
||||
ProcessorBox::return_io_finished (IOSelector::Result r, boost::weak_ptr<Processor> weak_processor, IOSelectorWindow* ios)
|
||||
{
|
||||
@ -1532,8 +1520,6 @@ ProcessorBox::register_actions ()
|
||||
ActionManager::jack_sensitive_actions.push_back (act);
|
||||
|
||||
ActionManager::register_action (popup_act_grp, X_("newaux"), _("New Aux Send ..."));
|
||||
ActionManager::register_action (popup_act_grp, X_("newreturn"), _("New Return ..."),
|
||||
sigc::ptr_fun (ProcessorBox::rb_choose_return));
|
||||
|
||||
ActionManager::register_action (popup_act_grp, X_("clear"), _("Clear (all)"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_clear));
|
||||
@ -1564,13 +1550,14 @@ ProcessorBox::register_actions ()
|
||||
ActionManager::register_action (popup_act_grp, X_("deselectall"), _("Deselect All"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_deselect_all));
|
||||
|
||||
/* activation */
|
||||
/* activation etc. */
|
||||
|
||||
ActionManager::plugin_selection_sensitive_actions.push_back(act);
|
||||
ActionManager::register_action (popup_act_grp, X_("activate_all"), _("Activate all"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_activate_all));
|
||||
ActionManager::register_action (popup_act_grp, X_("deactivate_all"), _("Deactivate all"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_deactivate_all));
|
||||
ActionManager::register_action (popup_act_grp, X_("ab_plugins"), _("A/B Plugins"),
|
||||
sigc::ptr_fun (ProcessorBox::rb_ab_plugins));
|
||||
|
||||
/* show editors */
|
||||
act = ActionManager::register_action (popup_act_grp, X_("edit"), _("Edit"),
|
||||
@ -1580,6 +1567,16 @@ ProcessorBox::register_actions ()
|
||||
ActionManager::add_action_group (popup_act_grp);
|
||||
}
|
||||
|
||||
void
|
||||
ProcessorBox::rb_ab_plugins ()
|
||||
{
|
||||
if (_current_processor_box == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
_current_processor_box->ab_plugins ();
|
||||
}
|
||||
|
||||
void
|
||||
ProcessorBox::rb_choose_plugin ()
|
||||
{
|
||||
@ -1607,15 +1604,6 @@ ProcessorBox::rb_choose_send ()
|
||||
_current_processor_box->choose_send ();
|
||||
}
|
||||
|
||||
void
|
||||
ProcessorBox::rb_choose_return ()
|
||||
{
|
||||
if (_current_processor_box == 0) {
|
||||
return;
|
||||
}
|
||||
_current_processor_box->choose_return ();
|
||||
}
|
||||
|
||||
void
|
||||
ProcessorBox::rb_choose_aux (boost::weak_ptr<Route> wr)
|
||||
{
|
||||
|
@ -184,7 +184,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject
|
||||
void choose_aux (boost::weak_ptr<ARDOUR::Route>);
|
||||
void choose_send ();
|
||||
void send_io_finished (IOSelector::Result, boost::weak_ptr<ARDOUR::Processor>, IOSelectorWindow*);
|
||||
void choose_return ();
|
||||
void return_io_finished (IOSelector::Result, boost::weak_ptr<ARDOUR::Processor>, IOSelectorWindow*);
|
||||
void choose_insert ();
|
||||
void choose_plugin ();
|
||||
@ -249,7 +248,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject
|
||||
static void rb_choose_plugin ();
|
||||
static void rb_choose_insert ();
|
||||
static void rb_choose_send ();
|
||||
static void rb_choose_return ();
|
||||
static void rb_clear ();
|
||||
static void rb_clear_pre ();
|
||||
static void rb_clear_post ();
|
||||
|
Loading…
Reference in New Issue
Block a user