This is to cut down on the compile times. It also helps with my sanity.
*/
-#include <ardour/session.h>
+#include "ardour/session.h"
#include "actions.h"
#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"
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));
preroll_clock.set_session (0);
postroll_clock.set_session (0);
- if (option_editor) {
- option_editor->set_session (0);
- }
-
delete session;
session = 0;
}
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_("<Actions>/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_("<Actions>/Common/ToggleRCOptionsEditor")));
+ rc_option_editor->set_session (session);
}
- RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleOptionsEditor"));
+ RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleRCOptionsEditor"));
if (act) {
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::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_("<Actions>/Common/ToggleSessionOptionsEditor")));
+ }
+
+ RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleSessionOptionsEditor"));
+ if (act) {
+ RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic (act);
+
+ if (tact->get_active()) {
+ session_option_editor->show_all ();
+ session_option_editor->present ();
} else {
- option_editor->hide ();
+ session_option_editor->hide ();
}
}
}
}
void
-ARDOUR_UI::handle_locations_change (Location* ignored)
+ARDOUR_UI::handle_locations_change (Location *)
{
if (session) {
if (session->locations()->num_range_markers()) {