X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ee6b1d97e741fda8d579fa21cbc89f0c91615cef..239c2e9674c8c6b9f0fd3d6fb94e2381691651b5:/src/mac/carbon/fontenum.cpp diff --git a/src/mac/carbon/fontenum.cpp b/src/mac/carbon/fontenum.cpp index f296efd93c..e1b1347c6d 100644 --- a/src/mac/carbon/fontenum.cpp +++ b/src/mac/carbon/fontenum.cpp @@ -33,7 +33,11 @@ #endif #include "wx/fontenum.h" +#include "wx/fontutil.h" #include "wx/fontmap.h" +#include "wx/fontutil.h" + +#include "wx/mac/private.h" // ---------------------------------------------------------------------------- // private classes @@ -100,7 +104,8 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) void wxFontEnumeratorHelper::DoEnumerate() { MenuHandle menu ; - Str255 name ; + Str255 p_name ; + char c_name[256] ; short lines ; menu = NewMenu( 32000 , "\pFont" ) ; @@ -109,11 +114,16 @@ void wxFontEnumeratorHelper::DoEnumerate() for ( int i = 1 ; i < lines+1 ; i ++ ) { - GetMenuItemText( menu , i , name ) ; - p2cstr( name ) ; - /* - - if ( m_fixedOnly ) + GetMenuItemText( menu , i , p_name ) ; +#if TARGET_CARBON + p2cstrcpy( c_name, p_name ) ; +#else + p2cstr( p_name ) ; + strcpy( c_name, (char *)p_name ) ; +#endif + /* + + if ( m_fixedOnly ) { // check that it's a fixed pitch font (there is *no* error here, the // flag name is misleading!) @@ -134,7 +144,7 @@ void wxFontEnumeratorHelper::DoEnumerate() } */ - m_fontEnum->OnFacename( name ) ; + m_fontEnum->OnFacename( c_name ) ; } DisposeMenu( menu ) ; }