]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/mimetmac.cpp
cleanup - reformat
[wxWidgets.git] / src / mac / carbon / mimetmac.cpp
index 847502c1b7c7c442382e165bc416df3ad94bc8ec..634c70065c8c01028caaa55f0a963b88bffcda79 100644 (file)
 //
 //
 
 //
 //
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "mimetype.h"
-#endif
-
 // for compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // for compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -422,8 +418,9 @@ wxString wxFileTypeImpl::GetCommand(const wxString& verb) const
             CFRelease(cfurlAppPath);
 
             //PHEW!  Success!
             CFRelease(cfurlAppPath);
 
             //PHEW!  Success!
+            //Since a filename might have spaces in it, so surround it with quotes
             if(cfsUnixPath)
             if(cfsUnixPath)
-                return wxMacCFStringHolder(cfsUnixPath).AsString(wxLocale::GetSystemEncoding());
+                return wxString(wxT("'")) + wxMacCFStringHolder(cfsUnixPath).AsString(wxLocale::GetSystemEncoding()) + wxString(wxT("'"));
         }
         else
         {
         }
         else
         {
@@ -972,7 +969,7 @@ public:
         }
     }
 
         }
     }
 
-    static void PrintOutType(wxString& sMessage, wxString sValue, CFTypeRef cfRef)
+    static void PrintOutType(wxString& sMessage, const wxString& sValue, CFTypeRef cfRef)
     {
             sMessage << wxT(" {");
 
     {
             sMessage << wxT(" {");