summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-09-01 15:46:48 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-02-22 15:31:24 -0500
commitae88abff333f9fac9f03e7247556b4a3251c2278 (patch)
treefd885ead93224e91f03d42390b69e9529f2f440b /gtk2_ardour
parentb944532f67572001c040bf1db7918658d8dbc926 (diff)
use newer API to show all actions and bindings with -b
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour_ui.cc37
1 files changed, 14 insertions, 23 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 6e6afbb758..6782442708 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -592,33 +592,24 @@ ARDOUR_UI::post_engine ()
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) {
-
- Bindings* bindings = (*map)->bindings();
-
- ActionMap::Actions actions;
-
- (*map)->get_actions (actions);
+ vector<string> paths;
+ vector<string> labels;
+ vector<string> tooltips;
+ vector<string> keys;
+ vector<Glib::RefPtr<Gtk::Action> > actions;
+
+ Gtkmm2ext::ActionMap::get_all_actions (paths, labels, tooltips, keys, actions);
- for (ActionMap::Actions::const_iterator act = actions.begin(); act != actions.end(); ++act) {
+ vector<string>::iterator k;
+ vector<string>::iterator p;
- if (bindings) {
+ for (p = paths.begin(), k = keys.begin(); p != paths.end(); ++k, ++p) {
- 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 {
- cout << Bindings::ardour_action_name (*act) << " => " << key.display_label() << endl;
- }
- } else {
- cout << Bindings::ardour_action_name (*act) << endl;
- }
+ if ((*k).empty()) {
+ cout << *p << endl;
+ } else {
+ cout << *p << " => " << *k << endl;
}
}