comparison src/w32menu.c @ 42589:ac09ecabe088

(single_submenu, set_frame_menubar, w32_menu_show): (w32_dialog_show): Initialize wv->help to Qnil.
author Jason Rumney <jasonr@gnu.org>
date Mon, 07 Jan 2002 00:24:45 +0000
parents f4d03465ebdc
children a5eb47b53761
comparison
equal deleted inserted replaced
42588:43a330df6213 42589:ac09ecabe088
1141 wv = xmalloc_widget_value (); 1141 wv = xmalloc_widget_value ();
1142 wv->name = "menu"; 1142 wv->name = "menu";
1143 wv->value = 0; 1143 wv->value = 0;
1144 wv->enabled = 1; 1144 wv->enabled = 1;
1145 wv->button_type = BUTTON_TYPE_NONE; 1145 wv->button_type = BUTTON_TYPE_NONE;
1146 wv->help = Qnil;
1146 first_wv = wv; 1147 first_wv = wv;
1147 save_wv = 0; 1148 save_wv = 0;
1148 prev_wv = 0; 1149 prev_wv = 0;
1149 1150
1150 /* Loop over all panes and items made during this call 1151 /* Loop over all panes and items made during this call
1213 if (!NILP (prefix) && wv->name[0] == '@') 1214 if (!NILP (prefix) && wv->name[0] == '@')
1214 wv->name++; 1215 wv->name++;
1215 wv->value = 0; 1216 wv->value = 0;
1216 wv->enabled = 1; 1217 wv->enabled = 1;
1217 wv->button_type = BUTTON_TYPE_NONE; 1218 wv->button_type = BUTTON_TYPE_NONE;
1219 wv->help = Qnil;
1218 } 1220 }
1219 save_wv = wv; 1221 save_wv = wv;
1220 prev_wv = 0; 1222 prev_wv = 0;
1221 i += MENU_ITEMS_PANE_LENGTH; 1223 i += MENU_ITEMS_PANE_LENGTH;
1222 } 1224 }
1325 wv = xmalloc_widget_value (); 1327 wv = xmalloc_widget_value ();
1326 wv->name = "menubar"; 1328 wv->name = "menubar";
1327 wv->value = 0; 1329 wv->value = 0;
1328 wv->enabled = 1; 1330 wv->enabled = 1;
1329 wv->button_type = BUTTON_TYPE_NONE; 1331 wv->button_type = BUTTON_TYPE_NONE;
1332 wv->help = Qnil;
1330 first_wv = wv; 1333 first_wv = wv;
1331 1334
1332 if (deep_p) 1335 if (deep_p)
1333 { 1336 {
1334 /* Make a widget-value tree representing the entire menu trees. */ 1337 /* Make a widget-value tree representing the entire menu trees. */
1461 wv = xmalloc_widget_value (); 1464 wv = xmalloc_widget_value ();
1462 wv->name = (char *) XSTRING (string)->data; 1465 wv->name = (char *) XSTRING (string)->data;
1463 wv->value = 0; 1466 wv->value = 0;
1464 wv->enabled = 1; 1467 wv->enabled = 1;
1465 wv->button_type = BUTTON_TYPE_NONE; 1468 wv->button_type = BUTTON_TYPE_NONE;
1469 wv->help = Qnil;
1466 /* This prevents lwlib from assuming this 1470 /* This prevents lwlib from assuming this
1467 menu item is really supposed to be empty. */ 1471 menu item is really supposed to be empty. */
1468 /* The EMACS_INT cast avoids a warning. 1472 /* The EMACS_INT cast avoids a warning.
1469 This value just has to be different from small integers. */ 1473 This value just has to be different from small integers. */
1470 wv->call_data = (void *) (EMACS_INT) (-1); 1474 wv->call_data = (void *) (EMACS_INT) (-1);
1602 wv = xmalloc_widget_value (); 1606 wv = xmalloc_widget_value ();
1603 wv->name = "menu"; 1607 wv->name = "menu";
1604 wv->value = 0; 1608 wv->value = 0;
1605 wv->enabled = 1; 1609 wv->enabled = 1;
1606 wv->button_type = BUTTON_TYPE_NONE; 1610 wv->button_type = BUTTON_TYPE_NONE;
1611 wv->Qnil;
1607 first_wv = wv; 1612 first_wv = wv;
1608 first_pane = 1; 1613 first_pane = 1;
1609 1614
1610 /* Loop over all panes and items, filling in the tree. */ 1615 /* Loop over all panes and items, filling in the tree. */
1611 i = 0; 1616 i = 0;
1668 if (keymaps && !NILP (prefix)) 1673 if (keymaps && !NILP (prefix))
1669 wv->name++; 1674 wv->name++;
1670 wv->value = 0; 1675 wv->value = 0;
1671 wv->enabled = 1; 1676 wv->enabled = 1;
1672 wv->button_type = BUTTON_TYPE_NONE; 1677 wv->button_type = BUTTON_TYPE_NONE;
1678 wv->help = Qnil;
1673 save_wv = wv; 1679 save_wv = wv;
1674 prev_wv = 0; 1680 prev_wv = 0;
1675 } 1681 }
1676 else if (first_pane) 1682 else if (first_pane)
1677 { 1683 {
1750 1756
1751 /* Maybe replace this separator with a bitmap or owner-draw item 1757 /* Maybe replace this separator with a bitmap or owner-draw item
1752 so that it looks better. Having two separators looks odd. */ 1758 so that it looks better. Having two separators looks odd. */
1753 wv_sep->name = "--"; 1759 wv_sep->name = "--";
1754 wv_sep->next = first_wv->contents; 1760 wv_sep->next = first_wv->contents;
1761 wv_sep->help = Qnil;
1755 1762
1756 #ifndef HAVE_MULTILINGUAL_MENU 1763 #ifndef HAVE_MULTILINGUAL_MENU
1757 if (STRING_MULTIBYTE (title)) 1764 if (STRING_MULTIBYTE (title))
1758 title = ENCODE_SYSTEM (title); 1765 title = ENCODE_SYSTEM (title);
1759 #endif 1766 #endif
1760 wv_title->name = (char *) XSTRING (title)->data; 1767 wv_title->name = (char *) XSTRING (title)->data;
1761 wv_title->enabled = TRUE; 1768 wv_title->enabled = TRUE;
1762 wv_title->title = TRUE; 1769 wv_title->title = TRUE;
1763 wv_title->button_type = BUTTON_TYPE_NONE; 1770 wv_title->button_type = BUTTON_TYPE_NONE;
1771 wv_title->help = Qnil;
1764 wv_title->next = wv_sep; 1772 wv_title->next = wv_sep;
1765 first_wv->contents = wv_title; 1773 first_wv->contents = wv_title;
1766 } 1774 }
1767 1775
1768 /* Actually create the menu. */ 1776 /* Actually create the menu. */
1894 prev_wv->value = pane_string; 1902 prev_wv->value = pane_string;
1895 if (keymaps && !NILP (prefix)) 1903 if (keymaps && !NILP (prefix))
1896 prev_wv->name++; 1904 prev_wv->name++;
1897 prev_wv->enabled = 1; 1905 prev_wv->enabled = 1;
1898 prev_wv->name = "message"; 1906 prev_wv->name = "message";
1907 prev_wv->help = Qnil;
1899 first_wv = prev_wv; 1908 first_wv = prev_wv;
1900 1909
1901 /* Loop over all panes and items, filling in the tree. */ 1910 /* Loop over all panes and items, filling in the tree. */
1902 i = MENU_ITEMS_PANE_LENGTH; 1911 i = MENU_ITEMS_PANE_LENGTH;
1903 while (i < menu_items_used) 1912 while (i < menu_items_used)
1939 if (!NILP (descrip)) 1948 if (!NILP (descrip))
1940 wv->key = (char *) XSTRING (descrip)->data; 1949 wv->key = (char *) XSTRING (descrip)->data;
1941 wv->value = (char *) XSTRING (item_name)->data; 1950 wv->value = (char *) XSTRING (item_name)->data;
1942 wv->call_data = (void *) &XVECTOR (menu_items)->contents[i]; 1951 wv->call_data = (void *) &XVECTOR (menu_items)->contents[i];
1943 wv->enabled = !NILP (enable); 1952 wv->enabled = !NILP (enable);
1953 wv->help = Qnil;
1944 prev_wv = wv; 1954 prev_wv = wv;
1945 1955
1946 if (! boundary_seen) 1956 if (! boundary_seen)
1947 left_count++; 1957 left_count++;
1948 1958
1955 if (! boundary_seen) 1965 if (! boundary_seen)
1956 left_count = nb_buttons - nb_buttons / 2; 1966 left_count = nb_buttons - nb_buttons / 2;
1957 1967
1958 wv = xmalloc_widget_value (); 1968 wv = xmalloc_widget_value ();
1959 wv->name = dialog_name; 1969 wv->name = dialog_name;
1970 wv->help = Qnil;
1960 1971
1961 /* Dialog boxes use a really stupid name encoding 1972 /* Dialog boxes use a really stupid name encoding
1962 which specifies how many buttons to use 1973 which specifies how many buttons to use
1963 and how many buttons are on the right. 1974 and how many buttons are on the right.
1964 The Q means something also. */ 1975 The Q means something also. */