Replace deprecated wxTextValidator::SetBellOnError whose logic whose inverted by the new wxTextValidator::SuppressBellOnError. Since its used in constructor only for TC_WINDOWS, we do the same in the destructor.

This commit is contained in:
Mounir IDRASSI 2014-10-26 17:28:59 +01:00
parent ce7fab744b
commit 2c6e9fc15c

View File

@ -154,7 +154,7 @@ namespace VeraCrypt
Gui->SetListCtrlColumnWidths (HotkeyListCtrl, colPermilles);
RestoreValidatorBell = !wxTextValidator::IsSilent();
wxTextValidator::SetBellOnError (true);
wxTextValidator::SuppressBellOnError (true);
HotkeyTextCtrl->SetValidator (wxTextValidator (wxFILTER_INCLUDE_CHAR_LIST));
UpdateHotkeyButtons();
@ -203,8 +203,10 @@ namespace VeraCrypt
PreferencesDialog::~PreferencesDialog ()
{
#ifdef TC_WINDOWS
if (RestoreValidatorBell)
wxTextValidator::SetBellOnError (false);
wxTextValidator::SuppressBellOnError (false);
#endif
}
void PreferencesDialog::SelectPage (wxPanel *page)