added missing file

This commit is contained in:
eknauel 2005-09-27 16:20:57 +00:00
parent 29ff444f3b
commit fc55b768c0
1 changed files with 28 additions and 0 deletions

28
scheme/network-viewer.scm Normal file
View File

@ -0,0 +1,28 @@
(define (make-service-info-viewer service-info buffer)
(let ((service-info service-info)
(select-line (make-select-line
(list
(service-info:name service-info)
;;(service-info:aliases service-info)
(number->string (service-info:port service-info))
(service-info:protocol service-info)))))
(lambda (message)
(case message
((paint)
(lambda (self win buffer have-focus?)
(paint-select-line-at select-line 5 5 win buffer have-focus?)))
((key-press)
(lambda (self key control-x-pressed?)
(select-line-handle-key-press! select-line key)
self))
((get-select-as-text)
(lambda (self for-scheme-mode? focus-object-table)
(select-line-selected-entry select-line)))
((get-selection-as-ref)
"UII get-selection-as-ref")
(else
(error "service-info-viewer unknown message" message))))))
(register-plugin!
(make-view-plugin make-service-info-viewer service-info?))