- MenuHandle menu ;
- Str255 p_name ;
- char c_name[256] ;
- short lines ;
-
- menu = NewMenu( 32000 , "\pFont" ) ;
- AppendResMenu( menu , 'FONT' ) ;
- lines = CountMenuItems( menu ) ;
-
- for ( int i = 1 ; i < lines+1 ; i ++ )
- {
- GetMenuItemText( menu , i , p_name ) ;
-#if TARGET_CARBON
- p2cstrcpy( c_name, p_name ) ;
+ MenuHandle menu;
+ short lines;
+
+ menu = NewMenu( 32000, "\pFont" );
+ AppendResMenu( menu, 'FONT' );
+ lines = CountMenuItems( menu );
+
+ for ( int i = 1; i < lines + 1; i ++ )
+ {
+ wxString c_name ;
+#if TARGET_API_MAC_CARBON
+ CFStringRef menutext ;
+ c_name = wxEmptyString ;
+ if ( CopyMenuItemTextAsCFString (menu, i, &menutext) == noErr )
+ {
+ c_name = wxMacCFStringHolder(menutext).AsString(wxLocale::GetSystemEncoding());
+ }