summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMenu.c
diff options
context:
space:
mode:
authordas <das>2004-11-11 01:24:29 (GMT)
committerdas <das>2004-11-11 01:24:29 (GMT)
commitfa61ec1dd665487c5513d7db7255a2e09ed3e3e1 (patch)
treec22d22b2f3ad690eeadd7c8e57c9cf5b9eb56b0d /macosx/tkMacOSXMenu.c
parentb7be4e0e9de6b6cb325269f53ce18596d73b4426 (diff)
downloadtk-fa61ec1dd665487c5513d7db7255a2e09ed3e3e1.zip
tk-fa61ec1dd665487c5513d7db7255a2e09ed3e3e1.tar.gz
tk-fa61ec1dd665487c5513d7db7255a2e09ed3e3e1.tar.bz2
* generic/tkMain.c:
* macosx/tkMacOSXAppInit.c (removed): * macosx/Wish.pbproj/project.pbxproj: * macosx/tkMacOSXInit.c: * macosx/tkMacOSXInt.h: changes to make TkAqua dynamically loadable, enabling [package require Tk] from tclsh. Startup code from tkMacOSXAppInit.c moved into tkMacOSXInit.c, added code that notifies the window server that an unbundled executable is a full GUI application after loading Tk. [Patch 1035348] * doc/wm.n: documented [wm attributes] on Mac OS X. [Bug 606665] * macosx/tkMacOSXWm.c: implemented TIP 222 [wm attributes -alpha] on Mac OS X. [Patch 892194] WmIconbitmapCmd: adopted FSRef changes from [wm atttrs -titlepath]. * macosx/tkMacOSXSubwindows.c: synced spacing/formatting with core-8-4-branch. * generic/tkRectOval.c: * macosx/README: * macosx/tkMacOSXDefault.h: * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXInit.c: * macosx/tkMacOSXInt.h: * macosx/tkMacOSXMenu.c: * macosx/tkMacOSXWm.c: forward port from core-8-4-branch of Jim's and my changes for CG drawing and [wm attributes] (corresponds to 8.4 changes dating from 09-18, 07-27, 07-24). * macosx/tkMacOSXMouseEvent.c: endianness fixes. * macosx/Wish.pbproj/project.pbxproj: corrected path to html help inside framework. * macosx/Makefile: prevent parallel make from building several targets at the same time.
Diffstat (limited to 'macosx/tkMacOSXMenu.c')
-rw-r--r--macosx/tkMacOSXMenu.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 7ad48b4..09126b8 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.15 2004/09/03 14:09:05 dkf Exp $
+ * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.16 2004/11/11 01:24:32 das Exp $
*/
#include "tkMacOSXInt.h"
#include "tkMenubutton.h"
@@ -141,9 +141,6 @@ typedef struct TopLevelMenubarList {
#define CASCADE_CMD (0x1b)
/* The special command char for cascade
* menus. */
-#define SEPARATOR_TEXT "\p(-"
- /* The text for a menu separator. */
-
#define MENUBAR_REDRAW_PENDING 1
#define SCREEN_MARGIN 5
@@ -1079,7 +1076,9 @@ ReconfigureIndividualMenu(
*/
if (mePtr->type == SEPARATOR_ENTRY) {
- AppendMenu(macMenuHdl, SEPARATOR_TEXT);
+ AppendMenuItemTextWithCFString (macMenuHdl, NULL,
+ kMenuItemAttrSeparator | kMenuItemAttrDisabled,
+ 0, NULL);
} else {
Tcl_DString itemTextDString;
int destWrote;
@@ -1087,13 +1086,12 @@ ReconfigureIndividualMenu(
GetEntryText(mePtr, &itemTextDString);
cf = CFStringCreateWithCString(NULL,
Tcl_DStringValue(&itemTextDString), kCFStringEncodingUTF8);
- AppendMenu(macMenuHdl, "\px");
if (cf != NULL) {
- SetMenuItemTextWithCFString(macMenuHdl, base + index, cf);
+ AppendMenuItemTextWithCFString (macMenuHdl, cf, 0, 0, NULL);
CFRelease(cf);
} else {
cf = CFSTR ("<Error>");
- SetMenuItemTextWithCFString(macMenuHdl, base + index, cf);
+ AppendMenuItemTextWithCFString (macMenuHdl, cf, 0, 0, NULL);
}
Tcl_DStringFree(&itemTextDString);
@@ -2103,6 +2101,7 @@ EventuallyInvokeMenu (ClientData data)
code = TkInvokeMenu(realData->menuPtr->interp, realData->menuPtr,
realData->index);
+
if (code != TCL_OK && code != TCL_CONTINUE
&& code != TCL_BREAK) {
Tcl_AddErrorInfo(realData->menuPtr->interp, "\n (menu invoke)");