summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-05-05 14:09:58 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-05-05 14:09:58 +0000
commit896a0a991cc44418f58903fe5dd1c58001c87314 (patch)
tree8a4e899260d04f7ad5dc42afde589ad55bbf3d3b
parent2e1d9645281435d590c2d2879aba08431f8561e6 (diff)
rename latched solo option and reverse its meaning; add exclusive solo button functionality in monitor section; add solo/mute override control in monitor section
git-svn-id: svn://localhost/ardour2/branches/3.0@7059 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/ardour3_ui_dark.rc.in9
-rw-r--r--gtk2_ardour/monitor_section.cc78
-rw-r--r--gtk2_ardour/monitor_section.h5
-rw-r--r--gtk2_ardour/rc_option_editor.cc8
-rw-r--r--libs/ardour/ardour/rc_configuration_vars.h2
-rw-r--r--libs/ardour/route.cc6
-rw-r--r--libs/ardour/session.cc2
7 files changed, 96 insertions, 14 deletions
diff --git a/gtk2_ardour/ardour3_ui_dark.rc.in b/gtk2_ardour/ardour3_ui_dark.rc.in
index da13db4e90..dc50a77a18 100644
--- a/gtk2_ardour/ardour3_ui_dark.rc.in
+++ b/gtk2_ardour/ardour3_ui_dark.rc.in
@@ -408,6 +408,13 @@ style "mixer_solo_button_active" = "solo_button_active"
ythickness = 0
}
+style "monitor_opt_button" = "small_button"
+{
+ font_name = "@FONT_SMALLER@"
+ bg[ACTIVE] = { 1.0, 0.749, 0.247 }
+ fg[ACTIVE] = { 0, 0, 0 }
+}
+
style "monitor_mono_button" = "small_button"
{
bg[ACTIVE] = { 0.725, 0.925, 0.949 }
@@ -1663,6 +1670,8 @@ widget "*MonitorMonoButton" style:highest "monitor_mono_button"
widget "*MonitorMonoButton*" style:highest "monitor_mono_button"
widget "*MonitorInvertButton" style:highest "monitor_invert_button"
widget "*MonitorInvertButton*" style:highest "monitor_invert_button"
+widget "*MonitorOptButton" style:highest "monitor_opt_button"
+widget "*MonitorOptButton*" style:highest "monitor_opt_button"
widget "*BypassButton" style:highest "red_when_active"
widget "*BypassButton*" style:highest "red_when_active"
widget "*TransportSoloAlert" style:highest "flashing_alert"
diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc
index 95b9e5c6a5..f3a668804b 100644
--- a/gtk2_ardour/monitor_section.cc
+++ b/gtk2_ardour/monitor_section.cc
@@ -52,7 +52,8 @@ MonitorSection::MonitorSection (Session* s)
, mono_button (_("mono"))
, rude_solo_button (_("soloing"))
, rude_audition_button (_("auditioning"))
- , exclusive_solo_button (_("Exclusive solo"))
+ , exclusive_solo_button (_("Exclusive"))
+ , solo_mute_override_button (_("Solo/Mute"))
{
Glib::RefPtr<Action> act;
@@ -127,7 +128,6 @@ MonitorSection::MonitorSection (Session* s)
act->connect_proxy (pfl_button);
}
-
/* Solo Boost */
solo_boost_control = new VolumeController (little_knob_pixbuf, &solo_boost_adjustment, false, 30, 30);
@@ -158,13 +158,34 @@ MonitorSection::MonitorSection (Session* s)
solo_packer->pack_start (*spin_packer, true, true);
- exclusive_solo_button.set_name (X_("MonitorCutButton"));
+ exclusive_solo_button.set_name (X_("MonitorOptButton"));
+ ARDOUR_UI::instance()->set_tip (&exclusive_solo_button, _("Exclusive solo means that only 1 solo is active at a time"));
+
+ act = ActionManager::get_action (X_("Monitor"), X_("toggle-exclusive-solo"));
+ if (act) {
+ act->connect_proxy (exclusive_solo_button);
+ }
+ solo_mute_override_button.set_name (X_("MonitorOptButton"));
+ ARDOUR_UI::instance()->set_tip (&solo_mute_override_button, _("If enabled, solo will override mute\n(a soloed & muted track or bus will be audible)"));
+
+ act = ActionManager::get_action (X_("Monitor"), X_("toggle-mute-overrides-solo"));
+ if (act) {
+ act->connect_proxy (solo_mute_override_button);
+ }
+
+ HBox* solo_opt_box = manage (new HBox);
+ solo_opt_box->set_spacing (12);
+ solo_opt_box->set_homogeneous (true);
+ solo_opt_box->pack_start (exclusive_solo_button);
+ solo_opt_box->pack_start (solo_mute_override_button);
+ solo_opt_box->show ();
+
upper_packer.set_spacing (12);
upper_packer.pack_start (rude_solo_button, false, false);
upper_packer.pack_start (rude_audition_button, false, false);
upper_packer.pack_start (solo_model_box, false, false);
- upper_packer.pack_start (exclusive_solo_button, false, false);
+ upper_packer.pack_start (*solo_opt_box, false, false);
upper_packer.pack_start (*solo_packer, false, false);
act = ActionManager::get_action (X_("Monitor"), X_("monitor-cut-all"));
@@ -412,6 +433,38 @@ MonitorSection::set_button_names ()
}
void
+MonitorSection::toggle_exclusive_solo ()
+{
+ if (!_monitor) {
+ return;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), "toggle-exclusive-solo");
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ Config->set_exclusive_solo (tact->get_active());
+ }
+
+}
+
+
+void
+MonitorSection::toggle_mute_overrides_solo ()
+{
+ if (!_monitor) {
+ return;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Monitor"), "toggle-mute-overrides-solo");
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ cerr << "Set solo_mute_override to " << tact->get_active() << endl;
+ Config->set_solo_mute_override (tact->get_active());
+ }
+}
+
+
+void
MonitorSection::dim_all ()
{
if (!_monitor) {
@@ -537,6 +590,7 @@ MonitorSection::register_actions ()
{
string action_name;
string action_descr;
+ Glib::RefPtr<Action> act;
monitor_actions = ActionGroup::create (X_("Monitor"));
ActionManager::add_action_group (monitor_actions);
@@ -550,6 +604,22 @@ MonitorSection::register_actions ()
ActionManager::register_toggle_action (monitor_actions, "monitor-dim-all", "",
sigc::mem_fun (*this, &MonitorSection::dim_all));
+ act = ActionManager::register_toggle_action (monitor_actions, "toggle-exclusive-solo", "",
+ sigc::mem_fun (*this, &MonitorSection::toggle_exclusive_solo));
+
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ tact->set_active (Config->get_exclusive_solo());
+
+ act = ActionManager::register_toggle_action (monitor_actions, "toggle-mute-overrides-solo", "",
+ sigc::mem_fun (*this, &MonitorSection::toggle_mute_overrides_solo));
+
+ tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ tact->set_active (Config->get_solo_mute_override());
+
+ /* map from RC config */
+
+
+
/* note the 1-based counting (for naming - backend uses 0-based) */
for (uint32_t chn = 1; chn <= 16; ++chn) {
diff --git a/gtk2_ardour/monitor_section.h b/gtk2_ardour/monitor_section.h
index a77efdb82c..d543ea1acd 100644
--- a/gtk2_ardour/monitor_section.h
+++ b/gtk2_ardour/monitor_section.h
@@ -92,6 +92,8 @@ class MonitorSection : public RouteUI
void dim_all ();
void cut_all ();
void mono ();
+ void toggle_exclusive_solo ();
+ void toggle_mute_overrides_solo ();
void dim_level_changed ();
void solo_boost_changed ();
void gain_value_changed ();
@@ -115,6 +117,7 @@ class MonitorSection : public RouteUI
BindableToggleButton rude_solo_button;
BindableToggleButton rude_audition_button;
BindableToggleButton exclusive_solo_button;
+ BindableToggleButton solo_mute_override_button;
void do_blink (bool);
void solo_blink (bool);
@@ -124,7 +127,7 @@ class MonitorSection : public RouteUI
void solo_cut_changed ();
void update_solo_model ();
void parameter_changed (std::string);
-
+
PBD::ScopedConnection config_connection;
PBD::ScopedConnectionList control_connections;
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc
index bf1ba93216..1bc4f0a252 100644
--- a/gtk2_ardour/rc_option_editor.cc
+++ b/gtk2_ardour/rc_option_editor.cc
@@ -1195,10 +1195,10 @@ RCOptionEditor::RCOptionEditor ()
add_option (_("Audio"),
new BoolOption (
- "solo-latched",
- _("Latched solo"),
- sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_latched),
- sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_latched)
+ "exclusive-solo",
+ _("Exclusive solo"),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::get_exclusive_solo),
+ sigc::mem_fun (*_rc_config, &RCConfiguration::set_exclusive_solo)
));
add_option (_("Audio"),
diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h
index 6fa16df3ed..158f84a3c7 100644
--- a/libs/ardour/ardour/rc_configuration_vars.h
+++ b/libs/ardour/ardour/rc_configuration_vars.h
@@ -82,7 +82,7 @@ CONFIG_VARIABLE (ListenPosition, listen_position, "listen-position", AfterFaderL
CONFIG_VARIABLE (bool, use_monitor_bus, "use-monitor-bus", false)
CONFIG_VARIABLE (bool, solo_control_is_listen_control, "solo-control-is-listen-control", false)
-CONFIG_VARIABLE (bool, solo_latched, "solo-latched", true)
+CONFIG_VARIABLE (bool, exclusive_solo, "exclusive-solo", false)
CONFIG_VARIABLE (bool, latched_record_enable, "latched-record-enable", false)
CONFIG_VARIABLE (bool, all_safe, "all-safe", false)
CONFIG_VARIABLE (bool, show_solo_mutes, "show-solo-mutes", true)
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index e3ef2ea6f0..7bd9157514 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -618,9 +618,9 @@ Route::mod_solo_by_others_upstream (int32_t delta)
_soloed_by_others_upstream += delta;
}
- DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 SbU delta %2 = %3 old = %4 sbd %5 ss %6 latched %7\n",
+ DEBUG_TRACE (DEBUG::Solo, string_compose ("%1 SbU delta %2 = %3 old = %4 sbd %5 ss %6 exclusive %7\n",
name(), delta, _soloed_by_others_upstream, old_sbu,
- _soloed_by_others_downstream, _self_solo, Config->get_solo_latched()));
+ _soloed_by_others_downstream, _self_solo, Config->get_exclusive_solo()));
/* push the inverse solo change to everything that feeds us.
@@ -639,7 +639,7 @@ Route::mod_solo_by_others_upstream (int32_t delta)
((old_sbu == 0 && _soloed_by_others_upstream > 0) ||
(old_sbu > 0 && _soloed_by_others_upstream == 0))) {
- if (delta > 0 || Config->get_solo_latched()) {
+ if (delta > 0 || !Config->get_exclusive_solo()) {
DEBUG_TRACE (DEBUG::Solo, "\t ... INVERT push\n");
for (FedBy::iterator i = _fed_by.begin(); i != _fed_by.end(); ++i) {
boost::shared_ptr<Route> sr = i->r.lock();
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 453dcd22e2..3fc0603a5b 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -2261,7 +2261,7 @@ Session::route_solo_changed (bool self_solo_change, void* /*src*/, boost::weak_p
delta = -1;
}
- if (delta == 1 && !Config->get_solo_latched()) {
+ if (delta == 1 && Config->get_exclusive_solo()) {
/* new solo: disable all other solos */
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
if ((*i) == route || (*i)->solo_isolated() || (*i)->is_master() || (*i)->is_monitor() || (*i)->is_hidden()) {