solo_safe_led = 0;
_solo_release = 0;
_mute_release = 0;
- route_active_menu_item = 0;
denormal_menu_item = 0;
step_edit_item = 0;
multiple_mute_change = false;
xml_node = 0;
}
- route_active_menu_item = 0;
denormal_menu_item = 0;
}
}
if (Config->get_solo_control_is_listen_control()) {
- _session->set_listen (_session->get_routes(), !_route->listening(), Session::rt_cleanup, true);
+ _session->set_listen (_session->get_routes(), !_route->listening_via_monitor(), Session::rt_cleanup, true);
} else {
_session->set_solo (_session->get_routes(), !_route->self_soloed(), Session::rt_cleanup, true);
}
}
if (Config->get_solo_control_is_listen_control()) {
- _session->set_listen (_route->route_group()->route_list(), !_route->listening(), Session::rt_cleanup, true);
+ _session->set_listen (_route->route_group()->route_list(), !_route->listening_via_monitor(), Session::rt_cleanup, true);
} else {
_session->set_solo (_route->route_group()->route_list(), !_route->self_soloed(), Session::rt_cleanup, true);
}
}
if (Config->get_solo_control_is_listen_control()) {
- _session->set_listen (rl, !_route->listening());
+ _session->set_listen (rl, !_route->listening_via_monitor());
} else {
_session->set_solo (rl, !_route->self_soloed());
}
using namespace Menu_Helpers;
MenuList& items = record_menu->items();
- items.push_back (CheckMenuElem (_("Step Edit"), sigc::mem_fun (*this, &RouteUI::toggle_step_edit)));
+ items.push_back (CheckMenuElem (_("Step Entry"), sigc::mem_fun (*this, &RouteUI::toggle_step_edit)));
step_edit_item = dynamic_cast<CheckMenuItem*> (&items.back());
if (_route->record_enabled()) {
if (Config->get_solo_control_is_listen_control()) {
- if (r->listening()) {
+ if (r->listening_via_monitor()) {
return 1;
} else {
return 0;
if (Config->get_solo_control_is_listen_control()) {
- if (r->listening()) {
+ if (r->listening_via_monitor()) {
return 1;
} else {
return 0;
if (Config->get_solo_control_is_listen_control()) {
- if (solo_button->get_active() != (x = _route->listening())) {
+ if (solo_button->get_active() != (x = _route->listening_via_monitor())) {
++_i_am_the_modifier;
solo_button->set_active(x);
--_i_am_the_modifier;
return 0;
}
- if (Config->get_show_solo_mutes()) {
+
+ if (Config->get_show_solo_mutes() && !Config->get_solo_control_is_listen_control ()) {
if (r->muted ()) {
/* full mute */
--_i_am_the_modifier;
}
- mute_button->set_visual_state (mute_visual_state (_session, _route));
+ mute_button->set_visual_state (mute_visual_state (_session, _route));
}
void
_route->set_solo_safe (check->get_active(), this);
}
-bool
-RouteUI::choose_color()
+/** Ask the user to choose a colour, and then set all selected tracks
+ * to that colour.
+ */
+void
+RouteUI::choose_color ()
{
bool picked;
- Gdk::Color color;
-
- color = Gtkmm2ext::UI::instance()->get_color (_("Color Selection"), picked, &_color);
+ Gdk::Color const color = Gtkmm2ext::UI::instance()->get_color (_("Color Selection"), picked, &_color);
if (picked) {
- set_color (color);
+ ARDOUR_UI::instance()->the_editor().get_selection().tracks.foreach_route_ui (
+ boost::bind (&RouteUI::set_color, _1, color)
+ );
}
-
- return picked;
}
void
}
void
-RouteUI::remove_this_route ()
+RouteUI::remove_this_route (bool apply_to_selection)
{
- if ((route()->is_master() || route()->is_monitor()) &&
- !Config->get_allow_special_bus_removal()) {
- MessageDialog msg (_("That would be bad news ...."),
- false,
- Gtk::MESSAGE_INFO,
+ if (apply_to_selection) {
+ ARDOUR_UI::instance()->the_editor().get_selection().tracks.foreach_route_ui (boost::bind (&RouteUI::remove_this_route, _1, false));
+ } else {
+ if ((route()->is_master() || route()->is_monitor()) &&
+ !Config->get_allow_special_bus_removal()) {
+ MessageDialog msg (_("That would be bad news ...."),
+ false,
+ Gtk::MESSAGE_INFO,
Gtk::BUTTONS_OK);
- msg.set_secondary_text (string_compose (_(
+ msg.set_secondary_text (string_compose (_(
"Removing the master or monitor bus is such a bad idea\n\
that %1 is not going to allow it.\n\
\n\
edit your ardour.rc file to set the\n\
\"allow-special-bus-removal\" option to be \"yes\""), PROGRAM_NAME));
- msg.present ();
- msg.run ();
- return;
- }
-
- vector<string> choices;
- string prompt;
-
- if (is_track()) {
- prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
- } else {
- prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
- }
-
- choices.push_back (_("No, do nothing."));
- choices.push_back (_("Yes, remove it."));
-
- string title;
- if (is_track()) {
- title = _("Remove track");
- } else {
- title = _("Remove bus");
- }
-
- Choice prompter (title, prompt, choices);
-
- if (prompter.run () == 1) {
- Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (&RouteUI::idle_remove_this_route), this));
+ msg.present ();
+ msg.run ();
+ return;
+ }
+
+ vector<string> choices;
+ string prompt;
+
+ if (is_track()) {
+ prompt = string_compose (_("Do you really want to remove track \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
+ } else {
+ prompt = string_compose (_("Do you really want to remove bus \"%1\" ?\n\nYou may also lose the playlist used by this track.\n\n(This action cannot be undone, and the session file will be overwritten)"), _route->name());
+ }
+
+ choices.push_back (_("No, do nothing."));
+ choices.push_back (_("Yes, remove it."));
+
+ string title;
+ if (is_track()) {
+ title = _("Remove track");
+ } else {
+ title = _("Remove bus");
+ }
+
+ Choice prompter (title, prompt, choices);
+
+ if (prompter.run () == 1) {
+ Glib::signal_idle().connect (sigc::bind (sigc::ptr_fun (&RouteUI::idle_remove_this_route), this));
+ }
}
}
}
void
-RouteUI::toggle_route_active ()
+RouteUI::set_route_active (bool a, bool apply_to_selection)
{
- bool yn;
-
- if (route_active_menu_item) {
- if (route_active_menu_item->get_active() != (yn = _route->active())) {
- _route->set_active (!yn);
- }
- }
-}
-
-void
-RouteUI::route_active_changed ()
-{
- if (route_active_menu_item) {
- Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&CheckMenuItem::set_active, route_active_menu_item, _route->active()));
+ if (apply_to_selection) {
+ ARDOUR_UI::instance()->the_editor().get_selection().tracks.foreach_route_ui (boost::bind (&RouteTimeAxisView::set_route_active, _1, a, false));
+ } else {
+ _route->set_active (a, this);
}
}
-
void
RouteUI::toggle_denormal_protection ()
{
_route->set_phase_invert (c, !_route->phase_invert (c));
}
+
+void
+RouteUI::set_invert_sensitive (bool yn)
+{
+ for (list<BindableToggleButton*>::iterator b = _invert_buttons.begin(); b != _invert_buttons.end(); ++b) {
+ (*b)->set_sensitive (yn);
+ }
+}