From 5d5642d6ec22213b0b944936328a0ae005bf577c Mon Sep 17 00:00:00 2001 From: Len Ovens Date: Fri, 21 Apr 2017 12:58:59 -0700 Subject: [PATCH] Add HTML output for -b so that output can replace actions page in manual. --- gtk2_ardour/ardour_ui.cc | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index db7d714d76..e39967d670 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -95,6 +95,7 @@ #include "ardour/profile.h" #include "ardour/recent_sessions.h" #include "ardour/record_enable_control.h" +#include "ardour/revision.h" #include "ardour/session_directory.h" #include "ardour/session_route.h" #include "ardour/session_state_utils.h" @@ -695,19 +696,29 @@ ARDOUR_UI::post_engine () vector keys; vector > actions; + cout << "\n

Menu actions

" << endl; + cout << "" << endl; + cout << "

\n Every single menu item in Ardour's GUI is accessible by control" << endl; + cout << " surfaces or scripts.\n

\n" << endl; + cout << "

\n The list below shows all available values of action-name as of" << endl; + cout << "Ardour " << revision << ". You can get the current list at any" << endl; + cout << " time by running Ardour with the -b flag.\n

\n" << endl; + cout << "\n " << endl; + cout << " " << endl; + cout << " \n " << endl; + Gtkmm2ext::ActionMap::get_all_actions (paths, labels, tooltips, keys, actions); vector::iterator k; vector::iterator p; + vector::iterator l; - for (p = paths.begin(), k = keys.begin(); p != paths.end(); ++k, ++p) { - - if ((*k).empty()) { - cout << *p << endl; - } else { - cout << *p << " => " << *k << endl; - } + for (p = paths.begin(), k = keys.begin(), l = labels.begin(); p != paths.end(); ++k, ++p, ++l) { + cout << " "; + cout << "" << endl; } + cout << " \n
Action NameMenu NameKey Binding
" << (*p).substr (9, string::npos); + cout << "" << *l << "" << *k << "
" << endl; halt_connection.disconnect (); AudioEngine::instance()->stop ();