Replace wxValidator::SetBellOnError() with SuppressBellOnError().

SetBellOnError() erroneously inversed the value of its parameter. Fixing it to
behave correctly could silently break the existing code which might work
around this bug already because it always behaved like this (ever since it was
added 10.5 years ago). So instead simply deprecate this function and add a new
SuppressBellOnError() one which behaves as expected.

Closes #11318.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-10-15 14:44:22 +00:00
parent b68d34f34c
commit c27181d1a1
4 changed files with 28 additions and 6 deletions

View File

@@ -173,7 +173,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString&title, int x, int y, int w, int
// All validators share a common (static) flag that controls
// whether they beep on error. Here we turn it off:
wxValidator::SetBellOnError(m_silent);
wxValidator::SuppressBellOnError(m_silent);
file_menu->Check(VALIDATE_TOGGLE_BELL, !wxValidator::IsSilent());
#if wxUSE_STATUSBAR
@@ -221,7 +221,7 @@ void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnToggleBell(wxCommandEvent& event)
{
m_silent = !m_silent;
wxValidator::SetBellOnError(m_silent);
wxValidator::SuppressBellOnError(m_silent);
event.Skip();
}