fix/revert/modify changes from 13617 that hide the gain + peak display from a generic...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 21 Jan 2013 14:24:57 +0000 (14:24 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 21 Jan 2013 14:24:57 +0000 (14:24 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@13947 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/gain_meter.cc
gtk2_ardour/mixer_strip.cc
gtk2_ardour/sfdb_ui.cc
gtk2_ardour/startup.cc

index a405f074ae5949431bdc8210826b83bd27a20e16..23b62b4a4104eb20a580b18bb5fec82d1b6d9d24 100644 (file)
@@ -854,7 +854,10 @@ GainMeter::GainMeter (Session* s, int fader_length)
        , gain_display_box(true, 0)
        , hbox(true, 2)
 {
-//     gain_display_box.pack_start (gain_display, true, true);
+       if (gain_display.get_parent()) {
+               gain_display.get_parent()->remove (gain_display);
+       }
+       gain_display_box.pack_start (gain_display, true, true);
 
        meter_metric_area.set_name ("AudioTrackMetrics");
        set_size_request_to_display_given_text (meter_metric_area, "-127", 0, 0);
@@ -901,9 +904,9 @@ GainMeter::set_controls (boost::shared_ptr<Route> r,
                hbox.remove (meter_alignment);
        }
 
-//     if (peak_display.get_parent()) {
-//             gain_display_box.remove (peak_display);
-//     }
+       if (peak_display.get_parent()) {
+               peak_display.get_parent()->remove (peak_display);
+       }
 
 //     if (gain_automation_state_button.get_parent()) {
 //             fader_vbox->remove (gain_automation_state_button);
@@ -925,7 +928,7 @@ GainMeter::set_controls (boost::shared_ptr<Route> r,
           pack some route-dependent stuff.
        */
 
-//     gain_display_box.pack_end (peak_display, true, true);
+       gain_display_box.pack_end (peak_display, true, true);
        hbox.pack_start (meter_alignment, true, true);
 
 //     if (r && !r->is_hidden()) {
index 0f1d78d5bff567cd64b9fd8a2bef39c1d8d9ccae..108d828a21e25f67815a8a7135c76570cb754eed 100644 (file)
@@ -401,11 +401,11 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
        revert_to_default_display ();
 
        if (gpm.gain_display.get_parent()) {
-               middle_button_table.remove (gpm.gain_display);
+               gpm.gain_display.get_parent()->remove (gpm.gain_display);
        }
 
        if (gpm.peak_display.get_parent()) {
-               middle_button_table.remove (gpm.peak_display);
+               gpm.peak_display.get_parent()->remove (gpm.peak_display);
        }
 
        if (solo_button->get_parent()) {
@@ -603,17 +603,22 @@ MixerStrip::set_width_enum (Width w, void* owner)
 
        set_button_names ();
 
+       /* unpack these from the parent and stuff them into our own
+          table
+       */
+       
+       if (gpm.peak_display.get_parent()) {
+               gpm.peak_display.get_parent()->remove (gpm.peak_display);
+       }
+       if (gpm.gain_display.get_parent()) {
+               gpm.gain_display.get_parent()->remove (gpm.gain_display);
+       }
+       
+       middle_button_table.attach (gpm.gain_display,0,1,1,2);
+       middle_button_table.attach (gpm.peak_display,1,2,1,2);
+
        switch (w) {
        case Wide:
-               if (!gpm.peak_display.get_parent()) {
-                       middle_button_table.attach (gpm.peak_display,1,2,1,2);
-               }
-               if (gpm.gain_display.get_parent()) {
-                       middle_button_table.remove (gpm.gain_display);
-               }
-               if (!gpm.gain_display.get_parent()) {
-                       middle_button_table.attach (gpm.gain_display,0,1,1,2);
-               }
 
                if (show_sends_button)  {
                        show_sends_button->set_text (_("Aux\nSends"));
@@ -640,16 +645,6 @@ MixerStrip::set_width_enum (Width w, void* owner)
                break;
 
        case Narrow:
-               if (gpm.peak_display.get_parent()) {
-                       middle_button_table.remove (gpm.peak_display);
-               }
-
-               if (gpm.gain_display.get_parent()) {
-                       middle_button_table.remove (gpm.gain_display);
-               }
-               if (!gpm.gain_display.get_parent()) {
-                       middle_button_table.attach (gpm.gain_display,0,2,1,2);
-               }
 
                if (show_sends_button) {
                        show_sends_button->set_text (_("Snd"));
index 8dacd0dff1d81ce0567acc7c9092596ee76099f7..f38b1b35ae75fab908d403afc4602d140e74a24d 100644 (file)
@@ -707,6 +707,7 @@ SoundFileBrowser::add_gain_meter ()
        boost::shared_ptr<Route> r = _session->the_auditioner ();
 
        gm->set_controls (r, r->shared_peak_meter(), r->amp());
+       gm->set_fader_name (X_("AudioTrackFader"));
 
        meter_packer.set_border_width (12);
        meter_packer.pack_start (*gm, false, true);
index 91e48c15bc73bceeffb566571c164b017d8cfa24..213b912f036b7e121a23013a9199edfa48acca21 100644 (file)
@@ -63,12 +63,6 @@ static string poor_mans_glob (string path)
        return copy;
 }
 
-static void show_me (Gtk::FileChooserButton* fcb)
-{
-       cerr << " Current folder of " << fcb << " changed to " << fcb->get_current_folder() << endl;
-}
-
-
 ArdourStartup::ArdourStartup (bool require_new, const std::string& session_name, const std::string& session_path, const std::string& template_name)
        : _response (RESPONSE_OK)
        , config_modified (false)
@@ -99,8 +93,6 @@ Ardour will play NO role in monitoring"))
        need_audio_setup = EngineControl::need_setup ();
        need_session_info = (session_name.empty() || require_new);
 
-       new_folder_chooser.signal_current_folder_changed().connect (sigc::bind (sigc::ptr_fun (show_me), &new_folder_chooser));
-
        _provided_session_name = session_name;
        _provided_session_path = session_path;