diff options
author | Carl Hetherington <carl@carlh.net> | 2009-06-14 13:44:26 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-06-14 13:44:26 +0000 |
commit | addaba4204255758b7290dc896d55cfa9b7946d5 (patch) | |
tree | eb62a382989184c026bb7245c1a1e583ae8f5afe /gtk2_ardour | |
parent | 478bab5380f586d3e022839a000a86c947a29f9c (diff) |
Add option to disable track record disarm when the transport is rolling (mantis #2658)
git-svn-id: svn://localhost/ardour2/branches/3.0@5187 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/rc_option_editor.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/route_ui.cc | 17 | ||||
-rw-r--r-- | gtk2_ardour/route_ui.h | 2 |
3 files changed, 27 insertions, 0 deletions
diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 8639b92f7c..4f96486ddc 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -996,6 +996,14 @@ RCOptionEditor::RCOptionEditor () mem_fun (*_rc_config, &RCConfiguration::set_secondary_clock_delta_edit_cursor) )); + add_option (_("Transport"), + new BoolOption ( + "disable-disarm-during-roll", + _("Disable record disarm when transport is rolling"), + mem_fun (*_rc_config, &RCConfiguration::get_disable_disarm_during_roll), + mem_fun (*_rc_config, &RCConfiguration::set_disable_disarm_during_roll) + )); + /* EDITOR */ add_option (_("Editor"), diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 7c0d908e6d..7926c9c468 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -128,6 +128,7 @@ RouteUI::init () UI::instance()->set_tip (show_sends_button, _("make mixer strips show sends to this bus"), ""); _session.SoloChanged.connect (mem_fun(*this, &RouteUI::solo_changed_so_update_mute)); + _session.TransportStateChange.connect (mem_fun (*this, &RouteUI::check_rec_enable_sensitivity)); } void @@ -482,6 +483,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev) _session.record_disenable_all (); } else { _session.record_enable_all (); + check_rec_enable_sensitivity (); } cmd->mark(); @@ -499,6 +501,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev) } else { reversibly_apply_track_boolean ("rec-enable change", &Track::set_record_enable, !track()->record_enabled(), this); + check_rec_enable_sensitivity (); } } @@ -1357,3 +1360,17 @@ RouteUI::save_as_template () _route->save_as_template (path.to_string(), name); } + +void +RouteUI::check_rec_enable_sensitivity () +{ + if (Config->get_disable_disarm_during_roll () == false) { + return; + } + + if (_session.transport_rolling() && rec_enable_button->get_active()) { + rec_enable_button->set_sensitive (false); + } else { + rec_enable_button->set_sensitive (true); + } +} diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h index fc6ef87f57..42a373ae7b 100644 --- a/gtk2_ardour/route_ui.h +++ b/gtk2_ardour/route_ui.h @@ -183,6 +183,8 @@ class RouteUI : public virtual AxisView void save_as_template (); protected: + void check_rec_enable_sensitivity (); + std::vector<sigc::connection> connections; std::string s_name; std::string m_name; |