]> code.delx.au - gnu-emacs/blobdiff - src/xfns.c
* xfns.c (syms_of_xfns): New variable: x-gtk-show-chooser-help-text.
[gnu-emacs] / src / xfns.c
index 8071ff1c4e6f7ef8470e514ca18dbd50030d1abe..ea6d43f649f16d76f66301804178eb6777c1c9b6 100644 (file)
@@ -158,6 +158,10 @@ int x_use_old_gtk_file_dialog;
 
 int x_gtk_show_hidden_files;
 
+/* If non-zero, don't show additional help text in the GTK file chooser.  */
+
+int x_gtk_show_chooser_help_text;
+
 /* If non-zero, don't collapse to tool bar when it is detached.  */
 
 int x_gtk_whole_detached_tool_bar;
@@ -4067,11 +4071,15 @@ If DISPLAY is nil, that stands for the selected frame's display.  */)
   x_destroy_all_bitmaps (dpyinfo);
   XSetCloseDownMode (dpyinfo->display, DestroyAll);
 
+#ifdef USE_GTK
+  xg_display_close (dpyinfo->display);
+#else
 #ifdef USE_X_TOOLKIT
   XtCloseDisplay (dpyinfo->display);
 #else
   XCloseDisplay (dpyinfo->display);
 #endif
+#endif /* ! USE_GTK */
 
   x_delete_display (dpyinfo);
   UNBLOCK_INPUT;
@@ -5328,6 +5336,8 @@ or directory must exist.  ONLY-DIR-P is ignored."  */)
   int count = SPECPDL_INDEX ();
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
 
+  check_x ();
+
   GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file);
 
   if (popup_activated ())
@@ -5495,6 +5505,8 @@ directories.  */)
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
   char *cdef_file;
 
+  check_x ();
+
   GCPRO6 (prompt, dir, default_filename, mustmatch, only_dir_p, file);
 
   if (popup_activated ())
@@ -5806,6 +5818,12 @@ Note that this is just the default, there is a toggle button on the file
 chooser to show or not show hidden files on a case by case basis.  */);
   x_gtk_show_hidden_files = 0;
 
+  DEFVAR_BOOL ("x-gtk-show-chooser-help-text", &x_gtk_show_chooser_help_text,
+    doc: /* *If non-nil, the GTK file chooser will by show additional help text.
+If more space for files in the file chooser dialog is wanted, set this to nil
+to turn the additional text off.  */);
+  x_gtk_show_chooser_help_text = 1;
+
   DEFVAR_BOOL ("x-gtk-whole-detached-tool-bar", &x_gtk_whole_detached_tool_bar,
     doc: /* *If non-nil, a detached tool bar is shown in full.
 The default is to just show an arrow and pressing on that arrow shows