mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-19 17:40:51 +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:
parent
911f5eabcc
commit
e4a7c9ba5b
@ -28,8 +28,8 @@ extern AUDACITY_DLL_API const wxString& GetCustomSubstitution(const wxString& st
|
|||||||
// Marks string for substitution only.
|
// Marks string for substitution only.
|
||||||
#define _TS( s ) GetCustomSubstitution( s )
|
#define _TS( s ) GetCustomSubstitution( s )
|
||||||
|
|
||||||
// Marks strings for extraction only...must use wxGetTranslation() to translate.
|
// Marks strings for extraction only... use .Translate() to translate.
|
||||||
#define XO(s) wxT(s)
|
#define XO(s) (TranslatableString{ wxT(s) })
|
||||||
|
|
||||||
#ifdef _
|
#ifdef _
|
||||||
#undef _
|
#undef _
|
||||||
|
@ -737,7 +737,7 @@ private:
|
|||||||
|
|
||||||
static wxArrayString names()
|
static wxArrayString names()
|
||||||
{
|
{
|
||||||
static wxString theNames[] =
|
static TranslatableString theNames[] =
|
||||||
{
|
{
|
||||||
LABEL_ARTIST,
|
LABEL_ARTIST,
|
||||||
LABEL_TITLE,
|
LABEL_TITLE,
|
||||||
@ -765,7 +765,7 @@ static wxArrayString names()
|
|||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
wxString label;
|
TranslatableString label;
|
||||||
wxString name;
|
wxString name;
|
||||||
}
|
}
|
||||||
labelmap[] =
|
labelmap[] =
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
|
|
||||||
|
#include "audacity/Types.h"
|
||||||
|
|
||||||
class AudacityProject;
|
class AudacityProject;
|
||||||
|
|
||||||
// Increase the template parameter as needed to allow more flags
|
// Increase the template parameter as needed to allow more flags
|
||||||
@ -42,7 +44,7 @@ struct CommandFlagOptions{
|
|||||||
CommandFlagOptions(
|
CommandFlagOptions(
|
||||||
const MessageFormatter &message_,
|
const MessageFormatter &message_,
|
||||||
const wxString &helpPage_ = {},
|
const wxString &helpPage_ = {},
|
||||||
const wxString &title_ = {}
|
const TranslatableString &title_ = {}
|
||||||
) : message{ message_ }, helpPage{ helpPage_ }, title{ title_ }
|
) : message{ message_ }, helpPage{ helpPage_ }, title{ title_ }
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -63,7 +65,7 @@ struct CommandFlagOptions{
|
|||||||
// Empty, or non-default title for the dialog box when the
|
// Empty, or non-default title for the dialog box when the
|
||||||
// condition is not satisfied for the selected command
|
// condition is not satisfied for the selected command
|
||||||
// This string must be given UN-translated.
|
// This string must be given UN-translated.
|
||||||
wxString title;
|
TranslatableString title;
|
||||||
|
|
||||||
// Conditions with higher "priority" are preferred over others in choosing
|
// Conditions with higher "priority" are preferred over others in choosing
|
||||||
// the help message
|
// the help message
|
||||||
|
@ -53,11 +53,11 @@ enum kVinyl
|
|||||||
nVinyl
|
nVinyl
|
||||||
};
|
};
|
||||||
|
|
||||||
static const wxChar *kVinylStrings[nVinyl] =
|
static const TranslatableString kVinylStrings[nVinyl] =
|
||||||
{
|
{
|
||||||
wxT("33\u2153"),
|
XO("33\u2153"),
|
||||||
wxT("45"),
|
XO("45"),
|
||||||
wxT("78"),
|
XO("78"),
|
||||||
/* i18n-hint: n/a is an English abbreviation meaning "not applicable". */
|
/* i18n-hint: n/a is an English abbreviation meaning "not applicable". */
|
||||||
XO("n/a"),
|
XO("n/a"),
|
||||||
};
|
};
|
||||||
|
@ -97,7 +97,7 @@ const double MIN_Threshold_Linear DB_TO_LINEAR(MIN_Threshold_dB);
|
|||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
const wxChar *name;
|
const TranslatableString name;
|
||||||
EffectDistortion::Params params;
|
EffectDistortion::Params params;
|
||||||
}
|
}
|
||||||
FactoryPresets[] =
|
FactoryPresets[] =
|
||||||
@ -131,7 +131,7 @@ FactoryPresets[] =
|
|||||||
|
|
||||||
wxString defaultLabel(int index)
|
wxString defaultLabel(int index)
|
||||||
{
|
{
|
||||||
static const wxString names[] = {
|
static const TranslatableString names[] = {
|
||||||
XO("Upper Threshold"),
|
XO("Upper Threshold"),
|
||||||
XO("Noise Floor"),
|
XO("Noise Floor"),
|
||||||
XO("Parameter 1"),
|
XO("Parameter 1"),
|
||||||
|
@ -1432,14 +1432,14 @@ struct ControlInfo {
|
|||||||
vld2.SetPrecision( 0 );
|
vld2.SetPrecision( 0 );
|
||||||
vld2.SetRange( valueMin, valueMax );
|
vld2.SetRange( valueMin, valueMax );
|
||||||
wxTextCtrl *const text =
|
wxTextCtrl *const text =
|
||||||
S.Id(id + 1).AddTextBox(textBoxCaption(), wxT(""), 0);
|
S.Id(id + 1).AddTextBox(textBoxCaption.Translation(), wxT(""), 0);
|
||||||
S.SetStyle(wxSL_HORIZONTAL);
|
S.SetStyle(wxSL_HORIZONTAL);
|
||||||
text->SetValidator(vld2);
|
text->SetValidator(vld2);
|
||||||
|
|
||||||
wxSlider *const slider =
|
wxSlider *const slider =
|
||||||
S.Id(id)
|
S.Id(id)
|
||||||
.AddSlider( {}, 0, sliderMax);
|
.AddSlider( {}, 0, sliderMax);
|
||||||
slider->SetName(sliderName());
|
slider->SetName(sliderName.Translation());
|
||||||
slider->SetSizeHints(150, -1);
|
slider->SetSizeHints(150, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1450,13 +1450,13 @@ struct ControlInfo {
|
|||||||
// (valueMin - valueMax) / sliderMax is the value increment of the slider
|
// (valueMin - valueMax) / sliderMax is the value increment of the slider
|
||||||
const wxChar* format;
|
const wxChar* format;
|
||||||
bool formatAsInt;
|
bool formatAsInt;
|
||||||
const wxString textBoxCaption_; wxString textBoxCaption() const { return wxGetTranslation(textBoxCaption_); }
|
const TranslatableString textBoxCaption;
|
||||||
const wxString sliderName_; wxString sliderName() const { return wxGetTranslation(sliderName_); }
|
const TranslatableString sliderName;
|
||||||
|
|
||||||
ControlInfo(MemberPointer f, double vMin, double vMax, long sMax, const wxChar* fmt, bool fAsInt,
|
ControlInfo(MemberPointer f, double vMin, double vMax, long sMax, const wxChar* fmt, bool fAsInt,
|
||||||
const wxString &caption, const wxString &name)
|
const TranslatableString &caption, const TranslatableString &name)
|
||||||
: field(f), valueMin(vMin), valueMax(vMax), sliderMax(sMax), format(fmt), formatAsInt(fAsInt)
|
: field(f), valueMin(vMin), valueMax(vMax), sliderMax(sMax), format(fmt), formatAsInt(fAsInt)
|
||||||
, textBoxCaption_(caption), sliderName_(name)
|
, textBoxCaption(caption), sliderName(name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -60,7 +60,7 @@ Param( WetOnly, bool, wxT("WetOnly"), false, false, true, 1 )
|
|||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
const wxChar *name;
|
const TranslatableString name;
|
||||||
EffectReverb::Params params;
|
EffectReverb::Params params;
|
||||||
}
|
}
|
||||||
FactoryPresets[] =
|
FactoryPresets[] =
|
||||||
|
@ -223,7 +223,7 @@ VendorSymbol NyquistEffect::GetVendor()
|
|||||||
return XO("Audacity");
|
return XO("Audacity");
|
||||||
}
|
}
|
||||||
|
|
||||||
return mAuthor;
|
return TranslatableString{ mAuthor };
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString NyquistEffect::GetVersion()
|
wxString NyquistEffect::GetVersion()
|
||||||
@ -1890,12 +1890,12 @@ bool NyquistEffect::Parse(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (len >= 2 && tokens[0] == wxT("action")) {
|
if (len >= 2 && tokens[0] == wxT("action")) {
|
||||||
mAction = UnQuote(tokens[1]);
|
mAction = TranslatableString{ UnQuote(tokens[1]) };
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len >= 2 && tokens[0] == wxT("info")) {
|
if (len >= 2 && tokens[0] == wxT("info")) {
|
||||||
mInfo = UnQuote(tokens[1]);
|
mInfo = TranslatableString{ UnQuote(tokens[1]) };
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1945,18 +1945,18 @@ bool NyquistEffect::Parse(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (len >= 2 && tokens[0] == wxT("author")) {
|
if (len >= 2 && tokens[0] == wxT("author")) {
|
||||||
mAuthor = UnQuote(tokens[1]);
|
mAuthor = TranslatableString{ UnQuote(tokens[1]) };
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len >= 2 && tokens[0] == wxT("release")) {
|
if (len >= 2 && tokens[0] == wxT("release")) {
|
||||||
// Value must be quoted if the release version string contains spaces.
|
// Value must be quoted if the release version string contains spaces.
|
||||||
mReleaseVersion = UnQuote(tokens[1]);
|
mReleaseVersion = TranslatableString{ UnQuote(tokens[1]) };
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len >= 2 && tokens[0] == wxT("copyright")) {
|
if (len >= 2 && tokens[0] == wxT("copyright")) {
|
||||||
mCopyright = UnQuote(tokens[1]);
|
mCopyright = TranslatableString{ UnQuote(tokens[1]) };
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,14 +215,14 @@ private:
|
|||||||
wxString mCmd; // the command to be processed
|
wxString mCmd; // the command to be processed
|
||||||
wxString mName; ///< Name of the Effect (untranslated)
|
wxString mName; ///< Name of the Effect (untranslated)
|
||||||
wxString mPromptName; // If a prompt, we need to remember original name.
|
wxString mPromptName; // If a prompt, we need to remember original name.
|
||||||
wxString mAction; // translatable
|
TranslatableString mAction;
|
||||||
wxString mInfo; // translatable
|
TranslatableString mInfo;
|
||||||
wxString mAuthor;
|
TranslatableString mAuthor;
|
||||||
// Version number of the specific plug-in (not to be confused with mVersion)
|
// Version number of the specific plug-in (not to be confused with mVersion)
|
||||||
// For shipped plug-ins this will be the same as the Audacity release version
|
// For shipped plug-ins this will be the same as the Audacity release version
|
||||||
// when the plug-in was last modified.
|
// when the plug-in was last modified.
|
||||||
wxString mReleaseVersion;
|
TranslatableString mReleaseVersion;
|
||||||
wxString mCopyright;
|
TranslatableString mCopyright;
|
||||||
wxString mManPage; // ONLY use if a help page exists in the manual.
|
wxString mManPage; // ONLY use if a help page exists in the manual.
|
||||||
wxString mHelpFile;
|
wxString mHelpFile;
|
||||||
bool mHelpFileExists;
|
bool mHelpFileExists;
|
||||||
|
@ -118,7 +118,7 @@ void ExportPlugin::SetFormat(const wxString & format, int index)
|
|||||||
mFormatInfos[index].mFormat = format;
|
mFormatInfos[index].mFormat = format;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportPlugin::SetDescription(const wxString & description, int index)
|
void ExportPlugin::SetDescription(const TranslatableString & description, int index)
|
||||||
{
|
{
|
||||||
mFormatInfos[index].mDescription = description;
|
mFormatInfos[index].mDescription = description;
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ wxString ExportPlugin::GetFormat(int index)
|
|||||||
return mFormatInfos[index].mFormat;
|
return mFormatInfos[index].mFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString ExportPlugin::GetUntranslatedDescription(int index)
|
TranslatableString ExportPlugin::GetUntranslatedDescription(int index)
|
||||||
{
|
{
|
||||||
return mFormatInfos[index].mDescription;
|
return mFormatInfos[index].mDescription;
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <wx/filename.h> // member variable
|
#include <wx/filename.h> // member variable
|
||||||
|
#include "audacity/Types.h"
|
||||||
#include "../SampleFormat.h"
|
#include "../SampleFormat.h"
|
||||||
#include "../widgets/wxPanelWrapper.h" // to inherit
|
#include "../widgets/wxPanelWrapper.h" // to inherit
|
||||||
|
|
||||||
@ -45,7 +46,7 @@ class AUDACITY_DLL_API FormatInfo
|
|||||||
~FormatInfo() {}
|
~FormatInfo() {}
|
||||||
|
|
||||||
wxString mFormat;
|
wxString mFormat;
|
||||||
wxString mDescription; // untranslated
|
TranslatableString mDescription;
|
||||||
// wxString mExtension;
|
// wxString mExtension;
|
||||||
FileExtensions mExtensions;
|
FileExtensions mExtensions;
|
||||||
wxString mMask;
|
wxString mMask;
|
||||||
@ -65,7 +66,7 @@ public:
|
|||||||
|
|
||||||
int AddFormat();
|
int AddFormat();
|
||||||
void SetFormat(const wxString & format, int index);
|
void SetFormat(const wxString & format, int index);
|
||||||
void SetDescription(const wxString & description /* untranslated */, int index);
|
void SetDescription(const TranslatableString & description, int index);
|
||||||
void AddExtension(const wxString &extension,int index);
|
void AddExtension(const wxString &extension,int index);
|
||||||
void SetExtensions(FileExtensions extensions, int index);
|
void SetExtensions(FileExtensions extensions, int index);
|
||||||
void SetMask(const wxString & mask, int index);
|
void SetMask(const wxString & mask, int index);
|
||||||
@ -74,7 +75,7 @@ public:
|
|||||||
|
|
||||||
virtual int GetFormatCount();
|
virtual int GetFormatCount();
|
||||||
virtual wxString GetFormat(int index);
|
virtual wxString GetFormat(int index);
|
||||||
wxString GetUntranslatedDescription(int index);
|
TranslatableString GetUntranslatedDescription(int index);
|
||||||
wxString GetTranslatedDescription(int index);
|
wxString GetTranslatedDescription(int index);
|
||||||
/** @brief Return the (first) file name extension for the sub-format.
|
/** @brief Return the (first) file name extension for the sub-format.
|
||||||
* @param index The sub-format for which the extension is wanted */
|
* @param index The sub-format for which the extension is wanted */
|
||||||
|
@ -225,7 +225,7 @@ ExportFFmpeg::ExportFFmpeg()
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetMaxChannels(ExportFFmpegOptions::fmts[newfmt].maxchannels,fmtindex);
|
SetMaxChannels(ExportFFmpegOptions::fmts[newfmt].maxchannels,fmtindex);
|
||||||
SetDescription(ExportFFmpegOptions::fmts[newfmt].description_, fmtindex);
|
SetDescription(ExportFFmpegOptions::fmts[newfmt].description, fmtindex);
|
||||||
|
|
||||||
int canmeta = ExportFFmpegOptions::fmts[newfmt].canmetadata;
|
int canmeta = ExportFFmpegOptions::fmts[newfmt].canmetadata;
|
||||||
if (canmeta && (canmeta == AV_CANMETA || canmeta <= avfver))
|
if (canmeta && (canmeta == AV_CANMETA || canmeta <= avfver))
|
||||||
@ -911,9 +911,9 @@ ProgressResult ExportFFmpeg::Export(AudacityProject *project,
|
|||||||
InitProgress( pDialog, wxFileName(fName).GetName(),
|
InitProgress( pDialog, wxFileName(fName).GetName(),
|
||||||
selectionOnly
|
selectionOnly
|
||||||
? wxString::Format(_("Exporting selected audio as %s"),
|
? wxString::Format(_("Exporting selected audio as %s"),
|
||||||
ExportFFmpegOptions::fmts[mSubFormat].Description())
|
ExportFFmpegOptions::fmts[mSubFormat].description.Translation())
|
||||||
: wxString::Format(_("Exporting the audio as %s"),
|
: wxString::Format(_("Exporting the audio as %s"),
|
||||||
ExportFFmpegOptions::fmts[mSubFormat].Description()) );
|
ExportFFmpegOptions::fmts[mSubFormat].description.Translation()) );
|
||||||
auto &progress = *pDialog;
|
auto &progress = *pDialog;
|
||||||
|
|
||||||
while (updateResult == ProgressResult::Success) {
|
while (updateResult == ProgressResult::Success) {
|
||||||
|
@ -1339,11 +1339,6 @@ ExposedFormat ExportFFmpegOptions::fmts[] =
|
|||||||
{FMT_OTHER, wxT("FFMPEG"), wxT(""), wxT(""), 255, AV_CANMETA, true, XO("Custom FFmpeg Export"), AV_CODEC_ID_NONE, true}
|
{FMT_OTHER, wxT("FFMPEG"), wxT(""), wxT(""), 255, AV_CANMETA, true, XO("Custom FFmpeg Export"), AV_CODEC_ID_NONE, true}
|
||||||
};
|
};
|
||||||
|
|
||||||
wxString ExposedFormat::Description() const
|
|
||||||
{
|
|
||||||
return wxGetTranslation(description_);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Sample rates supported by AAC encoder (must end with zero-element)
|
/// Sample rates supported by AAC encoder (must end with zero-element)
|
||||||
const int ExportFFmpegOptions::iAACSampleRates[] = { 7350, 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 0 };
|
const int ExportFFmpegOptions::iAACSampleRates[] = { 7350, 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 0 };
|
||||||
|
|
||||||
|
@ -53,11 +53,9 @@ struct ExposedFormat
|
|||||||
unsigned maxchannels; //!< how many channels this format could handle
|
unsigned maxchannels; //!< how many channels this format could handle
|
||||||
const int canmetadata; //!< !=0 if format supports metadata, AV_CANMETA any avformat version, otherwise version support added
|
const int canmetadata; //!< !=0 if format supports metadata, AV_CANMETA any avformat version, otherwise version support added
|
||||||
bool canutf8; //!< true if format supports metadata in UTF-8, false otherwise
|
bool canutf8; //!< true if format supports metadata in UTF-8, false otherwise
|
||||||
const wxChar *description_; //!< format description (will be shown in export dialog) (untranslated!)
|
const TranslatableString description; //!< format description (will be shown in export dialog)
|
||||||
AVCodecID codecid; //!< codec ID (see libavcodec/avcodec.h)
|
AVCodecID codecid; //!< codec ID (see libavcodec/avcodec.h)
|
||||||
bool compiledIn; //!< support for this codec/format is compiled in (checked at runtime)
|
bool compiledIn; //!< support for this codec/format is compiled in (checked at runtime)
|
||||||
|
|
||||||
wxString Description() const; // get translation
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ struct
|
|||||||
{
|
{
|
||||||
int format;
|
int format;
|
||||||
const wxChar *name;
|
const wxChar *name;
|
||||||
const wxChar *desc; // untranslated
|
const TranslatableString desc;
|
||||||
}
|
}
|
||||||
static const kFormats[] =
|
static const kFormats[] =
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,7 @@ BEGIN_EVENT_TABLE(ControlToolBar, ToolBar)
|
|||||||
EVT_IDLE(ControlToolBar::OnIdle)
|
EVT_IDLE(ControlToolBar::OnIdle)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
static const wxString
|
static const TranslatableString
|
||||||
sStatePlay = XO("Playing")
|
sStatePlay = XO("Playing")
|
||||||
, sStateStop = XO("Stopped")
|
, sStateStop = XO("Stopped")
|
||||||
, sStateRecord = XO("Recording")
|
, sStateRecord = XO("Recording")
|
||||||
@ -712,9 +712,9 @@ wxString ControlToolBar::StateForStatusBar()
|
|||||||
auto pProject = &mProject;
|
auto pProject = &mProject;
|
||||||
auto scrubState = pProject
|
auto scrubState = pProject
|
||||||
? Scrubber::Get( *pProject ).GetUntranslatedStateString()
|
? Scrubber::Get( *pProject ).GetUntranslatedStateString()
|
||||||
: wxString();
|
: TranslatableString{};
|
||||||
if (!scrubState.empty())
|
if (!scrubState.empty())
|
||||||
state = wxGetTranslation(scrubState);
|
state = scrubState.Translation();
|
||||||
else if (mPlay->IsDown())
|
else if (mPlay->IsDown())
|
||||||
state = wxGetTranslation(sStatePlay);
|
state = wxGetTranslation(sStatePlay);
|
||||||
else if (projectAudioManager.Recording())
|
else if (projectAudioManager.Recording())
|
||||||
|
@ -226,7 +226,7 @@ void EditToolBar::EnableDisableButtons()
|
|||||||
static const struct Entry {
|
static const struct Entry {
|
||||||
int tool;
|
int tool;
|
||||||
CommandID commandName;
|
CommandID commandName;
|
||||||
wxString untranslatedLabel;
|
TranslatableString untranslatedLabel;
|
||||||
} EditToolbarButtonList[] = {
|
} EditToolbarButtonList[] = {
|
||||||
{ ETBCutID, wxT("Cut"), XO("Cut") },
|
{ ETBCutID, wxT("Cut"), XO("Cut") },
|
||||||
{ ETBCopyID, wxT("Copy"), XO("Copy") },
|
{ ETBCopyID, wxT("Copy"), XO("Copy") },
|
||||||
|
@ -142,7 +142,7 @@ void ToolsToolBar::RegenerateTooltips()
|
|||||||
static const struct Entry {
|
static const struct Entry {
|
||||||
int tool;
|
int tool;
|
||||||
CommandID commandName;
|
CommandID commandName;
|
||||||
wxString untranslatedLabel;
|
TranslatableString untranslatedLabel;
|
||||||
} table[] = {
|
} table[] = {
|
||||||
{ selectTool, wxT("SelectTool"), XO("Selection Tool") },
|
{ selectTool, wxT("SelectTool"), XO("Selection Tool") },
|
||||||
{ envelopeTool, wxT("EnvelopeTool"), XO("Envelope Tool") },
|
{ envelopeTool, wxT("EnvelopeTool"), XO("Envelope Tool") },
|
||||||
|
@ -336,9 +336,9 @@ void TranscriptionToolBar::RegenerateTooltips()
|
|||||||
static const struct Entry {
|
static const struct Entry {
|
||||||
int tool;
|
int tool;
|
||||||
CommandID commandName;
|
CommandID commandName;
|
||||||
wxString untranslatedLabel;
|
TranslatableString untranslatedLabel;
|
||||||
CommandID commandName2;
|
CommandID commandName2;
|
||||||
wxString untranslatedLabel2;
|
TranslatableString untranslatedLabel2;
|
||||||
} table[] = {
|
} table[] = {
|
||||||
{ TTB_PlaySpeed, wxT("PlayAtSpeed"), XO("Play-at-Speed"),
|
{ TTB_PlaySpeed, wxT("PlayAtSpeed"), XO("Play-at-Speed"),
|
||||||
wxT("PlayAtSpeedLooped"), XO("Looped-Play-at-Speed")
|
wxT("PlayAtSpeedLooped"), XO("Looped-Play-at-Speed")
|
||||||
|
@ -260,8 +260,8 @@ static const ReservedCommandFlag
|
|||||||
namespace {
|
namespace {
|
||||||
const struct MenuItem {
|
const struct MenuItem {
|
||||||
CommandID name;
|
CommandID name;
|
||||||
wxString label;
|
TranslatableString label;
|
||||||
wxString status;
|
TranslatableString status;
|
||||||
CommandFlag flags;
|
CommandFlag flags;
|
||||||
void (Scrubber::*memFn)(const CommandContext&);
|
void (Scrubber::*memFn)(const CommandContext&);
|
||||||
bool seek;
|
bool seek;
|
||||||
@ -283,7 +283,7 @@ namespace {
|
|||||||
&Scrubber::OnSeek, true, &Scrubber::Seeks,
|
&Scrubber::OnSeek, true, &Scrubber::Seeks,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ wxT("ToggleScrubRuler"), XO("Scrub &Ruler"), wxT(""),
|
{ wxT("ToggleScrubRuler"), XO("Scrub &Ruler"), {},
|
||||||
AlwaysEnabledFlag,
|
AlwaysEnabledFlag,
|
||||||
&Scrubber::OnToggleScrubRuler, false, &Scrubber::ShowsBar,
|
&Scrubber::OnToggleScrubRuler, false, &Scrubber::ShowsBar,
|
||||||
},
|
},
|
||||||
@ -961,11 +961,11 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
static_assert(nMenuItems == 3, "wrong number of items");
|
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()) {
|
if (IsSpeedPlaying()) {
|
||||||
return sPlayAtSpeedStatus;
|
return sPlayAtSpeedStatus;
|
||||||
|
@ -27,6 +27,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||||||
|
|
||||||
class AudacityProject;
|
class AudacityProject;
|
||||||
extern AudacityProject *GetActiveProject();
|
extern AudacityProject *GetActiveProject();
|
||||||
|
class TranslatableString;
|
||||||
|
|
||||||
// Conditionally compile either a separate thead, or else use a timer in the main
|
// 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
|
// 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
|
// A string to put in the leftmost part of the status bar
|
||||||
// when scrub or seek is in progress, or else empty.
|
// when scrub or seek is in progress, or else empty.
|
||||||
const wxString &GetUntranslatedStateString() const;
|
const TranslatableString &GetUntranslatedStateString() const;
|
||||||
wxString StatusMessageForWave() const;
|
wxString StatusMessageForWave() const;
|
||||||
|
|
||||||
void Pause(bool paused);
|
void Pause(bool paused);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user