diff options
Diffstat (limited to 'macosx/tkMacOSXMenu.c')
-rw-r--r-- | macosx/tkMacOSXMenu.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 4f849bc..eaef5f1 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.24 2005/11/27 06:53:13 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.25 2006/01/10 05:37:51 das Exp $ */ #include "tkMacOSXInt.h" #include "tkMenubutton.h" @@ -25,6 +25,12 @@ #include "tkMacOSXDebug.h" #include <CoreFoundation/CFString.h> +/* +#ifdef TK_MAC_DEBUG +#define TK_MAC_DEBUG_MENUS +#endif +*/ + #if !defined(MAC_OS_X_VERSION_10_3) || \ (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3) /* Define constants only available on Mac OS X 10.3 or later */ @@ -1066,6 +1072,14 @@ ReconfigureIndividualMenu( TkMenuEntry *mePtr; int parentDisabled = 0; +#if defined(TK_MAC_DEBUG) && defined(TK_MAC_DEBUG_MENUS) + /* Carbon-internal menu debugging (c.f. Technote 2124) */ + TkMacOSXInitNamedDebugSymbol(HIToolbox, void, DebugPrintMenu, MenuRef menu); + if (DebugPrintMenu) { + DebugPrintMenu(macMenuHdl); + } +#endif + for (mePtr = menuPtr->menuRefPtr->parentEntryPtr; mePtr != NULL; mePtr = mePtr->nextCascadePtr) { char *name = (mePtr->namePtr == NULL) ? "" @@ -1150,10 +1164,6 @@ ReconfigureIndividualMenu( ((MacMenu *) mePtr->childMenuRefPtr ->menuPtr->platformData)->menuHdl; - if (childMenuHdl == NULL) { - childMenuHdl = ((MacMenu *) mePtr->childMenuRefPtr - ->menuPtr->platformData)->menuHdl; - } if (childMenuHdl != NULL) { { SetMenuItemHierarchicalID(macMenuHdl, base + index, |