]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/propform.cpp
Applied another Marco patch (5)
[wxWidgets.git] / src / generic / propform.cpp
index 4f1b06f67fa938b3d9c494b5af28ffa5e604472e..b8469214eb16d44ca95678da3fb8e61199b70db1 100644 (file)
@@ -23,9 +23,9 @@
 #if wxUSE_PROPSHEET
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
 #endif
 
+#include "wx/wx.h"
 #include "wx/propform.h"
 
 #include <ctype.h>
@@ -518,9 +518,9 @@ bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVi
 
     if (val < m_integerMin || val > m_integerMax)
     {
-        char buf[200];
-        sprintf(buf, "Value must be an integer between %ld and %ld!", m_integerMin, m_integerMax);
-        wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
+        wxChar buf[200];
+        wxSprintf(buf, wxT("Value must be an integer between %ld and %ld!"), m_integerMin, m_integerMax);
+        wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
         return FALSE;
     }
     return TRUE;
@@ -645,10 +645,10 @@ bool wxStringFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVie
         wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow;
         if (!m_strings->Member(text->GetValue()))
         {
-            wxString s("Value ");
-            s += text->GetValue();
-            s += " is not valid.";
-            wxMessageBox(s, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
+            wxString str( wxT("Value ") );
+            str += text->GetValue();
+            str += wxT(" is not valid.");
+            wxMessageBox(str, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
             return FALSE;
         }
     }
@@ -713,13 +713,13 @@ bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormV
     else if (m_propertyWindow->IsKindOf(CLASSINFO(wxListBox)))
     {
         wxListBox *lbox = (wxListBox *)m_propertyWindow;
-        if (lbox->Number() == 0 && m_strings)
+        if (lbox->GetCount() == 0 && m_strings)
         {
             // Try to initialize the listbox from 'strings'
             wxNode *node = m_strings->First();
             while (node)
             {
-                char *s = (char *)node->Data();
+                wxChar *s = (wxChar *)node->Data();
                 lbox->Append(s);
                 node = node->Next();
             }
@@ -736,20 +736,18 @@ bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormV
     else if (m_propertyWindow->IsKindOf(CLASSINFO(wxChoice)))
     {
         wxChoice *choice = (wxChoice *)m_propertyWindow;
-#ifndef __XVIEW__
-        if (choice->Number() == 0 && m_strings)
+        if (choice->GetCount() == 0 && m_strings)
         {
             // Try to initialize the choice item from 'strings'
             // XView doesn't allow this kind of thing.
             wxNode *node = m_strings->First();
             while (node)
             {
-                char *s = (char *)node->Data();
+                wxChar *s = (wxChar *)node->Data();
                 choice->Append(s);
                 node = node->Next();
             }
         }
-#endif
         choice->SetStringSelection(property->GetValue().StringValue());
     }
     else