Rename ...-ICON-FILE-NAME -> ...-ICON-URL.

This commit is contained in:
sperber 2003-01-29 09:16:56 +00:00
parent 301d6ff4c3
commit f373a87413
2 changed files with 44 additions and 44 deletions

View File

@ -489,7 +489,7 @@ one. Here they are:
encoding.
\end{desc}
\defun{with-file-name->icon-file-name}{proc [options]}{options}
\defun{with-file-name->icon-url}{proc [options]}{options}
\begin{desc}
This specifies a procedure for determining the icon to be displayed
next to a file name in a directory listing.
@ -497,19 +497,19 @@ one. Here they are:
representing the corresponding icon.
\end{desc}
\defun{with-blank-icon-file-name}{file-name [options]}{options}
\defun{with-blank-icon-url}{file-name [options]}{options}
\begin{desc}
This specifies a file name for the special icon that must be as wide
as the icons returned by the previous procedure but that is blank.
\end{desc}
\defun{with-back-icon-file-name}{file-name [options]}{options}
\defun{with-back-icon-url}{file-name [options]}{options}
\begin{desc}
This specifies a file name for the special icon that is displayed
next to the ``parent directory'' link in directory listings.
\end{desc}
\defun{with-unknown-icon-file-name}{file-name [options]}{options}
\defun{with-unknown-icon-url}{file-name [options]}{options}
\begin{desc}
This specifies a file name for the special icon that is displayed
next to the unknown entries in directory listings.

View File

@ -12,31 +12,31 @@
(define-record-type file-directory-options :file-directory-options
(really-make-file-directory-options file-name->content-type
file-name->content-encoding
file-name->icon-file-name
directory-icon-file-name
blank-icon-file-name
back-icon-file-name
unknown-icon-file-name)
file-name->icon-url
directory-icon-url
blank-icon-url
back-icon-url
unknown-icon-url)
file-directory-options?
(file-name->content-type file-directory-options-file-name->content-type
set-file-directory-options-file-name->content-type!)
(file-name->content-encoding file-directory-options-file-name->content-encoding
set-file-directory-options-file-name->content-encoding!)
(file-name->icon-file-name file-directory-options-file-name->icon-file-name
set-file-directory-options-file-name->icon-file-name!)
(directory-icon-file-name file-directory-options-directory-icon-file-name
set-file-directory-options-directory-icon-file-name!)
(blank-icon-file-name file-directory-options-blank-icon-file-name
set-file-directory-options-blank-icon-file-name!)
(back-icon-file-name file-directory-options-back-icon-file-name
set-file-directory-options-back-icon-file-name!)
(unknown-icon-file-name file-directory-options-unknown-icon-file-name
set-file-directory-options-unknown-icon-file-name!))
(file-name->icon-url file-directory-options-file-name->icon-url
set-file-directory-options-file-name->icon-url!)
(directory-icon-url file-directory-options-directory-icon-url
set-file-directory-options-directory-icon-url!)
(blank-icon-url file-directory-options-blank-icon-url
set-file-directory-options-blank-icon-url!)
(back-icon-url file-directory-options-back-icon-url
set-file-directory-options-back-icon-url!)
(unknown-icon-url file-directory-options-unknown-icon-url
set-file-directory-options-unknown-icon-url!))
(define (make-default-file-directory-options)
(really-make-file-directory-options default-file-name->content-type
default-file-name->content-encoding
default-file-name->icon-file-name
default-file-name->icon-url
"directory.xbm"
"blank.xbm"
"back.xbm"
@ -50,21 +50,21 @@
(set-file-directory-options-file-name->content-encoding!
new-options
(file-directory-options-file-name->content-encoding options))
(set-file-directory-options-file-name->icon-file-name!
(set-file-directory-options-file-name->icon-url!
new-options
(file-directory-options-file-name->icon-file-name options))
(set-file-directory-options-directory-icon-file-name!
(file-directory-options-file-name->icon-url options))
(set-file-directory-options-directory-icon-url!
new-options
(file-directory-options-directory-icon-file-name options))
(set-file-directory-options-blank-icon-file-name!
(file-directory-options-directory-icon-url options))
(set-file-directory-options-blank-icon-url!
new-options
(file-directory-options-blank-icon-file-name options))
(set-file-directory-options-back-icon-file-name!
(file-directory-options-blank-icon-url options))
(set-file-directory-options-back-icon-url!
new-options
(file-directory-options-back-icon-file-name options))
(set-file-directory-options-unknown-icon-file-name!
(file-directory-options-back-icon-url options))
(set-file-directory-options-unknown-icon-url!
new-options
(file-directory-options-unknown-icon-file-name options))
(file-directory-options-unknown-icon-url options))
new-options))
(define (make-file-directory-options-transformer set-option!)
@ -81,18 +81,18 @@
(define with-file-name->content-encoding
(make-file-directory-options-transformer
set-file-directory-options-file-name->content-encoding!))
(define with-file-name->icon-file-name
(define with-file-name->icon-url
(make-file-directory-options-transformer
set-file-directory-options-file-name->icon-file-name!))
(define with-blank-icon-file-name
set-file-directory-options-file-name->icon-url!))
(define with-blank-icon-url
(make-file-directory-options-transformer
set-file-directory-options-blank-icon-file-name!))
(define with-back-icon-file-name
set-file-directory-options-blank-icon-url!))
(define with-back-icon-url
(make-file-directory-options-transformer
set-file-directory-options-back-icon-file-name!))
(define with-unknown-icon-file-name
set-file-directory-options-back-icon-url!))
(define with-unknown-icon-url
(make-file-directory-options-transformer
set-file-directory-options-unknown-icon-file-name!))
set-file-directory-options-unknown-icon-url!))
(define (make-file-directory-options . stuff)
(let loop ((options (make-default-file-directory-options))
@ -274,7 +274,7 @@
;; These icons can, for example, be found in the cern-httpd-3.0
;; distribution at http://www.w3.org/pub/WWW/Daemon/
(define (default-file-name->icon-file-name fname)
(define (default-file-name->icon-url fname)
(let ((ext (file-name-extension fname)))
(cond
((string-ci=? ext ".txt") "text.xbm")
@ -384,12 +384,12 @@
(icon-name
(case type
((regular fifo socket)
((file-directory-options-file-name->icon-file-name options)
((file-directory-options-file-name->icon-url options)
fname))
((directory)
(file-directory-options-directory-icon-file-name options))
(file-directory-options-directory-icon-url options))
(else
(file-directory-options-unknown-icon-file-name options))))
(file-directory-options-unknown-icon-url options))))
(tag-name
(case type
((regular fifo socket) "[FILE]")
@ -445,9 +445,9 @@
(make-writer-body
(lambda (port httpd-options)
(let ((back-icon
(file-directory-options-back-icon-file-name options))
(file-directory-options-back-icon-url options))
(blank-icon
(file-directory-options-blank-icon-file-name options)))
(file-directory-options-blank-icon-url options)))
(with-tag port html ()
(let ((title (string-append "Index of /"
(string-join file-path "/"))))