Viewer for host-info
part of darcs patch Thu Sep 22 18:43:55 EEST 2005 Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
This commit is contained in:
parent
54907fe26e
commit
1d2a36c982
|
@ -101,3 +101,34 @@
|
|||
|
||||
(register-plugin!
|
||||
(make-view-plugin make-protocol-info-viewer protocol-info?))
|
||||
|
||||
(define (make-host-info-select-list hi num-lines)
|
||||
(make-select-list
|
||||
(append
|
||||
(list
|
||||
(make-unmarked-text-element
|
||||
(cons 'name (host-info:name hi))
|
||||
#t
|
||||
(format #f "Name: ~a" (host-info:name hi)))
|
||||
(make-unmarked-text-element
|
||||
(cons 'text "") #f "Aliases:"))
|
||||
(map (lambda (alias)
|
||||
(make-unmarked-text-element
|
||||
(cons 'alias alias) #t
|
||||
(format #f " ~a" alias)))
|
||||
(host-info:aliases hi))
|
||||
(list
|
||||
(make-unmarked-text-element
|
||||
(cons 'text "") #f "Addresses:"))
|
||||
(map (lambda (address)
|
||||
(make-unmarked-text-element
|
||||
(cons 'address address) #t
|
||||
(format #f " ~a" address)))
|
||||
(host-info:addresses hi)))
|
||||
num-lines))
|
||||
|
||||
(define make-host-info-viewer
|
||||
(make-info-viewer make-host-info-select-list))
|
||||
|
||||
(register-plugin!
|
||||
(make-view-plugin make-host-info-viewer host-info?))
|
||||
|
|
Loading…
Reference in New Issue