corrected apple menu and help menu anomalies under carbon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f1ba2ee8c1
commit
a3590de1a3
@ -626,10 +626,16 @@ void wxMenuBar::MacInstallMenuBar()
|
||||
wxString message ;
|
||||
wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
|
||||
::SetMenuBar( menubar ) ;
|
||||
#if TARGET_API_MAC_CARBON
|
||||
::DisposeMenuBar( menubar ) ;
|
||||
#else
|
||||
::DisposeHandle( menubar ) ;
|
||||
#endif
|
||||
|
||||
MenuHandle menu = ::GetMenuHandle( kwxMacAppleMenuId ) ;
|
||||
#if TARGET_API_MAC_OS8
|
||||
::AppendResMenu(menu, 'DRVR');
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < m_menus.GetCount(); i++)
|
||||
{
|
||||
@ -646,6 +652,11 @@ void wxMenuBar::MacInstallMenuBar()
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
for ( int i = CountMenuItems( mh ) ; i >= firstUserHelpMenuItem ; --i )
|
||||
{
|
||||
DeleteMenuItem( mh , i ) ;
|
||||
}
|
||||
|
||||
for (pos = 0 , node = menu->GetMenuItems().First(); node; node = node->Next(), pos++)
|
||||
{
|
||||
|
@ -626,10 +626,16 @@ void wxMenuBar::MacInstallMenuBar()
|
||||
wxString message ;
|
||||
wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
|
||||
::SetMenuBar( menubar ) ;
|
||||
#if TARGET_API_MAC_CARBON
|
||||
::DisposeMenuBar( menubar ) ;
|
||||
#else
|
||||
::DisposeHandle( menubar ) ;
|
||||
#endif
|
||||
|
||||
MenuHandle menu = ::GetMenuHandle( kwxMacAppleMenuId ) ;
|
||||
#if TARGET_API_MAC_OS8
|
||||
::AppendResMenu(menu, 'DRVR');
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < m_menus.GetCount(); i++)
|
||||
{
|
||||
@ -646,6 +652,11 @@ void wxMenuBar::MacInstallMenuBar()
|
||||
{
|
||||
continue ;
|
||||
}
|
||||
|
||||
for ( int i = CountMenuItems( mh ) ; i >= firstUserHelpMenuItem ; --i )
|
||||
{
|
||||
DeleteMenuItem( mh , i ) ;
|
||||
}
|
||||
|
||||
for (pos = 0 , node = menu->GetMenuItems().First(); node; node = node->Next(), pos++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user