# HG changeset patch # User Andrew Innes # Date 900193937 0 # Node ID 41e01b5de7ccfa3fd2d1cc6a145f036a17b9dd02 # Parent a5015b8f1003d23c3e2880940e9c3f1815c93e08 (w32_menu_show): Set widget call_data to 0 if definition is nil. (add_menu_item): Gray menu entry if widget call_data is 0. diff -r a5015b8f1003 -r 41e01b5de7cc src/w32menu.c --- a/src/w32menu.c Sat Jul 11 20:42:12 1998 +0000 +++ b/src/w32menu.c Sat Jul 11 21:52:17 1998 +0000 @@ -1721,7 +1721,7 @@ wv->value = 0; /* Use the contents index as call_data, since we are restricted to 16-bits.. */ - wv->call_data = (void *) (EMACS_INT) i; + wv->call_data = !NILP (def) ? (void *) (EMACS_INT) i : 0; wv->enabled = !NILP (enable); prev_wv = wv; @@ -2047,7 +2047,7 @@ fuFlags = MF_SEPARATOR; else { - if (wv->enabled) + if (wv->enabled && wv->call_data != 0) fuFlags = MF_STRING; else fuFlags = MF_STRING | MF_GRAYED;