comparison src/w32menu.c @ 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 da3ee40952bf
children a590f8d0dbd2
comparison
equal deleted inserted replaced
27895:583f230183eb 27896:75f296b1a872
1303 else 1303 else
1304 { 1304 {
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];
1311 descrip 1312 descrip
1312 = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; 1313 = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY];
1748 i += MENU_ITEMS_PANE_LENGTH; 1749 i += MENU_ITEMS_PANE_LENGTH;
1749 } 1750 }
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
1757 = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY]; 1760 = XVECTOR (menu_items)->contents[i + MENU_ITEMS_ITEM_EQUIV_KEY];
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
1774
1775 help_string = STRINGP (help) ? XSTRING (help)->data : NULL;
1768 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;
1772 else 1780 else
1955 i = MENU_ITEMS_PANE_LENGTH; 1963 i = MENU_ITEMS_PANE_LENGTH;
1956 while (i < menu_items_used) 1964 while (i < menu_items_used)
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 {
1968 free_menubar_widget_value_tree (first_wv); 1980 free_menubar_widget_value_tree (first_wv);
1969 *error = "Submenu in dialog items"; 1981 *error = "Submenu in dialog items";