introduce GUIObjectState; massive, pervasive changes in visibility and height managem...
[ardour.git] / gtk2_ardour / ardour_ui_dialogs.cc
index 903df41336480c687a7ab3c6557bee6ca27b561f..8c1c81167415fa5149d65ac51ba04524bb6b92e7 100644 (file)
@@ -31,6 +31,7 @@
 #include "ardour_ui.h"
 #include "bundle_manager.h"
 #include "global_port_matrix.h"
+#include "gui_object.h"
 #include "gui_thread.h"
 #include "keyeditor.h"
 #include "location_ui.h"
@@ -44,6 +45,7 @@
 #include "speaker_dialog.h"
 #include "sfdb_ui.h"
 #include "theme_manager.h"
+#include "time_info_box.h"
 
 #include "i18n.h"
 
@@ -62,6 +64,14 @@ ARDOUR_UI::set_session (Session *s)
                return;
        }
 
+       const XMLNodeList& children = _session->extra_xml (X_("UI"))->children();
+       for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
+               if ((*i)->name() == GUIObjectState::xml_node_name) {
+                       gui_object_state->load (**i);
+                       break;
+               }
+       }
+
        if (location_ui->get()) {
                location_ui->get()->set_session(s);
        }
@@ -97,6 +107,7 @@ ARDOUR_UI::set_session (Session *s)
        big_clock->set_session (s);
        preroll_clock->set_session (s);
        postroll_clock->set_session (s);
+       time_info_box->set_session (s);
 
        /* sensitize menu bar options that are now valid */
 
@@ -152,6 +163,7 @@ ARDOUR_UI::set_session (Session *s)
        _session->AuditionActive.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::auditioning_changed, this, _1), gui_context());
        _session->locations()->added.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context());
        _session->locations()->removed.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context());
+       _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::session_parameter_changed, this, _1), gui_context ());
 
 #ifdef HAVE_JACK_SESSION
        engine->JackSessionEvent.connect (*_session, MISSING_INVALIDATOR, ui_bind (&Session::jack_session_event, _session, _1), gui_context());
@@ -179,6 +191,8 @@ ARDOUR_UI::set_session (Session *s)
        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_one_second_connection = Glib::signal_timeout().connect (sigc::mem_fun(*this, &ARDOUR_UI::every_point_zero_one_seconds), 40);
+
+       update_format ();
 }
 
 int