diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-12 16:25:57 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-12 16:25:57 +0000 |
commit | 5a8e83e0deef37e2973879a46af21487912b2c59 (patch) | |
tree | 7d5726db162a0e6966302f02b3bf541515fc5b4c /gtk2_ardour/ardour_ui.cc | |
parent | bce3184ff5383f47675a97a8184f7739552cb04e (diff) |
move TC FPS up into status bar, use lower right of timecode audioclock mode for something ... TBDiscussed
git-svn-id: svn://localhost/ardour2/branches/3.0@13257 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index b02bfd61c4..19f01ff7d1 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -74,6 +74,8 @@ #include "ardour/session_state_utils.h" #include "ardour/session_utils.h" +#include "timecode/time.h" + typedef uint64_t microseconds_t; #include "about.h" @@ -463,6 +465,7 @@ ARDOUR_UI::post_engine () update_disk_space (); update_cpu_load (); update_sample_rate (engine->frame_rate()); + update_timecode_format (); Config->ParameterChanged.connect (forever_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::parameter_changed, this, _1), gui_context()); boost::function<void (string)> pc (boost::bind (&ARDOUR_UI::parameter_changed, this, _1)); @@ -886,6 +889,7 @@ ARDOUR_UI::every_second () update_cpu_load (); update_buffer_load (); update_disk_space (); + update_timecode_format (); return TRUE; } @@ -1095,6 +1099,22 @@ ARDOUR_UI::update_disk_space() disk_space_label.set_markup (buf); } +void +ARDOUR_UI::update_timecode_format () +{ + char buf[64]; + + if (_session) { + snprintf (buf, sizeof (buf), S_("Timecode|TC: <span foreground=\"%s\">%sfps</span>"), + rand() % 2 ? X_("red") : X_("green"), + Timecode::timecode_format_name (_session->config.get_timecode_format()).c_str()); + } else { + snprintf (buf, sizeof (buf), "TC: n/a"); + } + + timecode_format_label.set_markup (buf); +} + gint ARDOUR_UI::update_wall_clock () { |