summaryrefslogtreecommitdiff
path: root/libs/surfaces/launch_control_xl/gui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-08-24 16:53:06 +0200
committerRobin Gareus <robin@gareus.org>2018-08-24 16:55:00 +0200
commit3136b20847ea2e2e12f707bdc82fa336f85f4801 (patch)
tree08c54a63b074f3f853227f9985dc9cf031690c8b /libs/surfaces/launch_control_xl/gui.cc
parentc46cd91d0eca0e060d3efed5162c8a5205567274 (diff)
Cleanup various design patterns.
* do not use implicit bool-to-int-cast * avoid C++11 member initialization in header * always use set and access methods, remove public variable
Diffstat (limited to 'libs/surfaces/launch_control_xl/gui.cc')
-rw-r--r--libs/surfaces/launch_control_xl/gui.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/surfaces/launch_control_xl/gui.cc b/libs/surfaces/launch_control_xl/gui.cc
index b4b5f95d36..ad12b9a6b6 100644
--- a/libs/surfaces/launch_control_xl/gui.cc
+++ b/libs/surfaces/launch_control_xl/gui.cc
@@ -134,7 +134,7 @@ LCXLGUI::LCXLGUI (LaunchControlXL& p)
align->set (0.0, 0.5);
align->add (fader8master_button);
table.attach (*align, 1, 2, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0),0,0);
- fader8master_button.set_active(lcxl.use_fader8master);
+ fader8master_button.set_active (lcxl.fader8master());
fader8master_button.signal_toggled().connect (sigc::mem_fun (*this, &LCXLGUI::toggle_fader8master));
row++;
@@ -285,8 +285,7 @@ LCXLGUI::active_port_changed (Gtk::ComboBox* combo, bool for_input)
void
LCXLGUI::toggle_fader8master ()
{
- DEBUG_TRACE(DEBUG::LaunchControlXL, string_compose("use_fader8master WAS: %1\n", lcxl.use_fader8master));
- lcxl.use_fader8master = !(lcxl.use_fader8master);
- DEBUG_TRACE(DEBUG::LaunchControlXL, string_compose("use_fader8master IS: %1\n", lcxl.use_fader8master));
- lcxl.set_fader8master(lcxl.use_fader8master);
+ DEBUG_TRACE(DEBUG::LaunchControlXL, string_compose("use_fader8master WAS: %1\n", lcxl.fader8master()));
+ lcxl.set_fader8master (!lcxl.fader8master());
+ DEBUG_TRACE(DEBUG::LaunchControlXL, string_compose("use_fader8master IS: %1\n", lcxl.fader8master()));
}