set (last_when, true);
}
-void
-AudioClock::metric_position_changed ()
-{
- set (last_when, true);
-}
-
void
AudioClock::session_configuration_changed (std::string p)
{
switch (sync_src) {
case Engine:
- _left_btn.set_text (sync_source_to_string (sync_src, true));
- _right_btn.set_text ("");
+ _left_btn.set_text (sync_source_to_string (sync_src, true), true);
+ _right_btn.set_text ("", true);
break;
case MIDIClock:
if (slave) {
- _left_btn.set_text (sync_source_to_string (sync_src, true));
+ _left_btn.set_text (sync_source_to_string (sync_src, true), true);
_right_btn.set_text (slave->approximate_current_delta (), true);
} else {
- _left_btn.set_text (_("--pending--"));
- _right_btn.set_text ("");
+ _left_btn.set_text (_("--pending--"), true);
+ _right_btn.set_text ("", true);
}
break;
case LTC:
TimecodeSlave* tcslave;
if ((tcslave = dynamic_cast<TimecodeSlave*>(_session->slave())) != 0) {
matching = (tcslave->apparent_timecode_format() == _session->config.get_timecode_format());
- _left_btn.set_text (string_compose ("%1 <span face=\"monospace\" foreground=\"%3\">%2</span>",
+ _left_btn.set_text (string_compose ("%1<span face=\"monospace\" foreground=\"%3\">%2</span>",
sync_source_to_string(sync_src, true)[0],
dynamic_cast<TimecodeSlave*>(slave)->approximate_current_position (),
matching ? "#66ff66" : "#ff3333"
_right_btn.set_text (slave->approximate_current_delta (), true);
}
} else {
- _left_btn.set_text (_("--pending--"));
- _right_btn.set_text ("");
+ _left_btn.set_text (_("--pending--"), true);
+ _right_btn.set_text ("", true);
}
break;
}
} else {
_left_btn.set_text (string_compose ("%1/%2",
- _("INT"), sync_source_to_string(sync_src, true)));
- _right_btn.set_text ("");
+ _("INT"), sync_source_to_string(sync_src, true)), true);
+ _right_btn.set_text ("", true);
}
}
if (_off) {
_layout->set_text (" ----------");
- _left_btn.set_text ("");
- _right_btn.set_text ("");
+ _left_btn.set_text ("", true);
+ _right_btn.set_text ("", true);
return;
}
sprintf (buf, "%" PRId64 "Hz", rate);
}
- _left_btn.set_text (string_compose ("%1 %2", _("SR"), buf));
+ _left_btn.set_text (string_compose ("%1 %2", _("SR"), buf), true);
float vid_pullup = _session->config.get_video_pullup();
if (vid_pullup == 0.0) {
- _right_btn.set_text ("");
+ _right_btn.set_text ("", true);
} else {
sprintf (buf, _("%+.4f%%"), vid_pullup);
- _right_btn.set_text (string_compose ("%1 %2", _("Pull"), buf));
+ _right_btn.set_text (string_compose ("%1 %2", _("Pull"), buf), true);
}
}
}
if (_off) {
_layout->set_text (" --:--:--.---");
- _left_btn.set_text ("");
- _right_btn.set_text ("");
+ _left_btn.set_text ("", true);
+ _right_btn.set_text ("", true);
return;
}
if (_off) {
_layout->set_text (" --:--:--:--");
- _left_btn.set_text ("");
- _right_btn.set_text ("");
+ _left_btn.set_text ("", true);
+ _right_btn.set_text ("", true);
return;
}
if (_off) {
_layout->set_text (" ---|--|----");
- _left_btn.set_text ("");
- _right_btn.set_text ("");
+ _left_btn.set_text ("", true);
+ _right_btn.set_text ("", true);
return;
}
if (m.tempo().note_type() == 4) {
snprintf (buf, sizeof(buf), "\u2669 = %.3f", _session->tempo_map().tempo_at_frame (pos).note_types_per_minute());
- _left_btn.set_text (string_compose ("%1", buf));
+ _left_btn.set_text (string_compose ("%1", buf), true);
} else if (m.tempo().note_type() == 8) {
snprintf (buf, sizeof(buf), "\u266a = %.3f", _session->tempo_map().tempo_at_frame (pos).note_types_per_minute());
- _left_btn.set_text (string_compose ("%1", buf));
+ _left_btn.set_text (string_compose ("%1", buf), true);
} else {
snprintf (buf, sizeof(buf), "%.1f = %.3f", m.tempo().note_type(), _session->tempo_map().tempo_at_frame (pos).note_types_per_minute());
- _left_btn.set_text (string_compose ("%1: %2", S_("Tempo|T"), buf));
+ _left_btn.set_text (string_compose ("%1: %2", S_("Tempo|T"), buf), true);
}
snprintf (buf, sizeof(buf), "%g/%g", m.meter().divisions_per_bar(), m.meter().note_divisor());
- _right_btn.set_text (string_compose ("%1: %2", S_("TimeSignature|TS"), buf));
+ _right_btn.set_text (string_compose ("%1: %2", S_("TimeSignature|TS"), buf), true);
}
}
Config->ParameterChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_configuration_changed, this, _1), gui_context());
_session->config.ParameterChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_configuration_changed, this, _1), gui_context());
_session->tempo_map().PropertyChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_property_changed, this, _1), gui_context());
- _session->tempo_map().MetricPositionChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::metric_position_changed, this), gui_context());
+ _session->tempo_map().MetricPositionChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_property_changed, this, _1), gui_context());
XMLProperty const * prop;
XMLNode* node = _session->extra_xml (X_("ClockModes"));