From d1e869f96d69072e2e441427e3c6f70d22b72ddd Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 28 Dec 2016 22:59:15 +0100 Subject: Move "Feedback" option to control-portocol settings --- libs/surfaces/generic_midi/gmcp_gui.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'libs/surfaces/generic_midi') diff --git a/libs/surfaces/generic_midi/gmcp_gui.cc b/libs/surfaces/generic_midi/gmcp_gui.cc index 3c2479b622..1fb83a111f 100644 --- a/libs/surfaces/generic_midi/gmcp_gui.cc +++ b/libs/surfaces/generic_midi/gmcp_gui.cc @@ -54,6 +54,7 @@ private: Gtk::ComboBoxText map_combo; Gtk::Adjustment bank_adjustment; Gtk::SpinButton bank_spinner; + Gtk::CheckButton feedback_enable; Gtk::CheckButton motorised_button; Gtk::Adjustment threshold_adjustment; Gtk::SpinButton threshold_spinner; @@ -65,6 +66,7 @@ private: void bank_changed (); void motorised_changed (); void threshold_changed (); + void toggle_feedback_enable (); void update_port_combos (); PBD::ScopedConnection connection_change_connection; @@ -128,7 +130,8 @@ GMCPGUI::GMCPGUI (GenericMidiControlProtocol& p) : cp (p) , bank_adjustment (1, 1, 100, 1, 10) , bank_spinner (bank_adjustment) - , motorised_button ("Motorised") + , feedback_enable (_("Enable Feedback")) + , motorised_button (_("Motorised")) , threshold_adjustment (p.threshold(), 1, 127, 1, 10) , threshold_spinner (threshold_adjustment) , ignore_active_change (false) @@ -202,6 +205,12 @@ GMCPGUI::GMCPGUI (GenericMidiControlProtocol& p) bank_spinner.show (); label->show (); + feedback_enable.signal_toggled().connect (sigc::mem_fun (*this, &GMCPGUI::toggle_feedback_enable)); + table->attach (feedback_enable, 0, 2, n, n + 1); + ++n; + feedback_enable.show (); + feedback_enable.set_active (p.get_feedback ()); + motorised_button.signal_toggled().connect (sigc::mem_fun (*this, &GMCPGUI::motorised_changed)); table->attach (motorised_button, 0, 2, n, n + 1); ++n; @@ -266,6 +275,12 @@ GMCPGUI::binding_changed () } } +void +GMCPGUI::toggle_feedback_enable () +{ + cp.set_feedback (feedback_enable.get_active ()); +} + void GMCPGUI::motorised_changed () { -- cgit v1.2.3