fix computation of Text bounding box to respect _clamped_width
[ardour.git] / gtk2_ardour / ardour_ui_dialogs.cc
index 1f258ca1c8722625175dc3fabc5648311ab31f5a..db9e420206f0299fbbfe83d95f03f511bd00e0fc 100644 (file)
@@ -161,10 +161,6 @@ ARDOUR_UI::set_session (Session *s)
        _session->locations()->removed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context());
        _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_parameter_changed, this, _1), gui_context ());
 
-#ifdef HAVE_JACK_SESSION
-       engine->JackSessionEvent.connect (*_session, MISSING_INVALIDATOR, boost::bind (&Session::jack_session_event, _session, _1), gui_context());
-#endif
-
        /* Clocks are on by default after we are connected to a session, so show that here.
        */
 
@@ -203,6 +199,7 @@ ARDOUR_UI::set_session (Session *s)
                editor_meter->clear_meters();
                editor_meter->set_type (_session->master_out()->meter_type());
                editor_meter->setup_meters (30, 12, 6);
+               editor_meter->show();
                meter_box.pack_start(*editor_meter);
 
                ArdourMeter::ResetAllPeakDisplays.connect (sigc::mem_fun(*this, &ARDOUR_UI::reset_peak_display));
@@ -214,10 +211,17 @@ ARDOUR_UI::set_session (Session *s)
                editor_meter_peak_display.unset_flags (Gtk::CAN_FOCUS);
                editor_meter_peak_display.set_size_request(6, -1);
                editor_meter_peak_display.set_corner_radius(2);
-               editor_meter_peak_display.show();
 
                editor_meter_max_peak = -INFINITY;
                editor_meter_peak_display.signal_button_release_event().connect (sigc::mem_fun(*this, &ARDOUR_UI::editor_meter_peak_button_release), false);
+
+               if (Config->get_show_editor_meter()) {
+                       meter_box.show();
+                       editor_meter_peak_display.show();
+               } else {
+                       meter_box.hide();
+                       editor_meter_peak_display.hide();
+               }
        }
 
 }
@@ -271,7 +275,10 @@ ARDOUR_UI::unload_session (bool hide_stuff)
        rec_button.set_sensitive (false);
 
        WM::Manager::instance().set_session ((ARDOUR::Session*) 0);
-       ARDOUR_UI::instance()->video_timeline->close_session();
+
+       if (ARDOUR_UI::instance()->video_timeline) {
+               ARDOUR_UI::instance()->video_timeline->close_session();
+       }
 
        stop_blinking ();
        stop_clocking ();