summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-10-12 22:04:21 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-10-12 22:04:21 +0000
commiteaaca760c9e2e259f87801bce59442f5cf9d2210 (patch)
tree9a0295da4bc5bbb7d3370fb0ff5b98877541a642 /gtk2_ardour/ardour_ui.cc
parent5eeecf82a0432c1ed951886539a7331c71c15af9 (diff)
tweaks to be ready for more information timecode display in Timecode clock mode
git-svn-id: svn://localhost/ardour2/branches/3.0@13264 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r--gtk2_ardour/ardour_ui.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 19f01ff7d1..04ed4dbbd4 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -73,6 +73,7 @@
#include "ardour/session_route.h"
#include "ardour/session_state_utils.h"
#include "ardour/session_utils.h"
+#include "ardour/slave.h"
#include "timecode/time.h"
@@ -1105,8 +1106,17 @@ ARDOUR_UI::update_timecode_format ()
char buf[64];
if (_session) {
+ bool matching;
+ TimecodeSlave* tcslave;
+
+ if ((tcslave = dynamic_cast<TimecodeSlave*>(_session->slave())) != 0) {
+ matching = (tcslave->apparent_timecode_format() == _session->config.get_timecode_format());
+ } else {
+ matching = true;
+ }
+
snprintf (buf, sizeof (buf), S_("Timecode|TC: <span foreground=\"%s\">%sfps</span>"),
- rand() % 2 ? X_("red") : X_("green"),
+ matching ? X_("red") : X_("green"),
Timecode::timecode_format_name (_session->config.get_timecode_format()).c_str());
} else {
snprintf (buf, sizeof (buf), "TC: n/a");