*** src\ChangeLog.orig Mon May 12 17:12:58 1997 --- src\ChangeLog Mon May 12 17:12:30 1997 *************** *** 1,3 **** --- 1,12 ---- + Mon May 12 16:57:32 1997 Nico Francois + + * w32menu.c (list_of_panes): If a pane's name is empty ("") items + are now placed in the main popup instead of a blank-named submenu. + This seems to be an undocumented feature of x-popup-menu. + (list_of_items): New argument HMENU. If NULL the function will + work as before. If non-NULL the function will add items to the + specified menu. + Wed May 07 23:52:59 1997 Michael Welsh Duggan * w32menu.c (get_frame_menubar_event): Check for the possibility *** src\w32menu.c.orig Mon May 12 16:12:14 1997 --- src\w32menu.c Mon May 12 16:48:28 1997 *************** *** 649,659 **** pane_data = Fcdr (elt); CHECK_CONS (pane_data, 0); ! new_hmenu = list_of_items (lpmm, pane_data); ! if (new_hmenu == NULL) goto error; ! AppendMenu (hmenu, MF_POPUP, (UINT)new_hmenu, ! (char *) XSTRING (pane_name)->data); } } else --- 649,666 ---- pane_data = Fcdr (elt); CHECK_CONS (pane_data, 0); ! if (XSTRING (pane_name)->data[0] == 0) ! { ! list_of_items (hmenu, lpmm, pane_data); ! } ! else ! { ! new_hmenu = list_of_items (NULL, lpmm, pane_data); ! if (new_hmenu == NULL) goto error; ! AppendMenu (hmenu, MF_POPUP, (UINT)new_hmenu, ! (char *) XSTRING (pane_name)->data); ! } } } else *************** *** 665,671 **** CHECK_STRING (pane_name, 0); pane_data = Fcdr (elt); CHECK_CONS (pane_data, 0); ! hmenu = list_of_items (lpmm, pane_data); } return (hmenu); --- 672,678 ---- CHECK_STRING (pane_name, 0); pane_data = Fcdr (elt); CHECK_CONS (pane_data, 0); ! hmenu = list_of_items (NULL, lpmm, pane_data); } return (hmenu); *************** *** 678,692 **** /* Push the items in a single pane defined by the alist PANE. */ static HMENU ! list_of_items (lpmm, pane) menu_map * lpmm; Lisp_Object pane; { Lisp_Object tail, item, item1; - HMENU hmenu; ! hmenu = CreatePopupMenu (); ! if (hmenu == NULL) return NULL; for (tail = pane; !NILP (tail); tail = Fcdr (tail)) { --- 685,702 ---- /* Push the items in a single pane defined by the alist PANE. */ static HMENU ! list_of_items (hmenu, lpmm, pane) ! HMENU hmenu; menu_map * lpmm; Lisp_Object pane; { Lisp_Object tail, item, item1; ! if (hmenu == NULL) ! { ! hmenu = CreatePopupMenu (); ! if (hmenu == NULL) return NULL; ! } for (tail = pane; !NILP (tail); tail = Fcdr (tail)) {