diff options
-rw-r--r-- | gtk2_ardour/vca_master_strip.cc | 13 | ||||
-rw-r--r-- | gtk2_ardour/vca_master_strip.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gtk2_ardour/vca_master_strip.cc b/gtk2_ardour/vca_master_strip.cc index 1612ac4e70..7dfc396381 100644 --- a/gtk2_ardour/vca_master_strip.cc +++ b/gtk2_ardour/vca_master_strip.cc @@ -95,6 +95,7 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v) number_label.set_alignment (.5, .5); number_label.set_fallthrough_to_parent (true); number_label.set_inactive_color (_vca->presentation_info().color ()); + number_label.signal_button_release_event().connect (sigc::mem_fun (*this, &VCAMasterStrip::number_button_press)); update_bottom_padding (); @@ -388,6 +389,18 @@ VCAMasterStrip::vertical_button_press (GdkEventButton* ev) return true; } +bool +VCAMasterStrip::number_button_press (GdkEventButton* ev) +{ + if (Keyboard::is_context_menu_event (ev)) { + if (!context_menu) { + build_context_menu (); + } + context_menu->popup (1, ev->time); + } + return true; +} + void VCAMasterStrip::start_name_edit () { diff --git a/gtk2_ardour/vca_master_strip.h b/gtk2_ardour/vca_master_strip.h index 5a1ad74b75..575a21173c 100644 --- a/gtk2_ardour/vca_master_strip.h +++ b/gtk2_ardour/vca_master_strip.h @@ -91,6 +91,7 @@ class VCAMasterStrip : public AxisView, public Gtk::EventBox void start_name_edit (); void finish_name_edit (std::string, int); bool vertical_button_press (GdkEventButton*); + bool number_button_press (GdkEventButton*); void vca_property_changed (PBD::PropertyChange const & what_changed); void update_vca_name (); void build_context_menu (); |