diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-25 14:48:21 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-01-25 15:11:36 -0500 |
commit | b02b6cc3cd3033c681feaa63f0d5292bce78f68d (patch) | |
tree | f2215e99ce754975ac6c8c40083399ad7787cb18 /libs/surfaces/faderport/gui.cc | |
parent | 5b7fa0b3c5ad04a08dccf7c0f544be3064a3f3c0 (diff) |
faderport: add footswitch combos to GUI to allow user control over what the switch does
Diffstat (limited to 'libs/surfaces/faderport/gui.cc')
-rw-r--r-- | libs/surfaces/faderport/gui.cc | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/libs/surfaces/faderport/gui.cc b/libs/surfaces/faderport/gui.cc index 702ba26dc6..acd4d3ee5d 100644 --- a/libs/surfaces/faderport/gui.cc +++ b/libs/surfaces/faderport/gui.cc @@ -80,7 +80,7 @@ FaderPort::build_gui () FPGUI::FPGUI (FaderPort& p) : fp (p) , table (2, 5) - , action_table (4, 4) + , action_table (5, 4) , ignore_active_change (false) { set_border_width (12); @@ -138,6 +138,10 @@ FPGUI::FPGUI (FaderPort& p) build_available_action_menu (); + build_foot_action_combo (foot_combo[0], FaderPort::ButtonState(0)); + build_foot_action_combo (foot_combo[1], FaderPort::ShiftDown); + build_foot_action_combo (foot_combo[2], FaderPort::LongPress); + /* No shift-press combo for User because that is labelled as "next" * (marker) */ @@ -235,6 +239,24 @@ FPGUI::FPGUI (FaderPort& p) action_table.attach (*align, 3, 4, action_row, action_row+1, AttachOptions(FILL|EXPAND), AttachOptions (0)); action_row++; + l = manage (new Gtk::Label); + l->set_markup (string_compose ("<span weight=\"bold\">%1</span>", _("Footswitch"))); + l->set_alignment (1.0, 0.5); + action_table.attach (*l, 0, 1, action_row, action_row+1, AttachOptions(FILL|EXPAND), AttachOptions (0)); + align = manage (new Alignment); + align->set (0.0, 0.5); + align->add (foot_combo[0]); + action_table.attach (*align, 1, 2, action_row, action_row+1, AttachOptions(FILL|EXPAND), AttachOptions (0)); + align = manage (new Alignment); + align->set (0.0, 0.5); + align->add (foot_combo[1]); + action_table.attach (*align, 2, 3, action_row, action_row+1, AttachOptions(FILL|EXPAND), AttachOptions (0)); + align = manage (new Alignment); + align->set (0.0, 0.5); + align->add (foot_combo[2]); + action_table.attach (*align, 3, 4, action_row, action_row+1, AttachOptions(FILL|EXPAND), AttachOptions (0)); + action_row++; + table.attach (action_table, 0, 5, row, row+1, AttachOptions(FILL|EXPAND), AttachOptions (0)); row++; @@ -536,6 +558,20 @@ FPGUI::build_trns_action_combo (Gtk::ComboBox& cb, FaderPort::ButtonState bs) build_action_combo (cb, actions, FaderPort::Trns, bs); } +void +FPGUI::build_foot_action_combo (Gtk::ComboBox& cb, FaderPort::ButtonState bs) +{ + vector<pair<string,string> > actions; + + actions.push_back (make_pair (string("Toggle Roll"), string(X_("Transport/ToggleRoll")))); + actions.push_back (make_pair (string("Toggle Rec-Enable"), string(X_("Transport/Record")))); + +// actions.push_back (make_pair (string (_("Zoom In")), string (X_("Editor/temporal-zoom-in")))); +// actions.push_back (make_pair (string (_("Zoom Out")), string (X_("Editor/temporal-zoom-out")))); + + build_action_combo (cb, actions, FaderPort::Proj, bs); +} + bool FPGUI::find_action_in_model (const TreeModel::iterator& iter, std::string const & action_path, TreeModel::iterator* found) { |