# HG changeset patch # User Jan Dj¸«£rv # Date 1073595872 0 # Node ID ed3e26153ee9b465dab424052aa72b103f294c55 # Parent 41011f848610c2fb447b1975da537cf8677c0505 * xmenu.c (Fx_popup_dialog): Add an Ok button if no buttons are specified. diff -r 41011f848610 -r ed3e26153ee9 src/ChangeLog --- a/src/ChangeLog Thu Jan 08 12:20:43 2004 +0000 +++ b/src/ChangeLog Thu Jan 08 21:04:32 2004 +0000 @@ -1,3 +1,8 @@ +2004-01-08 Jan Dj,Ad(Brv + + * xmenu.c (Fx_popup_dialog): Add an Ok button if no buttons are + specified. + 2004-01-08 Kenichi Handa * editfns.c (Fformat): Fix '&' to '&&'. diff -r 41011f848610 -r ed3e26153ee9 src/xmenu.c --- 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. */