Mercurial > emacs
diff src/xmenu.c @ 53545:ed3e26153ee9
* xmenu.c (Fx_popup_dialog): Add an Ok button if no buttons are
specified.
| author | Jan Dj?rv <jan.h.d@swipnet.se> |
|---|---|
| date | Thu, 08 Jan 2004 21:04:32 +0000 |
| parents | 8e8832ef3963 |
| children | 5a46a8191136 82554ed1aed8 |
line wrap: on
line diff
--- a/src/xmenu.c Thu Jan 08 12:20:43 2004 +0000 +++ b/src/xmenu.c Thu Jan 08 21:04:32 2004 +0000 @@ -1092,6 +1092,12 @@ CHECK_STRING (title); record_unwind_protect (unuse_menu_items, Qnil); + if (NILP (Fcar (Fcdr (contents)))) + /* No buttons specified, add an "Ok" button so users can pop down + the dialog. Also, the lesstif/motif version crashes if there are + no buttons. */ + contents = Fcons (title, Fcons (Fcons (build_string ("Ok"), Qt), Qnil)); + list_of_panes (Fcons (contents, Qnil)); /* Display them in a dialog box. */
