X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fvca_master_strip.cc;h=d3f28cfb67379ad1a7bec16c3704d3909741719a;hb=806bfeced72674164a628c64abbda30ac916b2ca;hp=1612ac4e7070fdeedfafdd1a9772bda499137e14;hpb=eae6593a7ec11dc3093890f767fed6ff44cfc0a0;p=ardour.git diff --git a/gtk2_ardour/vca_master_strip.cc b/gtk2_ardour/vca_master_strip.cc index 1612ac4e70..d3f28cfb67 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 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 (); @@ -147,7 +148,7 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr v) mute_changed (); spill_change (boost::shared_ptr()); - Mixer_UI::instance()->show_vca_change.connect (sigc::mem_fun (*this, &VCAMasterStrip::spill_change)); + Mixer_UI::instance()->show_spill_change.connect (sigc::mem_fun (*this, &VCAMasterStrip::spill_change)); _vca->PropertyChanged.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::vca_property_changed, this, _1), gui_context()); _vca->presentation_info().PropertyChanged.connect (vca_connections, invalidator (*this), boost::bind (&VCAMasterStrip::vca_property_changed, this, _1), gui_context()); @@ -164,9 +165,9 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr v) VCAMasterStrip::~VCAMasterStrip () { - if ((_session && !_session->deletion_in_progress()) && Mixer_UI::instance()->showing_vca_slaves_for (_vca)) { + if ((_session && !_session->deletion_in_progress()) && Mixer_UI::instance()->showing_spill_for (_vca)) { /* cancel spill for this VCA */ - Mixer_UI::instance()->show_vca_slaves (boost::shared_ptr()); + Mixer_UI::instance()->show_spill (boost::shared_ptr()); } delete delete_dialog; @@ -178,9 +179,9 @@ VCAMasterStrip::~VCAMasterStrip () void VCAMasterStrip::self_delete () { - if ((_session && !_session->deletion_in_progress()) && Mixer_UI::instance()->showing_vca_slaves_for (_vca)) { + if ((_session && !_session->deletion_in_progress()) && Mixer_UI::instance()->showing_spill_for (_vca)) { /* cancel spill for this VCA */ - Mixer_UI::instance()->show_vca_slaves (boost::shared_ptr()); + Mixer_UI::instance()->show_spill (boost::shared_ptr()); } /* Drop reference immediately, delete self when idle */ _vca.reset (); @@ -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 () { @@ -424,7 +437,7 @@ void VCAMasterStrip::update_vca_name () { /* 20 is a rough guess at the number of letters we can fit. */ - vertical_button.set_text (short_version (_vca->name(), 20)); + vertical_button.set_text (short_version (_vca->full_name(), 20)); } void @@ -444,15 +457,15 @@ VCAMasterStrip::build_context_menu () void VCAMasterStrip::spill () { - if (Mixer_UI::instance()->showing_vca_slaves_for (_vca)) { - Mixer_UI::instance()->show_vca_slaves (boost::shared_ptr()); + if (Mixer_UI::instance()->showing_spill_for (_vca)) { + Mixer_UI::instance()->show_spill (boost::shared_ptr()); } else { - Mixer_UI::instance()->show_vca_slaves (_vca); + Mixer_UI::instance()->show_spill (_vca); } } void -VCAMasterStrip::spill_change (boost::shared_ptr vca) +VCAMasterStrip::spill_change (boost::shared_ptr vca) { if (vca != _vca) { vertical_button.set_active_state (Gtkmm2ext::Off); @@ -478,8 +491,8 @@ VCAMasterStrip::drop_all_slaves () { _vca->Drop (); /* EMIT SIGNAL */ - if (Mixer_UI::instance()->showing_vca_slaves_for (_vca)) { - Mixer_UI::instance()->show_vca_slaves (boost::shared_ptr()); + if (Mixer_UI::instance()->showing_spill_for (_vca)) { + Mixer_UI::instance()->show_spill (boost::shared_ptr()); } }