summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-02-01 12:22:01 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2016-02-01 12:22:01 -0500
commitca813315bfc3536b42ceb7075c8e7eb4727ac678 (patch)
tree4bac47c5507bbc106251c740cbc0a064cd5cd0cf
parent5eccbbfbd6d27941c7543cfd597fe9f52a3dcaad (diff)
mackie: add new bindings for Save,Undo,Cancel,Enter
these now control punch in, punch out, external sync and follow edits, respectively
-rw-r--r--libs/surfaces/mackie/mackie_control_protocol.cc16
-rw-r--r--libs/surfaces/mackie/mcp_buttons.cc17
2 files changed, 21 insertions, 12 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc
index 29af02fa82..a96e032fbc 100644
--- a/libs/surfaces/mackie/mackie_control_protocol.cc
+++ b/libs/surfaces/mackie/mackie_control_protocol.cc
@@ -1192,13 +1192,21 @@ MackieControlProtocol::update_timecode_display()
void MackieControlProtocol::notify_parameter_changed (std::string const & p)
{
if (p == "punch-in") {
- // no such button right now
- // update_global_button (Button::PunchIn, session->config.get_punch_in());
+ update_global_button (Button::Save, session->config.get_punch_in() ? flashing : off);
} else if (p == "punch-out") {
- // no such button right now
- // update_global_button (Button::PunchOut, session->config.get_punch_out());
+ update_global_button (Button::Undo, session->config.get_punch_out() ? flashing : off);
} else if (p == "clicking") {
update_global_button (Button::Click, Config->get_clicking());
+ } else if (p == "follow-edits") {
+ /* we can't respond to this at present, because "follow-edits"
+ * is a property of the (G)UI configuration object, to which we
+ * have no access. For now, this means that the lit state of
+ * this button (if there is one) won't reflect the setting.
+ */
+
+ //update_global_button (Button::Enter, session->config.get_follow_edits() ? on : off);
+ } else if (p == "external-sync") {
+ update_global_button (Button::Cancel, session->config.get_external_sync() ? on : off);
} else {
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("parameter changed: %1\n", p));
}
diff --git a/libs/surfaces/mackie/mcp_buttons.cc b/libs/surfaces/mackie/mcp_buttons.cc
index ff1b85874f..2c385ccae4 100644
--- a/libs/surfaces/mackie/mcp_buttons.cc
+++ b/libs/surfaces/mackie/mcp_buttons.cc
@@ -372,14 +372,14 @@ MackieControlProtocol::drop_release (Button &)
LedState
MackieControlProtocol::save_press (Button &)
{
- session->save_state ("");
- return on;
+ toggle_punch_in ();
+ return none;
}
LedState
MackieControlProtocol::save_release (Button &)
{
- return off;
+ return none;
}
LedState
@@ -573,14 +573,14 @@ MackieControlProtocol::clicking_release (Button &)
LedState
MackieControlProtocol::enter_press (Button &)
{
- Enter(); /* EMIT SIGNAL */
- return off;
+ access_action ("Transport/ToggleFollowEdits");
+ return none;
}
LedState
MackieControlProtocol::enter_release (Button &)
{
- return off;
+ return none;
}
LedState
@@ -773,12 +773,13 @@ MackieControlProtocol::touch_release (Button &)
LedState
MackieControlProtocol::cancel_press (Button &)
{
- return off;
+ access_action ("Transport/ToggleExternalSync");
+ return none;
}
LedState
MackieControlProtocol::cancel_release (Button &)
{
- return off;
+ return none;
}
LedState
MackieControlProtocol::user_a_press (Button &)