summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
127189e)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36773
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
pSubMenu->MacBeforeDisplay( true ) ;
if ( pos == (size_t)-1 )
pSubMenu->MacBeforeDisplay( true ) ;
if ( pos == (size_t)-1 )
- UMAAppendSubMenuItem(MAC_WXHMENU(m_hMenu), pItem->GetText(), wxFont::GetDefaultEncoding(), pSubMenu->m_macMenuId);
+ UMAAppendSubMenuItem(MAC_WXHMENU(m_hMenu), wxStripMenuCodes(pItem->GetText()), wxFont::GetDefaultEncoding(), pSubMenu->m_macMenuId);
- UMAInsertSubMenuItem(MAC_WXHMENU(m_hMenu), pItem->GetText(), wxFont::GetDefaultEncoding(), pos, pSubMenu->m_macMenuId);
+ UMAInsertSubMenuItem(MAC_WXHMENU(m_hMenu), wxStripMenuCodes(pItem->GetText()), wxFont::GetDefaultEncoding(), pos, pSubMenu->m_macMenuId);
pItem->UpdateItemBitmap() ;
pItem->UpdateItemStatus() ;
pItem->UpdateItemBitmap() ;
pItem->UpdateItemStatus() ;
- UMAAppendMenuItem(mh, item->GetText() , wxFont::GetDefaultEncoding(), entry);
+ UMAAppendMenuItem(mh, wxStripMenuCodes(item->GetText()) , wxFont::GetDefaultEncoding(), entry);
SetMenuItemCommandID( mh , CountMenuItems(mh) , wxIdToMacCommand ( item->GetId() ) ) ;
SetMenuItemRefCon( mh , CountMenuItems(mh) , (UInt32)item ) ;
}
SetMenuItemCommandID( mh , CountMenuItems(mh) , wxIdToMacCommand ( item->GetId() ) ) ;
SetMenuItemRefCon( mh , CountMenuItems(mh) , (UInt32)item ) ;
}
if ( aboutMenuItem )
{
wxAcceleratorEntry* entry = wxGetAccelFromString( aboutMenuItem->GetText() ) ;
if ( aboutMenuItem )
{
wxAcceleratorEntry* entry = wxGetAccelFromString( aboutMenuItem->GetText() ) ;
- UMASetMenuItemText( GetMenuHandle( kwxMacAppleMenuId ) , 1 , aboutMenuItem->GetText() , wxFont::GetDefaultEncoding() );
+ 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 ) ;
UMAEnableMenuItem( GetMenuHandle( kwxMacAppleMenuId ) , 1 , true );
SetMenuItemCommandID( GetMenuHandle( kwxMacAppleMenuId ) , 1 , kHICommandAbout ) ;
SetMenuItemRefCon(GetMenuHandle( kwxMacAppleMenuId ) , 1 , (UInt32)aboutMenuItem ) ;
else
::SetItemMark( mhandle , index , 0 ) ; // no mark
else
::SetItemMark( mhandle , index , 0 ) ; // no mark
- UMASetMenuItemText( mhandle , index , m_text , wxFont::GetDefaultEncoding() ) ;
+ UMASetMenuItemText( mhandle , index , wxStripMenuCodes(m_text) , wxFont::GetDefaultEncoding() ) ;
wxAcceleratorEntry *entry = wxGetAccelFromString( m_text ) ;
UMASetMenuItemShortcut( mhandle , index , entry ) ;
delete entry ;
wxAcceleratorEntry *entry = wxGetAccelFromString( m_text ) ;
UMASetMenuItemShortcut( mhandle , index , entry ) ;
delete entry ;
if( mhandle == NULL || index == 0)
return ;
if( mhandle == NULL || index == 0)
return ;
- UMASetMenuItemText( mhandle , index , m_text , wxFont::GetDefaultEncoding() ) ;
+ UMASetMenuItemText( mhandle , index , wxStripMenuCodes(m_text) , wxFont::GetDefaultEncoding() ) ;
wxAcceleratorEntry *entry = wxGetAccelFromString( m_text ) ;
UMASetMenuItemShortcut( mhandle , index , entry ) ;
delete entry ;
wxAcceleratorEntry *entry = wxGetAccelFromString( m_text ) ;
UMASetMenuItemShortcut( mhandle , index , entry ) ;
delete entry ;
void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title, wxFontEncoding encoding )
{
void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title, wxFontEncoding encoding )
{
- wxString str = wxStripMenuCodes( title ) ;
+ wxString str = title ; // we don't strip the accels here anynmore, must be done before
#if TARGET_CARBON
SetMenuItemTextWithCFString( menu , item , wxMacCFStringHolder(str , encoding) ) ;
#if TARGET_CARBON
SetMenuItemTextWithCFString( menu , item , wxMacCFStringHolder(str , encoding) ) ;