]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/mimetmac.cpp
Font (possible) fix
[wxWidgets.git] / src / mac / carbon / mimetmac.cpp
index f9cfb58d97233b2425e0e75ea829233bc90b7a22..cc471b746b2db7d9e3ee2f5f294449b232b5fa4d 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"
 
 
 // other standard headers
 #include <ctype.h>
-#include <InternetConfig.h> //For mime types
 
+#ifndef __DARWIN__
+#include <InternetConfig.h> //For mime types
+#endif
 
 /*   START CODE SAMPLE FROM TECHNOTE 1002 (http://developer.apple.com/technotes/tn/tn1002.html) */
 
@@ -389,7 +387,7 @@ wxFileTypeImpl::GetPrintCommand(wxString *printCmd,
 #if defined(__DARWIN__)
 
 //on darwin, use launch services
-#include "LaunchServices.h"
+#include <ApplicationServices/ApplicationServices.h>
 
 wxString wxFileTypeImpl::GetCommand(const wxString& verb) const
 {
@@ -906,7 +904,7 @@ public:
     bool Exists(CFTypeRef cftKey) const
     {
         wxASSERT(IsValid());
-        return CFDictionaryContainsKey((CFDictionaryRef)m_cfmdRef, cftKey) == true;
+        return CFDictionaryContainsKey((CFDictionaryRef)m_cfmdRef, cftKey);
     }
 
     bool IsOk() const {return m_cfmdRef != NULL; }
@@ -970,7 +968,7 @@ public:
         }
     }
 
-    static void PrintOutType(wxString& sMessage, wxString sValue, CFTypeRef cfRef)
+    static void PrintOutType(wxString& sMessage, const wxString& sValue, CFTypeRef cfRef)
     {
             sMessage << wxT(" {");
 
@@ -1213,7 +1211,7 @@ public:
     int GetValue()
     {
         int nOut;
-        CFNumberGetValue( m_cfnRef,    
+        CFNumberGetValue( m_cfnRef,
                           kCFNumberIntType,
                           &nOut
                         );
@@ -1359,9 +1357,9 @@ void wxCFDictionary::MakeValidXML()
                 cfdCurrent.MakeValidXML();
                 Set(pKeys[i], cfdCurrent);
             }
-            else if( ( CFGetTypeID(cfRef) == CFStringGetTypeID() ||
-                       CFGetTypeID(cfRef) == CFNumberGetTypeID() ||
-                       CFGetTypeID(cfRef) == CFBooleanGetTypeID() ) == false )
+            else if ( CFGetTypeID(cfRef) != CFStringGetTypeID() &&
+                      CFGetTypeID(cfRef) != CFNumberGetTypeID() &&
+                      CFGetTypeID(cfRef) != CFBooleanGetTypeID() )
             {
                 Remove(pKeys[i]);
                 --i;
@@ -1406,9 +1404,9 @@ void wxCFArray::MakeValidXML()
                 cfdCurrent.MakeValidXML();
                 Set(i, cfdCurrent);
             }
-            else if( ( CFGetTypeID(cfRef) == CFStringGetTypeID() ||
-                       CFGetTypeID(cfRef) == CFNumberGetTypeID() ||
-                       CFGetTypeID(cfRef) == CFBooleanGetTypeID() ) == false )
+            else if ( CFGetTypeID(cfRef) != CFStringGetTypeID() &&
+                      CFGetTypeID(cfRef) != CFNumberGetTypeID() &&
+                      CFGetTypeID(cfRef) != CFBooleanGetTypeID() )
             {
                 Remove(i);
                 --i;
@@ -1462,7 +1460,7 @@ wxFileType* wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
             wxCFDictionary cfdInfo;
             bool bInfoOpenSuccess = false;
             wxFile indictfile;
-            if(indictfile.Open(sInfoPath, wxFile::read));
+            if(indictfile.Open(sInfoPath, wxFile::read))
             {
                 CFIndex cfiBufLen = (CFIndex) indictfile.Length();
                 const UInt8* pBuffer = new UInt8[cfiBufLen];
@@ -1805,7 +1803,7 @@ wxMimeTypesManagerImpl::Unassociate(wxFileType *pFileType)
             wxCFDictionary cfdInfo;
             bool bInfoOpenSuccess = false;
             wxFile indictfile;
-            if(indictfile.Open(sInfoPath, wxFile::read));
+            if(indictfile.Open(sInfoPath, wxFile::read))
             {
                 CFIndex cfiBufLen = (CFIndex) indictfile.Length();
                 const UInt8* pBuffer = new UInt8[cfiBufLen];
@@ -2006,4 +2004,4 @@ wxMimeTypesManagerImpl::Unassociate(wxFileType *pFileType)
                             CFWriteStreamClose(cfwsInfo);
 
 */
-#endif //wxUSE_MIMETYPE
\ No newline at end of file
+#endif //wxUSE_MIMETYPE