introduce the notion that note additions and property changes can cause the removal...
[ardour.git] / gtk2_ardour / session_option_editor.cc
index 2cc6e253ba69b639f64cd4139379ee7424825e39..13f5dbc26cbea8b0e3b8e423d0c046c4927e56ba 100644 (file)
@@ -3,6 +3,8 @@
 #include "ardour/auditioner.h"
 #include "ardour/audioengine.h"
 #include "ardour/port.h"
+
+#include "gui_thread.h"
 #include "session_option_editor.h"
 #include "port_matrix.h"
 #include "i18n.h"
@@ -136,9 +138,11 @@ private:
 };
 
 SessionOptionEditor::SessionOptionEditor (Session* s)
-       : OptionEditor (&(s->config), _("Session Preferences"))
+       : OptionEditor (&(s->config), _("Session Properties"))
        , _session_config (&(s->config))
 {
+        set_name ("SessionProperties");
+
        /* SYNC */
 
        ComboOption<uint32_t>* spf = new ComboOption<uint32_t> (
@@ -160,9 +164,9 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
                sigc::mem_fun (*_session_config, &SessionConfiguration::set_sync_source)
                );
        
-       s->MTC_PortChanged.connect (_session_connections, boost::bind (&SessionOptionEditor::populate_sync_options, this, s, ssrc));
-       s->MIDIClock_PortChanged.connect (_session_connections, boost::bind (&SessionOptionEditor::populate_sync_options, this, s, ssrc));
-       s->config.ParameterChanged.connect (_session_connections, boost::bind (&SessionOptionEditor::follow_sync_state, this, _1, s, ssrc));
+       s->MTC_PortChanged.connect (_session_connections, invalidator (*this), boost::bind (&SessionOptionEditor::populate_sync_options, this, s, ssrc), gui_context());
+       s->MIDIClock_PortChanged.connect (_session_connections, invalidator (*this), boost::bind (&SessionOptionEditor::populate_sync_options, this, s, ssrc), gui_context());
+       s->config.ParameterChanged.connect (_session_connections, invalidator (*this), ui_bind (&SessionOptionEditor::follow_sync_state, this, _1, s, ssrc), gui_context());
 
        populate_sync_options (s, ssrc);
        follow_sync_state (string ("external-sync"), s, ssrc);