original commit: bb0d01e3fb31b361de4b7d82e7d4ffdbabcfb802
This commit is contained in:
Matthew Flatt 2005-05-01 20:49:42 +00:00
parent 394e11b380
commit 782c8a5e8c

View File

@ -42,11 +42,15 @@
(lambda () (lambda ()
(dynamic-wind (dynamic-wind
void void
(lambda () (send af on-exit)) (lambda ()
(lambda () (set! running-quit? #f)))))))))))]) (send af on-exit)
(unless (null? (wx:get-top-level-windows))
(wx:cancel-quit)))
(lambda ()
(set! running-quit? #f)))))))))))])
(wx:application-quit-handler (make-app-handler f f))) (wx:application-quit-handler (make-app-handler f f)))
(define (set-handler! who proc param arity) (define (set-handler! who proc param arity result-filter)
(when proc (when proc
(unless (and (procedure? proc) (unless (and (procedure? proc)
(procedure-arity-includes? proc arity)) (procedure-arity-includes? proc arity))
@ -59,7 +63,7 @@
(lambda args (lambda args
(parameterize ([wx:current-eventspace e]) (parameterize ([wx:current-eventspace e])
(wx:queue-callback (wx:queue-callback
(lambda () (apply proc args)) (lambda () (result-filter (apply proc args)))
wx:middle-queue-key))) wx:middle-queue-key)))
proc))))) proc)))))
@ -70,7 +74,8 @@
[(proc) [(proc)
(set-handler! 'application-preferences-handler proc (set-handler! 'application-preferences-handler proc
wx:application-pref-handler wx:application-pref-handler
0)])) 0
values)]))
(define application-about-handler (define application-about-handler
(case-lambda (case-lambda
@ -80,7 +85,8 @@
[(proc) [(proc)
(set-handler! 'application-about-handler proc (set-handler! 'application-about-handler proc
wx:application-about-handler wx:application-about-handler
0)])) 0
values)]))
(define application-quit-handler (define application-quit-handler
(case-lambda (case-lambda
@ -90,7 +96,8 @@
[(proc) [(proc)
(set-handler! 'application-quit-handler proc (set-handler! 'application-quit-handler proc
wx:application-quit-handler wx:application-quit-handler
0)])) 0
(lambda (v) (unless v (wx:cancel-quit)) v))]))
(define default-application-file-handler (define default-application-file-handler
(entry-point (entry-point
@ -121,7 +128,8 @@
(install-defh) (install-defh)
(set-handler! 'application-file-handler proc (set-handler! 'application-file-handler proc
wx:application-file-handler wx:application-file-handler
1))])) 1
values))]))
(define (current-eventspace-has-standard-menus?) (define (current-eventspace-has-standard-menus?)