diff options
author | Carl Hetherington <carl@carlh.net> | 2010-08-18 02:20:15 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-08-18 02:20:15 +0000 |
commit | 579fcb70e2b3b0a1ef2af9fc88edebff6d7e6dd3 (patch) | |
tree | b03f1c1b9a12e5e76aaf23b8ed6ad04cf663633f /gtk2_ardour/ardour_ui_dialogs.cc | |
parent | 8d8bc9baca511399f89c0f4b0657b2d2f957824c (diff) |
First go at saving window visibility and position state across saves.
git-svn-id: svn://localhost/ardour2/branches/3.0@7644 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui_dialogs.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui_dialogs.cc | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 747354ca4e..6a0bbb0a7e 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -41,6 +41,7 @@ #include "gui_thread.h" #include "midi_tracer.h" #include "add_route_dialog.h" +#include "global_port_matrix.h" #include "i18n.h" @@ -59,8 +60,8 @@ ARDOUR_UI::set_session (Session *s) return; } - if (location_ui) { - location_ui->set_session(s); + if (location_ui->get()) { + location_ui->get()->set_session(s); } if (route_params) { @@ -75,6 +76,12 @@ ARDOUR_UI::set_session (Session *s) session_option_editor->set_session (s); } + for (ARDOUR::DataType::iterator i = ARDOUR::DataType::begin(); i != ARDOUR::DataType::end(); ++i) { + if (_global_port_matrix[*i]->get()) { + _global_port_matrix[*i]->get()->set_session (_session); + } + } + primary_clock.set_session (s); secondary_clock.set_session (s); big_clock.set_session (s); @@ -217,10 +224,10 @@ ARDOUR_UI::toggle_big_clock_window () RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act); if (tact->get_active()) { - big_clock_window->show_all (); - big_clock_window->present (); + big_clock_window->get()->show_all (); + big_clock_window->get()->present (); } else { - big_clock_window->hide (); + big_clock_window->get()->hide (); } } } @@ -297,9 +304,9 @@ int ARDOUR_UI::create_location_ui () { if (location_ui == 0) { - location_ui = new LocationUIWindow (); - location_ui->set_session (_session); - location_ui->signal_unmap().connect (sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleLocations"))); + location_ui->set (new LocationUIWindow ()); + location_ui->get()->set_session (_session); + location_ui->get()->signal_unmap().connect (sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleLocations"))); } return 0; } @@ -316,10 +323,10 @@ ARDOUR_UI::toggle_location_window () RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act); if (tact->get_active()) { - location_ui->show_all (); - location_ui->present (); + location_ui->get()->show_all (); + location_ui->get()->present (); } else { - location_ui->hide (); + location_ui->get()->hide (); } } } |