]> git.eshelyaron.com Git - emacs.git/commitdiff
Add variable use-file-dialog to control use of file dialogs.
authorJan Djärv <jan.h.d@swipnet.se>
Sat, 29 Nov 2003 10:44:36 +0000 (10:44 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Sat, 29 Nov 2003 10:44:36 +0000 (10:44 +0000)
lisp/ChangeLog
lisp/cus-start.el
src/ChangeLog
src/fileio.c
src/fns.c

index d8d6278337ce5943cc1dc3b116667ff240ca778f..460c73c72e6a8370e5803dc49feae9caed2df0d1 100644 (file)
@@ -1,3 +1,7 @@
+2003-11-29  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * cus-start.el (all): Add use-file-dialog.
+
 2003-11-27  Kim F. Storm  <storm@cua.dk>
 
        * subr.el (posn-object-x-y): New defun.
index db044fc8ba9d8c334e7f610b38d9d9863734a011..5e237cd0db7c756376b10710e7325965c4cf82d6 100644 (file)
             (insert-default-directory minibuffer boolean)
             ;; fns.c
             (use-dialog-box menu boolean "21.1")
+            (use-file-dialog menu boolean "21.4")
             ;; frame.c
             (default-frame-alist frames
               (repeat (cons :format "%v"
index dc5f96e1f3fe0d18ce780c5a13b9e0a936d17b98..19ffd8f942825aba6c933510b0f5cce4abb634eb 100644 (file)
@@ -1,3 +1,11 @@
+2003-11-29  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * fileio.c (Fread_file_name): Check use_file_dialog also before
+       calling Fx_file_dialog.
+
+       * fns.c: use_file_dialog: New variable.
+       (syms_of_fns): DEFVAR_BOOL use-file-dialog.
+
 2003-11-29  Kim F. Storm  <storm@cua.dk>
 
        * msdos.c (Qcursor_type, Qbar, Qhbar): Declare extern.
index 9ed461099511b03368b9099f47abd17895451dfc..e586407ceccb13f6c2965fd743480e30092723d5 100644 (file)
@@ -134,6 +134,7 @@ extern int errno;
 
 #include "commands.h"
 extern int use_dialog_box;
+extern int use_file_dialog;
 
 #ifndef O_WRONLY
 #define O_WRONLY 1
@@ -6212,6 +6213,7 @@ provides a file dialog box.  */)
 #if defined (USE_MOTIF) || defined (HAVE_NTGUI) || defined (USE_GTK)
   if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
       && use_dialog_box
+      && use_file_dialog
       && have_menus_p ())
     {
       /* If DIR contains a file name, split it.  */
index 18bf8d62a8bf9bce187be2bd736e4a708bc5233c..fed948dc29f4c879e2cfede26a372574d7273966 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -59,6 +59,10 @@ Boston, MA 02111-1307, USA.  */
    asked by mouse commands.  */
 int use_dialog_box;
 
+/* Nonzero enables use of a file dialog for file name
+   questions asked by mouse commands.  */
+int use_file_dialog;
+
 extern int minibuffer_auto_raise;
 extern Lisp_Object minibuf_window;
 extern Lisp_Object Vlocale_coding_system;
@@ -5638,6 +5642,13 @@ This applies to `y-or-n-p' and `yes-or-no-p' questions asked by commands
 invoked by mouse clicks and mouse menu items.  */);
   use_dialog_box = 1;
 
+  DEFVAR_BOOL ("use-file-dialog", &use_file_dialog,
+    doc: /* *Non-nil means mouse commands use a file dialog to ask for files.
+This applies to commands from menus and tool bar buttons.  The value of
+`use-dialog-box' takes precedence over this variable, so a file dialog is only
+used if both `use-dialog-box' and this variable are non-nil.  */);
+  use_file_dialog = 1;
+  
   defsubr (&Sidentity);
   defsubr (&Srandom);
   defsubr (&Slength);