}
if ( item->IsSeparator() )
{
if ( wm && newItems)
InsertMenuItemTextWithCFString( wm,
}
if ( item->IsSeparator() )
{
if ( wm && newItems)
InsertMenuItemTextWithCFString( wm,
- CFSTR(""), insertAfter, kMenuItemAttrSeparator, 0);
-
+ CFSTR(""), insertAfter, kMenuItemAttrSeparator, 0);
+
- MenuItemIndex winListPos = -1;
- OSStatus err = GetIndMenuItemWithCommandID(wm,
+ MenuItemIndex winListPos = (MenuItemIndex)-1;
+ OSStatus err = GetIndMenuItemWithCommandID(wm,
wxIdToMacCommand ( item->GetId() ), 1, NULL, &winListPos);
wxIdToMacCommand ( item->GetId() ), 1, NULL, &winListPos);
if ( wm && err == menuItemNotFoundErr )
{
// NB: the only way to determine whether or not we should add
// a separator is to know if we've added menu items to the menu
// before the separator.
newItems = true;
if ( wm && err == menuItemNotFoundErr )
{
// NB: the only way to determine whether or not we should add
// a separator is to know if we've added menu items to the menu
// before the separator.
newItems = true;
- UMAInsertMenuItem(wm, wxStripMenuCodes(item->GetText()) , wxFont::GetDefaultEncoding(), insertAfter, entry);
+ UMAInsertMenuItem(wm, wxStripMenuCodes(item->GetItemLabel()) , wxFont::GetDefaultEncoding(), insertAfter, entry);
SetMenuItemCommandID( wm , insertAfter+1 , wxIdToMacCommand ( item->GetId() ) ) ;
SetMenuItemRefCon( wm , insertAfter+1 , (URefCon) item ) ;
}
delete entry ;
}
SetMenuItemCommandID( wm , insertAfter+1 , wxIdToMacCommand ( item->GetId() ) ) ;
SetMenuItemRefCon( wm , insertAfter+1 , (URefCon) item ) ;
}
delete entry ;
}
- CFSTR(""), kMenuItemAttrSeparator, 0,NULL);
+ CFSTR(""), kMenuItemAttrSeparator, 0,NULL);
- CFSTR(""), pos, kMenuItemAttrSeparator, 0);
+ CFSTR(""), pos, kMenuItemAttrSeparator, 0);
- UMAAppendSubMenuItem(MAC_WXHMENU(m_hMenu), wxStripMenuCodes(pItem->GetText()), wxFont::GetDefaultEncoding(), pSubMenu->m_macMenuId);
+ UMAAppendSubMenuItem(MAC_WXHMENU(m_hMenu), wxStripMenuCodes(pItem->GetItemLabel()), wxFont::GetDefaultEncoding(), pSubMenu->m_macMenuId);
- UMAInsertSubMenuItem(MAC_WXHMENU(m_hMenu), wxStripMenuCodes(pItem->GetText()), wxFont::GetDefaultEncoding(), pos, pSubMenu->m_macMenuId);
+ UMAInsertSubMenuItem(MAC_WXHMENU(m_hMenu), wxStripMenuCodes(pItem->GetItemLabel()), wxFont::GetDefaultEncoding(), pos, pSubMenu->m_macMenuId);
// However, the change from 10.2 to 10.3 suggests it is preferred
#if TARGET_API_MAC_OSX
InsertMenuItemTextWithCFString( appleMenu,
// However, the change from 10.2 to 10.3 suggests it is preferred
#if TARGET_API_MAC_OSX
InsertMenuItemTextWithCFString( appleMenu,
- CFSTR(""), 0, kMenuItemAttrSeparator, 0);
+ CFSTR(""), 0, kMenuItemAttrSeparator, 0);
- CFSTR("About..."), 0, 0, 0);
+ CFSTR("About..."), 0, 0, 0);
MacInsertMenu( appleMenu , 0 ) ;
// if we have a mac help menu, clean it up before adding new items
MacInsertMenu( appleMenu , 0 ) ;
// if we have a mac help menu, clean it up before adding new items
- CFSTR(""), kMenuItemAttrSeparator, 0,NULL);
+ CFSTR(""), kMenuItemAttrSeparator, 0,NULL);
- UMAAppendMenuItem(helpMenuHandle, wxStripMenuCodes(item->GetText()) , wxFont::GetDefaultEncoding(), entry);
+ UMAAppendMenuItem(helpMenuHandle, wxStripMenuCodes(item->GetItemLabel()) , wxFont::GetDefaultEncoding(), entry);
SetMenuItemCommandID( helpMenuHandle , CountMenuItems(helpMenuHandle) , wxIdToMacCommand ( item->GetId() ) ) ;
SetMenuItemRefCon( helpMenuHandle , CountMenuItems(helpMenuHandle) , (URefCon) item ) ;
}
SetMenuItemCommandID( helpMenuHandle , CountMenuItems(helpMenuHandle) , wxIdToMacCommand ( item->GetId() ) ) ;
SetMenuItemRefCon( helpMenuHandle , CountMenuItems(helpMenuHandle) , (URefCon) item ) ;
}
if ( MacGetWindowMenuHMenu() == NULL )
{
CreateStandardWindowMenu( 0 , (MenuHandle*) &s_macWindowMenuHandle ) ;
}
if ( MacGetWindowMenuHMenu() == NULL )
{
CreateStandardWindowMenu( 0 , (MenuHandle*) &s_macWindowMenuHandle ) ;
}
kHICommandWindowListSeparator, 1, NULL, &winListStart);
kHICommandWindowListSeparator, 1, NULL, &winListStart);
// add a separator so that the standard items and the custom items
// aren't mixed together, but only if this is the first run
// add a separator so that the standard items and the custom items
// aren't mixed together, but only if this is the first run
if ( err == menuItemNotFoundErr )
{
InsertMenuItemTextWithCFString( wm,
CFSTR(""), winListStart-1, kMenuItemAttrSeparator, 'WXWM');
}
if ( err == menuItemNotFoundErr )
{
InsertMenuItemTextWithCFString( wm,
CFSTR(""), winListStart-1, kMenuItemAttrSeparator, 'WXWM');
}
}
else
{
UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , m_titles[i], m_font.GetEncoding() ) ;
menu->MacBeforeDisplay(false) ;
}
else
{
UMASetMenuTitle( MAC_WXHMENU(menu->GetHMenu()) , m_titles[i], m_font.GetEncoding() ) ;
menu->MacBeforeDisplay(false) ;
- entry = wxAcceleratorEntry::Create( aboutMenuItem->GetText() ) ;
- UMASetMenuItemText( GetMenuHandle( kwxMacAppleMenuId ) , 1 , wxStripMenuCodes ( aboutMenuItem->GetText() ) , wxFont::GetDefaultEncoding() );
+ entry = wxAcceleratorEntry::Create( aboutMenuItem->GetItemLabel() ) ;
+ UMASetMenuItemText( GetMenuHandle( kwxMacAppleMenuId ) , 1 , wxStripMenuCodes ( aboutMenuItem->GetItemLabel() ) , wxFont::GetDefaultEncoding() );
UMAEnableMenuItem( GetMenuHandle( kwxMacAppleMenuId ) , 1 , true );
SetMenuItemCommandID( GetMenuHandle( kwxMacAppleMenuId ) , 1 , kHICommandAbout ) ;
SetMenuItemRefCon(GetMenuHandle( kwxMacAppleMenuId ) , 1 , (URefCon)aboutMenuItem ) ;
UMAEnableMenuItem( GetMenuHandle( kwxMacAppleMenuId ) , 1 , true );
SetMenuItemCommandID( GetMenuHandle( kwxMacAppleMenuId ) , 1 , kHICommandAbout ) ;
SetMenuItemRefCon(GetMenuHandle( kwxMacAppleMenuId ) , 1 , (URefCon)aboutMenuItem ) ;