Mercurial > emacs
changeset 27896:75f296b1a872
(single_submenu): Set up help string.
[!HAVE_MULTILINGUAL_MENU]: Don't overwrite item_name with descrip.
(w32_dialog_show): Set up help string.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Sun, 27 Feb 2000 21:38:00 +0000 |
parents | 583f230183eb |
children | a6384a2b5574 |
files | src/w32menu.c |
diffstat | 1 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32menu.c Sun Feb 27 21:36:58 2000 +0000 +++ b/src/w32menu.c Sun Feb 27 21:38:00 2000 +0000 @@ -1305,6 +1305,7 @@ /* Create a new item within current pane. */ Lisp_Object item_name, enable, descrip, def, type, selected; Lisp_Object help; + /* NTEMACS_TODO: implement popup/modeline help for menus. */ item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; @@ -1750,7 +1751,9 @@ else { /* Create a new item within current pane. */ - Lisp_Object item_name, enable, descrip, def, type, selected; + Lisp_Object item_name, enable, descrip, def, type, selected, help; + char *help_string; + item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; descrip @@ -1758,14 +1761,19 @@ def = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_DEFINITION]; type = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_TYPE]; selected = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_SELECTED]; + help = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_HELP]; #ifndef HAVE_MULTILINGUAL_MENU if (STRINGP (item_name) && STRING_MULTIBYTE (item_name)) item_name = string_make_unibyte (item_name); if (STRINGP (descrip) && STRING_MULTIBYTE (descrip)) - item_name = string_make_unibyte (descrip); + descrip = string_make_unibyte (descrip); + if (STRINGP (help) && STRING_MULTIBYTE (help)) + help_string = string_make_unibyte (help); #endif + help_string = STRINGP (help) ? XSTRING (help)->data : NULL; + wv = xmalloc_widget_value (); if (prev_wv) prev_wv->next = wv; @@ -1957,11 +1965,15 @@ { /* Create a new item within current pane. */ - Lisp_Object item_name, enable, descrip; + Lisp_Object item_name, enable, descrip, help; + char *help_string; + item_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_NAME]; enable = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_ENABLE]; descrip = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; + help = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_HELP]; + help_string = STRINGP (help) ? XSTRING (help)->data : NULL; if (NILP (item_name)) {