diff options
| author | Jason Rumney | 2000-02-27 21:38:00 +0000 |
|---|---|---|
| committer | Jason Rumney | 2000-02-27 21:38:00 +0000 |
| commit | b65a2f83ecb834784e7926f2c5ef7c9da37c9fad (patch) | |
| tree | f5e4b1991f4b80ca6e40cf801adcae67a7263942 | |
| parent | 3213ee4e67584a61b2df504662e595bfa3f1e9de (diff) | |
| download | emacs-b65a2f83ecb834784e7926f2c5ef7c9da37c9fad.tar.gz emacs-b65a2f83ecb834784e7926f2c5ef7c9da37c9fad.zip | |
(single_submenu): Set up help string.
[!HAVE_MULTILINGUAL_MENU]: Don't overwrite item_name with descrip.
(w32_dialog_show): Set up help string.
| -rw-r--r-- | src/w32menu.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/w32menu.c b/src/w32menu.c index 772749af16c..3f7edcad050 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -1305,6 +1305,7 @@ single_submenu (item_key, item_name, maps) | |||
| 1305 | /* Create a new item within current pane. */ | 1305 | /* Create a new item within current pane. */ |
| 1306 | Lisp_Object item_name, enable, descrip, def, type, selected; | 1306 | Lisp_Object item_name, enable, descrip, def, type, selected; |
| 1307 | Lisp_Object help; | 1307 | Lisp_Object help; |
| 1308 | /* NTEMACS_TODO: implement popup/modeline help for menus. */ | ||
| 1308 | 1309 | ||
| 1309 | item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; | 1310 | item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; |
| 1310 | enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; | 1311 | enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; |
| @@ -1750,7 +1751,9 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1750 | else | 1751 | else |
| 1751 | { | 1752 | { |
| 1752 | /* Create a new item within current pane. */ | 1753 | /* Create a new item within current pane. */ |
| 1753 | Lisp_Object item_name, enable, descrip, def, type, selected; | 1754 | Lisp_Object item_name, enable, descrip, def, type, selected, help; |
| 1755 | char *help_string; | ||
| 1756 | |||
| 1754 | item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; | 1757 | item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; |
| 1755 | enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; | 1758 | enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; |
| 1756 | descrip | 1759 | descrip |
| @@ -1758,14 +1761,19 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) | |||
| 1758 | def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; | 1761 | def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; |
| 1759 | type = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_TYPE]; | 1762 | type = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_TYPE]; |
| 1760 | selected = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_SELECTED]; | 1763 | selected = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_SELECTED]; |
| 1764 | help = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_HELP]; | ||
| 1761 | 1765 | ||
| 1762 | #ifndef HAVE_MULTILINGUAL_MENU | 1766 | #ifndef HAVE_MULTILINGUAL_MENU |
| 1763 | if (STRINGP (item_name) && STRING_MULTIBYTE (item_name)) | 1767 | if (STRINGP (item_name) && STRING_MULTIBYTE (item_name)) |
| 1764 | item_name = string_make_unibyte (item_name); | 1768 | item_name = string_make_unibyte (item_name); |
| 1765 | if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) | 1769 | if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) |
| 1766 | item_name = string_make_unibyte (descrip); | 1770 | descrip = string_make_unibyte (descrip); |
| 1771 | if (STRINGP (help) && STRING_MULTIBYTE (help)) | ||
| 1772 | help_string = string_make_unibyte (help); | ||
| 1767 | #endif | 1773 | #endif |
| 1768 | 1774 | ||
| 1775 | help_string = STRINGP (help) ? XSTRING (help)->data : NULL; | ||
| 1776 | |||
| 1769 | wv = xmalloc_widget_value (); | 1777 | wv = xmalloc_widget_value (); |
| 1770 | if (prev_wv) | 1778 | if (prev_wv) |
| 1771 | prev_wv->next = wv; | 1779 | prev_wv->next = wv; |
| @@ -1957,11 +1965,15 @@ w32_dialog_show (f, keymaps, title, error) | |||
| 1957 | { | 1965 | { |
| 1958 | 1966 | ||
| 1959 | /* Create a new item within current pane. */ | 1967 | /* Create a new item within current pane. */ |
| 1960 | Lisp_Object item_name, enable, descrip; | 1968 | Lisp_Object item_name, enable, descrip, help; |
| 1969 | char *help_string; | ||
| 1970 | |||
| 1961 | item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; | 1971 | item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; |
| 1962 | enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; | 1972 | enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; |
| 1963 | descrip | 1973 | descrip |
| 1964 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; | 1974 | = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; |
| 1975 | help = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_HELP]; | ||
| 1976 | help_string = STRINGP (help) ? XSTRING (help)->data : NULL; | ||
| 1965 | 1977 | ||
| 1966 | if (NILP (item_name)) | 1978 | if (NILP (item_name)) |
| 1967 | { | 1979 | { |