From 0d999ea4ec059e62dd72ea595e166dba05109bfc Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 1 Jun 2016 21:57:32 -0400 Subject: remove un-used name_hbox widget from TimeAxisView --- gtk2_ardour/automation_time_axis.cc | 5 +++-- gtk2_ardour/mixer_strip.cc | 1 - gtk2_ardour/route_time_axis.cc | 2 -- gtk2_ardour/time_axis_view.cc | 24 ++++++++++++------------ gtk2_ardour/time_axis_view.h | 1 - gtk2_ardour/vca_time_axis.cc | 2 -- 6 files changed, 15 insertions(+), 20 deletions(-) diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index ae0a691710..820cc62501 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -173,7 +173,9 @@ AutomationTimeAxisView::AutomationTimeAxisView ( //name label isn't editable on an automation track; remove the tooltip set_tooltip (name_label, X_("")); - /* repack the name label */ + /* repack the name label, which TimeAxisView has already attached to + * the controls_table + */ if (name_label.get_parent()) { name_label.get_parent()->remove (name_label); @@ -186,7 +188,6 @@ AutomationTimeAxisView::AutomationTimeAxisView ( /* add the buttons */ controls_table.set_border_width (1); - controls_table.remove (name_hbox); controls_table.attach (hide_button, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0); controls_table.attach (name_label, 2, 3, 1, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 2, 0); controls_table.attach (auto_button, 3, 4, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 0, 0); diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index b03fd9c2a0..f0f0235361 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -2615,7 +2615,6 @@ MixerStrip::update_track_number_visibility () if (tnw & 1) --tnw; number_label.set_size_request(tnw, -1); number_label.show (); - //name_hbox.set_size_request(TimeAxisView::name_width_px - 2 - tnw, -1); // -2 = cellspacing } else { number_label.hide (); } diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 13cd68b858..303824638e 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -430,10 +430,8 @@ RouteTimeAxisView::update_track_number_visibility () if (tnw & 1) --tnw; number_label.set_size_request(tnw, -1); number_label.show (); - name_hbox.set_size_request(TimeAxisView::name_width_px - 2 - tnw, -1); // -2 = cellspacing } else { number_label.hide (); - name_hbox.set_size_request(TimeAxisView::name_width_px, -1); } } diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index f97a1e8c51..1de3c641dd 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -148,20 +148,19 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie name_label.set_width_chars (12); set_tooltip (name_label, _("Track/Bus name (double click to edit)")); - Gtk::Entry* an_entry = new Gtkmm2ext::FocusEntry; - an_entry->set_name ("EditorTrackNameDisplay"); - Gtk::Requisition req; - an_entry->size_request (req); - name_label.set_size_request (-1, req.height); - name_label.set_ellipsize (Pango::ELLIPSIZE_MIDDLE); - delete an_entry; + { + std::auto_ptr an_entry (new Gtkmm2ext::FocusEntry); + an_entry->set_name (X_("TrackNameEditor")); + Gtk::Requisition req; + an_entry->size_request (req); - name_hbox.pack_end (name_label, true, true); + name_label.set_size_request (-1, req.height); + name_label.set_ellipsize (Pango::ELLIPSIZE_MIDDLE); + } // set min. track-header width if fader is not visible - name_hbox.set_size_request(name_width_px, -1); + name_label.set_size_request(name_width_px, -1); - name_hbox.show (); name_label.show (); controls_table.set_row_spacings (2); @@ -169,10 +168,11 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie controls_table.set_border_width (2); if (ARDOUR::Profile->get_mixbus() ) { - controls_table.attach (name_hbox, 4, 5, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0); + controls_table.attach (name_label, 4, 5, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0); } else { - controls_table.attach (name_hbox, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0); + controls_table.attach (name_label, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::SHRINK, 0, 0); } + controls_table.show_all (); controls_table.set_no_show_all (); diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h index 13ade6a2fe..4995c0e15e 100644 --- a/gtk2_ardour/time_axis_view.h +++ b/gtk2_ardour/time_axis_view.h @@ -230,7 +230,6 @@ class TimeAxisView : public virtual AxisView Gtk::VBox time_axis_vbox; Gtk::HBox time_axis_hbox; Gtk::Frame time_axis_frame; - Gtk::HBox name_hbox; Gtk::HBox top_hbox; Gtk::Label name_label; Gtk::Fixed scroomer_placeholder; diff --git a/gtk2_ardour/vca_time_axis.cc b/gtk2_ardour/vca_time_axis.cc index 45f9480b51..fc593369ac 100644 --- a/gtk2_ardour/vca_time_axis.cc +++ b/gtk2_ardour/vca_time_axis.cc @@ -256,10 +256,8 @@ VCATimeAxisView::update_track_number_visibility () if (tnw & 1) --tnw; number_label.set_size_request(tnw, -1); number_label.show (); - name_hbox.set_size_request (TimeAxisView::name_width_px - 2 - tnw, -1); // -2 = cellspacing } else { number_label.hide (); - name_hbox.set_size_request (TimeAxisView::name_width_px, -1); } } -- cgit v1.2.3