}
ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelector*()> get_plugin_selector,
- RouteRedirectSelection& rsel, MixerStrip* parent, bool owner_is_mixer)
+ RouteProcessorSelection& rsel, MixerStrip* parent, bool owner_is_mixer)
: _parent_strip (parent)
, _owner_is_mixer (owner_is_mixer)
, ab_direction (true)
processor_display.Reordered.connect (sigc::mem_fun (*this, &ProcessorBox::reordered));
processor_display.DropFromAnotherBox.connect (sigc::mem_fun (*this, &ProcessorBox::object_drop));
- processor_display.SelectionChanged.connect (sigc::mem_fun (*this, &ProcessorBox::selection_changed));
processor_scroller.show ();
processor_display.show ();
processor_menu->signal_unmap().connect (sigc::mem_fun (*this, &ProcessorBox::processor_menu_unmapped));
}
+ /* Sort out the plugin submenu */
+
Gtk::MenuItem* plugin_menu_item = dynamic_cast<Gtk::MenuItem*>(ActionManager::get_widget("/ProcessorMenu/newplugin"));
if (plugin_menu_item) {
plugin_menu_item->set_submenu (*_get_plugin_selector()->plugin_menu());
}
+ /* And the aux submenu */
+
Gtk::MenuItem* aux_menu_item = dynamic_cast<Gtk::MenuItem*>(ActionManager::get_widget("/ProcessorMenu/newaux"));
if (aux_menu_item) {
}
}
+ /* Sensitise actions as approprioate */
+
cut_action->set_sensitive (can_cut());
paste_action->set_sensitive (!_rr_selection.processors.empty());
+ const bool sensitive = !processor_display.selection().empty();
+ ActionManager::set_sensitive (ActionManager::plugin_selection_sensitive_actions, sensitive);
+ edit_action->set_sensitive (one_processor_can_be_edited ());
+
+ boost::shared_ptr<Processor> single_selection;
+ if (processor_display.selection().size() == 1) {
+ single_selection = processor_display.selection().front()->processor ();
+ }
+
+ boost::shared_ptr<PluginInsert> pi;
+ if (single_selection) {
+ pi = boost::dynamic_pointer_cast<PluginInsert> (single_selection);
+ }
+
+ /* enable gui for plugin inserts with editors */
+ controls_action->set_sensitive(pi && pi->plugin()->has_editor());
+
+ /* 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_menu->popup (1, arg);
/* Add a placeholder gap to the processor list to indicate where a processor would be
void
ProcessorBox::processor_operation (ProcessorOperation op)
{
-
- bool ret = false;
ProcSelection targets;
get_selected_processors (targets);
(*i)->activate ();
}
}
- ret = true;
break;
case ProcessorsAB:
return processor_menu;
}
-void
-ProcessorBox::selection_changed ()
-{
- const bool sensitive = !processor_display.selection().empty();
- ActionManager::set_sensitive(ActionManager::plugin_selection_sensitive_actions,
- sensitive);
- edit_action->set_sensitive(one_processor_can_be_edited());
-
- const bool single_selection = (processor_display.selection().size() == 1);
-
- boost::shared_ptr<PluginInsert> pi;
- if (single_selection) {
- pi = boost::dynamic_pointer_cast<PluginInsert>(
- processor_display.selection().front()->processor());
- }
-
- /* enable gui for plugin inserts with editors */
- controls_action->set_sensitive(pi && pi->plugin()->has_editor());
-
- /* disallow rename for multiple selections and for plugin inserts */
- rename_action->set_sensitive(single_selection && pi);
-}
-
void
ProcessorBox::select_all_processors ()
{
}
void
-ProcessorBox::all_processors_active (bool state)
+ProcessorBox::all_visible_processors_active (bool state)
{
- _route->all_processors_active (PreFader, state);
- _route->all_processors_active (PostFader, state);
+ _route->all_visible_processors_active (state);
}
void
return;
}
- SendUIWindow* w = new SendUIWindow (send, _session);
- w->show ();
+ if (boost::dynamic_pointer_cast<InternalSend> (processor) == 0) {
+ SendUIWindow* w = new SendUIWindow (send, _session);
+ w->show ();
+ }
} else if ((retrn = boost::dynamic_pointer_cast<Return> (processor)) != 0) {
/* activation etc. */
- ActionManager::register_action (popup_act_grp, X_("activate_all"), _("Activate all"),
+ 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"),
+ 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));
return;
}
- _current_processor_box->all_processors_active (true);
+ _current_processor_box->all_visible_processors_active (true);
}
void
if (_current_processor_box == 0) {
return;
}
- _current_processor_box->all_processors_active (false);
+ _current_processor_box->all_visible_processors_active (false);
}
void