1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-19 09:17:54 +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

@@ -278,8 +278,8 @@ void ToneGenDialog::PopulateOrExchangeStandard( ShuttleGui & S )
// The added colon to improve visual consistency was placed outside
// the translatable strings to avoid breaking translations close to 2.0.
// TODO: Make colon part of the translatable string after 2.0.
S.TieTextBox(_("Frequency (Hz)") + wxString(wxT(":")), frequency[0], 5);
S.TieTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), amplitude[0], 5);
S.TieNumericTextBox(_("Frequency (Hz)") + wxString(wxT(":")), frequency[0], 5);
S.TieNumericTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), amplitude[0], 5);
S.AddPrompt(_("Duration") + wxString(wxT(":")));
if (mToneDurationT == NULL)
{
@@ -319,10 +319,10 @@ void ToneGenDialog::PopulateOrExchangeExtended( ShuttleGui & S )
// The added colon to improve visual consistency was placed outside
// the translatable strings to avoid breaking translations close to 2.0.
// TODO: Make colon part of the translatable string after 2.0.
S.TieTextBox(_("Frequency (Hz)") + wxString(wxT(":")), frequency[0], 10)->SetName(_("Frequency Hertz Start"));
S.TieTextBox(wxT(""), frequency[1], 10)->SetName(_("Frequency Hertz End"));
S.TieTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), amplitude[0], 10)->SetName(_("Amplitude Start"));
S.TieTextBox(wxT(""), amplitude[1], 10)->SetName(_("Amplitude End"));
S.TieNumericTextBox(_("Frequency (Hz)") + wxString(wxT(":")), frequency[0], 10)->SetName(_("Frequency Hertz Start"));
S.TieNumericTextBox(wxT(""), frequency[1], 10)->SetName(_("Frequency Hertz End"));
S.TieNumericTextBox(_("Amplitude (0-1)") + wxString(wxT(":")), amplitude[0], 10)->SetName(_("Amplitude Start"));
S.TieNumericTextBox(wxT(""), amplitude[1], 10)->SetName(_("Amplitude End"));
}
S.EndMultiColumn();
S.StartMultiColumn(2, wxCENTER);