From 4336bb25d739cd007811ccd0298a15acc5e20787 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 23 Dec 2010 00:26:54 +0000 Subject: [PATCH] Use MTC instead of MIDI Timecode as the string for the external sync button. Fixes #3621. git-svn-id: svn://localhost/ardour2/branches/3.0@8332 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_ui_options.cc | 2 +- libs/ardour/ardour/utils.h | 2 +- libs/ardour/utils.cc | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 9957b4587d..aee08f13b5 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -331,7 +331,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_label (sync_source_to_string (_session->config.get_sync_source())); + sync_button.set_label (sync_source_to_string (_session->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); diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h index 06dc6d6bd9..0b3fbc7b6c 100644 --- a/libs/ardour/ardour/utils.h +++ b/libs/ardour/ardour/utils.h @@ -64,7 +64,7 @@ bool path_is_paired (std::string path, std::string& pair_base); void compute_equal_power_fades (ARDOUR::framecnt_t nframes, float* in, float* out); -const char* sync_source_to_string (ARDOUR::SyncSource src); +const char* sync_source_to_string (ARDOUR::SyncSource src, bool sh = false); ARDOUR::SyncSource string_to_sync_source (std::string str); const char* edit_mode_to_string (ARDOUR::EditMode); diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index 64e06b6f12..f9d16a47b4 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -400,7 +400,7 @@ edit_mode_to_string (EditMode mode) SyncSource string_to_sync_source (string str) { - if (str == _("MIDI Timecode")) { + if (str == _("MIDI Timecode") || str == _("MTC")) { return MTC; } @@ -417,15 +417,20 @@ string_to_sync_source (string str) return JACK; } +/** @param sh Return a short version of the string */ const char* -sync_source_to_string (SyncSource src) +sync_source_to_string (SyncSource src, bool sh) { switch (src) { case JACK: return _("JACK"); case MTC: - return _("MIDI Timecode"); + if (sh) { + return _("MTC"); + } else { + return _("MIDI Timecode"); + } case MIDIClock: return _("MIDI Clock");