if ( pItem->IsSeparator() )
{
if ( pos == (size_t)-1 )
- MacAppendMenu(MAC_WXHMENU(m_hMenu), "\p-");
+ AppendMenuItemTextWithCFString( MAC_WXHMENU(m_hMenu),
+ CFSTR(""), kMenuItemAttrSeparator, 0,NULL);
else
- MacInsertMenuItem(MAC_WXHMENU(m_hMenu), "\p-" , pos);
+ InsertMenuItemTextWithCFString( MAC_WXHMENU(m_hMenu),
+ CFSTR(""), pos, kMenuItemAttrSeparator, 0);
}
else
{
}
SetMenuItemCommandID( MAC_WXHMENU(m_hMenu) , pos , wxIdToMacCommand ( pItem->GetId() ) ) ;
- SetMenuItemRefCon( MAC_WXHMENU(m_hMenu) , pos , (UInt32) pItem ) ;
+ SetMenuItemRefCon( MAC_WXHMENU(m_hMenu) , pos , (URefCon) pItem ) ;
pItem->UpdateItemText() ;
pItem->UpdateItemBitmap() ;
pItem->UpdateItemStatus() ;
::SetMenuBar( menubar ) ;
DisposeMenuBar( menubar ) ;
MenuHandle appleMenu = NULL ;
- char appleMenuTitle[3] = { 01 , kMenuAppleLogoFilledGlyph , 0 } ;
verify_noerr( CreateNewMenu( kwxMacAppleMenuId , 0 , &appleMenu ) ) ;
- verify_noerr( SetMenuTitle( appleMenu , (ConstStr255Param) appleMenuTitle ) );
+ verify_noerr( SetMenuTitleWithCFString( appleMenu , CFSTR( "\x14" ) ) );
// Add About/Preferences separator only on OS X
// KH/RN: Separator is always present on 10.3 but not on 10.2
// However, the change from 10.2 to 10.3 suggests it is preferred
#if TARGET_API_MAC_OSX
- MacInsertMenuItem( appleMenu , "\p-" , 0 ) ;
+ InsertMenuItemTextWithCFString( appleMenu,
+ CFSTR(""), 0, kMenuItemAttrSeparator, 0);
#endif
-
- MacInsertMenuItem( appleMenu , "\pAbout..." , 0 ) ;
+ InsertMenuItemTextWithCFString( appleMenu,
+ CFSTR("About..."), 0, 0, 0);
MacInsertMenu( appleMenu , 0 ) ;
// clean-up the help menu before adding new items
if ( item->IsSeparator() )
{
if ( mh )
- MacAppendMenu(mh, "\p-" );
+ AppendMenuItemTextWithCFString( mh,
+ CFSTR(""), kMenuItemAttrSeparator, 0,NULL);
}
else
{
{
UMAAppendMenuItem(mh, wxStripMenuCodes(item->GetText()) , wxFont::GetDefaultEncoding(), entry);
SetMenuItemCommandID( mh , CountMenuItems(mh) , wxIdToMacCommand ( item->GetId() ) ) ;
- SetMenuItemRefCon( mh , CountMenuItems(mh) , (UInt32)item ) ;
+ SetMenuItemRefCon( mh , CountMenuItems(mh) , (URefCon) item ) ;
}
}
UMASetMenuItemText( GetMenuHandle( kwxMacAppleMenuId ) , 1 , wxStripMenuCodes ( aboutMenuItem->GetText() ) , wxFont::GetDefaultEncoding() );
UMAEnableMenuItem( GetMenuHandle( kwxMacAppleMenuId ) , 1 , true );
SetMenuItemCommandID( GetMenuHandle( kwxMacAppleMenuId ) , 1 , kHICommandAbout ) ;
- SetMenuItemRefCon(GetMenuHandle( kwxMacAppleMenuId ) , 1 , (UInt32)aboutMenuItem ) ;
+ SetMenuItemRefCon(GetMenuHandle( kwxMacAppleMenuId ) , 1 , (URefCon)aboutMenuItem ) ;
UMASetMenuItemShortcut( GetMenuHandle( kwxMacAppleMenuId ) , 1 , entry ) ;
}
}