author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 11 Jun 2018 11:15:47 +0100 | |
branch | jv |
changeset 1558 | 36927a04ace3 |
parent 609 | f0f51d4a0066 |
permissions | -rw-r--r-- |
609 | 1 |
"/ Encoding: iso8859-1 |
416 | 2 |
"/ |
3 |
"/ $Header$ |
|
4 |
"/ |
|
5 |
"/ MIMEType: application/x-smalltalk-source |
|
6 |
"/ |
|
7 |
"/ if you dont like the splash banner at startup, |
|
8 |
"/ simply remove or rename this file. |
|
9 |
"/ |
|
430 | 10 |
"/ if you like another image to be shown (especially for applications), |
609 | 11 |
"/ copy this file to the apps startup directory, |
430 | 12 |
"/ and edit the bitmap-file names found below as required. |
431 | 13 |
"/ (notice, that the code below uses an image which does not allocate |
14 |
"/ to many colors for the particular display in use - it may be useful |
|
15 |
"/ to do so for you own images as well, to avoid slowing down startup) |
|
430 | 16 |
"/ |
17 |
"/ Notice: |
|
18 |
"/ the image used here was bought by ObjectShare from Robert Tinney |
|
19 |
"/ and placed into the Public Domain by ObjectShare. |
|
20 |
"/ We would like to thank both for that. |
|
21 |
"/ Feel free to use & spread it. |
|
416 | 22 |
|
422 | 23 |
|d imgFileName img view| |
416 | 24 |
|
420 | 25 |
"/ for now: cannot do this under DOZE; |
26 |
"/ win does not support viewBackgrounds and |
|
27 |
"/ no event handling takes place at this time. sigh. |
|
609 | 28 |
"/ Display connections with round-trip-time >= 20 ms are |
479
c34a15c6340c
do not show banner on slow display connections
Stefan Vogel <sv@exept.de>
parents:
433
diff
changeset
|
29 |
"/ considered slow and no banner is shown |
420 | 30 |
|
419 | 31 |
(OperatingSystem isUNIXlike |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
479
diff
changeset
|
32 |
and:[(Smalltalk at:#XPMReader) notNil "maybe minimal configuration" |
609 | 33 |
and:[Display notNil |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
479
diff
changeset
|
34 |
and:[Display roundTripTime < 20]]]) ifTrue:[ |
422 | 35 |
"/ choose one of the banners |
427 | 36 |
"/ (select the one which fits our screen depth best, |
37 |
"/ avoiding allocation of too many colors) |
|
419 | 38 |
(d := Display depth) <= 8 ifTrue:[ |
39 |
d <= 4 ifTrue:[ |
|
40 |
d <= 2 ifTrue:[ |
|
422 | 41 |
imgFileName := 'banner1.xpm' "/ bw image |
419 | 42 |
] ifFalse:[ |
422 | 43 |
imgFileName := 'banner3.xpm' "/ 8 colors |
419 | 44 |
] |
416 | 45 |
] ifFalse:[ |
422 | 46 |
imgFileName := 'banner5.xpm' "/ 24 colors |
419 | 47 |
]. |
416 | 48 |
] ifFalse:[ |
422 | 49 |
imgFileName := 'banner8.xpm' "/ 255 colors |
416 | 50 |
]. |
51 |
||
422 | 52 |
img := Image fromFile:imgFileName. |
419 | 53 |
img notNil ifTrue:[ |
433 | 54 |
"/ ('showBanner.rc [info]: launch splash screen banner.') infoPrintCR. |
422 | 55 |
"/ remember the bannerView - will be destroyed by |
56 |
"/ the hideBanner script. |
|
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
479
diff
changeset
|
57 |
view := PopUpBanner forImage:img. |
419 | 58 |
view showCentered. |
421 | 59 |
Display flush. |
488
521e2d58f050
Changed workstation initialization.
Stefan Vogel <sv@exept.de>
parents:
479
diff
changeset
|
60 |
Smalltalk addStartBlock:[view destroy]. |
419 | 61 |
]. |
416 | 62 |
]. |
63 |
! |