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:
Stefan Csomor 2002-01-14 14:13:48 +00:00
parent f1ba2ee8c1
commit a3590de1a3
2 changed files with 22 additions and 0 deletions

View File

@ -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++)
{

View File

@ -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++)
{