comparison src/fileio.c @ 57868:c955f6add62a

* fileio.c (Fread_file_name): Pass Qt as fifth parameter to Fx_file_dialog if only directories should be read. * lisp.h: Fx_file_dialog takes 5 parameters. * xfns.c (Fx_file_dialog): Both Motif and GTK version: Add parameter only_dir_p. In Motif version, don't put DEFAULT_FILENAME in filter part of the dialog, just text field part. Do not add DEFAULT_FILENAME to list of files if it isn't there. In GTK version, pass only_dir_p parameter to xg_get_file_name. * macfns.c (Fx_file_dialog): Add parameter only_dir_p. Check only_dir_p instead of comparing prompt to "Dired". When using a save dialog, add option kNavDontConfirmReplacement, change title to "Enter name", change text for save button to "Ok". * w32fns.c (Fx_file_dialog): Add parameter only_dir_p. Check only_dir_p instead of comparing prompt to "Dired". * gtkutil.c (xg_get_file_with_chooser) (xg_get_file_with_selection): New functions, only defined ifdef HAVE_GTK_FILE_CHOOSER_DIALOG_NEW and HAVE_GTK_FILE_SELECTION_NEW respectively. (xg_get_file_name): Add parameter only_dir_p. Call xg_get_file_with_chooser or xg_get_file_with_selection depending on HAVE_GTK_FILE* and the value of use_old_gtk_file_dialog. (xg_initialize): New DEFVAR_BOOL use_old_gtk_file_dialog. * gtkutil.h (xg_get_file_name): Add parameter only_dir_p.
author Jan Djärv <jan.h.d@swipnet.se>
date Tue, 02 Nov 2004 08:21:16 +0000
parents b2a68db48f92
children 3a6cc929df05 e24e2e78deda
comparison
equal deleted inserted replaced
57867:5a547995da89 57868:c955f6add62a
6319 default_filename = file; 6319 default_filename = file;
6320 dir = Ffile_name_directory (dir); 6320 dir = Ffile_name_directory (dir);
6321 } 6321 }
6322 if (!NILP(default_filename)) 6322 if (!NILP(default_filename))
6323 default_filename = Fexpand_file_name (default_filename, dir); 6323 default_filename = Fexpand_file_name (default_filename, dir);
6324 val = Fx_file_dialog (prompt, dir, default_filename, mustmatch); 6324 val = Fx_file_dialog (prompt, dir, default_filename, mustmatch,
6325 EQ (predicate, Qfile_directory_p) ? Qt : Qnil);
6325 add_to_history = 1; 6326 add_to_history = 1;
6326 } 6327 }
6327 else 6328 else
6328 #endif 6329 #endif
6329 val = Fcompleting_read (prompt, intern ("read-file-name-internal"), 6330 val = Fcompleting_read (prompt, intern ("read-file-name-internal"),