summaryrefslogtreecommitdiff
path: root/src/nsfns.m
diff options
context:
space:
mode:
authorAdrian Robert <Adrian.B.Robert@gmail.com>2009-02-13 13:30:35 +0000
committerAdrian Robert <Adrian.B.Robert@gmail.com>2009-02-13 13:30:35 +0000
commitba301db32981a147c1866bf90781ec3c2714f5b7 (patch)
tree36e4702a6812f85761493a7dfdcbd0979cbccd08 /src/nsfns.m
parent5ae6e65f654ad1c405b8d2113007866e6b595fe6 (diff)
downloademacs-ba301db32981a147c1866bf90781ec3c2714f5b7.tar.gz
* nsfns.m (ns-read-file-name): BLOCK_INPUT while showing dialog. \n \n* nsmenu.m (pop_down_menu): Check popup_activated_flag. \n(ns_popup_dialog, EmacsDialogPanel-runDialogAt:): Let \npop_down_menu do the cleanup work as it is always called. (Bug#2154) \n \n* nsfont.m (nsfont_make_fontset_for_font): For now, don't try to \nset fontset font for 'mathematical-' sub-scripts. (Bug #2218)\n
Diffstat (limited to 'src/nsfns.m')
-rw-r--r--src/nsfns.m12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index f3b80c11622..963445b624c 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1449,7 +1449,7 @@ Optional arg INIT, if non-nil, provides a default file name to use. */)
static id fileDelegate = nil;
int ret;
id panel;
- NSString *fname;
+ Lisp_Object fname;
NSString *promptS = NILP (prompt) || !STRINGP (prompt) ? nil :
[NSString stringWithUTF8String: SDATA (prompt)];
@@ -1482,6 +1482,7 @@ Optional arg INIT, if non-nil, provides a default file name to use. */)
[panel setDelegate: fileDelegate];
panelOK = 0;
+ BLOCK_INPUT;
if (NILP (isLoad))
{
ret = [panel runModalForDirectory: dirS file: initS];
@@ -1494,11 +1495,13 @@ Optional arg INIT, if non-nil, provides a default file name to use. */)
ret = (ret == NSOKButton) || panelOK;
- fname = [panel filename];
-
+ if (ret)
+ fname = build_string ([[panel filename] UTF8String]);
+
[[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow];
+ UNBLOCK_INPUT;
- return ret ? build_string ([fname UTF8String]) : Qnil;
+ return ret ? fname : Qnil;
}
@@ -2644,6 +2647,7 @@ Value is t if tooltip was open, nil otherwise. */)
#endif
+
/* ==========================================================================
Lisp interface declaration