]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
Metrowerks Objective-C++ is more strict about types than Apple's.
[wxWidgets.git] / src / common / utilscmn.cpp
index cc066591b57bfa2c410f59cdcde27c26b2f9cfc8..09369b63f3151bef006dc88747bd6543bdb3d0b7 100644 (file)
@@ -95,7 +95,7 @@
     #include <sys/stat.h>
 #endif
 
-#if defined(__WXMSW__) && !defined(__PALMOS__)
+#if defined(__WXMSW__)
     #include "wx/msw/private.h"
 #endif
 
 wxChar *
 copystring (const wxChar *s)
 {
-  if (s == NULL) s = wxT("");
+  if (s == NULL) s = wxEmptyString;
   size_t len = wxStrlen (s) + 1;
 
   wxChar *news = new wxChar[len];
@@ -281,7 +281,7 @@ const wxChar *wxGetInstallPrefix()
 #ifdef wxINSTALL_PREFIX
     return wxT(wxINSTALL_PREFIX);
 #else
-    return wxT("");
+    return wxEmptyString;
 #endif
 }
 
@@ -330,10 +330,10 @@ wxString wxGetEmailAddress()
     wxString email;
 
     wxString host = wxGetFullHostName();
-    if ( !host.IsEmpty() )
+    if ( !host.empty() )
     {
         wxString user = wxGetUserId();
-        if ( !user.IsEmpty() )
+        if ( !user.empty() )
         {
             email << user << wxT('@') << host;
         }
@@ -479,13 +479,14 @@ static bool ReadAll(wxInputStream *is, wxArrayString& output)
 // public versions of wxExecute() below
 static long wxDoExecuteWithCapture(const wxString& command,
                                    wxArrayString& output,
-                                   wxArrayString* error)
+                                   wxArrayString* error,
+                                   int flags)
 {
     // create a wxProcess which will capture the output
     wxProcess *process = new wxProcess;
     process->Redirect();
 
-    long rc = wxExecute(command, wxEXEC_SYNC, process);
+    long rc = wxExecute(command, wxEXEC_SYNC | flags, process);
 
 #if wxUSE_STREAMS
     if ( rc != -1 )
@@ -510,16 +511,17 @@ static long wxDoExecuteWithCapture(const wxString& command,
     return rc;
 }
 
-long wxExecute(const wxString& command, wxArrayString& output)
+long wxExecute(const wxString& command, wxArrayString& output, int flags)
 {
-    return wxDoExecuteWithCapture(command, output, NULL);
+    return wxDoExecuteWithCapture(command, output, NULL, flags);
 }
 
 long wxExecute(const wxString& command,
                wxArrayString& output,
-               wxArrayString& error)
+               wxArrayString& error,
+               int flags)
 {
-    return wxDoExecuteWithCapture(command, output, &error);
+    return wxDoExecuteWithCapture(command, output, &error, flags);
 }
 
 // ----------------------------------------------------------------------------
@@ -820,8 +822,8 @@ wxString wxGetPasswordFromUser(const wxString& message,
     else
         style &= ~wxCENTRE;
 
-    wxTextEntryDialog dialog(parent, message, caption, defaultValue,
-                             style | wxTE_PASSWORD, wxPoint(x, y));
+    wxPasswordEntryDialog dialog(parent, message, caption, defaultValue,
+                             style, wxPoint(x, y));
     if ( dialog.ShowModal() == wxID_OK )
     {
         str = dialog.GetValue();