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.
|
431
|
12 |
"/ (notice, that the code below uses an image which does not allocate
|
|
13 |
"/ to many colors for the particular display in use - it may be useful
|
|
14 |
"/ to do so for you own images as well, to avoid slowing down startup)
|
430
|
15 |
"/
|
|
16 |
"/ Notice:
|
|
17 |
"/ the image used here was bought by ObjectShare from Robert Tinney
|
|
18 |
"/ and placed into the Public Domain by ObjectShare.
|
|
19 |
"/ We would like to thank both for that.
|
|
20 |
"/ Feel free to use & spread it.
|
416
|
21 |
|
422
|
22 |
|d imgFileName img view|
|
416
|
23 |
|
420
|
24 |
"/ for now: cannot do this under DOZE;
|
|
25 |
"/ win does not support viewBackgrounds and
|
|
26 |
"/ no event handling takes place at this time. sigh.
|
|
27 |
|
419
|
28 |
(OperatingSystem isUNIXlike
|
|
29 |
and:[Display notNil]) ifTrue:[
|
422
|
30 |
"/ choose one of the banners
|
427
|
31 |
"/ (select the one which fits our screen depth best,
|
|
32 |
"/ avoiding allocation of too many colors)
|
419
|
33 |
(d := Display depth) <= 8 ifTrue:[
|
|
34 |
d <= 4 ifTrue:[
|
|
35 |
d <= 2 ifTrue:[
|
422
|
36 |
imgFileName := 'banner1.xpm' "/ bw image
|
419
|
37 |
] ifFalse:[
|
422
|
38 |
imgFileName := 'banner3.xpm' "/ 8 colors
|
419
|
39 |
]
|
416
|
40 |
] ifFalse:[
|
422
|
41 |
imgFileName := 'banner5.xpm' "/ 24 colors
|
419
|
42 |
].
|
416
|
43 |
] ifFalse:[
|
422
|
44 |
imgFileName := 'banner8.xpm' "/ 255 colors
|
416
|
45 |
].
|
|
46 |
|
422
|
47 |
img := Image fromFile:imgFileName.
|
419
|
48 |
img notNil ifTrue:[
|
433
|
49 |
"/ ('showBanner.rc [info]: launch splash screen banner.') infoPrintCR.
|
422
|
50 |
"/ remember the bannerView - will be destroyed by
|
|
51 |
"/ the hideBanner script.
|
419
|
52 |
Smalltalk at:#'__BannerView__' put:(view := PopUpBanner forImage:img).
|
|
53 |
view showCentered.
|
421
|
54 |
Display flush.
|
419
|
55 |
].
|
416
|
56 |
].
|
|
57 |
!
|