mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 22:56:32 +01:00
use translatable strings for TC info,
and prepare delta display git-svn-id: svn://localhost/ardour2/branches/3.0@13275 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
bdcd6dba69
commit
3769c060f2
2 changed files with 29 additions and 10 deletions
|
|
@ -1108,34 +1108,49 @@ AudioClock::set_timecode (framepos_t when, bool /*force*/)
|
||||||
|
|
||||||
if (_session->config.get_external_sync()) {
|
if (_session->config.get_external_sync()) {
|
||||||
Slave* slave = _session->slave();
|
Slave* slave = _session->slave();
|
||||||
|
SyncSource sync_src = Config->get_sync_source();
|
||||||
|
|
||||||
switch (Config->get_sync_source()) {
|
switch (sync_src) {
|
||||||
case JACK:
|
case JACK:
|
||||||
_left_layout->set_text ("JACK");
|
_left_layout->set_text (string_compose ("%1",
|
||||||
|
sync_source_to_string(sync_src, true)));
|
||||||
|
_right_layout->set_text ("");
|
||||||
break;
|
break;
|
||||||
case MTC:
|
case MTC:
|
||||||
if (slave) {
|
if (slave) {
|
||||||
_left_layout->set_text (string_compose ("MTC %1", dynamic_cast<TimecodeSlave*>(slave)->approximate_current_position()));
|
_left_layout->set_text (string_compose ("%1 %2",
|
||||||
|
sync_source_to_string(sync_src, true),
|
||||||
|
dynamic_cast<TimecodeSlave*>(slave)->approximate_current_position()));
|
||||||
|
_right_layout->set_text ("+- 0"); // XXX
|
||||||
} else {
|
} else {
|
||||||
_left_layout->set_text ("MTC --pending--");
|
_left_layout->set_text (string_compose ("%1 --pending--",
|
||||||
|
sync_source_to_string(sync_src, true)));
|
||||||
|
_right_layout->set_text ("");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MIDIClock:
|
case MIDIClock:
|
||||||
_left_layout->set_text ("M-Clock");
|
_left_layout->set_text (string_compose ("%1",
|
||||||
|
sync_source_to_string(sync_src, true)));
|
||||||
|
_right_layout->set_text ("");
|
||||||
break;
|
break;
|
||||||
case LTC:
|
case LTC:
|
||||||
if (slave) {
|
if (slave) {
|
||||||
_left_layout->set_text (string_compose ("LTC %1", dynamic_cast<TimecodeSlave*>(slave)->approximate_current_position()));
|
_left_layout->set_text (string_compose ("%1 %2",
|
||||||
|
sync_source_to_string(sync_src, true),
|
||||||
|
dynamic_cast<TimecodeSlave*>(slave)->approximate_current_position()));
|
||||||
|
_right_layout->set_text ("+- 0"); // XXX
|
||||||
} else {
|
} else {
|
||||||
_left_layout->set_text ("LTC --pending--");
|
_left_layout->set_text (string_compose ("%1 --pending--",
|
||||||
|
sync_source_to_string(sync_src, true)));
|
||||||
|
_right_layout->set_text ("");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_left_layout->set_text ("INT");
|
_left_layout->set_text ("INT");
|
||||||
|
_right_layout->set_text ("");
|
||||||
}
|
}
|
||||||
|
|
||||||
_right_layout->set_text ("77:77:77:77");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2018,7 +2033,7 @@ AudioClock::set_mode (Mode m)
|
||||||
|
|
||||||
switch (_mode) {
|
switch (_mode) {
|
||||||
case Timecode:
|
case Timecode:
|
||||||
mode_based_info_ratio = 0.57; // trial and error, could be affected by font metrics
|
mode_based_info_ratio = 0.62; // trial and error, could be affected by font metrics
|
||||||
insert_map.push_back (11);
|
insert_map.push_back (11);
|
||||||
insert_map.push_back (10);
|
insert_map.push_back (10);
|
||||||
insert_map.push_back (8);
|
insert_map.push_back (8);
|
||||||
|
|
|
||||||
|
|
@ -451,7 +451,11 @@ sync_source_to_string (SyncSource src, bool sh)
|
||||||
}
|
}
|
||||||
|
|
||||||
case MIDIClock:
|
case MIDIClock:
|
||||||
|
if (sh) {
|
||||||
|
return _("M-Clock");
|
||||||
|
} else {
|
||||||
return _("MIDI Clock");
|
return _("MIDI Clock");
|
||||||
|
}
|
||||||
|
|
||||||
case LTC:
|
case LTC:
|
||||||
return _("LTC");
|
return _("LTC");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue