Line-up interfaces to use size_t for GetCount()s (and count related api).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
5d0d3e6d72
commit
0360340068
@ -119,7 +119,7 @@ public:
|
||||
const wxString& GetDescription() const { return m_desc; }
|
||||
// get the array of all extensions
|
||||
const wxArrayString& GetExtensions() const { return m_exts; }
|
||||
int GetExtensionsCount() const {return m_exts.GetCount(); }
|
||||
size_t GetExtensionsCount() const {return m_exts.GetCount(); }
|
||||
// get the icon info
|
||||
const wxString& GetIconFile() const { return m_iconFile; }
|
||||
int GetIconIndex() const { return m_iconIndex; }
|
||||
|
@ -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:
|
||||
@ -30,6 +30,8 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_MIMETYPE
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/string.h"
|
||||
|
||||
@ -38,9 +40,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if wxUSE_MIMETYPE
|
||||
|
||||
#include "wx/log.h"
|
||||
#include "wx/file.h"
|
||||
#include "wx/intl.h"
|
||||
@ -415,7 +414,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;
|
||||
@ -547,7 +546,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;
|
||||
}
|
||||
@ -717,7 +716,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);
|
||||
@ -1592,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] ) );
|
||||
}
|
||||
@ -1750,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;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msw/mimetype.cpp
|
||||
// Name: src/msw/mimetype.cpp
|
||||
// Purpose: classes and functions to manage MIME types
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
@ -509,7 +509,7 @@ wxFileType *wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
|
||||
_T("Associate() needs extension") );
|
||||
|
||||
bool ok;
|
||||
int iExtCount = 0 ;
|
||||
size_t iExtCount = 0;
|
||||
wxString filetype;
|
||||
wxString extWithDot;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user