Add remove all and disconnect all to port matrix menu. Hide bundles whose channels...
[ardour.git] / gtk2_ardour / ardour_ui.cc
index f97d892c4ceee1744c28ad8b466285e7f71c2499..23df74e6fd07f9342a978efb8b64d19fa225947c 100644 (file)
@@ -234,20 +234,20 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[])
 
        last_shuttle_request = last_peak_grab = 0; //  get_microseconds();
 
-       ARDOUR::Diskstream::DiskOverrun.connect (sigc::mem_fun(*this, &ARDOUR_UI::disk_overrun_handler));
-       ARDOUR::Diskstream::DiskUnderrun.connect (sigc::mem_fun(*this, &ARDOUR_UI::disk_underrun_handler));
+       ARDOUR::Diskstream::DiskOverrun.connect (forever_connections, boost::bind (&ARDOUR_UI::disk_overrun_handler, this), gui_context());
+       ARDOUR::Diskstream::DiskUnderrun.connect (forever_connections, boost::bind (&ARDOUR_UI::disk_underrun_handler, this), gui_context());
 
        /* handle dialog requests */
 
-       ARDOUR::Session::Dialog.connect (sigc::mem_fun(*this, &ARDOUR_UI::session_dialog));
+       ARDOUR::Session::Dialog.connect (forever_connections, ui_bind (&ARDOUR_UI::session_dialog, this, _1), gui_context());
 
-       /* handle pending state with a dialog */
+       /* handle pending state with a dialog (PROBLEM: needs to return a value and thus cannot be x-thread) */
 
-       ARDOUR::Session::AskAboutPendingState.connect (sigc::mem_fun(*this, &ARDOUR_UI::pending_state_dialog));
+       ARDOUR::Session::AskAboutPendingState.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::pending_state_dialog, this));
 
-       /* handle sr mismatch with a dialog */
+       /* handle sr mismatch with a dialog (PROBLEM: needs to return a value and thus cannot be x-thread) */
 
-       ARDOUR::Session::AskAboutSampleRateMismatch.connect (sigc::mem_fun(*this, &ARDOUR_UI::sr_mismatch_dialog));
+       ARDOUR::Session::AskAboutSampleRateMismatch.connect_same_thread (forever_connections, boost::bind (&ARDOUR_UI::sr_mismatch_dialog, this, _1, _2));
 
        /* lets get this party started */
 
@@ -329,10 +329,10 @@ ARDOUR_UI::create_engine ()
                return -1;
        }
 
-       engine->Stopped.connect (sigc::mem_fun(*this, &ARDOUR_UI::engine_stopped));
-       engine->Running.connect (sigc::mem_fun(*this, &ARDOUR_UI::engine_running));
-       engine->Halted.connect (sigc::mem_fun(*this, &ARDOUR_UI::engine_halted));
-       engine->SampleRateChanged.connect (sigc::mem_fun(*this, &ARDOUR_UI::update_sample_rate));
+       engine->Stopped.connect (forever_connections, boost::bind (&ARDOUR_UI::engine_stopped, this), gui_context());
+       engine->Running.connect (forever_connections, boost::bind (&ARDOUR_UI::engine_running, this), gui_context());
+       engine->Halted.connect (forever_connections, boost::bind (&ARDOUR_UI::engine_halted, this), gui_context());
+       engine->SampleRateChanged.connect (forever_connections, ui_bind (&ARDOUR_UI::update_sample_rate, this, _1), gui_context());
 
        post_engine ();
 
@@ -407,7 +407,7 @@ ARDOUR_UI::post_engine ()
        update_cpu_load ();
        update_sample_rate (engine->frame_rate());
 
-       Config->ParameterChanged.connect (sigc::mem_fun (*this, &ARDOUR_UI::parameter_changed));
+       Config->ParameterChanged.connect (forever_connections, ui_bind (&ARDOUR_UI::parameter_changed, this, _1), gui_context());
        boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1));
        Config->map_parameters (pc);