build system tweaks for coreaudio/waves-coreaudio
[ardour.git] / gtk2_ardour / ardour_ui_dialogs.cc
index 8cd65ef378979017444160735b59df48f909b45f..d5cbeeef1147f68014f6c81b91f057c9dd15ebbc 100644 (file)
@@ -55,6 +55,7 @@
 #include "sfdb_ui.h"
 #include "theme_manager.h"
 #include "time_info_box.h"
+#include "timers.h"
 
 #include <gtkmm2ext/keyboard.h>
 
@@ -145,12 +146,9 @@ ARDOUR_UI::set_session (Session *s)
 
        setup_session_options ();
 
-       Blink.connect (sigc::mem_fun(*this, &ARDOUR_UI::transport_rec_enable_blink));
-       Blink.connect (sigc::mem_fun(*this, &ARDOUR_UI::solo_blink));
-       Blink.connect (sigc::mem_fun(*this, &ARDOUR_UI::sync_blink));
-       Blink.connect (sigc::mem_fun(*this, &ARDOUR_UI::audition_blink));
-       Blink.connect (sigc::mem_fun(*this, &ARDOUR_UI::feedback_blink));
+       blink_connection = Timers::blink_connect (sigc::mem_fun(*this, &ARDOUR_UI::blink_handler));
 
+       _session->SaveSessionRequested.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::save_session_at_its_request, this, _1), gui_context());
        _session->RecordStateChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::record_state_changed, this), gui_context());
        _session->StepEditStatusChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::step_edit_status_change, this, _1), gui_context());
        _session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::map_transport_state, this), gui_context());
@@ -178,13 +176,12 @@ ARDOUR_UI::set_session (Session *s)
        Glib::signal_idle().connect (sigc::mem_fun (*this, &ARDOUR_UI::first_idle));
 
        start_clocking ();
-       start_blinking ();
 
        map_transport_state ();
 
-       second_connection = Glib::signal_timeout().connect (sigc::mem_fun(*this, &ARDOUR_UI::every_second), 1000);
-       point_one_second_connection = Glib::signal_timeout().connect (sigc::mem_fun(*this, &ARDOUR_UI::every_point_one_seconds), 100);
-       point_zero_something_second_connection = Glib::signal_timeout().connect (sigc::mem_fun(*this, &ARDOUR_UI::every_point_zero_something_seconds), 40);
+       second_connection = Timers::second_connect (sigc::mem_fun(*this, &ARDOUR_UI::every_second));
+       point_one_second_connection = Timers::rapid_connect (sigc::mem_fun(*this, &ARDOUR_UI::every_point_one_seconds));
+       point_zero_something_second_connection = Timers::super_rapid_connect (sigc::mem_fun(*this, &ARDOUR_UI::every_point_zero_something_seconds));
        set_fps_timeout_connection();
 
        update_format ();
@@ -232,7 +229,7 @@ ARDOUR_UI::set_session (Session *s)
                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() && !ARDOUR::Profile->get_trx()) {
+               if (ARDOUR_UI::config()->get_show_editor_meter() && !ARDOUR::Profile->get_trx()) {
                        transport_tearoff_hbox.pack_start (meter_box, false, false);
                        transport_tearoff_hbox.pack_start (editor_meter_peak_display, false, false);
                        meter_box.show();
@@ -278,7 +275,6 @@ ARDOUR_UI::unload_session (bool hide_stuff)
                editor->hide ();
                mixer->hide ();
                meterbridge->hide ();
-               theme_manager->hide ();
                audio_port_matrix->hide();
                midi_port_matrix->hide();
                route_params->hide();
@@ -306,12 +302,11 @@ ARDOUR_UI::unload_session (bool hide_stuff)
                ARDOUR_UI::instance()->video_timeline->close_session();
        }
 
-       stop_blinking ();
        stop_clocking ();
 
        /* drop everything attached to the blink signal */
 
-       Blink.clear ();
+       blink_connection.disconnect ();
 
        delete _session;
        _session = 0;