summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui.cc
diff options
context:
space:
mode:
authorLen Ovens <len@ovenwerks.net>2017-04-21 12:58:59 -0700
committerLen Ovens <len@ovenwerks.net>2017-04-21 12:58:59 -0700
commit5d5642d6ec22213b0b944936328a0ae005bf577c (patch)
tree9db4815779cc35df1790d05f6f3d5131e3dd3fd6 /gtk2_ardour/ardour_ui.cc
parent2012dc25530e787083863dfe69b34990fad52e0a (diff)
Add HTML output for -b so that output can replace actions page in manual.
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r--gtk2_ardour/ardour_ui.cc25
1 files 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<string> keys;
vector<Glib::RefPtr<Gtk::Action> > actions;
+ cout << "\n<h2>Menu actions</h2>" << endl;
+ cout << "<!-- created by running ardour -b -->" << endl;
+ cout << "<p>\n Every single menu item in Ardour's GUI is accessible by control" << endl;
+ cout << " surfaces or scripts.\n</p>\n" << endl;
+ cout << "<p>\n The list below shows all available values of <em>action-name</em> 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</p>\n" << endl;
+ cout << "<table class=\"dl\">\n <thead>" << endl;
+ cout << " <tr><th>Action Name</th><th>Menu Name</th><th>Key Binding</th></tr>" << endl;
+ cout << " </thead>\n <tbody>" << endl;
+
Gtkmm2ext::ActionMap::get_all_actions (paths, labels, tooltips, keys, actions);
vector<string>::iterator k;
vector<string>::iterator p;
+ vector<string>::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 << " <tr><th><kbd class=\"osc\">" << (*p).substr (9, string::npos);
+ cout << "</kbd></th><td>" << *l << "</td>";
+ cout << "<td>" << *k << "</td></tr>" << endl;
}
+ cout << " </tbody>\n </table class=\"dl\">" << endl;
halt_connection.disconnect ();
AudioEngine::instance()->stop ();