aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsmenu.m
diff options
context:
space:
mode:
authorJoakim Verona2011-07-26 09:47:27 +0200
committerJoakim Verona2011-07-26 09:47:27 +0200
commit460c547e0d83da81e503fe475f168c168850f49b (patch)
tree7a1f2c55f4d4d21c0713ddee277758c29e0b0a4e /src/nsmenu.m
parent716c24d8844d8ef23c93185ad7fd362c78668b6a (diff)
parentd6f0886cf1d99d80c45a8a57a7bcce42dc623c3c (diff)
downloademacs-460c547e0d83da81e503fe475f168c168850f49b.tar.gz
emacs-460c547e0d83da81e503fe475f168c168850f49b.zip
merge upstream
Diffstat (limited to 'src/nsmenu.m')
-rw-r--r--src/nsmenu.m10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 6a9ee7dd4f5..6931b7a3c01 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1340,7 +1340,7 @@ Lisp_Object
1340ns_popup_dialog (Lisp_Object position, Lisp_Object contents, Lisp_Object header) 1340ns_popup_dialog (Lisp_Object position, Lisp_Object contents, Lisp_Object header)
1341{ 1341{
1342 id dialog; 1342 id dialog;
1343 Lisp_Object window, tem; 1343 Lisp_Object window, tem, title;
1344 struct frame *f; 1344 struct frame *f;
1345 NSPoint p; 1345 NSPoint p;
1346 BOOL isQ; 1346 BOOL isQ;
@@ -1389,6 +1389,14 @@ ns_popup_dialog (Lisp_Object position, Lisp_Object contents, Lisp_Object header)
1389 p.x = (int)f->left_pos + ((int)FRAME_COLUMN_WIDTH (f) * f->text_cols)/2; 1389 p.x = (int)f->left_pos + ((int)FRAME_COLUMN_WIDTH (f) * f->text_cols)/2;
1390 p.y = (int)f->top_pos + (FRAME_LINE_HEIGHT (f) * f->text_lines)/2; 1390 p.y = (int)f->top_pos + (FRAME_LINE_HEIGHT (f) * f->text_lines)/2;
1391 1391
1392 title = Fcar (contents);
1393 CHECK_STRING (title);
1394
1395 if (NILP (Fcar (Fcdr (contents))))
1396 /* No buttons specified, add an "Ok" button so users can pop down
1397 the dialog. */
1398 contents = Fcons (title, Fcons (Fcons (build_string ("Ok"), Qt), Qnil));
1399
1392 BLOCK_INPUT; 1400 BLOCK_INPUT;
1393 dialog = [[EmacsDialogPanel alloc] initFromContents: contents 1401 dialog = [[EmacsDialogPanel alloc] initFromContents: contents
1394 isQuestion: isQ]; 1402 isQuestion: isQ];