MonitorSection::solo_use_pfl ()
{
/* this is driven by a toggle on a radio group, and so is invoked twice,
- once for the item that became inactive and once for the one that became
- active.
- */
+ once for the item that became inactive and once for the one that became
+ active.
+ */
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Solo"), X_("solo-use-pfl"));
if (act) {
return true;
}
+#define SYNCHRONIZE_TOGGLE_ACTION(action, value) \
+ if (action) { \
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(action); \
+ if (tact && tact->get_active() != value) { \
+ tact->set_active(value); \
+ } \
+ }
+
void
MonitorSection::parameter_changed (std::string name)
{
update_solo_model ();
} else if (name == "listen-position") {
update_solo_model ();
+ } else if (name == "solo-mute-override") {
+ SYNCHRONIZE_TOGGLE_ACTION(
+ ActionManager::get_action (X_("Monitor"), "toggle-mute-overrides-solo"),
+ Config->get_solo_mute_override ())
+ } else if (name == "exclusive-solo") {
+ SYNCHRONIZE_TOGGLE_ACTION(
+ ActionManager::get_action (X_("Monitor"), "toggle-exclusive-solo"),
+ Config->get_exclusive_solo ())
}
}