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:
@@ -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++)
|
||||
{
|
||||
@@ -647,6 +653,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++)
|
||||
{
|
||||
item = (wxMenuItem *)node->Data();
|
||||
|
@@ -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++)
|
||||
{
|
||||
@@ -647,6 +653,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++)
|
||||
{
|
||||
item = (wxMenuItem *)node->Data();
|
||||
|
Reference in New Issue
Block a user