Add action to print keyboard shortcuts
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ KeyEditor::KeyEditor ()
|
||||
print_button.add (print_label);
|
||||
print_label.set_markup (string_compose (" <span size=\"large\" weight=\"bold\">%1</span> ", _("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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user