1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 22:12:58 +02:00

Uses of TranslatableString as value of XO macro...

... It is not implicitly convertible from wxString, compelling many uses of
the new type to fix compilation.
This commit is contained in:
Paul Licameli
2018-03-29 16:26:31 -04:00
parent 911f5eabcc
commit e4a7c9ba5b
21 changed files with 58 additions and 61 deletions

View File

@@ -260,8 +260,8 @@ static const ReservedCommandFlag
namespace {
const struct MenuItem {
CommandID name;
wxString label;
wxString status;
TranslatableString label;
TranslatableString status;
CommandFlag flags;
void (Scrubber::*memFn)(const CommandContext&);
bool seek;
@@ -283,7 +283,7 @@ namespace {
&Scrubber::OnSeek, true, &Scrubber::Seeks,
},
{ wxT("ToggleScrubRuler"), XO("Scrub &Ruler"), wxT(""),
{ wxT("ToggleScrubRuler"), XO("Scrub &Ruler"), {},
AlwaysEnabledFlag,
&Scrubber::OnToggleScrubRuler, false, &Scrubber::ShowsBar,
},
@@ -961,11 +961,11 @@ END_EVENT_TABLE()
static_assert(nMenuItems == 3, "wrong number of items");
static wxString sPlayAtSpeedStatus = XO("Playing at Speed");
static auto sPlayAtSpeedStatus = XO("Playing at Speed");
const wxString &Scrubber::GetUntranslatedStateString() const
const TranslatableString &Scrubber::GetUntranslatedStateString() const
{
static wxString empty;
static TranslatableString empty;
if (IsSpeedPlaying()) {
return sPlayAtSpeedStatus;

View File

@@ -27,6 +27,7 @@ Paul Licameli split from TrackPanel.cpp
class AudacityProject;
extern AudacityProject *GetActiveProject();
class TranslatableString;
// Conditionally compile either a separate thead, or else use a timer in the main
// thread, to poll the mouse and update scrubbing speed and direction. The advantage of
@@ -124,7 +125,7 @@ public:
// A string to put in the leftmost part of the status bar
// when scrub or seek is in progress, or else empty.
const wxString &GetUntranslatedStateString() const;
const TranslatableString &GetUntranslatedStateString() const;
wxString StatusMessageForWave() const;
void Pause(bool paused);