original commit: 7a82c4cc7e562c26174a544913ff47e1bea8b4a5
This commit is contained in:
Paul Steckler 2002-07-15 22:04:59 +00:00
parent 6a82b47be1
commit 88d66a2a98

View File

@ -12,6 +12,7 @@
(define launch-browser? #t) (define launch-browser? #t)
(define external-connections? #f) (define external-connections? #f)
(define iconize? #f) (define iconize? #f)
(define quiet? #f)
(define port #f) (define port #f)
(command-line (command-line
@ -24,6 +25,8 @@
(set! external-connections? #t)] (set! external-connections? #t)]
[("-i" "--iconize") "Iconize the control panel" [("-i" "--iconize") "Iconize the control panel"
(set! iconize? #t)] (set! iconize? #t)]
[("-q" "--quiet") "Don't show the control panel"
(set! quiet? #t)]
[("-p" "--port") number "Use given port number" [("-p" "--port") number "Use given port number"
(with-handlers (with-handlers
((void (lambda _ ((void (lambda _
@ -51,7 +54,9 @@
; allow browser startup time ; allow browser startup time
(sleep 2)) (sleep 2))
(define hd-frame% (if quiet?
(semaphore-wait (make-semaphore 0))
(let* ([hd-frame%
(class frame% (class frame%
(inherit show) (inherit show)
(field (field
@ -106,19 +111,21 @@
(parent panel) (parent panel)
(min-width 100) (min-width 100)
(callback (lambda (b ev) (callback (lambda (b ev)
(shutdown-dialog))))))) (shutdown-dialog))))))]
[frame
(define frame
(instantiate hd-frame% () (instantiate hd-frame% ()
(label "PLT Help Desk") (label "PLT Help Desk")
(min-width 175) (min-width 175)
(stretchable-width #f) (stretchable-width #f)
(stretchable-height #f))) (stretchable-height #f))])
(send frame center) (send frame center)
(send frame show #t) (send frame show #t)
(when iconize? (when iconize?
(send frame iconize #t))) (send frame iconize #t)))))