Add option to skip printing action list

This commit is contained in:
Robin Gareus
2026-01-08 16:55:13 +01:00
parent c86bb05945
commit 0be808ec3c
2 changed files with 7 additions and 2 deletions

View File

@@ -854,7 +854,7 @@ Bindings::save (XMLNode& root)
}
void
Bindings::save_all_bindings_as_html (ostream& ostr)
Bindings::save_all_bindings_as_html (ostream& ostr, bool include_action_list)
{
if (bindings.empty()) {
return;
@@ -896,6 +896,10 @@ Bindings::save_all_bindings_as_html (ostream& ostr)
ostr << "</tr>\n\n";
ostr << "</tbody></table>\n\n";
if (!include_action_list) {
goto out;
}
ostr << "<br/>\n\n";
ostr << "<div style=\"page-break-before: always;\"></div>\n\n";
ostr << "<table border=\"2\" cellpadding=\"6\"><tbody>\n\n";
@@ -928,6 +932,7 @@ Bindings::save_all_bindings_as_html (ostream& ostr)
ostr << "</tr>\n\n";
ostr << "</tbody></table>\n\n";
out:
ostr << "</body>\n";
ostr << "</html>\n";
}

View File

@@ -165,7 +165,7 @@ class LIBGTKMM2EXT_API Bindings {
static std::list<Bindings*> bindings;
static Bindings* get_bindings (std::string const & name);
static void associate_all ();
static void save_all_bindings_as_html (std::ostream&);
static void save_all_bindings_as_html (std::ostream&, bool include_action_list = true);
static PBD::Signal<void(Bindings*)> BindingsChanged;