Commit d6f0886c authored by Jan Djärv's avatar Jan Djärv
Browse files

* nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons

are specified.

Fixes: debbugs:9168
parent 2eb1f9e6
2011-07-25 Jan Djärv <>
* nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
are specified (Bug#9168).
2011-07-25 Paul Eggert <>
* bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
......@@ -1340,7 +1340,7 @@ - (NSRect) frame
ns_popup_dialog (Lisp_Object position, Lisp_Object contents, Lisp_Object header)
id dialog;
Lisp_Object window, tem;
Lisp_Object window, tem, title;
struct frame *f;
NSPoint p;
......@@ -1389,6 +1389,14 @@ - (NSRect) frame
p.x = (int)f->left_pos + ((int)FRAME_COLUMN_WIDTH (f) * f->text_cols)/2;
p.y = (int)f->top_pos + (FRAME_LINE_HEIGHT (f) * f->text_lines)/2;
title = Fcar (contents);
if (NILP (Fcar (Fcdr (contents))))
/* No buttons specified, add an "Ok" button so users can pop down
the dialog. */
contents = Fcons (title, Fcons (Fcons (build_string ("Ok"), Qt), Qnil));
dialog = [[EmacsDialogPanel alloc] initFromContents: contents
isQuestion: isQ];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment