Button::AudioInstruments should not be lit without good reason.
[ardour.git] / libs / surfaces / mackie / mcp_buttons.cc
index d6040601a1e8a54285eeddae46e6b19c4f708702..6652516cf93ad4bba5906453c5088d93ba8a1e73 100644 (file)
@@ -108,9 +108,9 @@ MackieControlProtocol::left_press (Button &)
        DEBUG_TRACE (DEBUG::MackieControl, string_compose ("bank left with current initial = %1 nstrips = %2 tracks/busses = %3\n",
                                                           _current_initial_bank, strip_cnt, sorted.size()));
        if (_current_initial_bank > 0) {
-               switch_banks ((_current_initial_bank - 1) / strip_cnt * strip_cnt);
+               (void) switch_banks ((_current_initial_bank - 1) / strip_cnt * strip_cnt);
        } else {
-               switch_banks (0);
+               (void) switch_banks (0);
        }
 
 
@@ -120,7 +120,7 @@ MackieControlProtocol::left_press (Button &)
 LedState
 MackieControlProtocol::left_release (Button &)
 {
-       return off;
+       return none;
 }
 
 LedState
@@ -141,23 +141,16 @@ MackieControlProtocol::right_press (Button &)
 
        if (_current_initial_bank < max_bank) {
                uint32_t new_initial = (_current_initial_bank / strip_cnt * strip_cnt) + strip_cnt;
-
-               switch_banks (new_initial);
-       } else {
-               switch_banks (max_bank);
+               (void) switch_banks (new_initial);
        }
 
-       return on;
+       return none;
 }
 
 LedState
 MackieControlProtocol::right_release (Button &)
 {
-       if (zoom_mode()) {
-
-       }
-
-       return off;
+       return none;
 }
 
 LedState
@@ -581,7 +574,7 @@ MackieControlProtocol::bank_release (Button& b, uint32_t basic_bank_num)
                bank_num = 8 + basic_bank_num;
        }
 
-       switch_banks (n_strips() * bank_num);
+       (void) switch_banks (n_strips() * bank_num);
 
        return on;
 }
@@ -689,20 +682,16 @@ MackieControlProtocol::plugin_press (Button &)
 LedState
 MackieControlProtocol::plugin_release (Button &)
 {
-       set_view_mode (Plugins);
+       // Do not do this yet, since it does nothing
+       // set_view_mode (Plugins);
        return none; /* LED state set by set_view_mode */
 }
 LedState
 MackieControlProtocol::eq_press (Button &)
 {
-       if (Profile->get_mixbus()) {
-               boost::shared_ptr<Route> r = first_selected_route ();
-               if (r && r->eq_band_cnt() > 0) {
-                       set_subview_mode (EQ, r);
-                       return none; /* led state handled by set_subview_mode() */
-               }
-       }
-       return none;
+       boost::shared_ptr<Route> r = first_selected_route ();
+       set_subview_mode (EQ, r);
+       return none; /* led state handled by set_subview_mode() */
 
 }
 LedState
@@ -713,16 +702,9 @@ MackieControlProtocol::eq_release (Button &)
 LedState
 MackieControlProtocol::dyn_press (Button &)
 {
-       if (Profile->get_mixbus()) {
-               boost::shared_ptr<Route> r = first_selected_route ();
-
-               if (r) {
-                       set_subview_mode (Dynamics, r);
-                       return none; /* led state handled by set_subview_mode() */
-               }
-       }
-
-       return none;
+       boost::shared_ptr<Route> r = first_selected_route ();
+       set_subview_mode (Dynamics, r);
+       return none; /* led state handled by set_subview_mode() */
 }
 
 LedState
@@ -878,8 +860,9 @@ MackieControlProtocol::track_release (Mackie::Button&)
 Mackie::LedState
 MackieControlProtocol::send_press (Mackie::Button&)
 {
-       /* XXX to come */
-       return none;
+       boost::shared_ptr<Route> r = first_selected_route ();
+       set_subview_mode (Sends, r);
+       return none; /* led state handled by set_subview_mode() */
 }
 Mackie::LedState
 MackieControlProtocol::send_release (Mackie::Button&)
@@ -921,13 +904,13 @@ MackieControlProtocol::audiotracks_release (Mackie::Button&)
 Mackie::LedState
 MackieControlProtocol::audioinstruments_press (Mackie::Button& b)
 {
-       return dyn_press (b);
+       return none;
 }
 
 Mackie::LedState
 MackieControlProtocol::audioinstruments_release (Mackie::Button& b)
 {
-       return dyn_release (b);
+       return none;
 
 }
 Mackie::LedState