using namespace std;
Glib::RefPtr<ActionGroup> MonitorSection::monitor_actions;
-Glib::RefPtr<Gdk::Pixbuf> MonitorSection::big_knob_pixbuf;
-Glib::RefPtr<Gdk::Pixbuf> MonitorSection::little_knob_pixbuf;
MonitorSection::MonitorSection (Session* s)
: AxisView (s)
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) {
}
}
-void
-MonitorSection::setup_knob_images ()
-{
-
- try {
- uint32_t c = ARDOUR_UI::config()->color_by_name ("monitor knob");
- char buf[16];
- snprintf (buf, 16, "#%x", (c >> 8));
- MotionFeedback::set_lamp_color (buf);
- big_knob_pixbuf = MotionFeedback::render_pixbuf (80);
-
- } catch (...) {
-
- error << "No usable large knob image" << endmsg;
- throw failed_constructor ();
- }
-
- if (!big_knob_pixbuf) {
- error << "No usable large knob image" << endmsg;
- throw failed_constructor ();
- }
-
- try {
-
- little_knob_pixbuf = MotionFeedback::render_pixbuf (30);
-
- } catch (...) {
-
- error << "No usable small knob image" << endmsg;
- throw failed_constructor ();
- }
-
- if (!little_knob_pixbuf) {
- error << "No usable small knob image" << endmsg;
- throw failed_constructor ();
- }
-
-}
-
void
MonitorSection::update_solo_model ()
{
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 ())
}
}