From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Fri, 10 May 2002 12:26:30 +0000 (+0000)
Subject: Unicode compilation problems in the samples (patch from Dimitri)
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4fce73fcaf45a87f5f81a7495bea05d1b8b5358e

Unicode compilation problems in the samples (patch from Dimitri)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/samples/config/conftest.cpp b/samples/config/conftest.cpp
index a3aff05a03..b85f46e015 100644
--- a/samples/config/conftest.cpp
+++ b/samples/config/conftest.cpp
@@ -251,5 +251,5 @@ MyFrame::~MyFrame()
   pConfig->Write("/MainFrame/w", (long) w);
   pConfig->Write("/MainFrame/h", (long) h);
 
-  pConfig->Write("/TestValue", "");
+  pConfig->Write("/TestValue", wxT("A test value"));
 }
diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp
index 35a477e829..e2fd90b69a 100644
--- a/samples/dialogs/dialogs.cpp
+++ b/samples/dialogs/dialogs.cpp
@@ -326,19 +326,19 @@ void MyFrame::MessageBox(wxCommandEvent& WXUNUSED(event) )
   switch ( dialog.ShowModal() )
   {
       case wxID_YES:
-          wxLogStatus("You pressed \"Yes\"");
+          wxLogStatus(wxT("You pressed \"Yes\""));
           break;
 
       case wxID_NO:
-          wxLogStatus("You pressed \"No\"");
+          wxLogStatus(wxT("You pressed \"No\""));
           break;
 
       case wxID_CANCEL:
-          wxLogStatus("You pressed \"Cancel\"");
+          wxLogStatus(wxT("You pressed \"Cancel\""));
           break;
 
       default:
-          wxLogError("Unexpected wxMessageDialog return code!");
+          wxLogError(wxT("Unexpected wxMessageDialog return code!"));
   }
 }
 
diff --git a/samples/ipc/server.cpp b/samples/ipc/server.cpp
index 91a173313d..0c91c8df45 100644
--- a/samples/ipc/server.cpp
+++ b/samples/ipc/server.cpp
@@ -207,7 +207,7 @@ bool MyConnection::OnExecute(const wxString& WXUNUSED(topic),
                              int WXUNUSED(size),
                              wxIPCFormat WXUNUSED(format))
 {
-    wxLogStatus("Execute command: %s", data);
+    wxLogStatus(wxT("Execute command: %s"), data);
     return TRUE;
 }
 
@@ -217,7 +217,7 @@ bool MyConnection::OnPoke(const wxString& WXUNUSED(topic),
                           int WXUNUSED(size),
                           wxIPCFormat WXUNUSED(format))
 {
-    wxLogStatus("Poke command: %s = %s", item.c_str(), data);
+    wxLogStatus(wxT("Poke command: %s = %s"), item.c_str(), data);
     return TRUE;
 }
 
diff --git a/samples/thread/thread.cpp b/samples/thread/thread.cpp
index 48aef6531e..7ca5a653d2 100644
--- a/samples/thread/thread.cpp
+++ b/samples/thread/thread.cpp
@@ -574,16 +574,16 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) )
 
 void MyFrame::OnExecMain(wxCommandEvent& WXUNUSED(event))
 {
-    wxLogMessage("The exit code from the main program is %ld",
+    wxLogMessage(wxT("The exit code from the main program is %ld"),
                  EXEC("/bin/echo \"main program\""));
 }
 
 void MyFrame::OnExecThread(wxCommandEvent& WXUNUSED(event))
 {
-    MyExecThread thread("/bin/echo \"child thread\"");
+    MyExecThread thread(wxT("/bin/echo \"child thread\""));
     thread.Run();
 
-    wxLogMessage("The exit code from a child thread is %ld",
+    wxLogMessage(wxT("The exit code from a child thread is %ld"),
                  (long)thread.Wait());
 }
 
@@ -607,7 +607,7 @@ void MyFrame::OnShowCPUs(wxCommandEvent& WXUNUSED(event))
             break;
 
         default:
-            msg.Printf("This system has %d CPUs", nCPUs);
+            msg.Printf(wxT("This system has %d CPUs"), nCPUs);
     }
             
     wxLogMessage(msg);