adjust various plumbing to get the drracket icon to the startup screen. Only to realize

that the startup screen is a dialog% and thus doesn't have set-icon

related to PR 12241

original commit: b95b346a4e3f51dddd5ec88faf126f1b4636125e
This commit is contained in:
Robby Findler 2011-09-29 13:43:18 -05:00
parent 6c3d889b93
commit 17f11541b4
2 changed files with 26 additions and 4 deletions

View File

@ -138,7 +138,9 @@
(set! icons (cons (make-icon bm x y) icons))
(refresh-splash))
(define (start-splash splash-draw-spec _splash-title width-default #:allow-funny? [allow-funny? #f])
(define (start-splash splash-draw-spec _splash-title width-default
#:allow-funny? [allow-funny? #f]
#:frame-icon [frame-icon #f])
(unless allow-funny? (set! funny? #f))
(set! splash-title _splash-title)
(set! splash-max-width (max 1 (splash-get-preference (get-splash-width-preference-name) width-default)))
@ -152,6 +154,16 @@
(on-splash-eventspace/ret
(send (get-gauge) set-range splash-max-width)
(send splash-tlw set-label splash-title)
#; ;; commented out because dialogs don't accept set-icon
(when frame-icon
(if (pair? frame-icon)
(let ([small (car icon)]
[large (cdr icon)])
(send splash-tlw set-icon small (send small get-loaded-mask) 'small)
(send splash-tlw set-icon large (send large get-loaded-mask) 'large))
(send splash-tlw set-icon frame-icon (send icon get-loaded-mask) 'both)))
(cond
[(or (path? splash-draw-spec)
(string? splash-draw-spec))

View File

@ -24,7 +24,14 @@ that number to control the gauge along the bottom of the splash screen.
exact-nonnegative-integer?))]
[splash-title string?]
[width-default exact-nonnegative-integer?]
[#:allow-funny? allow-funny? boolean? #f])
[#:allow-funny? allow-funny? boolean? #f]
[#:frame-icon
frame-icon
(or/c #f
(is-a?/c bitmap%)
(cons/c (is-a?/c bitmap%)
(is-a?/c bitmap%)))
#f])
void?]{
Starts a new splash screen. The splash screen is created in its own, new
@tech[#:doc '(lib "scribblings/gui/gui.scrbl") #:key "eventspace"]{eventspace}.
@ -52,7 +59,10 @@ that number to control the gauge along the bottom of the splash screen.
The @racket[allow-funny?] argument determines if a special gauge is used on Christmas day.
}
The @racket[frame-icon] is used just like the value of the parameter @racket[frame:current-icon] is used,
but for the splash screen.
}
@defproc[(shutdown-splash) void?]{
Stops the splash window's gauge from advancing. Call this after all of the files have been loaded.
}