1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

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