diff options
Diffstat (limited to 'libs/surfaces/mackie/mcp_buttons.cc')
-rw-r--r-- | libs/surfaces/mackie/mcp_buttons.cc | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/libs/surfaces/mackie/mcp_buttons.cc b/libs/surfaces/mackie/mcp_buttons.cc index c1cd673931..ff1b85874f 100644 --- a/libs/surfaces/mackie/mcp_buttons.cc +++ b/libs/surfaces/mackie/mcp_buttons.cc @@ -60,7 +60,7 @@ LedState MackieControlProtocol::option_press (Button &) { _modifier_state |= MODIFIER_OPTION; - gui_invoke ("Editor/set-loop-from-edit-range"); + access_action ("Editor/set-loop-from-edit-range"); return on; } LedState @@ -74,7 +74,7 @@ MackieControlProtocol::control_press (Button &) { _modifier_state |= MODIFIER_CONTROL; DEBUG_TRACE (DEBUG::MackieControl, string_compose ("CONTROL Press: modifier state now set to %1\n", _modifier_state)); - gui_invoke ("Editor/set-punch-from-edit-range"); + access_action ("Editor/set-punch-from-edit-range"); return on; } LedState @@ -88,7 +88,7 @@ LedState MackieControlProtocol::cmd_alt_press (Button &) { _modifier_state |= MODIFIER_CMDALT; - gui_invoke ("Editor/set-session-from-edit-range"); + access_action ("Editor/set-session-from-edit-range"); return on; } LedState @@ -346,26 +346,21 @@ MackieControlProtocol::scrub_release (Mackie::Button &) LedState MackieControlProtocol::undo_press (Button&) { - if (main_modifier_state() & MODIFIER_SHIFT) { - Redo(); /* EMIT SIGNAL */ - } else { - Undo(); /* EMIT SIGNAL */ - } - return off; + toggle_punch_out (); + return none; } LedState MackieControlProtocol::undo_release (Button&) { - return off; + return none; } LedState MackieControlProtocol::drop_press (Button &) { - gui_invoke ("Editor/start-range-from-playhead"); - update_global_button (Button::Replace, flashing); - return on; + access_action ("Editor/start-range-from-playhead"); + return none; } LedState @@ -511,7 +506,7 @@ MackieControlProtocol::rewind_press (Button &) if (modifier_state() & MODIFIER_MARKER) { prev_marker (); } else if (modifier_state() & MODIFIER_NUDGE) { - gui_invoke ("Editor/nudge-playhead-backward"); + access_action ("Editor/nudge-playhead-backward"); } else if (main_modifier_state() == MODIFIER_SHIFT) { goto_start (); } else { @@ -532,7 +527,7 @@ MackieControlProtocol::ffwd_press (Button &) if (modifier_state() & MODIFIER_MARKER) { next_marker (); } else if (modifier_state() & MODIFIER_NUDGE) { - gui_invoke ("Editor/nudge-playhead-forward"); + access_action ("Editor/nudge-playhead-forward"); } else if (main_modifier_state() == MODIFIER_SHIFT) { goto_end(); } else { @@ -1045,9 +1040,9 @@ MackieControlProtocol::nudge_release (Mackie::Button&) */ if (main_modifier_state() & MODIFIER_SHIFT) { - gui_invoke ("Region/nudge-backward"); + access_action ("Region/nudge-backward"); } else { - gui_invoke ("Region/nudge-forward"); + access_action ("Region/nudge-forward"); } return off; @@ -1055,8 +1050,7 @@ MackieControlProtocol::nudge_release (Mackie::Button&) Mackie::LedState MackieControlProtocol::replace_press (Mackie::Button&) { - gui_invoke ("Editor/finish-range-from-playhead"); - update_global_button (Button::Drop, off); + access_action ("Editor/finish-range-from-playhead"); return off; } Mackie::LedState |