X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/172da31f537534fd531f05abede196aefa60d6b7..3ab296d9eb6d351eb1d2238f3e6ff2f5e6123861:/src/mac/carbon/mimetmac.cpp diff --git a/src/mac/carbon/mimetmac.cpp b/src/mac/carbon/mimetmac.cpp index 67d3371823..4ee87964e6 100644 --- a/src/mac/carbon/mimetmac.cpp +++ b/src/mac/carbon/mimetmac.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: mac/mimetype.cpp +// Name: src/mac/carbon/mimetype.cpp // Purpose: Mac Carbon implementation for wx MIME-related classes // Author: Ryan Norton // Modified by: @@ -27,27 +27,27 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ - #pragma hdrstop + #pragma hdrstop #endif -#ifndef WX_PRECOMP - #include "wx/string.h" - - #if wxUSE_GUI - #include "wx/icon.h" - #endif -#endif +#if wxUSE_MIMETYPE +#include "wx/mac/mimetype.h" -#if wxUSE_MIMETYPE +#ifndef WX_PRECOMP + #include "wx/dynarray.h" + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/log.h" + + #if wxUSE_GUI + #include "wx/icon.h" + #endif +#endif -#include "wx/log.h" #include "wx/file.h" -#include "wx/intl.h" -#include "wx/dynarray.h" #include "wx/confbase.h" -#include "wx/mac/mimetype.h" #include "wx/mac/private.h" // other standard headers @@ -55,6 +55,7 @@ #ifndef __DARWIN__ #include + #include #endif @@ -414,7 +415,7 @@ wxString wxFileTypeImpl::GetCommand(const wxString& verb) const m_lIndex, &entry); wxString sCurrentExtension = wxMacMakeStringFromPascal(entry.extension); - sCurrentExtension = sCurrentExtension.Right(sCurrentExtension.Length()-1 ); + sCurrentExtension = sCurrentExtension.Right(sCurrentExtension.length()-1 ); //type, creator, ext, roles, outapp (FSRef), outappurl CFURLRef cfurlAppPath; @@ -546,7 +547,7 @@ bool wxFileTypeImpl::GetExtensions(wxArrayString& extensions) //entry has period in it wxString sCurrentExtension = wxMacMakeStringFromPascal( entry.extension ); - extensions.Add( sCurrentExtension.Right( sCurrentExtension.Length() - 1 ) ); + extensions.Add( sCurrentExtension.Right( sCurrentExtension.length() - 1 ) ); return true; } @@ -629,7 +630,7 @@ void wxMimeTypesManagerImpl::Initialize(int mailcapStyles, const wxString& extra if (status != noErr) { wxLogDebug(wxT("Could not initialize wxMimeTypesManager!")); - wxASSERT( false ); + wxFAIL; m_hIC = NULL; return; @@ -716,7 +717,7 @@ wxFileType* wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& e) if (status == noErr) { wxString sCurrentExtension = wxMacMakeStringFromPascal(entry.extension); - if ( sCurrentExtension.Right(sCurrentExtension.Length() - 1) == e ) // entry has period in it + if ( sCurrentExtension.Right(sCurrentExtension.length() - 1) == e ) // entry has period in it { wxFileType* pFileType = new wxFileType(); pFileType->m_impl->Init((wxMimeTypesManagerImpl*)this, pos); @@ -818,7 +819,6 @@ pascal OSStatus MoreProcGetProcessTypeSignature( // #include "wx/mac/corefoundation/cfstring.h" -#include "wx/intl.h" //wxLocale for wxCFString #define wxCF_RELEASE true #define wxCF_RETAIN false @@ -1591,7 +1591,7 @@ wxFileType* wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo) //'*' for unrestricted if (ftInfo.GetExtensionsCount() != 0) { - for (size_t iExtension = 0; iExtension < (size_t)ftInfo.GetExtensionsCount(); ++iExtension) + for (size_t iExtension = 0; iExtension < ftInfo.GetExtensionsCount(); ++iExtension) { cfaExtensions.Add( wxCFString( asExtensions[iExtension] ) ); } @@ -1749,7 +1749,7 @@ wxFileType* wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo) wxMacStringToPascal(ftInfo.GetDescription(), psDescription); Str255 psPostCreatorName; - wxMacStringToPascal(wxT(""), psPostCreatorName); + wxMacStringToPascal(wxEmptyString, psPostCreatorName); //add the entry to the database ICMapEntry entry;