..
original commit: 63cb90633078cd74f5fdd4bf5776df118ae8bf17
This commit is contained in:
parent
5062124082
commit
ee1377af03
|
@ -167,29 +167,27 @@
|
|||
|
||||
(define after-init? #f)
|
||||
(override can-close? on-close on-focus on-drop-file)
|
||||
[define can-close?
|
||||
(lambda ()
|
||||
(let ([number-of-frames
|
||||
(length (send (group:get-the-frame-group)
|
||||
get-frames))])
|
||||
(and (super-can-close?)
|
||||
(or (exit:exiting?)
|
||||
(not (= 1 number-of-frames))
|
||||
(exit:user-oks-exit)))))]
|
||||
[define on-close
|
||||
(lambda ()
|
||||
(super-on-close)
|
||||
(send (group:get-the-frame-group)
|
||||
remove-frame
|
||||
this)
|
||||
(unless (exit:exiting?)
|
||||
(when (null? (send (group:get-the-frame-group) get-frames))
|
||||
(exit:exit))))]
|
||||
[define on-focus
|
||||
(lambda (on?)
|
||||
(super-on-focus on?)
|
||||
(when on?
|
||||
(send (group:get-the-frame-group) set-active-frame this)))]
|
||||
(define (can-close?)
|
||||
(let ([number-of-frames
|
||||
(length (send (group:get-the-frame-group)
|
||||
get-frames))])
|
||||
(and (super-can-close?)
|
||||
(or (exit:exiting?)
|
||||
(not (= 1 number-of-frames))
|
||||
(exit:user-oks-exit)))))
|
||||
(define (on-close)
|
||||
(super-on-close)
|
||||
(send (group:get-the-frame-group)
|
||||
remove-frame
|
||||
this)
|
||||
(unless (exit:exiting?)
|
||||
(when (null? (send (group:get-the-frame-group) get-frames))
|
||||
(exit:exit))))
|
||||
|
||||
(define (on-focus on?)
|
||||
(super-on-focus on?)
|
||||
(when on?
|
||||
(send (group:get-the-frame-group) set-active-frame this)))
|
||||
|
||||
[define on-drop-file
|
||||
(lambda (filename)
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
(quicksort
|
||||
(get-frames)
|
||||
(lambda (x y) (string-ci<=? (send x get-label) (send y get-label))))])
|
||||
(let loop ([windows (filter (lambda (x) (send x is-shown?)) sorted)]
|
||||
(let loop ([windows sorted]
|
||||
[prev (car (last-pair sorted))])
|
||||
(cond
|
||||
[(null? windows) (void)]
|
||||
|
@ -192,7 +192,9 @@
|
|||
(send mdi-parent show #t))
|
||||
mdi-parent)]
|
||||
|
||||
[define get-frames (lambda () (map frame-frame frames))]
|
||||
(define (get-frames)
|
||||
(filter (lambda (x) (send x is-shown?))
|
||||
(map frame-frame frames)))
|
||||
|
||||
[define frame-label-changed
|
||||
(lambda (frame)
|
||||
|
|
Loading…
Reference in New Issue
Block a user