Disable solo-controls-are-listen-controls if we don't have a monitor bus. Should fix #3660.
git-svn-id: svn://localhost/ardour2/branches/3.0@8436 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
69aa106050
commit
75b1f698a1
|
@ -152,6 +152,10 @@ public:
|
|||
void set_state_from_config ();
|
||||
void add_to_page (OptionEditorPage*);
|
||||
|
||||
void set_sensitive (bool yn) {
|
||||
_button->set_sensitive (yn);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void toggled ();
|
||||
|
@ -398,11 +402,12 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
virtual void parameter_changed (std::string const &);
|
||||
|
||||
ARDOUR::Configuration* _config;
|
||||
|
||||
private:
|
||||
|
||||
void parameter_changed (std::string const &);
|
||||
PBD::ScopedConnection config_connection;
|
||||
|
||||
Gtk::Notebook _notebook;
|
||||
|
|
|
@ -1212,26 +1212,29 @@ RCOptionEditor::RCOptionEditor ()
|
|||
sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_mute_gain),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_mute_gain)
|
||||
));
|
||||
|
||||
add_option (_("Solo / mute"),
|
||||
new BoolOption (
|
||||
"solo-control-is-listen-control",
|
||||
_("Solo controls are Listen controls"),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_control_is_listen_control),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_control_is_listen_control)
|
||||
));
|
||||
|
||||
ComboOption<ListenPosition>* lp = new ComboOption<ListenPosition> (
|
||||
_solo_control_is_listen_control = new BoolOption (
|
||||
"solo-control-is-listen-control",
|
||||
_("Solo controls are Listen controls"),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::get_solo_control_is_listen_control),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_solo_control_is_listen_control)
|
||||
);
|
||||
|
||||
add_option (_("Solo / mute"), _solo_control_is_listen_control);
|
||||
|
||||
_listen_position = new ComboOption<ListenPosition> (
|
||||
"listen-position",
|
||||
_("Listen Position"),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::get_listen_position),
|
||||
sigc::mem_fun (*_rc_config, &RCConfiguration::set_listen_position)
|
||||
);
|
||||
|
||||
lp->add (AfterFaderListen, _("after-fader listen"));
|
||||
lp->add (PreFaderListen, _("pre-fader listen"));
|
||||
_listen_position->add (AfterFaderListen, _("after-fader listen"));
|
||||
_listen_position->add (PreFaderListen, _("pre-fader listen"));
|
||||
|
||||
add_option (_("Solo / mute"), lp);
|
||||
add_option (_("Solo / mute"), _listen_position);
|
||||
|
||||
parameter_changed ("use-monitor-bus");
|
||||
|
||||
add_option (_("Solo / mute"),
|
||||
new BoolOption (
|
||||
|
@ -1389,4 +1392,18 @@ RCOptionEditor::RCOptionEditor ()
|
|||
add_option (_("Keyboard"), new KeyboardOptions);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
RCOptionEditor::parameter_changed (string const & p)
|
||||
{
|
||||
OptionEditor::parameter_changed (p);
|
||||
|
||||
if (p == "use-monitor-bus") {
|
||||
bool const s = Config->get_use_monitor_bus ();
|
||||
if (!s) {
|
||||
/* we can't use this if we don't have a monitor bus */
|
||||
Config->set_solo_control_is_listen_control (false);
|
||||
}
|
||||
_solo_control_is_listen_control->set_sensitive (s);
|
||||
_listen_position->set_sensitive (s);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,5 +15,9 @@ public:
|
|||
RCOptionEditor ();
|
||||
|
||||
private:
|
||||
void parameter_changed (std::string const &);
|
||||
|
||||
ARDOUR::RCConfiguration* _rc_config;
|
||||
BoolOption* _solo_control_is_listen_control;
|
||||
ComboOption<ARDOUR::ListenPosition>* _listen_position;
|
||||
};
|
||||
|
|
|
@ -1645,9 +1645,7 @@ RouteUI::parameter_changed (string const & p)
|
|||
{
|
||||
if (p == "disable-disarm-during-roll") {
|
||||
check_rec_enable_sensitivity ();
|
||||
} else if (p == "solo-control-is-listen-control") {
|
||||
set_button_names ();
|
||||
} else if (p == "listen-position") {
|
||||
} else if (p == "use-monitor-bus" || p == "solo-control-is-listen-control" || p == "listen-position") {
|
||||
set_button_names ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,19 +41,17 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
|
|||
|
||||
/* TIMECODE*/
|
||||
|
||||
ComboOption<SyncSource>* ssrc = new ComboOption<SyncSource> (
|
||||
_sync_source = new ComboOption<SyncSource> (
|
||||
"sync-source",
|
||||
_("External timecode source"),
|
||||
sigc::mem_fun (*_session_config, &SessionConfiguration::get_sync_source),
|
||||
sigc::mem_fun (*_session_config, &SessionConfiguration::set_sync_source)
|
||||
);
|
||||
|
||||
s->config.ParameterChanged.connect (_session_connections, invalidator (*this), ui_bind (&SessionOptionEditor::follow_sync_state, this, _1, s, ssrc), gui_context());
|
||||
populate_sync_options ();
|
||||
parameter_changed (string ("external-sync"));
|
||||
|
||||
populate_sync_options (s, ssrc);
|
||||
follow_sync_state (string ("external-sync"), s, ssrc);
|
||||
|
||||
add_option (_("Timecode"), ssrc);
|
||||
add_option (_("Timecode"), _sync_source);
|
||||
|
||||
add_option (_("Timecode"), new OptionEditorHeading (_("Timecode Settings")));
|
||||
|
||||
|
@ -298,28 +296,23 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
|
|||
}
|
||||
|
||||
void
|
||||
SessionOptionEditor::populate_sync_options (Session* s, Option* opt)
|
||||
SessionOptionEditor::populate_sync_options ()
|
||||
{
|
||||
ComboOption<SyncSource>* sync_opt = dynamic_cast<ComboOption<SyncSource>* > (opt);
|
||||
vector<SyncSource> sync_opts = _session->get_available_sync_options ();
|
||||
|
||||
vector<SyncSource> sync_opts = s->get_available_sync_options ();
|
||||
|
||||
sync_opt->clear ();
|
||||
_sync_source->clear ();
|
||||
|
||||
for (vector<SyncSource>::iterator i = sync_opts.begin(); i != sync_opts.end(); ++i) {
|
||||
sync_opt->add (*i, sync_source_to_string (*i));
|
||||
_sync_source->add (*i, sync_source_to_string (*i));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SessionOptionEditor::follow_sync_state (std::string p, Session* s, Option* opt)
|
||||
SessionOptionEditor::parameter_changed (std::string const & p)
|
||||
{
|
||||
ComboOption<SyncSource>* sync_opt = dynamic_cast<ComboOption<SyncSource>* > (opt);
|
||||
OptionEditor::parameter_changed (p);
|
||||
|
||||
if (p == "external-sync") {
|
||||
if (s->config.get_external_sync()) {
|
||||
sync_opt->set_sensitive (false);
|
||||
} else {
|
||||
sync_opt->set_sensitive (true);
|
||||
}
|
||||
_sync_source->set_sensitive (!_session->config.get_external_sync ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,9 @@ public:
|
|||
SessionOptionEditor (ARDOUR::Session* s);
|
||||
|
||||
private:
|
||||
void parameter_changed (std::string const &);
|
||||
void populate_sync_options ();
|
||||
|
||||
ARDOUR::SessionConfiguration* _session_config;
|
||||
void populate_sync_options (ARDOUR::Session*, Option*);
|
||||
void follow_sync_state (std::string, ARDOUR::Session*, Option*);
|
||||
ComboOption<ARDOUR::SyncSource>* _sync_source;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user