1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-16 09:31:14 +01:00

Use an enum class for numeric validator styles

This commit is contained in:
Paul Licameli
2017-10-30 12:18:10 -04:00
parent cad632b9b0
commit 6e7d7447c1
21 changed files with 97 additions and 91 deletions

View File

@@ -720,7 +720,7 @@ void EffectTruncSilence::PopulateOrExchange(ShuttleGui & S)
S.AddSpace(0); // 'choices' already includes units.
// Ignored silence
FloatingPointValidator<double> vldDur(3, &mInitialAllowedSilence, NUM_VAL_NO_TRAILING_ZEROES);
FloatingPointValidator<double> vldDur(3, &mInitialAllowedSilence, NumValidatorStyle::NO_TRAILING_ZEROES);
vldDur.SetRange(MIN_Minimum, MAX_Minimum);
mInitialAllowedSilenceT = S.AddTextBox(_("Duration:"), wxT(""), 12);
mInitialAllowedSilenceT->SetValidator(vldDur);
@@ -744,13 +744,13 @@ void EffectTruncSilence::PopulateOrExchange(ShuttleGui & S)
{
// Truncation / Compression factor
FloatingPointValidator<double> vldTrunc(3, &mTruncLongestAllowedSilence, NUM_VAL_NO_TRAILING_ZEROES);
FloatingPointValidator<double> vldTrunc(3, &mTruncLongestAllowedSilence, NumValidatorStyle::NO_TRAILING_ZEROES);
vldTrunc.SetRange(MIN_Truncate, MAX_Truncate);
mTruncLongestAllowedSilenceT = S.AddTextBox(_("Truncate to:"), wxT(""), 12);
mTruncLongestAllowedSilenceT->SetValidator(vldTrunc);
S.AddUnits(_("seconds"));
FloatingPointValidator<double> vldComp(3, &mSilenceCompressPercent, NUM_VAL_NO_TRAILING_ZEROES);
FloatingPointValidator<double> vldComp(3, &mSilenceCompressPercent, NumValidatorStyle::NO_TRAILING_ZEROES);
vldComp.SetRange(MIN_Compress, MAX_Compress);
mSilenceCompressPercentT = S.AddTextBox(_("Compress to:"), wxT(""), 12);
mSilenceCompressPercentT->SetValidator(vldComp);