From 1014c931c993f539f276ce11958ed136393d387e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 20 Apr 2012 19:51:35 +0000 Subject: [PATCH] Support adding plugins via keyboard (Enter). git-svn-id: svn://localhost/ardour2/branches/3.0@12045 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/plugin_selector.cc | 7 +++++++ gtk2_ardour/plugin_selector.h | 1 + 2 files changed, 8 insertions(+) diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index b1698b59ae..85f4a8d75b 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -182,6 +182,7 @@ PluginSelector::PluginSelector (PluginManager& mgr) added_list.set_name("PluginSelectorList"); plugin_display.signal_button_press_event().connect_notify (sigc::mem_fun(*this, &PluginSelector::row_clicked)); + plugin_display.signal_row_activated().connect_notify (sigc::mem_fun(*this, &PluginSelector::row_activated)); plugin_display.get_selection()->signal_changed().connect (sigc::mem_fun(*this, &PluginSelector::display_selection_changed)); plugin_display.grab_focus(); @@ -206,6 +207,12 @@ PluginSelector::row_clicked(GdkEventButton* event) } } +void +PluginSelector::row_activated(Gtk::TreeModel::Path path, Gtk::TreeViewColumn* col) +{ + btn_add_clicked(); +} + bool PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string& filterstr) { diff --git a/gtk2_ardour/plugin_selector.h b/gtk2_ardour/plugin_selector.h index 7eef190b5f..7be17b62aa 100644 --- a/gtk2_ardour/plugin_selector.h +++ b/gtk2_ardour/plugin_selector.h @@ -119,6 +119,7 @@ class PluginSelector : public ArdourDialog ARDOUR::PluginManager& manager; void row_clicked(GdkEventButton *); + void row_activated(Gtk::TreeModel::Path path, Gtk::TreeViewColumn* col); void btn_add_clicked(); void btn_remove_clicked(); void btn_update_clicked();