]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/gridctrl.cpp
another compilation fix
[wxWidgets.git] / src / generic / gridctrl.cpp
index f16184ecf7292194f7feb1bd961b7890513452fa..ddd9793285edccfa34aa6c0a692e0367b160c5ad 100644 (file)
@@ -10,7 +10,7 @@
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
-    #pragma interface "gridctrl.h"
+    #pragma implementation "gridctrl.h"
 #endif
 
 #include "wx/wxprec.h"
@@ -115,7 +115,7 @@ wxSize wxGridCellDateTimeRenderer::GetBestSize(wxGrid& grid,
 }
 
 void wxGridCellDateTimeRenderer::SetParameters(const wxString& params){
-    if(params)
+    if (!params.IsEmpty())
         m_oformat=params;
 }
 
@@ -128,7 +128,7 @@ void wxGridCellDateTimeRenderer::SetParameters(const wxString& params){
 
 wxGridCellEnumRenderer::wxGridCellEnumRenderer(const wxString& choices)
 {
-    if(choices)
+    if (!choices.IsEmpty())
         SetParameters(choices);
 }
 
@@ -215,7 +215,9 @@ void wxGridCellEnumRenderer::SetParameters(const wxString& params)
 wxGridCellEnumEditor::wxGridCellEnumEditor(const wxString& choices)
                     : wxGridCellChoiceEditor()
 {
-    if(choices)
+    m_startint = -1;
+
+    if (!choices.IsEmpty())
         SetParameters(choices);
 }
 
@@ -265,7 +267,7 @@ bool wxGridCellEnumEditor::EndEdit(int row, int col, wxGrid* grid)
         if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_NUMBER))
             grid->GetTable()->SetValueAsLong(row, col, pos);
         else
-            grid->GetTable()->SetValue(row, col,wxString::Format("%i",pos));
+            grid->GetTable()->SetValue(row, col,wxString::Format(wxT("%i"),pos));
     }
 
     return changed;
@@ -363,7 +365,7 @@ wxGridCellAutoWrapStringRenderer::GetBestSize(wxGrid& grid,
                                               wxDC& dc,
                                               int row, int col)
 {
-    int x,y, height , width = grid.GetColSize(col) -10;
+    wxCoord x,y, height , width = grid.GetColSize(col) -10;
     int count = 250; //Limit iterations..
 
     wxRect rect(0,0,width,10);