diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2018-10-05 12:35:13 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2018-10-05 14:15:02 -0400 |
commit | 58e9bb0a14ccda3242ac849067b27660383681f8 (patch) | |
tree | a82744236e51e69432cd53de2f839ba221af4f27 /gtk2_ardour/audio_clock.cc | |
parent | 4c7e5dbc74981dfe1c1d277a633cb2cce0d6036b (diff) |
move away from "sync source" concepts
Diffstat (limited to 'gtk2_ardour/audio_clock.cc')
-rw-r--r-- | gtk2_ardour/audio_clock.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 9bc7128ab2..68faab78b0 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -36,6 +36,7 @@ #include "ardour/session.h" #include "ardour/transport_master.h" #include "ardour/tempo.h" +#include "ardour/transport_master_manager.h" #include "ardour/types.h" #include "ardour_ui.h" @@ -938,12 +939,10 @@ AudioClock::set_slave_info () return; } - const SyncSource sync_src = Config->get_sync_source(); + boost::shared_ptr<TransportMaster> tm = TransportMasterManager::instance().current(); if (_session->transport_master_is_external()) { - boost::shared_ptr<TransportMaster> tm = _session->transport_master(); - switch (tm->type()) { case Engine: _left_btn.set_text (tm->name(), true); @@ -951,7 +950,7 @@ AudioClock::set_slave_info () break; case MIDIClock: if (tm) { - _left_btn.set_text (sync_source_to_string (tm->type(), true), true); + _left_btn.set_text (tm->display_name(), true); _right_btn.set_text (tm->delta_string (), true); } else { _left_btn.set_text (_("--pending--"), true); @@ -966,7 +965,7 @@ AudioClock::set_slave_info () if ((tcmaster = boost::dynamic_pointer_cast<TimecodeTransportMaster>(tm)) != 0) { matching = (tcmaster->apparent_timecode_format() == _session->config.get_timecode_format()); _left_btn.set_text (string_compose ("%1<span face=\"monospace\" foreground=\"%3\">%2</span>", - sync_source_to_string(tm->type(), true)[0], + tm->display_name()[0], tcmaster->position_string (), matching ? "#66ff66" : "#ff3333" ), true); @@ -979,7 +978,7 @@ AudioClock::set_slave_info () break; } } else { - _left_btn.set_text (string_compose ("%1/%2", _("INT"), sync_source_to_string (sync_src, true)), true); + _left_btn.set_text (string_compose ("%1/%2", _("INT"), tm->display_name()), true); _right_btn.set_text ("", true); } } |