]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grideditors.cpp
Implement wxFileType::GetOpenCommand() in wxOSX.
[wxWidgets.git] / src / generic / grideditors.cpp
index 57f01972b3471cac7304f289832989143d307532..ac90aa3310bdb867d4a8c501a68a744f4fcfe730 100644 (file)
     #include "wx/textctrl.h"
     #include "wx/checkbox.h"
     #include "wx/combobox.h"
-    #include "wx/valtext.h"
     #include "wx/intl.h"
     #include "wx/math.h"
     #include "wx/listbox.h"
 #endif
 
+#include "wx/valnum.h"
 #include "wx/textfile.h"
 #include "wx/spinctrl.h"
 #include "wx/tokenzr.h"
@@ -300,13 +300,13 @@ void wxGridCellEditor::Show(bool show, wxGridCellAttr *attr)
     else
     {
         // restore the standard colours fonts
-        if ( m_colFgOld.Ok() )
+        if ( m_colFgOld.IsOk() )
         {
             m_control->SetForegroundColour(m_colFgOld);
             m_colFgOld = wxNullColour;
         }
 
-        if ( m_colBgOld.Ok() )
+        if ( m_colBgOld.IsOk() )
         {
             m_control->SetBackgroundColour(m_colBgOld);
             m_colBgOld = wxNullColour;
@@ -314,7 +314,7 @@ void wxGridCellEditor::Show(bool show, wxGridCellAttr *attr)
 
 // Workaround for GTK+1 font setting problem on some platforms
 #if !defined(__WXGTK__) || defined(__WXGTK20__)
-        if ( m_fontOld.Ok() )
+        if ( m_fontOld.IsOk() )
         {
             m_control->SetFont(m_fontOld);
             m_fontOld = wxNullFont;
@@ -660,7 +660,7 @@ void wxGridCellNumberEditor::Create(wxWindow* parent,
         wxGridCellTextEditor::Create(parent, id, evtHandler);
 
 #if wxUSE_VALIDATORS
-        Text()->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
+        Text()->SetValidator(wxIntegerValidator<int>());
 #endif
     }
 }
@@ -875,7 +875,7 @@ void wxGridCellFloatEditor::Create(wxWindow* parent,
     wxGridCellTextEditor::Create(parent, id, evtHandler);
 
 #if wxUSE_VALIDATORS
-    Text()->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
+    Text()->SetValidator(wxFloatingPointValidator<double>(m_precision));
 #endif
 }