mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
use newer API to show all actions and bindings with -b
This commit is contained in:
parent
b944532f67
commit
ae88abff33
1 changed files with 14 additions and 23 deletions
|
|
@ -592,33 +592,24 @@ ARDOUR_UI::post_engine ()
|
||||||
|
|
||||||
if (ARDOUR_COMMAND_LINE::show_key_actions) {
|
if (ARDOUR_COMMAND_LINE::show_key_actions) {
|
||||||
|
|
||||||
cerr << "Dump actions from " << ActionMap::action_maps.size() << " action maps\n";
|
|
||||||
|
|
||||||
for (list<ActionMap*>::const_iterator map = ActionMap::action_maps.begin(); map != ActionMap::action_maps.end(); ++map) {
|
vector<string> paths;
|
||||||
|
vector<string> labels;
|
||||||
|
vector<string> tooltips;
|
||||||
|
vector<string> keys;
|
||||||
|
vector<Glib::RefPtr<Gtk::Action> > actions;
|
||||||
|
|
||||||
Bindings* bindings = (*map)->bindings();
|
Gtkmm2ext::ActionMap::get_all_actions (paths, labels, tooltips, keys, actions);
|
||||||
|
|
||||||
ActionMap::Actions actions;
|
vector<string>::iterator k;
|
||||||
|
vector<string>::iterator p;
|
||||||
|
|
||||||
(*map)->get_actions (actions);
|
for (p = paths.begin(), k = keys.begin(); p != paths.end(); ++k, ++p) {
|
||||||
|
|
||||||
for (ActionMap::Actions::const_iterator act = actions.begin(); act != actions.end(); ++act) {
|
if ((*k).empty()) {
|
||||||
|
cout << *p << endl;
|
||||||
if (bindings) {
|
|
||||||
|
|
||||||
KeyboardKey key;
|
|
||||||
Bindings::Operation op;
|
|
||||||
|
|
||||||
key = bindings->get_binding_for_action (*act, op);
|
|
||||||
|
|
||||||
if (key == KeyboardKey::null_key()) {
|
|
||||||
cout << Bindings::ardour_action_name (*act) << endl;
|
|
||||||
} else {
|
} else {
|
||||||
cout << Bindings::ardour_action_name (*act) << " => " << key.display_label() << endl;
|
cout << *p << " => " << *k << endl;
|
||||||
}
|
|
||||||
} else {
|
|
||||||
cout << Bindings::ardour_action_name (*act) << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue