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

IdentInterfaceSymbol to distinguish internal vs visible enum settings

This commit is contained in:
Paul Licameli
2018-03-26 22:03:45 -04:00
parent 595cf05d42
commit 2065eebff6
21 changed files with 205 additions and 198 deletions

View File

@@ -38,12 +38,12 @@ enum kCoordTypes
nCoordTypes
};
static const wxString kCoordTypeStrings[nCoordTypes] =
static const IdentInterfaceSymbol kCoordTypeStrings[nCoordTypes] =
{
XO("Panel"),
XO("App"),
XO("Track0"),
XO("Track1"),
{ XO("Panel") },
{ XO("App") },
{ XO("Track0") },
{ XO("Track1") },
};

View File

@@ -55,17 +55,17 @@ enum {
nTypes
};
static const wxString kTypes[nTypes] =
static const IdentInterfaceSymbol kTypes[nTypes] =
{
XO("Commands"),
XO("Commands+"),
XO("Menus"),
XO("Preferences"),
XO("Tracks"),
XO("Clips"),
XO("Envelopes"),
XO("Labels"),
XO("Boxes")
{ XO("Commands") },
{ XO("Commands+") },
{ XO("Menus") },
{ XO("Preferences") },
{ XO("Tracks") },
{ XO("Clips") },
{ XO("Envelopes") },
{ XO("Labels") },
{ XO("Boxes") },
};
enum {
@@ -75,11 +75,11 @@ enum {
nFormats
};
static const wxString kFormats[nFormats] =
static const IdentInterfaceSymbol kFormats[nFormats] =
{
XO("JSON"),
XO("LISP"),
XO("Brief")
{ XO("JSON") },
{ XO("LISP") },
{ XO("Brief") }
};

View File

@@ -26,11 +26,11 @@
#include "CommandContext.h"
const int nTypes =3;
static const wxString kTypes[nTypes] =
static const IdentInterfaceSymbol kTypes[nTypes] =
{
XO("Tracks"),
XO("Clips"),
XO("Labels")
{ XO("Tracks") },
{ XO("Clips") },
{ XO("Labels") },
};

View File

@@ -46,48 +46,50 @@ small calculations of rectangles.
#include "CommandContext.h"
static const wxString kCaptureWhatStrings[ ScreenshotCommand::nCaptureWhats ] =
static const IdentInterfaceSymbol
kCaptureWhatStrings[ ScreenshotCommand::nCaptureWhats ] =
{
XO("Window"),
XO("Full_Window"),
XO("Window_Plus"),
XO("Fullscreen"),
XO("Toolbars"),
XO("Effects"),
XO("Scriptables"),
XO("Preferences"),
XO("Selectionbar"),
XO("Spectral_Selection"),
XO("Tools"),
XO("Transport"),
XO("Mixer"),
XO("Meter"),
XO("Play_Meter"),
XO("Record_Meter"),
XO("Edit"),
XO("Device"),
XO("Scrub"),
XO("Transcription"),
XO("Trackpanel"),
XO("Ruler"),
XO("Tracks"),
XO("First_Track"),
XO("First_Two_Tracks"),
XO("First_Three_Tracks"),
XO("First_Four_Tracks"),
XO("Second_Track"),
XO("Tracks_Plus"),
XO("First_Track_Plus"),
XO("All_Tracks"),
XO("All_Tracks_Plus"),
{ XO("Window") },
{ XO("Full_Window") },
{ XO("Window_Plus") },
{ XO("Fullscreen") },
{ XO("Toolbars") },
{ XO("Effects") },
{ XO("Scriptables") },
{ XO("Preferences") },
{ XO("Selectionbar") },
{ XO("Spectral_Selection") },
{ XO("Tools") },
{ XO("Transport") },
{ XO("Mixer") },
{ XO("Meter") },
{ XO("Play_Meter") },
{ XO("Record_Meter") },
{ XO("Edit") },
{ XO("Device") },
{ XO("Scrub") },
{ XO("Transcription") },
{ XO("Trackpanel") },
{ XO("Ruler") },
{ XO("Tracks") },
{ XO("First_Track") },
{ XO("First_Two_Tracks") },
{ XO("First_Three_Tracks") },
{ XO("First_Four_Tracks") },
{ XO("Second_Track") },
{ XO("Tracks_Plus") },
{ XO("First_Track_Plus") },
{ XO("All_Tracks") },
{ XO("All_Tracks_Plus") },
};
static const wxString kBackgroundStrings[ ScreenshotCommand::nBackgrounds ] =
static const IdentInterfaceSymbol
kBackgroundStrings[ ScreenshotCommand::nBackgrounds ] =
{
XO("Blue"),
XO("White"),
XO("None")
{ XO("Blue") },
{ XO("White") },
{ XO("None") },
};
@@ -627,7 +629,7 @@ void ScreenshotCommand::GetDerivedParams()
// Build a suitable filename
mFileName = MakeFileName(mFilePath,
GetCustomTranslation( kCaptureWhatStrings[ mCaptureMode ] ));
kCaptureWhatStrings[ mCaptureMode ].Translation() );
if (mBack == kBlue)
{
@@ -777,7 +779,7 @@ wxRect ScreenshotCommand::GetTrackRect( AudacityProject * pProj, TrackPanel * pa
wxString ScreenshotCommand::WindowFileName(AudacityProject * proj, wxTopLevelWindow *w){
if (w != proj && w->GetTitle() != wxT("")) {
mFileName = MakeFileName(mFilePath,
GetCustomTranslation( kCaptureWhatStrings[ mCaptureMode ] ) +
kCaptureWhatStrings[ mCaptureMode ].Translation() +
(wxT("-") + w->GetTitle() + wxT("-")));
}
return mFileName;

View File

@@ -44,14 +44,14 @@ explicitly code all three.
// Relative to project and relative to selection cover MOST options, since you can already
// set a selection to a clip.
const int nRelativeTos =6;
static const wxString kRelativeTo[nRelativeTos] =
static const IdentInterfaceSymbol kRelativeTo[nRelativeTos] =
{
XO("Project Start"),
XO("Project"),
XO("Project End"),
XO("Selection Start"),
XO("Selection"),
XO("Selection End")
{ XO("Project Start") },
{ XO("Project") },
{ XO("Project End") },
{ XO("Selection Start") },
{ XO("Selection") },
{ XO("Selection End") }
};
bool SelectTimeCommand::DefineParams( ShuttleParams & S ){
@@ -167,12 +167,12 @@ bool SelectFrequenciesCommand::Apply(const CommandContext & context){
}
const int nModes =3;
static const wxString kModes[nModes] =
static const IdentInterfaceSymbol kModes[nModes] =
{
/* i18n-hint verb, imperative */
XO("Set"),
XO("Add"),
XO("Remove")
{ XO("Set") },
{ XO("Add") },
{ XO("Remove") },
};
bool SelectTracksCommand::DefineParams( ShuttleParams & S ){

View File

@@ -38,12 +38,12 @@ enum kColours
nColours
};
static const wxString kColourStrings[nColours] =
static const IdentInterfaceSymbol kColourStrings[nColours] =
{
XO("Color0"),
XO("Color1"),
XO("Color2"),
XO("Color3"),
{ XO("Color0") },
{ XO("Color1") },
{ XO("Color2") },
{ XO("Color3") },
};

View File

@@ -236,12 +236,12 @@ enum kColours
nColours
};
static const wxString kColourStrings[nColours] =
static const IdentInterfaceSymbol kColourStrings[nColours] =
{
XO("Color0"),
XO("Color1"),
XO("Color2"),
XO("Color3"),
{ XO("Color0") },
{ XO("Color1") },
{ XO("Color2") },
{ XO("Color3") },
};
@@ -252,10 +252,10 @@ enum kDisplayTypes
nDisplayTypes
};
static const wxString kDisplayTypeStrings[nDisplayTypes] =
static const IdentInterfaceSymbol kDisplayTypeStrings[nDisplayTypes] =
{
XO("Waveform"),
XO("Spectrogram"),
{ XO("Waveform") },
{ XO("Spectrogram") },
};
enum kScaleTypes
@@ -265,10 +265,10 @@ enum kScaleTypes
nScaleTypes
};
static const wxString kScaleTypeStrings[nScaleTypes] =
static const IdentInterfaceSymbol kScaleTypeStrings[nScaleTypes] =
{
XO("Linear"),
XO("dB"),
{ XO("Linear") },
{ XO("dB") },
};
enum kZoomTypes
@@ -279,11 +279,11 @@ enum kZoomTypes
nZoomTypes
};
static const wxString kZoomTypeStrings[nZoomTypes] =
static const IdentInterfaceSymbol kZoomTypeStrings[nZoomTypes] =
{
XO("Reset"),
XO("Times2"),
XO("HalfWave"),
{ XO("Reset") },
{ XO("Times2") },
{ XO("HalfWave") },
};
bool SetTrackVisualsCommand::DefineParams( ShuttleParams & S ){