X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fgtkmm2ext%2Fbindings.cc;h=11b55932a4d1336f13c5b05f05bff4173a53646b;hb=c05cfe332868c1aca477aedcecdfb78948e6d559;hp=2b1762da9088eba86aec456ee9a72299d2e4c2d8;hpb=545f5bee87062c33ce5aa7bb0fecfbdd1cb1a83b;p=ardour.git
diff --git a/libs/gtkmm2ext/bindings.cc b/libs/gtkmm2ext/bindings.cc
index 2b1762da90..11b55932a4 100644
--- a/libs/gtkmm2ext/bindings.cc
+++ b/libs/gtkmm2ext/bindings.cc
@@ -730,16 +730,16 @@ Bindings::save (XMLNode& root)
}
child = new XMLNode (X_("Binding"));
- child->add_property (X_("key"), k->first.name());
- child->add_property (X_("action"), k->second.action_name);
+ child->set_property (X_("key"), k->first.name());
+ child->set_property (X_("action"), k->second.action_name);
presses->add_child_nocopy (*child);
}
for (MouseButtonBindingMap::iterator k = button_press_bindings.begin(); k != button_press_bindings.end(); ++k) {
XMLNode* child;
child = new XMLNode (X_("Binding"));
- child->add_property (X_("button"), k->first.name());
- child->add_property (X_("action"), k->second.action_name);
+ child->set_property (X_("button"), k->first.name());
+ child->set_property (X_("action"), k->second.action_name);
presses->add_child_nocopy (*child);
}
@@ -753,16 +753,16 @@ Bindings::save (XMLNode& root)
}
child = new XMLNode (X_("Binding"));
- child->add_property (X_("key"), k->first.name());
- child->add_property (X_("action"), k->second.action_name);
+ child->set_property (X_("key"), k->first.name());
+ child->set_property (X_("action"), k->second.action_name);
releases->add_child_nocopy (*child);
}
for (MouseButtonBindingMap::iterator k = button_release_bindings.begin(); k != button_release_bindings.end(); ++k) {
XMLNode* child;
child = new XMLNode (X_("Binding"));
- child->add_property (X_("button"), k->first.name());
- child->add_property (X_("action"), k->second.action_name);
+ child->set_property (X_("button"), k->first.name());
+ child->set_property (X_("action"), k->second.action_name);
releases->add_child_nocopy (*child);
}
@@ -782,60 +782,95 @@ Bindings::save_all_bindings_as_html (ostream& ostr)
ostr << PROGRAM_NAME;
ostr << "\n";
-
- ostr << "\n";
-
ostr << "\n
\n";
- ostr << "\n";
+ ostr << "
\n\n";
+ ostr << "\n\n";
+
+ /* first column: separate by group */
+ ostr << "\n\n";
+ for (list::const_iterator b = bindings.begin(); b != bindings.end(); ++b) {
+ (*b)->save_as_html (ostr, true);
+ }
+ ostr << " | \n\n";
+ //second column
+ ostr << "\n\n";
for (list::const_iterator b = bindings.begin(); b != bindings.end(); ++b) {
- (*b)->save_as_html (ostr);
+ (*b)->save_as_html (ostr, false);
+ }
+ ostr << " | \n\n";
+
+
+ ostr << "
\n\n";
+ ostr << "
\n\n";
+
+ ostr << "\n\n";
+ ostr << "
\n\n";
+ ostr << "\n\n";
+ ostr << "\n\n";
+ ostr << " Partial List of Available Actions { => with current shortcut, where applicable } \n\n";
+ {
+ vector paths;
+ vector labels;
+ vector tooltips;
+ vector keys;
+ vector > actions;
+
+ 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(), l = labels.begin(); p != paths.end(); ++k, ++p, ++l) {
+
+ string print_path = *p;
+ /* strip / from the start */
+ print_path = print_path.substr (10);
+
+ if ((*k).empty()) {
+ ostr << print_path << " ( " << *l << " ) " << "" << endl;
+ } else {
+ ostr << print_path << " ( " << *l << " ) " << " => " << *k << "" << endl;
+ }
+ }
}
+ ostr << " | \n\n";
+ ostr << "
\n\n";
+ ostr << "
\n\n";
- ostr << "
\n";
ostr << "\n";
ostr << "