Mercurial > emacs
diff src/nsfns.m @ 102004:e1a5d89a91dd
* 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
author | Adrian Robert <Adrian.B.Robert@gmail.com> |
---|---|
date | Fri, 13 Feb 2009 13:30:35 +0000 |
parents | 5b58e8f46076 |
children | ccae12dc75d9 |
line wrap: on
line diff
--- a/src/nsfns.m Fri Feb 13 12:57:45 2009 +0000 +++ b/src/nsfns.m Fri Feb 13 13:30:35 2009 +0000 @@ -1449,7 +1449,7 @@ 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 @@ [panel setDelegate: fileDelegate]; panelOK = 0; + BLOCK_INPUT; if (NILP (isLoad)) { ret = [panel runModalForDirectory: dirS file: initS]; @@ -1494,11 +1495,13 @@ ret = (ret == NSOKButton) || panelOK; - fname = [panel filename]; - + if (ret) + fname = build_string ([[panel filename] UTF8String]); + [[FRAME_NS_VIEW (SELECTED_FRAME ()) window] makeKeyWindow]; - - return ret ? build_string ([fname UTF8String]) : Qnil; + UNBLOCK_INPUT; + + return ret ? fname : Qnil; } @@ -2644,6 +2647,7 @@ #endif + /* ========================================================================== Lisp interface declaration