From 301000c94e4b0e11ef4f9aab24c14f3a45a1eb7c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 2 Jun 2016 14:46:22 -0400 Subject: [PATCH] make new action to bind BackSpace to in processors box --- gtk2_ardour/processor_box.bindings | 1 + gtk2_ardour/processor_box.cc | 5 +++++ gtk2_ardour/processor_box.h | 1 + 3 files changed, 7 insertions(+) diff --git a/gtk2_ardour/processor_box.bindings b/gtk2_ardour/processor_box.bindings index 1a43d9067e..eb644576fe 100644 --- a/gtk2_ardour/processor_box.bindings +++ b/gtk2_ardour/processor_box.bindings @@ -1,5 +1,6 @@ + diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index b4634c6b08..a91b3aead4 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -109,6 +109,7 @@ RefPtr ProcessorBox::cut_action; RefPtr ProcessorBox::copy_action; RefPtr ProcessorBox::rename_action; RefPtr ProcessorBox::delete_action; +RefPtr ProcessorBox::backspace_action; RefPtr ProcessorBox::manage_pins_action; RefPtr ProcessorBox::edit_action; RefPtr ProcessorBox::edit_generic_action; @@ -2122,6 +2123,7 @@ ProcessorBox::show_processor_menu (int arg) cut_action->set_sensitive (sensitive && can_cut ()); copy_action->set_sensitive (sensitive); delete_action->set_sensitive (sensitive || stub_processor_selected ()); + backspace_action->set_sensitive (sensitive || stub_processor_selected ()); edit_action->set_sensitive (one_processor_can_be_edited ()); edit_generic_action->set_sensitive (one_processor_can_be_edited ()); @@ -3638,10 +3640,13 @@ ProcessorBox::register_actions () sigc::ptr_fun (ProcessorBox::rb_copy)); delete_action = myactions.register_action (processor_box_actions, X_("delete"), _("Delete"), sigc::ptr_fun (ProcessorBox::rb_delete)); + backspace_action = myactions.register_action (processor_box_actions, X_("backspace"), _("Delete"), + sigc::ptr_fun (ProcessorBox::rb_delete)); ActionManager::plugin_selection_sensitive_actions.push_back (cut_action); ActionManager::plugin_selection_sensitive_actions.push_back (copy_action); ActionManager::plugin_selection_sensitive_actions.push_back (delete_action); + ActionManager::plugin_selection_sensitive_actions.push_back (backspace_action); paste_action = myactions.register_action (processor_box_actions, X_("paste"), _("Paste"), sigc::ptr_fun (ProcessorBox::rb_paste)); diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 3480fad556..48101909ac 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -551,6 +551,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD static Glib::RefPtr paste_action; static Glib::RefPtr rename_action; static Glib::RefPtr delete_action; + static Glib::RefPtr backspace_action; static Glib::RefPtr manage_pins_action; static Glib::RefPtr edit_action; static Glib::RefPtr edit_generic_action;