remove un-used name_hbox widget from TimeAxisView
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 2 Jun 2016 01:57:32 +0000 (21:57 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 2 Jun 2016 01:57:43 +0000 (21:57 -0400)
gtk2_ardour/automation_time_axis.cc
gtk2_ardour/mixer_strip.cc
gtk2_ardour/route_time_axis.cc
gtk2_ardour/time_axis_view.cc
gtk2_ardour/time_axis_view.h
gtk2_ardour/vca_time_axis.cc

index ae0a691710a32138476356a59b80051724ddc5e3..820cc62501ebcab000e747efa0a0d13cb1de756f 100644 (file)
@@ -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);
index b03fd9c2a0f676ae859e6f9b8ebe508060d234b8..f0f0235361a80b62695c3ff84ff1bdde7bfb2357 100644 (file)
@@ -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 ();
        }
index 13cd68b858d73e668303a127ae6e4a3ec34d74c8..303824638ea38e94b5226c9daf219fb0390c4058 100644 (file)
@@ -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);
        }
 }
 
index f97a1e8c515e9b5a2a3215da929c49126ae1de5b..1de3c641ddd87603c2ebae09b58ab1996587089a 100644 (file)
@@ -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<Gtk::Entry> 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 ();
 
index 13ade6a2fe2b9f93d55bf0464780a9733bb4aa1c..4995c0e15e0d17ca23d93389e3950568122d4458 100644 (file)
@@ -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;
index 45f9480b5135cac4f93020513c771bce61814b43..fc593369acaa0a8f43004eda4a874fc32f14dc19 100644 (file)
@@ -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);
        }
 }