From 7b5e8bf0f751ec76fce440e1547f5a274a9b9549 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 14 Dec 2008 07:59:33 +0000 Subject: [PATCH] make all mixerstrip elements visible in the mixer window. at least, i think that is everything - trying to move away from using show_all() git-svn-id: svn://localhost/ardour2/branches/3.0@4321 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/mixer_strip.cc | 47 +++++++++++++++++++++++--------------- gtk2_ardour/mixer_strip.h | 3 +++ 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index c6b60b974e..990581e63c 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -139,9 +139,19 @@ MixerStrip::init () comment_window = 0; comment_area = 0; _width_owner = 0; + spacer = 0; - width_button.add (*(manage (new Gtk::Image (::get_icon("strip_width"))))); - hide_button.add (*(manage (new Gtk::Image (::get_icon("hide"))))); + Gtk::Image* img; + + img = manage (new Gtk::Image (::get_icon("strip_width"))); + img->show (); + + width_button.add (*img); + + img = manage (new Gtk::Image (::get_icon("hide"))); + img->show (); + + hide_button.add (*img); input_label.set_text (_("Input")); ARDOUR_UI::instance()->set_tip (&input_button, _("Click to choose inputs"), ""); @@ -208,8 +218,6 @@ MixerStrip::init () global_vpacker.set_border_width (0); global_vpacker.set_spacing (0); - VBox *whvbox = manage (new VBox); - width_button.set_name ("MixerWidthButton"); hide_button.set_name ("MixerHideButton"); top_event_box.set_name ("MixerTopEventBox"); @@ -220,17 +228,16 @@ MixerStrip::init () width_hide_box.pack_start (width_button, false, true); width_hide_box.pack_start (top_event_box, true, true); width_hide_box.pack_end (hide_button, false, true); - Gtk::Alignment *gain_meter_alignment = Gtk::manage(new Gtk::Alignment()); - gain_meter_alignment->set_padding(0, 4, 0, 0); - gain_meter_alignment->add(gpm); + gain_meter_alignment.set_padding(0, 4, 0, 0); + gain_meter_alignment.add(gpm); - whvbox->pack_start (width_hide_box, true, true); + whvbox.pack_start (width_hide_box, true, true); - global_vpacker.pack_start (*whvbox, Gtk::PACK_SHRINK); + global_vpacker.pack_start (whvbox, Gtk::PACK_SHRINK); global_vpacker.pack_start (button_table,Gtk::PACK_SHRINK); global_vpacker.pack_start (pre_processor_box, true, true); global_vpacker.pack_start (middle_button_table,Gtk::PACK_SHRINK); - global_vpacker.pack_start (*gain_meter_alignment,Gtk::PACK_SHRINK); + global_vpacker.pack_start (gain_meter_alignment,Gtk::PACK_SHRINK); global_vpacker.pack_start (bottom_button_table,Gtk::PACK_SHRINK); global_vpacker.pack_start (post_processor_box, true, true); if (!is_midi_track()) { @@ -297,13 +304,8 @@ MixerStrip::~MixerStrip () { GoingAway(); /* EMIT_SIGNAL */ - if (input_selector) { - delete input_selector; - } - - if (output_selector) { - delete output_selector; - } + delete input_selector; + delete output_selector; } void @@ -348,7 +350,7 @@ MixerStrip::set_route (boost::shared_ptr rt) scrollbar_height = requisition.height; } - EventBox* spacer = manage (new EventBox); + spacer = manage (new EventBox); spacer->set_size_request (-1, scrollbar_height); global_vpacker.pack_start (*spacer, false, false); } @@ -454,13 +456,20 @@ MixerStrip::set_route (boost::shared_ptr rt) /* we don't allow master or control routes to be hidden */ hide_button.show(); } + width_button.show(); width_hide_box.show(); + whvbox.show (); global_frame.show(); global_vpacker.show(); button_table.show(); middle_button_table.show(); bottom_button_table.show(); + pre_processor_box.show_all (); + gpm.show_all (); + panners.show_all (); + gain_meter_alignment.show (); + post_processor_box.show_all (); gain_unit_button.show(); gain_unit_label.show(); meter_point_button.show(); @@ -480,7 +489,7 @@ MixerStrip::set_route (boost::shared_ptr rt) speed_label.show(); speed_frame.show(); - show(); + show (); } void diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h index 2b6aed2717..12d84c48fc 100644 --- a/gtk2_ardour/mixer_strip.h +++ b/gtk2_ardour/mixer_strip.h @@ -122,7 +122,10 @@ class MixerStrip : public RouteUI, public Gtk::EventBox Gtk::Button hide_button; Gtk::Button width_button; Gtk::HBox width_hide_box; + Gtk::VBox whvbox; Gtk::EventBox top_event_box; + Gtk::EventBox* spacer; + Gtk::Alignment gain_meter_alignment; void hide_clicked(); void width_clicked ();