diff options
author | das <das> | 2001-11-23 02:04:08 (GMT) |
---|---|---|
committer | das <das> | 2001-11-23 02:04:08 (GMT) |
commit | aa409cc42da819e8ab1d081e7a1f175b33c1c2cf (patch) | |
tree | 0d0864ac4fc0b0ff178f5869f1600d2c584109c8 /mac/tkMacMenu.c | |
parent | 5efa25f6e1ad2a687cac8c1caab6d8c10f978269 (diff) | |
download | tk-aa409cc42da819e8ab1d081e7a1f175b33c1c2cf.zip tk-aa409cc42da819e8ab1d081e7a1f175b33c1c2cf.tar.gz tk-aa409cc42da819e8ab1d081e7a1f175b33c1c2cf.tar.bz2 |
** upport to 8.4 of mac code changes for 8.3.3 & various new
** changes for 8.4, some already backported to 8.3.4 (patch #435660)
see ChangeLog for details
Diffstat (limited to 'mac/tkMacMenu.c')
-rw-r--r-- | mac/tkMacMenu.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/mac/tkMacMenu.c b/mac/tkMacMenu.c index 44897c9..ed29f5d 100644 --- a/mac/tkMacMenu.c +++ b/mac/tkMacMenu.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacMenu.c,v 1.20 2001/10/12 13:30:31 tmh Exp $ + * RCS: @(#) $Id: tkMacMenu.c,v 1.21 2001/11/23 02:06:07 das Exp $ */ #include "tkMacInt.h" @@ -178,7 +178,7 @@ static char *currentMenuBarName; static Tk_Window currentMenuBarOwner; /* Which window owns the current menu bar. */ static char elipsisString[TCL_UTF_MAX + 1]; - /* The UTF representation of the elipsis (ƒ) + /* The UTF representation of the elipsis (Š) * character. */ static int helpItemCount; /* The number of items in the help menu. * -1 means that the help menu is @@ -529,7 +529,7 @@ TkpNewMenu( (length > 230) ? 230 : length); itemText[0] = (length > 230) ? 230 : length; macMenuHdl = NewMenu(menuID, itemText); -#ifdef GENERATINGCFM +#if GENERATINGCFM { Handle mdefProc = FixMDEF(); if ((mdefProc != NULL)) { @@ -687,7 +687,7 @@ TkpDestroyMenuEntry( * Given a menu entry, gives back the text that should go in it. * Separators should be done by the caller, as they have to be * handled specially. This is primarily used to do a substitution - * between "..." and "ƒ". + * between "..." and "Š". * * Results: * itemText points to the new text for the item. @@ -752,10 +752,10 @@ GetEntryText( * We try the following special mac characters. If none of them * are present, just use the check mark. * '' - Check mark character (\022) - * '¥' - Mac Bullet character (\245) + * '€' - Mac Bullet character (\245) * '' - Filled diamond (\023) * '×' - Hollow diamond (\327) - * 'Ñ' = Mac Long dash ("em dash") (\321) + * '‹' = Mac Long dash ("em dash") (\321) * '-' = short dash (minus, "en dash"); * * Results: @@ -1223,7 +1223,7 @@ ReconfigureMacintoshMenu( ReconfigureIndividualMenu(menuPtr, macMenuHdl, 0); if (menuPtr->menuFlags & MENU_APPLE_MENU) { - AddResMenu(macMenuHdl, 'DRVR'); + AppendResMenu(macMenuHdl, 'DRVR'); } if ((*macMenuHdl)->menuID == currentHelpMenuID) { @@ -4462,10 +4462,16 @@ TkpMenuNotifyToplevelCreate( *---------------------------------------------------------------------- */ +#if __MWERKS__ != 0x2400 +#define MDEF_PROC_OFFSET 0x24 +#else +#define MDEF_PROC_OFFSET 0x20 +#endif + static Handle FixMDEF(void) { -#ifdef GENERATINGCFM +#if GENERATINGCFM Handle MDEFHandle = GetResource('MDEF', 591); Handle SICNHandle = GetResource('SICN', SICN_RESOURCE_NUMBER); if ((MDEFHandle != NULL) && (SICNHandle != NULL)) { @@ -4474,7 +4480,7 @@ FixMDEF(void) if (menuDefProc == NULL) { menuDefProc = TkNewMenuDefProc(MenuDefProc); } - memmove((void *) (((long) (*MDEFHandle)) + 0x24), &menuDefProc, 4); + memmove((void *) (((long) (*MDEFHandle)) + MDEF_PROC_OFFSET), &menuDefProc, 4); return MDEFHandle; } else { return NULL; @@ -4531,7 +4537,7 @@ TkpMenuInit(void) } FixMDEF(); - Tcl_ExternalToUtf(NULL, NULL, "\311", /* É */ + Tcl_ExternalToUtf(NULL, NULL, "\311", /* Š */ -1, 0, NULL, elipsisString, TCL_UTF_MAX + 1, NULL, NULL, NULL); } |