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 8f20447..c7e3a78 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);
@@ -360,7 +360,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);
@@ -682,18 +682,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;
@@ -761,7 +761,7 @@ TkpPostMenu(
* to be posted. */
int y) /* The global y-coordinate */
{
-
+
/* Get the object that holds this Tk Window.*/
Tk_Window root;
@@ -769,11 +769,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);
@@ -847,12 +847,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;
@@ -1462,10 +1462,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);
@@ -1528,7 +1528,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.