summaryrefslogtreecommitdiffstats
path: root/win/tkWinMenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinMenu.c')
-rw-r--r--win/tkWinMenu.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 0b6efcf..40a7b97 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -685,7 +685,7 @@ ReconfigureWindowsMenu(
Tcl_DStringInit(&ds);
Tcl_DStringAppend(&ds,
- Tk_PathName(menuPtr->masterMenuPtr->tkwin), -1);
+ Tk_PathName(menuPtr->mainMenuPtr->tkwin), -1);
Tcl_DStringAppend(&ds, ".system", 7);
menuRefPtr = TkFindMenuReferences(menuPtr->interp,
@@ -696,7 +696,7 @@ ReconfigureWindowsMenu(
if ((menuRefPtr != NULL)
&& (menuRefPtr->menuPtr != NULL)
&& (menuPtr->parentTopLevelPtr != NULL)
- && (systemMenuPtr->masterMenuPtr
+ && (systemMenuPtr->mainMenuPtr
== menuRefPtr->menuPtr)) {
HMENU systemMenuHdl = (HMENU) systemMenuPtr->platformData;
HWND wrapper = TkWinGetWrapperWindow(menuPtr
@@ -1252,7 +1252,8 @@ TkWinHandleMenuEvent(
hashEntryPtr = Tcl_FindHashEntry(&tsdPtr->winMenuTable,
*plParam);
if (hashEntryPtr != NULL) {
- TkSizeT i, len, underline;
+ TkSizeT i, len;
+ int underline;
Tcl_Obj *labelPtr;
WCHAR *wlabel;
int menuChar;
@@ -1270,7 +1271,7 @@ TkWinHandleMenuEvent(
for (i = 0; i < menuPtr->numEntries; i++) {
underline = menuPtr->entries[i]->underline;
labelPtr = menuPtr->entries[i]->labelPtr;
- if ((underline != TCL_INDEX_NONE) && (labelPtr != NULL)) {
+ if ((underline >= 0) && (labelPtr != NULL)) {
/*
* Ensure we don't exceed the label length, then check
*/
@@ -1279,7 +1280,7 @@ TkWinHandleMenuEvent(
Tcl_DStringFree(&ds);
Tcl_DStringInit(&ds);
wlabel = Tcl_UtfToWCharDString(src, len, &ds);
- if ((underline + 1 < len + 1) && (menuChar ==
+ if (((TkSizeT)underline + 1 < len + 1) && (menuChar ==
Tcl_UniCharToUpper(wlabel[underline]))) {
*plResult = (2 << 16) | i;
returnResult = 1;
@@ -1689,7 +1690,7 @@ GetTearoffEntryGeometry(
(void)mePtr;
(void)tkfont;
- if (menuPtr->menuType != MASTER_MENU) {
+ if (menuPtr->menuType != MAIN_MENU) {
*heightPtr = 0;
} else {
*heightPtr = fmPtr->linespace;
@@ -2328,13 +2329,13 @@ TkpInitializeMenuBindings(
"<KeyRelease-Alt_R>", "tk::WinMenuKey %W %N", 0);
(void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
- "<Alt-KeyPress>", "tk::WinMenuKey %W %N", 0);
+ "<Alt-Key>", "tk::WinMenuKey %W %N", 0);
(void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
"<Alt-KeyRelease>", "tk::WinMenuKey %W %N", 0);
(void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
- "<KeyPress-F10>", "tk::WinMenuKey %W %N", 0);
+ "<Key-F10>", "tk::WinMenuKey %W %N", 0);
(void) Tk_CreateBinding(interp, bindingTable, (ClientData) uid,
"<KeyRelease-F10>", "tk::WinMenuKey %W %N", 0);
@@ -2597,7 +2598,7 @@ DrawTearoffEntry(
(void)tkfont;
(void)fmPtr;
- if (menuPtr->menuType != MASTER_MENU) {
+ if (menuPtr->menuType != MAIN_MENU) {
return;
}
@@ -3229,7 +3230,7 @@ TkpMenuNotifyToplevelCreate(
if ((menuName != NULL) && (menuName[0] != '\0')) {
menuRefPtr = TkFindMenuReferences(interp, menuName);
if ((menuRefPtr != NULL) && (menuRefPtr->menuPtr != NULL)) {
- for (menuPtr = menuRefPtr->menuPtr->masterMenuPtr; menuPtr != NULL;
+ for (menuPtr = menuRefPtr->menuPtr->mainMenuPtr; menuPtr != NULL;
menuPtr = menuPtr->nextInstancePtr) {
if (menuPtr->menuType == MENUBAR) {
ScheduleMenuReconfigure(menuPtr);