aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Innes1998-07-11 21:52:17 +0000
committerAndrew Innes1998-07-11 21:52:17 +0000
commite59fe83bff7290cf5543e73752d65c71c1c23a16 (patch)
tree95e3e8865e08b81555c52f5f05eaa3ed9c611984 /src
parent93e4ce1b88af9466a13bd876a73ee60ded1a6052 (diff)
downloademacs-e59fe83bff7290cf5543e73752d65c71c1c23a16.tar.gz
emacs-e59fe83bff7290cf5543e73752d65c71c1c23a16.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/w32menu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/w32menu.c b/src/w32menu.c
index 4263c631bdc..6c793ca87e5 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -1721,7 +1721,7 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error)
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
@@ -2047,7 +2047,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item)
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;