diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 7f72725af8..3432a3ccbf 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -188,13 +188,13 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) , add_route_dialog (X_("add-routes"), _("Add Tracks/Busses")) , about (X_("about"), _("About")) , location_ui (X_("locations"), _("Locations")) - , route_params (X_("inspector"), _("Tracks and Busses")) , session_option_editor (X_("session-options-editor"), _("Properties"), boost::bind (&ARDOUR_UI::create_session_option_editor, this)) , add_video_dialog (X_("add-video"), _("Add Tracks/Busses"), boost::bind (&ARDOUR_UI::create_add_video_dialog, this)) , bundle_manager (X_("bundle-manager"), _("Bundle Manager"), boost::bind (&ARDOUR_UI::create_bundle_manager, this)) , big_clock_window (X_("big-clock"), _("Big Clock"), boost::bind (&ARDOUR_UI::create_big_clock_window, this)) , audio_port_matrix (X_("audio-connection-manager"), _("Audio Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::AUDIO)) , midi_port_matrix (X_("midi-connection-manager"), _("MIDI Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::MIDI)) + , route_params (X_("inspector"), _("Tracks and Busses"), boost::bind (&ARDOUR_UI::create_route_params_window, this)) , error_log_button (_("Errors")) @@ -363,6 +363,18 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir) and its functionality are separate */ + if (audio_port_matrix) { + audio_port_matrix->set_session (_session); + } + + if (midi_port_matrix) { + midi_port_matrix->set_session (_session); + } + + if (route_params) { + route_params->set_session (_session); + } + (void) theme_manager.get (true); starting.connect (sigc::mem_fun(*this, &ARDOUR_UI::startup)); diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 0ed5d145b4..e7bc5a2782 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -579,7 +579,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr WM::Proxy add_route_dialog; WM::Proxy about; WM::Proxy location_ui; - WM::Proxy route_params; /* Windows/Dialogs that require a creator method */ @@ -589,6 +588,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr WM::ProxyWithConstructor big_clock_window; WM::ProxyWithConstructor audio_port_matrix; WM::ProxyWithConstructor midi_port_matrix; + WM::ProxyWithConstructor route_params; /* creator methods */ @@ -597,6 +597,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr AddVideoDialog* create_add_video_dialog (); BigClockWindow* create_big_clock_window(); GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType); + RouteParams_UI* create_route_params_window (); static UIConfiguration *ui_config; diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 02b1efaa2e..a8ff6305a2 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -73,6 +73,9 @@ ARDOUR_UI::set_session (Session *s) midi_port_matrix->set_session (s); } + if (route_params) { + route_params->set_session (s); + } if (!_session) { /* Session option editor cannot exist across change-of-session */ @@ -222,6 +225,9 @@ ARDOUR_UI::unload_session (bool hide_stuff) editor->hide (); mixer->hide (); theme_manager->hide (); + audio_port_matrix->hide(); + midi_port_matrix->hide(); + route_params->hide(); } second_connection.disconnect (); @@ -447,6 +453,14 @@ ARDOUR_UI::create_big_clock_window () return new BigClockWindow (*big_clock); } +RouteParams_UI* +ARDOUR_UI::create_route_params_window () +{ + RouteParams_UI *rv = new RouteParams_UI (); + rv->set_session(_session); + return rv; +} + void ARDOUR_UI::handle_locations_change (Location *) {