mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Indicate UTF8 literals - fixes glyph rendering with MSVC (1/2)
This commit is contained in:
parent
c635d15cf0
commit
2c7f8eeb97
10 changed files with 24 additions and 24 deletions
|
|
@ -123,7 +123,7 @@ Engine_TransportMaster::position_string () const
|
||||||
std::string
|
std::string
|
||||||
Engine_TransportMaster::delta_string () const
|
Engine_TransportMaster::delta_string () const
|
||||||
{
|
{
|
||||||
return string ("\u0394 0 ");
|
return string (u8"\u0394 0 ");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
|
|
@ -656,7 +656,7 @@ std::string
|
||||||
LTC_TransportMaster::delta_string() const
|
LTC_TransportMaster::delta_string() const
|
||||||
{
|
{
|
||||||
if (!_collect || current.timestamp == 0) {
|
if (!_collect || current.timestamp == 0) {
|
||||||
return X_("\u2012\u2012\u2012\u2012");
|
return X_(u8"\u2012\u2012\u2012\u2012");
|
||||||
} else if ((monotonic_cnt - current.timestamp) > 2 * samples_per_ltc_frame) {
|
} else if ((monotonic_cnt - current.timestamp) > 2 * samples_per_ltc_frame) {
|
||||||
return _("flywheel");
|
return _("flywheel");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -437,7 +437,7 @@ MIDIClock_TransportMaster::delta_string() const
|
||||||
current.safe_read (last);
|
current.safe_read (last);
|
||||||
|
|
||||||
if (last.timestamp == 0 || starting()) {
|
if (last.timestamp == 0 || starting()) {
|
||||||
return X_("\u2012\u2012\u2012\u2012");
|
return X_(u8"\u2012\u2012\u2012\u2012");
|
||||||
} else {
|
} else {
|
||||||
return format_delta_time (_current_delta);
|
return format_delta_time (_current_delta);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -548,7 +548,7 @@ MTC_TransportMaster::delta_string () const
|
||||||
current.safe_read (last);
|
current.safe_read (last);
|
||||||
|
|
||||||
if (last.timestamp == 0 || reset_pending) {
|
if (last.timestamp == 0 || reset_pending) {
|
||||||
return X_("\u2012\u2012\u2012\u2012");
|
return X_(u8"\u2012\u2012\u2012\u2012");
|
||||||
} else {
|
} else {
|
||||||
return format_delta_time (_current_delta);
|
return format_delta_time (_current_delta);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -528,7 +528,7 @@ TimecodeTransportMaster::set_fr2997 (bool yn)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* used for delta_string(): (note: \u00B1 is the plus-or-minus sign) */
|
/* used for delta_string(): (note: \u00B1 is the plus-or-minus sign) */
|
||||||
#define PLUSMINUS(A) (((A) < 0) ? "-" : (((A) > 0) ? "+" : "\u00B1"))
|
#define PLUSMINUS(A) (((A) < 0) ? "-" : (((A) > 0) ? "+" : u8"\u00B1"))
|
||||||
#define LEADINGZERO(A) ((A) < 10 ? " " : (A) < 100 ? " " : (A) < 1000 ? " " : (A) < 10000 ? " " : "")
|
#define LEADINGZERO(A) ((A) < 10 ? " " : (A) < 100 ? " " : (A) < 1000 ? " " : (A) < 10000 ? " " : "")
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
|
|
@ -539,13 +539,13 @@ TransportMaster::format_delta_time (sampleoffset_t delta) const
|
||||||
samplecnt_t sr = _session->sample_rate();
|
samplecnt_t sr = _session->sample_rate();
|
||||||
if (abs (_current_delta) >= sr) {
|
if (abs (_current_delta) >= sr) {
|
||||||
int secs = rint ((double) delta / sr);
|
int secs = rint ((double) delta / sr);
|
||||||
snprintf(buf, sizeof(buf), "\u0394%s%s%d s", LEADINGZERO(abs(secs)), PLUSMINUS(-secs), abs(secs));
|
snprintf(buf, sizeof(buf), u8"\u0394%s%s%d s", LEADINGZERO(abs(secs)), PLUSMINUS(-secs), abs(secs));
|
||||||
buf[63] = '\0';
|
buf[63] = '\0';
|
||||||
return std::string(buf);
|
return std::string(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* left-align sign, to make it readable when decimals jitter */
|
/* left-align sign, to make it readable when decimals jitter */
|
||||||
snprintf (buf, sizeof(buf), "\u0394%s%s%lldsm", PLUSMINUS(-delta), LEADINGZERO(::llabs(delta)), ::llabs(delta));
|
snprintf (buf, sizeof(buf), u8"\u0394%s%s%lldsm", PLUSMINUS(-delta), LEADINGZERO(::llabs(delta)), ::llabs(delta));
|
||||||
buf[63] = '\0';
|
buf[63] = '\0';
|
||||||
return std::string(buf);
|
return std::string(buf);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ ARDOUR::cue_marker_name (int32_t index)
|
||||||
|
|
||||||
if (index == CueRecord::stop_all) {
|
if (index == CueRecord::stop_all) {
|
||||||
/* this is a reasonable "stop" icon */
|
/* this is a reasonable "stop" icon */
|
||||||
return string (X_("\u25a1"));
|
return string (X_(u8"\u25a1"));
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
|
||||||
|
|
@ -399,13 +399,13 @@ VBAPanner::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
|
||||||
|
|
||||||
switch (ac->parameter ().type ()) {
|
switch (ac->parameter ().type ()) {
|
||||||
case PanAzimuthAutomation: /* direction */
|
case PanAzimuthAutomation: /* direction */
|
||||||
return string_compose (_ ("%1\u00B0"), (int(rint (val * 360.0)) + 180) % 360);
|
return string_compose (_ (u8"%1\u00B0"), (int(rint (val * 360.0)) + 180) % 360);
|
||||||
|
|
||||||
case PanWidthAutomation: /* diffusion */
|
case PanWidthAutomation: /* diffusion */
|
||||||
return string_compose (_ ("%1%%"), (int)floor (100.0 * fabs (val)));
|
return string_compose (_ ("%1%%"), (int)floor (100.0 * fabs (val)));
|
||||||
|
|
||||||
case PanElevationAutomation: /* elevation */
|
case PanElevationAutomation: /* elevation */
|
||||||
return string_compose (_ ("%1\u00B0"), (int)floor (90.0 * fabs (val)));
|
return string_compose (_ (u8"%1\u00B0"), (int)floor (90.0 * fabs (val)));
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return _ ("unused");
|
return _ ("unused");
|
||||||
|
|
|
||||||
|
|
@ -517,7 +517,7 @@ MackieControlProtocolGUI::refresh_function_key_editor ()
|
||||||
|
|
||||||
Glib::RefPtr<Gtk::Action> act;
|
Glib::RefPtr<Gtk::Action> act;
|
||||||
string action;
|
string action;
|
||||||
const string defstring = "\u2022";
|
const string defstring = u8"\u2022";
|
||||||
|
|
||||||
/* We only allow plain bindings for Fn keys. All others are
|
/* We only allow plain bindings for Fn keys. All others are
|
||||||
* reserved for hard-coded actions.
|
* reserved for hard-coded actions.
|
||||||
|
|
@ -668,7 +668,7 @@ MackieControlProtocolGUI::action_changed (const Glib::ustring &sPath, const Tree
|
||||||
within the model.
|
within the model.
|
||||||
*/
|
*/
|
||||||
if (remove) {
|
if (remove) {
|
||||||
Glib::ustring dot = "\u2022";
|
Glib::ustring dot = u8"\u2022";
|
||||||
(*row).set_value (col.index(), dot);
|
(*row).set_value (col.index(), dot);
|
||||||
} else {
|
} else {
|
||||||
(*row).set_value (col.index(), act->get_label());
|
(*row).set_value (col.index(), act->get_label());
|
||||||
|
|
|
||||||
|
|
@ -47,13 +47,13 @@ row_interval_string (const Push2::RowInterval row_interval, const bool inkey)
|
||||||
{
|
{
|
||||||
switch (row_interval) {
|
switch (row_interval) {
|
||||||
case Push2::Third:
|
case Push2::Third:
|
||||||
return _("3rd \u2191");
|
return _(u8"3rd \u2191");
|
||||||
case Push2::Fourth:
|
case Push2::Fourth:
|
||||||
return _("4th \u2191");
|
return _(u8"4th \u2191");
|
||||||
case Push2::Fifth:
|
case Push2::Fifth:
|
||||||
return _("5th \u2191");
|
return _(u8"5th \u2191");
|
||||||
case Push2::Sequential:
|
case Push2::Sequential:
|
||||||
return inkey ? _("Octave \u2191") : _("Sequential \u2191");
|
return inkey ? _(u8"Octave \u2191") : _(u8"Sequential \u2191");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|
@ -62,7 +62,7 @@ row_interval_string (const Push2::RowInterval row_interval, const bool inkey)
|
||||||
static const char*
|
static const char*
|
||||||
column_interval_string (const bool inkey)
|
column_interval_string (const bool inkey)
|
||||||
{
|
{
|
||||||
return inkey ? _("Scale \u2192") : _("Semitone \u2192");
|
return inkey ? _(u8"Scale \u2192") : _(u8"Semitone \u2192");
|
||||||
}
|
}
|
||||||
|
|
||||||
ScaleLayout::ScaleLayout (Push2& p, Session & s, std::string const & name)
|
ScaleLayout::ScaleLayout (Push2& p, Session & s, std::string const & name)
|
||||||
|
|
@ -179,19 +179,19 @@ ScaleLayout::ScaleLayout (Push2& p, Session & s, std::string const & name)
|
||||||
t->set (S_("Note|F"));
|
t->set (S_("Note|F"));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
t->set (S_("Note|B\u266D/A\u266F"));
|
t->set (S_(u8"Note|B\u266D/A\u266F"));
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
t->set (S_("Note|E\u266D/D\u266F"));
|
t->set (S_(u8"Note|E\u266D/D\u266F"));
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
t->set (S_("Note|A\u266D/G\u266F"));
|
t->set (S_(u8"Note|A\u266D/G\u266F"));
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
t->set (S_("Note|D\u266D/C\u266F"));
|
t->set (S_(u8"Note|D\u266D/C\u266F"));
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
t->set (S_("Note|G\u266D/F\u266F"));
|
t->set (S_(u8"Note|G\u266D/F\u266F"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -407,7 +407,7 @@ US2400ProtocolGUI::refresh_function_key_editor ()
|
||||||
|
|
||||||
Glib::RefPtr<Gtk::Action> act;
|
Glib::RefPtr<Gtk::Action> act;
|
||||||
string action;
|
string action;
|
||||||
const string defstring = "\u2022";
|
const string defstring = u8"\u2022";
|
||||||
|
|
||||||
/* We only allow plain bindings for Fn keys. All others are
|
/* We only allow plain bindings for Fn keys. All others are
|
||||||
* reserved for hard-coded actions. */
|
* reserved for hard-coded actions. */
|
||||||
|
|
@ -470,7 +470,7 @@ US2400ProtocolGUI::action_changed (const Glib::ustring &sPath, const TreeModel::
|
||||||
* within the model.
|
* within the model.
|
||||||
*/
|
*/
|
||||||
if (remove) {
|
if (remove) {
|
||||||
Glib::ustring dot = "\u2022";
|
Glib::ustring dot = u8"\u2022";
|
||||||
(*row).set_value (col.index(), dot);
|
(*row).set_value (col.index(), dot);
|
||||||
} else {
|
} else {
|
||||||
(*row).set_value (col.index(), act->get_label());
|
(*row).set_value (col.index(), act->get_label());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue