[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cheesy Hacks #1: Better Search Files

MCL Users-

This is the first in possibly a series of cheesy hacks that fit
in a single email message. Use at your own risk.

This hack adds a "Pick Path" button, which brings up the standard directory
dialog box, to the Search Files dialog.

Please let me know of any bugs or improvements you make.
Shannon Spires
;;; better search files.lisp
;;; Adds a "pick path" button to the standard MCL "search files" dialog box,
;;;  so you can use the standard file dialog box to pick a path.
;;; Load this file at startup time after MCL's menus have been built.

;;; 11/11/93 Shannon Spires
;;; Use at your own risk.

(defun new-search-file-dialog ()
    #@(312 10)
    #@(76 16)
    "Pick Path"
    #'(LAMBDA (ITEM)
        (let ((pathitem (FIND-NAMED-SIBLING ITEM 'CCL::FILE-ITEM)))
             ; :directory (dialog-item-text pathitem)
;;   uncomment above line to have path pick start at directory currently 
;;     shown in the box.
;;   This can be useful, but unfortunately it bombs with the default string
;;     that MCL first puts in the box.
;; Use this format to search all subdirectories as well: "**:*.lisp"

 (find-menu-item (find-menu "Tools") "Search Files")

; end of better search files.lisp