]> git.eshelyaron.com Git - emacs.git/commitdiff
* xmenu.c (Fx_popup_dialog): Add an Ok button if no buttons are
authorJan Djärv <jan.h.d@swipnet.se>
Thu, 8 Jan 2004 21:04:32 +0000 (21:04 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Thu, 8 Jan 2004 21:04:32 +0000 (21:04 +0000)
  specified.

src/ChangeLog
src/xmenu.c

index 44d922a254e5f896463c0ce2bc170061c0324f6d..27c76179e57cc8e1fba391f25342c4fc2fae5e71 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-08  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * xmenu.c (Fx_popup_dialog): Add an Ok button if no buttons are
+       specified.
+
 2004-01-08  Kenichi Handa  <handa@m17n.org>
 
        * editfns.c (Fformat): Fix '&' to '&&'.
index 669d8177c15cdaed2427f749f34758efbda8c2ec..439f5002ddece50750c0e8a03927b5c7bfff8674 100644 (file)
@@ -1092,6 +1092,12 @@ on the left of the dialog box and all following items on the right.
     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.  */