From f9d64bb358607b8bb771c5d61eccaea2859d3e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 2 Nov 2004 08:21:16 +0000 Subject: * 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. --- src/gtkutil.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gtkutil.h') diff --git a/src/gtkutil.h b/src/gtkutil.h index c0055f361cc..b2e2c5f2fff 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h @@ -132,7 +132,8 @@ extern void free_widget_value P_ ((widget_value *)); extern char *xg_get_file_name P_ ((FRAME_PTR f, char *prompt, char *default_filename, - int mustmatch_p)); + int mustmatch_p, + int only_dir_p)); extern GtkWidget *xg_create_widget P_ ((char *type, char *name, -- cgit v1.2.1