summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/ardour_ui2.cc')
-rw-r--r--gtk2_ardour/ardour_ui2.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc
index 70ff8f7c39..e7306bea00 100644
--- a/gtk2_ardour/ardour_ui2.cc
+++ b/gtk2_ardour/ardour_ui2.cc
@@ -811,6 +811,14 @@ ARDOUR_UI::set_transport_sensitivity (bool yn)
}
void
+ARDOUR_UI::set_punch_sensitivity ()
+{
+ bool can_punch = _session && _session->punch_is_possible() && _session->locations()->auto_punch_location ();
+ ActionManager::get_action ("Transport", "TogglePunchIn")->set_sensitive (can_punch);
+ ActionManager::get_action ("Transport", "TogglePunchOut")->set_sensitive (can_punch);
+}
+
+void
ARDOUR_UI::editor_realized ()
{
boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));