X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7df07b10aaf306995cc93f67706113bae9173135..c0b0635cf69537ca32377bad5650b39402cb21b6:/samples/validate/validate.cpp diff --git a/samples/validate/validate.cpp b/samples/validate/validate.cpp index 2348ebf269..3e3e1130e8 100644 --- a/samples/validate/validate.cpp +++ b/samples/validate/validate.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: validate.cpp -// Purpose: wxWindows validator sample +// Purpose: wxWidgets validator sample // Author: Julian Smart // Modified by: // Created: 04/01/98 @@ -15,7 +15,7 @@ // from a text control. All validators transfer data, but not // all test validity, so don't be confused by the name. -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) # pragma implementation #endif // __GNUG__ @@ -107,7 +107,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 +120,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 +173,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 );