]> git.saurik.com Git - wxWidgets.git/commitdiff
build fixes for wxUSE_VALIDATORS==0
authorPaul Cornett <paulcor@bullseye.com>
Wed, 23 Sep 2009 16:32:32 +0000 (16:32 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Wed, 23 Sep 2009 16:32:32 +0000 (16:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/validate.h
src/msw/bmpbuttn.cpp
src/propgrid/advprops.cpp
src/propgrid/props.cpp

index 55005f9d8776b3cd068752b1d7adbb48de2fc835..3cd0fdc4356a798d3c943e8cdab44bbbcd408fd7 100644 (file)
@@ -87,7 +87,7 @@ extern WXDLLIMPEXP_DATA_CORE(const wxValidator) wxDefaultValidator;
     // a wxValidator parameter to avoid using "#if wxUSE_VALIDATORS"
     // everywhere
     class WXDLLIMPEXP_FWD_CORE wxValidator;
-    #define wxDefaultValidator (*(NULL))
+    #define wxDefaultValidator (*reinterpret_cast<wxValidator*>(NULL))
 
     // this macro allows to avoid warnings about unused parameters when
     // wxUSE_VALIDATORS == 0
index a77672cbfbd45a5b16276c935ba98b8b3628cd9a..aea2db8f61a597910ac594920a4a9e41a5992045 100644 (file)
@@ -127,7 +127,7 @@ bool wxBitmapButton::Create(wxWindow *parent,
                             const wxBitmap& bitmap,
                             const wxPoint& pos,
                             const wxSize& size, long style,
-                            const wxValidator& wxVALIDATOR_PARAM(validator),
+                            const wxValidator& validator,
                             const wxString& name)
 {
     if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style,
index c4444d6de3ed96e98a10c49e2de20ea3ab39aaf0..bab9d937e47b41bef2d36cb3104a611237a7748e 100644 (file)
@@ -276,11 +276,12 @@ wxPGWindowList wxPGSpinCtrlEditor::CreateControls( wxPropertyGrid* propgrid, wxP
     wnd2->SetRange( INT_MIN, INT_MAX );
     wnd2->SetValue( 0 );
 
+    wxWindow* wnd1 = wxPGTextCtrlEditor::CreateControls(propgrid, property, pos, tcSz).m_primary;
+#if wxUSE_VALIDATORS
     // Let's add validator to make sure only numbers can be entered
     wxTextValidator validator(wxFILTER_NUMERIC, &m_tempString);
-
-    wxTextCtrl* wnd1 = (wxTextCtrl*) wxPGTextCtrlEditor::CreateControls( propgrid, property, pos, tcSz ).m_primary;
     wnd1->SetValidator(validator);
+#endif
 
     return wxPGWindowList(wnd1, wnd2);
 }
index fde73ced09dc1a0c89a89a32ba1018313b45bf71..77ecc238ee5b00fa9fe2a5c60b0d485059eda1a0 100644 (file)
@@ -2120,12 +2120,14 @@ bool wxArrayEditorDialog::Create( wxWindow *parent,
     wxBoxSizer* rowsizer = new wxBoxSizer( wxHORIZONTAL );
     m_edValue = new wxTextCtrl(this,21,wxEmptyString,
         wxDefaultPosition,wxDefaultSize,wxTE_PROCESS_ENTER);
+#if wxUSE_VALIDATORS
     wxValidator* validator = GetTextCtrlValidator();
     if ( validator )
     {
         m_edValue->SetValidator( *validator );
         delete validator;
     }
+#endif
     rowsizer->Add( m_edValue,
         1, wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL|wxALL, spacing );