Mercurial > emacs
diff src/w32menu.c @ 22737:41e01b5de7cc
(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.
| author | Andrew Innes <andrewi@gnu.org> |
|---|---|
| date | Sat, 11 Jul 1998 21:52:17 +0000 |
| parents | 3d1ce72aa7b9 |
| children | b38cb406ed80 |
line wrap: on
line diff
--- 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;
