diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 6c1191e90c..443b8d08a8 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -67,6 +67,7 @@ #include "actions.h" #include "meter_patterns.h" #include "meterbridge.h" +#include "keyeditor.h" #include "luawindow.h" #include "mixer_ui.h" #include "recorder_ui.h" @@ -277,6 +278,8 @@ ARDOUR_UI::install_actions () act = ActionManager::register_action (main_actions, X_("FlushWastebasket"), _("Flush Wastebasket"), sigc::mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::flush_trash)); + act = ActionManager::register_action (main_actions, X_("PrintKeyBindings"), _("Print Keyboard Shortcuts"), sigc::ptr_fun (&KeyEditor::print)); + ActionManager::write_sensitive_actions.push_back (act); ActionManager::session_sensitive_actions.push_back (act); diff --git a/gtk2_ardour/keyeditor.cc b/gtk2_ardour/keyeditor.cc index de45823469..66db610db9 100644 --- a/gtk2_ardour/keyeditor.cc +++ b/gtk2_ardour/keyeditor.cc @@ -128,7 +128,7 @@ KeyEditor::KeyEditor () print_button.add (print_label); print_label.set_markup (string_compose (" %1 ", _("Print Bindings (to your web browser)"))); - print_button.signal_clicked().connect (sigc::mem_fun (*this, &KeyEditor::print)); + print_button.signal_clicked().connect (sigc::ptr_fun (&KeyEditor::print)); reset_box.pack_start (reset_button, true, false); reset_box.pack_start (print_button, true, false); @@ -585,10 +585,10 @@ KeyEditor::search_string_updated (const std::string& filter) } void -KeyEditor::print () const +KeyEditor::print () { stringstream sstr; - Bindings::save_all_bindings_as_html (sstr); + Bindings::save_all_bindings_as_html (sstr, false); if (sstr.str().empty()) { return; diff --git a/gtk2_ardour/keyeditor.h b/gtk2_ardour/keyeditor.h index e7c3624b25..4335caa8cc 100644 --- a/gtk2_ardour/keyeditor.h +++ b/gtk2_ardour/keyeditor.h @@ -52,6 +52,8 @@ public: _refresh_connection.disconnect (); } + static void print (); + private: class Tab : public Gtk::VBox { @@ -131,7 +133,6 @@ private: Gtk::SortType sort_type; void toggle_sort_type (); void search_string_updated (const std::string&); - void print () const; sigc::connection _refresh_connection; };