416
|
1 |
"/
|
|
2 |
"/ $Header$
|
|
3 |
"/
|
|
4 |
"/ MIMEType: application/x-smalltalk-source
|
|
5 |
"/
|
|
6 |
"/ if you dont like the splash banner at startup,
|
|
7 |
"/ simply remove or rename this file.
|
|
8 |
"/
|
430
|
9 |
"/ if you like another image to be shown (especially for applications),
|
|
10 |
"/ copy this file to the apps startup directory,
|
|
11 |
"/ and edit the bitmap-file names found below as required.
|
|
12 |
"/
|
|
13 |
"/ Notice:
|
|
14 |
"/ the image used here was bought by ObjectShare from Robert Tinney
|
|
15 |
"/ and placed into the Public Domain by ObjectShare.
|
|
16 |
"/ We would like to thank both for that.
|
|
17 |
"/ Feel free to use & spread it.
|
416
|
18 |
|
422
|
19 |
|d imgFileName img view|
|
416
|
20 |
|
420
|
21 |
"/ for now: cannot do this under DOZE;
|
|
22 |
"/ win does not support viewBackgrounds and
|
|
23 |
"/ no event handling takes place at this time. sigh.
|
|
24 |
|
419
|
25 |
(OperatingSystem isUNIXlike
|
|
26 |
and:[Display notNil]) ifTrue:[
|
422
|
27 |
"/ choose one of the banners
|
427
|
28 |
"/ (select the one which fits our screen depth best,
|
|
29 |
"/ avoiding allocation of too many colors)
|
419
|
30 |
(d := Display depth) <= 8 ifTrue:[
|
|
31 |
d <= 4 ifTrue:[
|
|
32 |
d <= 2 ifTrue:[
|
422
|
33 |
imgFileName := 'banner1.xpm' "/ bw image
|
419
|
34 |
] ifFalse:[
|
422
|
35 |
imgFileName := 'banner3.xpm' "/ 8 colors
|
419
|
36 |
]
|
416
|
37 |
] ifFalse:[
|
422
|
38 |
imgFileName := 'banner5.xpm' "/ 24 colors
|
419
|
39 |
].
|
416
|
40 |
] ifFalse:[
|
422
|
41 |
imgFileName := 'banner8.xpm' "/ 255 colors
|
416
|
42 |
].
|
|
43 |
|
422
|
44 |
img := Image fromFile:imgFileName.
|
419
|
45 |
img notNil ifTrue:[
|
429
|
46 |
('showBanner.rc [info]: launch splash screen banner.') infoPrintCR.
|
422
|
47 |
"/ remember the bannerView - will be destroyed by
|
|
48 |
"/ the hideBanner script.
|
419
|
49 |
Smalltalk at:#'__BannerView__' put:(view := PopUpBanner forImage:img).
|
|
50 |
view showCentered.
|
421
|
51 |
Display flush.
|
419
|
52 |
].
|
416
|
53 |
].
|
|
54 |
!
|