X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fardour_ui_dialogs.cc;h=6cbaeb58f0a1f0487291596787cc586e98c7d383;hb=73a6b8ef25bb90ad6c66b25b17da5962a38291d2;hp=3fa662d589d88773e832c9b926b06e26f8c9f633;hpb=e0aaed6d65f160c328cb8b56d7c6552ee15d65e2;p=ardour.git diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 3fa662d589..6cbaeb58f0 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -29,7 +29,8 @@ #include "ardour_ui.h" #include "location_ui.h" #include "mixer_ui.h" -#include "option_editor.h" +#include "rc_option_editor.h" +#include "session_option_editor.h" #include "public_editor.h" #include "route_params_ui.h" #include "sfdb_ui.h" @@ -99,10 +100,6 @@ ARDOUR_UI::connect_to_session (Session *s) route_params->set_session (s); } - if (option_editor) { - option_editor->set_session (s); - } - setup_session_options (); Blink.connect (mem_fun(*this, &ARDOUR_UI::transport_rec_enable_blink)); @@ -202,10 +199,6 @@ ARDOUR_UI::unload_session (bool hide_stuff) preroll_clock.set_session (0); postroll_clock.set_session (0); - if (option_editor) { - option_editor->set_session (0); - } - delete session; session = 0; @@ -231,23 +224,44 @@ ARDOUR_UI::toggle_big_clock_window () } void -ARDOUR_UI::toggle_options_window () +ARDOUR_UI::toggle_rc_options_window () { - if (option_editor == 0) { - option_editor = new OptionEditor (*this, *editor, *mixer); - option_editor->signal_unmap().connect(sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("/Common/ToggleOptionsEditor"))); - option_editor->set_session (session); + if (rc_option_editor == 0) { + rc_option_editor = new RCOptionEditor; + rc_option_editor->signal_unmap().connect(sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("/Common/ToggleRCOptionsEditor"))); + rc_option_editor->set_session (session); } - RefPtr act = ActionManager::get_action (X_("Common"), X_("ToggleOptionsEditor")); + RefPtr act = ActionManager::get_action (X_("Common"), X_("ToggleRCOptionsEditor")); if (act) { RefPtr tact = RefPtr::cast_dynamic(act); if (tact->get_active()) { - option_editor->show_all (); - option_editor->present (); + rc_option_editor->show_all (); + rc_option_editor->present (); + } else { + rc_option_editor->hide (); + } + } +} + +void +ARDOUR_UI::toggle_session_options_window () +{ + if (session_option_editor == 0) { + session_option_editor = new SessionOptionEditor (session); + session_option_editor->signal_unmap().connect(sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("/Common/ToggleSessionOptionsEditor"))); + } + + RefPtr act = ActionManager::get_action (X_("Common"), X_("ToggleSessionOptionsEditor")); + if (act) { + RefPtr tact = RefPtr::cast_dynamic (act); + + if (tact->get_active()) { + session_option_editor->show_all (); + session_option_editor->present (); } else { - option_editor->hide (); + session_option_editor->hide (); } } }