Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
22736:a5015b8f1003 | 22737:41e01b5de7cc |
---|---|
1719 if (!NILP (descrip)) | 1719 if (!NILP (descrip)) |
1720 wv->key = (char *) XSTRING (descrip)->data; | 1720 wv->key = (char *) XSTRING (descrip)->data; |
1721 wv->value = 0; | 1721 wv->value = 0; |
1722 /* Use the contents index as call_data, since we are | 1722 /* Use the contents index as call_data, since we are |
1723 restricted to 16-bits.. */ | 1723 restricted to 16-bits.. */ |
1724 wv->call_data = (void *) (EMACS_INT) i; | 1724 wv->call_data = !NILP (def) ? (void *) (EMACS_INT) i : 0; |
1725 wv->enabled = !NILP (enable); | 1725 wv->enabled = !NILP (enable); |
1726 prev_wv = wv; | 1726 prev_wv = wv; |
1727 | 1727 |
1728 i += MENU_ITEMS_ITEM_LENGTH; | 1728 i += MENU_ITEMS_ITEM_LENGTH; |
1729 } | 1729 } |
2045 | 2045 |
2046 if (name_is_separator (wv->name)) | 2046 if (name_is_separator (wv->name)) |
2047 fuFlags = MF_SEPARATOR; | 2047 fuFlags = MF_SEPARATOR; |
2048 else | 2048 else |
2049 { | 2049 { |
2050 if (wv->enabled) | 2050 if (wv->enabled && wv->call_data != 0) |
2051 fuFlags = MF_STRING; | 2051 fuFlags = MF_STRING; |
2052 else | 2052 else |
2053 fuFlags = MF_STRING | MF_GRAYED; | 2053 fuFlags = MF_STRING | MF_GRAYED; |
2054 | 2054 |
2055 if (wv->key != NULL) | 2055 if (wv->key != NULL) |