1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-23 06:31:17 +01:00

Disallow non-numeric chars in numeric input boxes.

Patch by Ed using examples by Martyn & James.
This commit is contained in:
martynshaw99
2011-06-16 23:29:56 +00:00
parent 65fb8f4ff8
commit 309f9a90ce
14 changed files with 122 additions and 97 deletions

View File

@@ -878,15 +878,15 @@ void TruncSilenceDialog::PopulateOrExchange(ShuttleGui & S)
{
wxArrayString choices(Enums::NumDbChoices, Enums::GetDbChoices());
S.Id( ID_SHORTEST_SILENCE_TEXT ).TieTextBox(_("Min silence duration:"),
S.Id( ID_SHORTEST_SILENCE_TEXT ).TieNumericTextBox(_("Min silence duration:"),
mEffect->mTruncInitialAllowedSilentMs,
10);
S.AddUnits( _("milliseconds") );
S.Id( ID_LONGEST_SILENCE_TEXT ).TieTextBox(_("Max silence duration:"),
S.Id( ID_LONGEST_SILENCE_TEXT ).TieNumericTextBox(_("Max silence duration:"),
mEffect->mTruncLongestAllowedSilentMs,
10);
S.AddUnits( _("milliseconds") );
S.Id( ID_COMPRESS_FACTOR ).TieTextBox(_("Silence compression:"),
S.Id( ID_COMPRESS_FACTOR ).TieNumericTextBox(_("Silence compression:"),
mEffect->mSilenceCompressRatio,
10);
S.AddUnits( _(":1") );