summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXMenu.c')
-rw-r--r--macosx/tkMacOSXMenu.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index c3121cb..ed22640 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -270,7 +270,7 @@ static int ModifierCharWidth(Tk_Font tkfont);
if (result != TCL_OK && result != TCL_CONTINUE &&
result != TCL_BREAK) {
Tcl_AddErrorInfo(interp, "\n (menu invoke)");
- Tcl_BackgroundError(interp);
+ Tcl_BackgroundException(interp, result);
}
Tcl_Release(menuPtr);
Tcl_Release(interp);
@@ -361,7 +361,7 @@ static int ModifierCharWidth(Tk_Font tkfont);
if (result!=TCL_OK && result!=TCL_CONTINUE && result!=TCL_BREAK) {
Tcl_AddErrorInfo(interp, "\n (menu preprocess)");
- Tcl_BackgroundError(interp);
+ Tcl_BackgroundException(interp, result);
}
Tcl_Release(menuPtr);
Tcl_Release(interp);
@@ -693,18 +693,18 @@ TkpConfigureMenuEntry(
int i = 0;
NSArray *itemArray = [submenu itemArray];
for (NSMenuItem *item in itemArray) {
- TkMenuEntry *submePtr = menuRefPtr->menuPtr->entries[i];
- /* Work around an apparent bug where itemArray can have
+ TkMenuEntry *submePtr = menuRefPtr->menuPtr->entries[i];
+ /* Work around an apparent bug where itemArray can have
more items than the menu's entries[] array. */
if (i >= menuRefPtr->menuPtr->numEntries) break;
- [item setEnabled: !(submePtr->state == ENTRY_DISABLED)];
- i++;
+ [item setEnabled: !(submePtr->state == ENTRY_DISABLED)];
+ i++;
}
}
+
}
}
}
-
[menuItem setSubmenu:submenu];
return TCL_OK;
@@ -772,7 +772,7 @@ TkpPostMenu(
* to be posted. */
int y) /* The global y-coordinate */
{
-
+
/* Get the object that holds this Tk Window.*/
Tk_Window root;
@@ -780,11 +780,11 @@ TkpPostMenu(
if (root == NULL) {
return TCL_ERROR;
}
-
+
Drawable d = Tk_WindowId(root);
NSView *rootview = TkMacOSXGetRootControl(d);
NSWindow *win = [rootview window];
-
+
inPostMenu = 1;
int oldMode = Tcl_SetServiceMode(TCL_SERVICE_NONE);
@@ -858,12 +858,12 @@ TkpSetWindowMenuBar(
*
*----------------------------------------------------------------------
*/
-
+
void
TkpSetMainMenubar(
Tcl_Interp *interp, /* The interpreter of the application */
Tk_Window tkwin, /* The frame we are setting up */
- char *menuName) /* The name of the menu to put in front.*/
+ const char *menuName) /* The name of the menu to put in front. */
{
static Tcl_Interp *currentInterp = NULL;
TKMenu *menu = nil;
@@ -1473,10 +1473,10 @@ TkpMenuInit(void)
[NSMenuItem setUsesUserKeyEquivalents:NO];
tkColPtr = TkpGetColor(None, DEF_MENU_BG_COLOR);
defaultBg = tkColPtr->color.pixel;
- ckfree((char *) tkColPtr);
+ ckfree(tkColPtr);
tkColPtr = TkpGetColor(None, DEF_MENU_FG);
defaultFg = tkColPtr->color.pixel;
- ckfree((char *) tkColPtr);
+ ckfree(tkColPtr);
ChkErr(GetThemeMetric, kThemeMetricMenuMarkColumnWidth,
&menuMarkColumnWidth);
@@ -1539,7 +1539,7 @@ TkpMenuThreadInit(void)
void
TkpMenuNotifyToplevelCreate(
Tcl_Interp *interp, /* The interp the menu lives in. */
- char *menuName) /* The name of the menu to reconfigure. */
+ const char *menuName) /* The name of the menu to reconfigure. */
{
/*
* Nothing to do.