// Purpose: wxMenu, wxMenuBar, wxMenuItem
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Purpose: wxMenu, wxMenuBar, wxMenuItem
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
- MacAppendMenu(MAC_WXHMENU(m_hMenu), "\p-");
+ AppendMenuItemTextWithCFString( MAC_WXHMENU(m_hMenu),
+ CFSTR(""), kMenuItemAttrSeparator, 0,NULL);
- MacInsertMenuItem(MAC_WXHMENU(m_hMenu), "\p-" , pos);
+ InsertMenuItemTextWithCFString( MAC_WXHMENU(m_hMenu),
+ CFSTR(""), pos, kMenuItemAttrSeparator, 0);
- 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);
UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), wxT("a"), wxFont::GetDefaultEncoding(), pos);
pos += 1 ;
}
UMAInsertMenuItem(MAC_WXHMENU(m_hMenu), wxT("a"), wxFont::GetDefaultEncoding(), pos);
pos += 1 ;
}
pItem->UpdateItemText() ;
pItem->UpdateItemBitmap() ;
pItem->UpdateItemStatus() ;
pItem->UpdateItemText() ;
pItem->UpdateItemBitmap() ;
pItem->UpdateItemStatus() ;
::SetMenuBar( menubar ) ;
DisposeMenuBar( menubar ) ;
MenuHandle appleMenu = NULL ;
::SetMenuBar( menubar ) ;
DisposeMenuBar( menubar ) ;
MenuHandle appleMenu = NULL ;
// 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
// 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);
-
- MacInsertMenuItem( appleMenu , "\pAbout..." , 0 ) ;
+ InsertMenuItemTextWithCFString( appleMenu,
+ CFSTR("About..."), 0, 0, 0);
MacInsertMenu( appleMenu , 0 ) ;
// clean-up the help menu before adding new items
MacInsertMenu( appleMenu , 0 ) ;
// clean-up the help menu before adding new items
wxMenu* menu = menuIter->GetData() , *subMenu = NULL ;
if ( m_titles[i] == wxT("?") || m_titles[i] == wxT("&?") || m_titles[i] == wxApp::s_macHelpMenuTitleName )
{
wxMenu* menu = menuIter->GetData() , *subMenu = NULL ;
if ( m_titles[i] == wxT("?") || m_titles[i] == wxT("&?") || m_titles[i] == wxApp::s_macHelpMenuTitleName )
{
- MacAppendMenu(mh, "\p-" );
+ AppendMenuItemTextWithCFString( mh,
+ CFSTR(""), kMenuItemAttrSeparator, 0,NULL);
- UMAAppendMenuItem(mh, item->GetText() , wxFont::GetDefaultEncoding(), entry);
+ UMAAppendMenuItem(mh, wxStripMenuCodes(item->GetText()) , wxFont::GetDefaultEncoding(), entry);
- wxAcceleratorEntry* entry = wxGetAccelFromString( aboutMenuItem->GetText() ) ;
- UMASetMenuItemText( GetMenuHandle( kwxMacAppleMenuId ) , 1 , aboutMenuItem->GetText() , wxFont::GetDefaultEncoding() );
+ wxAcceleratorEntry*
+ entry = wxAcceleratorEntry::Create( aboutMenuItem->GetText() ) ;
+ UMASetMenuItemText( GetMenuHandle( kwxMacAppleMenuId ) , 1 , wxStripMenuCodes ( aboutMenuItem->GetText() ) , wxFont::GetDefaultEncoding() );
UMAEnableMenuItem( GetMenuHandle( kwxMacAppleMenuId ) , 1 , true );
SetMenuItemCommandID( GetMenuHandle( kwxMacAppleMenuId ) , 1 , kHICommandAbout ) ;
UMAEnableMenuItem( GetMenuHandle( kwxMacAppleMenuId ) , 1 , true );
SetMenuItemCommandID( GetMenuHandle( kwxMacAppleMenuId ) , 1 , kHICommandAbout ) ;