13
0

VCA number-label: match track/bus header behavior

This commit is contained in:
Robin Gareus 2017-01-05 15:08:42 +01:00
parent 4c7fcc11f7
commit 1de2afa6c3
2 changed files with 14 additions and 0 deletions

View File

@ -95,6 +95,7 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
number_label.set_alignment (.5, .5); number_label.set_alignment (.5, .5);
number_label.set_fallthrough_to_parent (true); number_label.set_fallthrough_to_parent (true);
number_label.set_inactive_color (_vca->presentation_info().color ()); 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 (); update_bottom_padding ();
@ -388,6 +389,18 @@ VCAMasterStrip::vertical_button_press (GdkEventButton* ev)
return true; 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 void
VCAMasterStrip::start_name_edit () VCAMasterStrip::start_name_edit ()
{ {

View File

@ -91,6 +91,7 @@ class VCAMasterStrip : public AxisView, public Gtk::EventBox
void start_name_edit (); void start_name_edit ();
void finish_name_edit (std::string, int); void finish_name_edit (std::string, int);
bool vertical_button_press (GdkEventButton*); bool vertical_button_press (GdkEventButton*);
bool number_button_press (GdkEventButton*);
void vca_property_changed (PBD::PropertyChange const & what_changed); void vca_property_changed (PBD::PropertyChange const & what_changed);
void update_vca_name (); void update_vca_name ();
void build_context_menu (); void build_context_menu ();