;;; -*- Mode:Lisp; Readtable:ZL; Package:USER; Base:8; Patch-File:T -*-
;;; Patch file for System version 124.19
;;; Reason:
;;;  The Peek File System display now successfully notices when the access
;;;  method has changed for a host.
;;; Written 2-Jun-88 15:58:21 by pld (Peter L. DeWolf) at site Gigamos Cambridge
;;; while running on Azathoth from band 2
;;; with Experimental System 124.17, Experimental Local-File 74.1, Experimental File-Server 23.1, Experimental Unix-Interface 12.0, Experimental ZMail 72.0, Experimental Tape 23.6, Experimental Lambda-Diag 16.1, microcode 1756, SDU Boot Tape 3.14, SDU ROM 8.



; From modified file DJ: L.WINDOW; PEEK.LISP#207 at 2-Jun-88 15:59:11
#8R TV#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "TV")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: WINDOW; PEEK  "

(defun file-host-item-function (host)
  (when host
    (list (list :pre-process-function 'peek-file-host-pre-process
		:host host
		:access nil)
	    '(nil)
	    '(nil))))

))

; From modified file DJ: L.WINDOW; PEEK.LISP#207 at 2-Jun-88 15:59:16
#8R TV#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "TV")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: WINDOW; PEEK  "

(defun peek-file-host-pre-process (item)
  (let* ((host (getf (tv:scroll-item-plist item) :host))
	 (access (getf (tv:scroll-item-plist item) :access))
	 (new-access (send host :access)))
    (unless (eq access new-access)
      (setf (getf (tv:scroll-item-plist item) :access) new-access)
      (setf (cdr (tv:scroll-item-component-items item))
	    (append (send host :peek-file-system-header)
		    (send host :peek-file-system))))))

))

; From modified file DJ: L.WINDOW; PEEK.LISP#207 at 2-Jun-88 15:59:22
#8R TV#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "TV")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: WINDOW; PEEK  "

(defun peek-file-system (ignore)
  "Display status of file system"
  (scroll-maintain-list 
    #'(lambda () fs:*pathname-host-list*)
    'file-host-item-function
    nil
    'next-interesting-file-host-stepper))

))
