diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-11 03:10:18 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-11 03:10:18 +0000 |
commit | 9707a0e8271a54dd21e49d6ca9ae98378ac4f8a5 (patch) | |
tree | 3db9d9cab869d2bfab9f68b1afca56b1da5811fe /gtk2_ardour | |
parent | 1a530550196050dfe4a67732965ae3ddc3e1b077 (diff) |
move the external sync source selection tobe a global config parameter, not per-session, since this is likely a reflection of studio setup, h/w etc.; starting using real tooltips in the RC option editor
git-svn-id: svn://localhost/ardour2/branches/3.0@13237 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_options.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/audio_clock.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/rc_option_editor.cc | 51 | ||||
-rw-r--r-- | gtk2_ardour/rc_option_editor.h | 3 | ||||
-rw-r--r-- | gtk2_ardour/session_option_editor.cc | 28 | ||||
-rw-r--r-- | gtk2_ardour/session_option_editor.h | 2 |
8 files changed, 55 insertions, 43 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 6968c6b78a..b02bfd61c4 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1601,7 +1601,7 @@ ARDOUR_UI::transport_roll () #if 0 if (_session->config.get_external_sync()) { - switch (_session->config.get_sync_source()) { + switch (Config->get_sync_source()) { case JACK: break; default: @@ -1648,7 +1648,7 @@ ARDOUR_UI::toggle_roll (bool with_abort, bool roll_out_of_bounded_mode) } if (_session->config.get_external_sync()) { - switch (_session->config.get_sync_source()) { + switch (Config->get_sync_source()) { case JACK: break; default: diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 232c41b0c7..5da10c7ea3 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -60,7 +60,7 @@ ARDOUR_UI::toggle_external_sync() { if (_session) { if (_session->config.get_video_pullup() != 0.0f) { - if (_session->config.get_sync_source() == JACK) { + if (Config->get_sync_source() == JACK) { MessageDialog msg ( _("It is not possible to use JACK as the the sync source\n\ when the pull up/down setting is non-zero.")); @@ -311,7 +311,7 @@ ARDOUR_UI::parameter_changed (std::string p) ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true); ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (true); } else { - sync_button.set_text (sync_source_to_string (_session->config.get_sync_source(), true)); + sync_button.set_text (sync_source_to_string (Config->get_sync_source(), true)); /* XXX need to make auto-play is off as well as insensitive */ ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false); ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false); @@ -439,7 +439,7 @@ ARDOUR_UI::synchronize_sync_source_and_video_pullup () act->set_sensitive (true); } else { /* can't sync to JACK if video pullup != 0.0 */ - if (_session->config.get_sync_source() == JACK) { + if (Config->get_sync_source() == JACK) { act->set_sensitive (false); } else { act->set_sensitive (true); diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 3a2bf0cee1..776903ae1f 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -1083,7 +1083,7 @@ AudioClock::set_timecode (framepos_t when, bool /*force*/) if (_left_layout) { if (_session->config.get_external_sync()) { - switch (_session->config.get_sync_source()) { + switch (Config->get_sync_source()) { case JACK: _left_layout->set_text ("JACK"); break; diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index d891db6651..0aac921afd 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -2106,7 +2106,7 @@ Editor::transition_to_rolling (bool fwd) } if (_session->config.get_external_sync()) { - switch (_session->config.get_sync_source()) { + switch (Config->get_sync_source()) { case JACK: break; default: diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 9365f8eedd..0af11adae0 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -1019,24 +1019,45 @@ RCOptionEditor::RCOptionEditor () BoolOption* tsf = new BoolOption ( "timecode-sync-frame-rate", - _("Force Ardour's timecode rate to match an external timecode source"), + _("Match session video frame rate to external timecode (when slaved to timecode)"), sigc::mem_fun (*_rc_config, &RCConfiguration::get_timecode_sync_frame_rate), sigc::mem_fun (*_rc_config, &RCConfiguration::set_timecode_sync_frame_rate) ); - tsf->set_note (_("If off, slaving to timecode will cause Ardour to chase the external timecode\nsource but it will use its own timecode frame rate")); + Gtkmm2ext::UI::instance()->set_tip + (tsf->tip_widget(), + _("This option controls the value of the video frame rate <i>while chasing</i> an external timecode source.\n\n" + "When enabled, the session video frame rate will be changed to match that of the selected external timecode source.\n\n" + "When not enabled, the session video frame rate will not be changed to match that of the selected external timecode source." + "Instead the frame rate indication in the main clock will flash red and Ardour will convert between the external " + "timecode standard and the session standard")); + add_option (_("Transport"), tsf); tsf = new BoolOption ( "timecode-source-is-synced", - _("Timecode source shares sample clock with audio interface"), + _("External timecode is sync locked"), sigc::mem_fun (*_rc_config, &RCConfiguration::get_timecode_source_is_synced), sigc::mem_fun (*_rc_config, &RCConfiguration::set_timecode_source_is_synced) ); - Gtkmm2ext::UI::instance()->set_tip (tsf->tip_widget(), - _("If on, Ardour will assume that the timecode source shares an external sync\nsource (Blackburst, Word Clock, etc.) with your audio interface." - "\nThis is a preferable configuration but may not match your equipment")); + Gtkmm2ext::UI::instance()->set_tip + (tsf->tip_widget(), + _("When enabled, indicates that the selected external timecode source shares sync (Black & Burst, Wordclock, etc) with the audio interface")); + add_option (_("Transport"), tsf); + _sync_source = new ComboOption<SyncSource> ( + "sync-source", + _("External timecode source"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_sync_source), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_sync_source) + ); + + populate_sync_options (); + parameter_changed (string ("external-sync")); + + add_option (_("Timecode"), _sync_source); + + /* EDITOR */ add_option (_("Editor"), @@ -1674,5 +1695,23 @@ RCOptionEditor::parameter_changed (string const & p) } _solo_control_is_listen_control->set_sensitive (s); _listen_position->set_sensitive (s); + } else if (p == "external-sync") { + if (_session) { + _sync_source->set_sensitive (!_session->config.get_external_sync ()); + } else { + _sync_source->set_sensitive (false); + } + } +} + +void +RCOptionEditor::populate_sync_options () +{ + vector<SyncSource> sync_opts = ARDOUR::get_available_sync_options (); + + _sync_source->clear (); + + for (vector<SyncSource>::iterator i = sync_opts.begin(); i != sync_opts.end(); ++i) { + _sync_source->add (*i, sync_source_to_string (*i)); } } diff --git a/gtk2_ardour/rc_option_editor.h b/gtk2_ardour/rc_option_editor.h index a5711919a9..6789594e8a 100644 --- a/gtk2_ardour/rc_option_editor.h +++ b/gtk2_ardour/rc_option_editor.h @@ -34,10 +34,13 @@ class RCOptionEditor : public OptionEditor public: RCOptionEditor (); + void populate_sync_options (); + private: void parameter_changed (std::string const &); ARDOUR::RCConfiguration* _rc_config; BoolOption* _solo_control_is_listen_control; ComboOption<ARDOUR::ListenPosition>* _listen_position; VisibilityGroup _mixer_strip_visibility; + ComboOption<ARDOUR::SyncSource>* _sync_source; }; diff --git a/gtk2_ardour/session_option_editor.cc b/gtk2_ardour/session_option_editor.cc index 6834a9ddea..c0c8bc07cd 100644 --- a/gtk2_ardour/session_option_editor.cc +++ b/gtk2_ardour/session_option_editor.cc @@ -37,18 +37,6 @@ SessionOptionEditor::SessionOptionEditor (Session* s) /* TIMECODE*/ - _sync_source = new ComboOption<SyncSource> ( - "sync-source", - _("External timecode source"), - sigc::mem_fun (*_session_config, &SessionConfiguration::get_sync_source), - sigc::mem_fun (*_session_config, &SessionConfiguration::set_sync_source) - ); - - populate_sync_options (); - parameter_changed (string ("external-sync")); - - add_option (_("Timecode"), _sync_source); - add_option (_("Timecode"), new OptionEditorHeading (_("Timecode Settings"))); ComboOption<TimecodeFormat>* smf = new ComboOption<TimecodeFormat> ( @@ -300,25 +288,9 @@ SessionOptionEditor::SessionOptionEditor (Session* s) } void -SessionOptionEditor::populate_sync_options () -{ - vector<SyncSource> sync_opts = _session->get_available_sync_options (); - - _sync_source->clear (); - - for (vector<SyncSource>::iterator i = sync_opts.begin(); i != sync_opts.end(); ++i) { - _sync_source->add (*i, sync_source_to_string (*i)); - } -} - -void SessionOptionEditor::parameter_changed (std::string const & p) { OptionEditor::parameter_changed (p); - - if (p == "external-sync") { - _sync_source->set_sensitive (!_session->config.get_external_sync ()); - } } /* the presence of absence of a monitor section is not really a regular session diff --git a/gtk2_ardour/session_option_editor.h b/gtk2_ardour/session_option_editor.h index 55d49a1e3a..3914ec8a8d 100644 --- a/gtk2_ardour/session_option_editor.h +++ b/gtk2_ardour/session_option_editor.h @@ -31,10 +31,8 @@ public: private: void parameter_changed (std::string const &); - void populate_sync_options (); ARDOUR::SessionConfiguration* _session_config; - ComboOption<ARDOUR::SyncSource>* _sync_source; bool set_use_monitor_section (bool); bool get_use_monitor_section (); |