comparison src/dialog-msw.c @ 707:a307f9a2021d

[xemacs-hg @ 2001-12-20 05:49:28 by andyp] sync with 21-4-6-windows
author andyp
date Thu, 20 Dec 2001 05:49:48 +0000
parents 685b588e92d8
children 943eaba38521
comparison
equal deleted inserted replaced
706:c9bf82d465b5 707:a307f9a2021d
281 static Lisp_Object 281 static Lisp_Object
282 free_dynarr_opaque_ptr (Lisp_Object arg) 282 free_dynarr_opaque_ptr (Lisp_Object arg)
283 { 283 {
284 Dynarr_free (get_opaque_ptr (arg)); 284 Dynarr_free (get_opaque_ptr (arg));
285 return arg; 285 return arg;
286 }
287
288 /* Unwind protection decrements dialog count */
289 static Lisp_Object
290 dialog_popped_down (Lisp_Object arg)
291 {
292 popup_up_p--;
286 } 293 }
287 294
288 295
289 #define ALIGN_TEMPLATE \ 296 #define ALIGN_TEMPLATE \
290 { \ 297 { \
432 } 439 }
433 440
434 pMalloc->lpVtbl->Free(pMalloc, pidl); 441 pMalloc->lpVtbl->Free(pMalloc, pidl);
435 pMalloc->lpVtbl->Release(pMalloc); 442 pMalloc->lpVtbl->Release(pMalloc);
436 return ret; 443 return ret;
437 } 444 }
438 else if (pd.unknown_fname != 0) { 445 else if (pd.unknown_fname != 0) {
439 ret = tstr_to_local_file_format (pd.unknown_fname); 446 ret = tstr_to_local_file_format (pd.unknown_fname);
440 xfree(pd.unknown_fname); 447 xfree(pd.unknown_fname);
441 } 448 }
442 449 else while (1)
450 signal_quit ();
443 } 451 }
444 else 452 else
445 signal_error (Qdialog_box_error, 453 signal_error (Qdialog_box_error,
446 "Unable to create folder browser", 454 "Unable to create folder browser",
447 make_int (0)); 455 make_int (0));
790 798
791 static Lisp_Object 799 static Lisp_Object
792 mswindows_make_dialog_box_internal (struct frame* f, Lisp_Object type, 800 mswindows_make_dialog_box_internal (struct frame* f, Lisp_Object type,
793 Lisp_Object keys) 801 Lisp_Object keys)
794 { 802 {
803 int unbind_count = specpdl_depth ();
804 record_unwind_protect (dialog_popped_down, Qnil);
805 popup_up_p++;
806
795 if (EQ (type, Qfile)) 807 if (EQ (type, Qfile))
796 return handle_file_dialog_box (f, keys); 808 return unbind_to (unbind_count, handle_file_dialog_box (f, keys));
797 else if (EQ (type, Qdirectory)) 809 else if (EQ (type, Qdirectory))
798 return handle_directory_dialog_box (f, keys); 810 return unbind_to (unbind_count, handle_directory_dialog_box (f, keys));
799 else if (EQ (type, Qquestion)) 811 else if (EQ (type, Qquestion))
800 return handle_question_dialog_box (f, keys); 812 return unbind_to (unbind_count, handle_question_dialog_box (f, keys));
801 else if (EQ (type, Qprint)) 813 else if (EQ (type, Qprint))
802 return mswindows_handle_print_dialog_box (f, keys); 814 return unbind_to (unbind_count, mswindows_handle_print_dialog_box (f, keys));
803 else if (EQ (type, Qpage_setup)) 815 else if (EQ (type, Qpage_setup))
804 return mswindows_handle_page_setup_dialog_box (f, keys); 816 return unbind_to (unbind_count,
817 mswindows_handle_page_setup_dialog_box (f, keys));
805 else 818 else
806 signal_error (Qunimplemented, "Dialog box type", type); 819 signal_error (Qunimplemented, "Dialog box type", type);
807 return Qnil; 820 return Qnil;
808 } 821 }
809 822