menu help under classic was not giving back the correct help menu handle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -589,7 +589,6 @@ OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static OSStatus helpMenuStatus = noErr ;
|
static OSStatus helpMenuStatus = noErr ;
|
||||||
static MenuRef helpMenuHandle = NULL ;
|
|
||||||
static MenuItemIndex firstCustomItemIndex = 0 ;
|
static MenuItemIndex firstCustomItemIndex = 0 ;
|
||||||
|
|
||||||
OSStatus UMAGetHelpMenu(
|
OSStatus UMAGetHelpMenu(
|
||||||
@@ -599,13 +598,11 @@ OSStatus UMAGetHelpMenu(
|
|||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
return HMGetHelpMenu( outHelpMenu , outFirstCustomItemIndex ) ;
|
return HMGetHelpMenu( outHelpMenu , outFirstCustomItemIndex ) ;
|
||||||
#else
|
#else
|
||||||
if ( helpMenuHandle == NULL )
|
MenuRef helpMenuHandle ;
|
||||||
|
helpMenuStatus = HMGetHelpMenuHandle( &helpMenuHandle ) ;
|
||||||
|
if ( firstCustomItemIndex == 0 && helpMenuStatus == noErr )
|
||||||
{
|
{
|
||||||
helpMenuStatus = HMGetHelpMenuHandle( &helpMenuHandle ) ;
|
firstCustomItemIndex = CountMenuItems( helpMenuHandle ) + 1 ;
|
||||||
if ( helpMenuStatus == noErr )
|
|
||||||
{
|
|
||||||
firstCustomItemIndex = CountMenuItems( helpMenuHandle ) + 1 ;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ( outFirstCustomItemIndex )
|
if ( outFirstCustomItemIndex )
|
||||||
{
|
{
|
||||||
|
@@ -589,7 +589,6 @@ OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static OSStatus helpMenuStatus = noErr ;
|
static OSStatus helpMenuStatus = noErr ;
|
||||||
static MenuRef helpMenuHandle = NULL ;
|
|
||||||
static MenuItemIndex firstCustomItemIndex = 0 ;
|
static MenuItemIndex firstCustomItemIndex = 0 ;
|
||||||
|
|
||||||
OSStatus UMAGetHelpMenu(
|
OSStatus UMAGetHelpMenu(
|
||||||
@@ -599,13 +598,11 @@ OSStatus UMAGetHelpMenu(
|
|||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
return HMGetHelpMenu( outHelpMenu , outFirstCustomItemIndex ) ;
|
return HMGetHelpMenu( outHelpMenu , outFirstCustomItemIndex ) ;
|
||||||
#else
|
#else
|
||||||
if ( helpMenuHandle == NULL )
|
MenuRef helpMenuHandle ;
|
||||||
|
helpMenuStatus = HMGetHelpMenuHandle( &helpMenuHandle ) ;
|
||||||
|
if ( firstCustomItemIndex == 0 && helpMenuStatus == noErr )
|
||||||
{
|
{
|
||||||
helpMenuStatus = HMGetHelpMenuHandle( &helpMenuHandle ) ;
|
firstCustomItemIndex = CountMenuItems( helpMenuHandle ) + 1 ;
|
||||||
if ( helpMenuStatus == noErr )
|
|
||||||
{
|
|
||||||
firstCustomItemIndex = CountMenuItems( helpMenuHandle ) + 1 ;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ( outFirstCustomItemIndex )
|
if ( outFirstCustomItemIndex )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user