]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/uma.cpp
gcc pragmas fixes
[wxWidgets.git] / src / mac / carbon / uma.cpp
index 4fe99c0e6a8d7ce5eac08d6cc0df0177b2f3aad1..c9342a3947819817e6d340e8800f32428478b0ee 100644 (file)
@@ -94,7 +94,6 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls )
                sUMAHasWindowManager = sUMAWindowManagerAttr & gestaltWindowMgrPresent ;
        }
                
                sUMAHasWindowManager = sUMAWindowManagerAttr & gestaltWindowMgrPresent ;
        }
                
-#ifndef __DARWIN__
 #if TARGET_CARBON
 // Call currently implicitely done :           InitFloatingWindows() ;
 #else
 #if TARGET_CARBON
 // Call currently implicitely done :           InitFloatingWindows() ;
 #else
@@ -102,7 +101,6 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls )
                InitFloatingWindows() ;
        else
                InitWindows();
                InitFloatingWindows() ;
        else
                InitWindows();
-#endif
 #endif
 
        if ( NavServicesAvailable() )
 #endif
 
        if ( NavServicesAvailable() )
@@ -588,9 +586,10 @@ OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState )
   return ::DrawThemePlacard( inRect , inState ) ;
 }
 
   return ::DrawThemePlacard( inRect , inState ) ;
 }
 
+#if !TARGET_CARBON
 static OSStatus helpMenuStatus = noErr ;
 static OSStatus helpMenuStatus = noErr ;
-static MenuRef helpMenuHandle = NULL ;
 static MenuItemIndex firstCustomItemIndex = 0 ;
 static MenuItemIndex firstCustomItemIndex = 0 ;
+#endif
 
 OSStatus UMAGetHelpMenu(
   MenuRef *        outHelpMenu,
 
 OSStatus UMAGetHelpMenu(
   MenuRef *        outHelpMenu,
@@ -599,13 +598,11 @@ OSStatus UMAGetHelpMenu(
 #if TARGET_CARBON
   return HMGetHelpMenu( outHelpMenu , outFirstCustomItemIndex ) ;
 #else
 #if TARGET_CARBON
   return HMGetHelpMenu( outHelpMenu , outFirstCustomItemIndex ) ;
 #else
-  if ( helpMenuHandle == NULL )
+  MenuRef helpMenuHandle ;
+  helpMenuStatus = HMGetHelpMenuHandle( &helpMenuHandle ) ;
+  if ( firstCustomItemIndex == 0 && helpMenuStatus == noErr )
   {
   {
-    helpMenuStatus = HMGetHelpMenuHandle( &helpMenuHandle ) ;
-    if ( helpMenuStatus == noErr )
-    {
-      firstCustomItemIndex = CountMenuItems( helpMenuHandle ) + 1 ;
-    }
+    firstCustomItemIndex = CountMenuItems( helpMenuHandle ) + 1 ;
   }
   if ( outFirstCustomItemIndex )
   {
   }
   if ( outFirstCustomItemIndex )
   {