Changeset 11868


Ignore:
Timestamp:
Mar 31, 2009, 10:49:14 AM (10 years ago)
Author:
gb
Message:

Add *CHOOSE-FILE-DIALOG-HOOK* to skeletal
CHOOSE-FILE-DIALOG/CHOOSE-NEW-FILE-DIALOG, so that versions that actually
have a UI can be called.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/misc.lisp

    r11527 r11868  
    695695                       (return-from get-answer (list (nth value list))))))))))))
    696696
     697(defvar *choose-file-dialog-hook* nil "for GUIs")
     698
    697699;;; There should ideally be some way to override the UI (such as
    698700;;; it is ...) here.
     
    701703;;;   b) should do more sanity-checking
    702704(defun choose-file-dialog (&key file-types (prompt "File name:"))
    703   (%choose-file-dialog t prompt file-types))
     705  (let* ((hook *choose-file-dialog-hook*))
     706    (if hook
     707      (funcall hook t prompt file-types)
     708      (%choose-file-dialog t prompt file-types))))
    704709
    705710(defun choose-new-file-dialog (&key prompt)
    706   (%choose-file-dialog nil prompt nil))
     711  (let* ((hook *choose-file-dialog-hook*))
     712    (if hook
     713      (funcall hook nil prompt nil)
     714      (%choose-file-dialog nil prompt nil))))
    707715
    708716(defun %choose-file-dialog (must-exist prompt file-types)
Note: See TracChangeset for help on using the changeset viewer.