summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui_options.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-02-19 17:30:47 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-02-19 17:30:47 +0000
commit4c6b2c7eb7fa4b8fffe8ea9cbc5eb775f6b12cd8 (patch)
tree260e4b1ba4587b8cb5b3b3d8d1cef5f924a864ca /gtk2_ardour/ardour_ui_options.cc
parent60b8dce6379426ccdf54832e11c83a7b13c44d57 (diff)
remote control IDs follow editor/mixer view order; fix multiple display of disk over/under run errors; don't show automation editing cursor unless you actually edit it
git-svn-id: svn://localhost/ardour2/trunk@1474 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui_options.cc')
-rw-r--r--gtk2_ardour/ardour_ui_options.cc62
1 files changed, 62 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc
index fec0f83752..b34825bff3 100644
--- a/gtk2_ardour/ardour_ui_options.cc
+++ b/gtk2_ardour/ardour_ui_options.cc
@@ -226,6 +226,39 @@ ARDOUR_UI::set_solo_model (SoloModel model)
}
void
+ARDOUR_UI::set_remote_model (RemoteModel model)
+{
+ const char* action = 0;
+
+ switch (model) {
+ case UserOrdered:
+ action = X_("RemoteUserDefined");
+ break;
+ case MixerOrdered:
+ action = X_("RemoteMixerDefined");
+ break;
+ case EditorOrdered:
+ action = X_("RemoteEditorDefined");
+ break;
+
+ default:
+ fatal << string_compose (_("programming error: unknown remote model in ARDOUR_UI::set_remote_model: %1"), model) << endmsg;
+ /*NOTREACHED*/
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
+
+ if (act) {
+ Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
+
+ if (ract && ract->get_active() && Config->get_remote_model() != model) {
+ Config->set_remote_model (model);
+ }
+ }
+
+}
+
+void
ARDOUR_UI::set_monitor_model (MonitorModel model)
{
const char* action = 0;
@@ -478,6 +511,33 @@ ARDOUR_UI::map_monitor_model ()
}
void
+ARDOUR_UI::map_remote_model ()
+{
+ const char* on = 0;
+
+ switch (Config->get_remote_model()) {
+ case UserOrdered:
+ on = X_("RemoteUserDefined");
+ break;
+ case MixerOrdered:
+ on = X_("RemoteMixerDefined");
+ break;
+ case EditorOrdered:
+ on = X_("RemoteEditorDefined");
+ break;
+ }
+
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+
+ if (tact && !tact->get_active()) {
+ tact->set_active (true);
+ }
+ }
+}
+
+void
ARDOUR_UI::map_file_header_format ()
{
const char* action = 0;
@@ -814,6 +874,8 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
ActionManager::map_some_state ("options", "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end);
} else if (PARAM_IS ("monitoring-model")) {
map_monitor_model ();
+ } else if (PARAM_IS ("remote-model")) {
+ map_remote_model ();
} else if (PARAM_IS ("use-video-sync")) {
ActionManager::map_some_state ("Transport", "ToggleVideoSync", &Configuration::get_use_video_sync);
} else if (PARAM_IS ("quieten-at-speed")) {