comparison src/xfns.c @ 69065:4c87a7783f95

* xfns.c (Fx_file_dialog, Motif and GTK): DECODE_FILE before returning it.
author Jan Djärv <jan.h.d@swipnet.se>
date Tue, 21 Feb 2006 08:37:33 +0000
parents f5fa98f7c3b7
children f2147c1027b6 866effff65a4 d1c5430c5bff
comparison
equal deleted inserted replaced
69064:7f6655da13ce 69065:4c87a7783f95
5327 Lisp_Object prompt, dir, default_filename, mustmatch, only_dir_p; 5327 Lisp_Object prompt, dir, default_filename, mustmatch, only_dir_p;
5328 { 5328 {
5329 int result; 5329 int result;
5330 struct frame *f = SELECTED_FRAME (); 5330 struct frame *f = SELECTED_FRAME ();
5331 Lisp_Object file = Qnil; 5331 Lisp_Object file = Qnil;
5332 Lisp_Object decoded_file;
5332 Widget dialog, text, help; 5333 Widget dialog, text, help;
5333 Arg al[10]; 5334 Arg al[10];
5334 int ac = 0; 5335 int ac = 0;
5335 extern XtAppContext Xt_app_con; 5336 extern XtAppContext Xt_app_con;
5336 XmString dir_xmstring, pattern_xmstring; 5337 XmString dir_xmstring, pattern_xmstring;
5467 5468
5468 /* Make "Cancel" equivalent to C-g. */ 5469 /* Make "Cancel" equivalent to C-g. */
5469 if (NILP (file)) 5470 if (NILP (file))
5470 Fsignal (Qquit, Qnil); 5471 Fsignal (Qquit, Qnil);
5471 5472
5472 return unbind_to (count, file); 5473 decoded_file = DECODE_FILE (file);
5474
5475 return unbind_to (count, decoded_file);
5473 } 5476 }
5474 5477
5475 #endif /* USE_MOTIF */ 5478 #endif /* USE_MOTIF */
5476 5479
5477 #ifdef USE_GTK 5480 #ifdef USE_GTK
5495 Lisp_Object prompt, dir, default_filename, mustmatch, only_dir_p; 5498 Lisp_Object prompt, dir, default_filename, mustmatch, only_dir_p;
5496 { 5499 {
5497 FRAME_PTR f = SELECTED_FRAME (); 5500 FRAME_PTR f = SELECTED_FRAME ();
5498 char *fn; 5501 char *fn;
5499 Lisp_Object file = Qnil; 5502 Lisp_Object file = Qnil;
5503 Lisp_Object decoded_file;
5500 int count = SPECPDL_INDEX (); 5504 int count = SPECPDL_INDEX ();
5501 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6; 5505 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
5502 char *cdef_file; 5506 char *cdef_file;
5503 5507
5504 GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file); 5508 GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file);
5535 5539
5536 /* Make "Cancel" equivalent to C-g. */ 5540 /* Make "Cancel" equivalent to C-g. */
5537 if (NILP (file)) 5541 if (NILP (file))
5538 Fsignal (Qquit, Qnil); 5542 Fsignal (Qquit, Qnil);
5539 5543
5540 return unbind_to (count, file); 5544 decoded_file = DECODE_FILE (file);
5545
5546 return unbind_to (count, decoded_file);
5541 } 5547 }
5542 5548
5543 #endif /* USE_GTK */ 5549 #endif /* USE_GTK */
5544 5550
5545 5551