X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be5a51fb592f3fa2ba38ac6cd1e488d6d806058c..94c09a19ec0406118b51b60657232ea3b14d6c4f:/samples/validate/validate.cpp diff --git a/samples/validate/validate.cpp b/samples/validate/validate.cpp index 98126e603d..0b1c376744 100644 --- a/samples/validate/validate.cpp +++ b/samples/validate/validate.cpp @@ -15,10 +15,6 @@ // from a text control. All validators transfer data, but not // all test validity, so don't be confused by the name. -#if defined(__GNUG__) && !defined(__APPLE__) -# pragma implementation -#endif // __GNUG__ - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -107,7 +103,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString&title, int x, int y, int w, int wxMenu *file_menu = new wxMenu; file_menu->Append(VALIDATE_TEST_DIALOG, wxT("&Test"), wxT("Demonstrate validators")); - file_menu->Append(VALIDATE_TOGGLE_BELL, wxT("&Bell on error"), wxT("Toggle bell on error"), true); + file_menu->AppendCheckItem(VALIDATE_TOGGLE_BELL, wxT("&Bell on error"), wxT("Toggle bell on error")); file_menu->AppendSeparator(); file_menu->Append(wxID_EXIT, wxT("E&xit")); @@ -120,7 +116,9 @@ MyFrame::MyFrame(wxFrame *frame, const wxString&title, int x, int y, int w, int wxValidator::SetBellOnError(m_silent); file_menu->Check(VALIDATE_TOGGLE_BELL, !wxValidator::IsSilent()); +#if wxUSE_STATUSBAR CreateStatusBar(1); +#endif // wxUSE_STATUSBAR } void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) @@ -171,7 +169,7 @@ void MyFrame::OnToggleBell(wxCommandEvent& event) MyDialog::MyDialog( wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long WXUNUSED(style) ) : - wxDialog(parent, VALIDATE_DIALOG_ID, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxRESIZE_BORDER) + wxDialog(parent, VALIDATE_DIALOG_ID, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) { // Sizers automatically ensure a workable layout. wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL );