if (press) {
if ((x = on_press.find (bs)) == on_press.end()) {
+ DEBUG_TRACE (DEBUG::FaderPort, string_compose ("no press action for button %1 state %2%3\%4\n", id, hex, bs, dec));
return;
}
} else {
- if ((x = on_press.find (bs)) == on_release.end()) {
+ if ((x = on_release.find (bs)) == on_release.end()) {
+ DEBUG_TRACE (DEBUG::FaderPort, string_compose ("no release action for button %1 state %2%3\%4\n", id, hex, bs, dec));
return;
}
}
if (name.empty()) {
on_press.erase (bs);
} else {
+ cerr << "Set button press " << id << " to action " << name << " state " << hex << bs << dec << endl;
todo.action_name = name;
on_press[bs] = todo;
}
if (name.empty()) {
on_release.erase (bs);
} else {
+ cerr << "Set button rel " << id << " to action " << name << " state " << hex << bs << dec << endl;
todo.action_name = name;
on_release[bs] = todo;
}
}
void
-FPGUI::action_changed (Gtk::ComboBox* cb, FaderPort::ButtonID id)
+FPGUI::action_changed (Gtk::ComboBox* cb, FaderPort::ButtonID id, FaderPort::ButtonState bs)
{
TreeModel::const_iterator row = cb->get_active ();
string action_path = (*row)[action_columns.path];
- fp.set_action (id, action_path, true);
+ /* release binding */
+ cerr << "Reset release for " << id << " to " << action_path << " bs = " << hex << bs << dec << endl;
+ fp.set_action (id, action_path, false, bs);
}
void
cb.set_active (active_row);
}
- cb.signal_changed().connect (sigc::bind (sigc::mem_fun (*this, &FPGUI::action_changed), &cb, id));
+ cb.signal_changed().connect (sigc::bind (sigc::mem_fun (*this, &FPGUI::action_changed), &cb, id, bs));
}
void
vector<pair<string,string> > actions;
actions.push_back (make_pair (string("Toggle Meterbridge"), string(X_("Common/toggle-meterbridge"))));
+ actions.push_back (make_pair (string("Toggle Summary"), string(X_("Editor/ToggleSummary"))));
+ actions.push_back (make_pair (string("Toggle Editor Lists"), string(X_("Editor/show-editor-list"))));
+ actions.push_back (make_pair (string (_("Zoom to Session")), string (X_("Editor/zoom-to-session"))));
+ 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);
}
vector<pair<string,string> > actions;
actions.push_back (make_pair (string("Toggle Locations"), string(X_("Window/toggle-locations"))));
+ actions.push_back (make_pair (string("Toggle Metronome"), string(X_("Transport/ToggleClick"))));
+ actions.push_back (make_pair (string("Toggle Sync"), string(X_("Transport/ToggleExternalSync"))));
+ actions.push_back (make_pair (string("Set Playhead @pointer"), string(X_("Editor/set-playhead"))));
build_action_combo (cb, actions, FaderPort::Trns, bs);
}