author | Claus Gittinger <cg@exept.de> |
Mon, 28 Apr 1997 22:50:15 +0200 | |
changeset 213 | ff75059590f4 |
parent 212 | df657c69a60f |
child 214 | 01ed852ca742 |
permissions | -rw-r--r-- |
0 | 1 |
"* |
2 |
* $Header$ |
|
5 | 3 |
* |
209 | 4 |
* ST/X startup configuration file: |
5 |
* |
|
5 | 6 |
* DONT add site specific things here - use your own d_xxx.rc file instead |
8 | 7 |
* where xxx stands for your displays hostname(s) |
5 | 8 |
* |
9 |
* display related configuration: |
|
10 |
* first do some common setup, then try to find a |
|
11 |
* display specific initialization file. |
|
0 | 12 |
*" |
13 |
||
14 |
"* |
|
5 | 15 |
* mouse-button translation |
16 |
* |
|
17 |
* (allowed are #select #menu and #paste) |
|
18 |
* |
|
19 |
* the following line puts paste onto the right button (as in xterm): |
|
20 |
*" |
|
25 | 21 |
"/ Screen buttonTranslation:#(select #menu #paste). |
5 | 22 |
|
23 |
"* |
|
24 |
* while that one puts the pop-up menu both on the middle and right buttons: |
|
25 |
*" |
|
25 | 26 |
"/ Screen buttonTranslation:#(select #menu #menu). |
27 |
Screen buttonTranslation:#(1 2 2). |
|
7 | 28 |
|
29 |
"* |
|
30 |
* lefthanders can use: |
|
31 |
*" |
|
25 | 32 |
"/ Screen buttonTranslation:#(#menu #menu #select). |
5 | 33 |
! |
34 |
||
35 |
"* |
|
7 | 36 |
* define extensions for image files (i.e. extension-to-readerClass |
37 |
* mappings). Some of the readers are autoloaded (see patches file). |
|
38 |
* Moved this from code to here (from Image-class), for more flexibility |
|
5 | 39 |
* actually since this is not display- but host specific (naming conventions) |
40 |
* it should be moved into the host.rc or h_xxx.rc file |
|
84 | 41 |
* |
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
42 |
* Some readers are optional and therefore, only installed if the |
84 | 43 |
* corresponding Smalltalk class is nonNil; not accessing it as global, |
44 |
* but via a SMalltalk>>at: message - this avoids warning messages |
|
45 |
* during startup, if classes are missing and the globals are undefined. |
|
5 | 46 |
*" |
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
47 |
|formats rdr| |
5 | 48 |
|
49 |
formats := Image fileFormats. |
|
84 | 50 |
rdr := Smalltalk at:#XBMReader ifAbsent:nil. |
51 |
rdr notNil ifTrue:[ |
|
200 | 52 |
Image addReader:rdr suffix:'xbm'. |
53 |
Image addReader:rdr suffix:'bm'. |
|
84 | 54 |
]. |
55 |
rdr := Smalltalk at:#TIFFReader ifAbsent:nil. |
|
56 |
rdr notNil ifTrue:[ |
|
200 | 57 |
Image addReader:rdr suffix:'tif'. |
58 |
Image addReader:rdr suffix:'tiff'. |
|
84 | 59 |
]. |
60 |
rdr := Smalltalk at:#GIFReader ifAbsent:nil. |
|
61 |
rdr notNil ifTrue:[ |
|
200 | 62 |
Image addReader:rdr suffix:'gif'. |
84 | 63 |
]. |
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
64 |
|
84 | 65 |
"/ still to come ... |
7 | 66 |
"/ formats at:'.img' put:IMGReader. |
67 |
"/ formats at:'.IMG' put:IMGReader. |
|
68 |
"/ formats at:'.mac' put:MacPaintReader. |
|
69 |
||
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
70 |
rdr := Smalltalk at:#SunRasterReader ifAbsent:nil. |
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
71 |
rdr notNil ifTrue:[ |
200 | 72 |
Image addReader:rdr suffix:'im8'. |
73 |
Image addReader:rdr suffix:'icon'. |
|
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
74 |
]. |
7 | 75 |
|
84 | 76 |
"/ still to come ... |
7 | 77 |
"/ formats at:'.g3' put:G3FileReader. |
78 |
||
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
79 |
rdr := Smalltalk at:#WindowsIconReader ifAbsent:nil. |
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
80 |
rdr notNil ifTrue:[ |
200 | 81 |
Image addReader:rdr suffix:'bmp'. |
82 |
Image addReader:rdr suffix:'ico'. |
|
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
83 |
]. |
7 | 84 |
|
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
85 |
rdr := Smalltalk at:#JPEGReader ifAbsent:nil. |
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
86 |
rdr notNil ifTrue:[ |
200 | 87 |
Image addReader:rdr suffix:'jpg'. |
88 |
Image addReader:rdr suffix:'jpeg'. |
|
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
89 |
]. |
7 | 90 |
|
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
91 |
rdr := Smalltalk at:#PBMReader ifAbsent:nil. |
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
92 |
rdr notNil ifTrue:[ |
200 | 93 |
Image addReader:rdr suffix:'ppm'. |
94 |
Image addReader:rdr suffix:'pbm'. |
|
95 |
Image addReader:rdr suffix:'pgm'. |
|
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
96 |
]. |
7 | 97 |
|
84 | 98 |
rdr := Smalltalk at:#ST80FormReader ifAbsent:nil. |
99 |
rdr notNil ifTrue:[ |
|
200 | 100 |
Image addReader:rdr suffix:'form'. |
84 | 101 |
]. |
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
102 |
|
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
103 |
rdr := Smalltalk at:#FaceReader ifAbsent:nil. |
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
104 |
rdr notNil ifTrue:[ |
200 | 105 |
Image addReader:rdr suffix:'face'. |
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
106 |
]. |
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
107 |
|
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
108 |
rdr := Smalltalk at:#XPMReader ifAbsent:nil. |
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
109 |
rdr notNil ifTrue:[ |
200 | 110 |
Image addReader:rdr suffix:'xpm'. |
111 |
Image addReader:rdr suffix:'pm'. |
|
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
112 |
]. |
7 | 113 |
|
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
114 |
rdr := Smalltalk at:#PCXReader ifAbsent:nil. |
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
115 |
rdr notNil ifTrue:[ |
200 | 116 |
Image addReader:rdr suffix:'pcx'. |
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
117 |
]. |
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
118 |
|
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
119 |
rdr := Smalltalk at:#TargaReader ifAbsent:nil. |
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
120 |
rdr notNil ifTrue:[ |
200 | 121 |
Image addReader:rdr suffix:'tga'. |
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
122 |
]. |
14 | 123 |
|
84 | 124 |
rdr := Smalltalk at:#XWDReader ifAbsent:nil. |
125 |
rdr notNil ifTrue:[ |
|
200 | 126 |
Image addReader:rdr suffix:'xwd'. |
84 | 127 |
]. |
47 | 128 |
|
48
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
129 |
rdr := Smalltalk at:#BlitImageReader ifAbsent:nil. |
892180489f28
avoid warnings, if ImageReader classes are not available
Claus Gittinger <cg@exept.de>
parents:
47
diff
changeset
|
130 |
rdr notNil ifTrue:[ |
200 | 131 |
Image addReader:rdr suffix:'48x48x1'. |
205 | 132 |
]. |
133 |
||
134 |
rdr := Smalltalk at:#IrisRGBReader ifAbsent:nil. |
|
135 |
rdr notNil ifTrue:[ |
|
136 |
Image addReader:rdr suffix:'rgb'. |
|
137 |
]. |
|
138 |
||
139 |
"/ movie formats - experimanetal and not yet complete |
|
140 |
||
141 |
"/ rdr := Smalltalk at:#FLIImageReader ifAbsent:nil. |
|
142 |
"/ rdr notNil ifTrue:[ |
|
143 |
"/ Image addReader:rdr suffix:'fli'. |
|
144 |
"/ ]. |
|
145 |
||
146 |
"/ rdr := Smalltalk at:#AVIImageReader ifAbsent:nil. |
|
147 |
"/ rdr notNil ifTrue:[ |
|
148 |
"/ Image addReader:rdr suffix:'avi'. |
|
149 |
"/ ]. |
|
150 |
||
5 | 151 |
! |
152 |
||
153 |
"* |
|
154 |
* find out, on what type of display we run |
|
8 | 155 |
* (boy, they should have added this to the x-protocol) |
5 | 156 |
* |
23 | 157 |
* look for a file named 'd_<displayname>.rc' and file it in |
5 | 158 |
*" |
159 |
||
68 | 160 |
|arguments displayVar display displayType s idx| |
5 | 161 |
|
162 |
"find display name from environment or -display argument" |
|
163 |
||
68 | 164 |
arguments := Smalltalk commandLineArguments. |
126 | 165 |
arguments size > 0 ifTrue:[ |
71 | 166 |
idx := arguments indexOf:'-display'. |
167 |
idx ~~ 0 ifTrue:[ |
|
87 | 168 |
displayVar := arguments at:idx + 1. |
126 | 169 |
arguments removeAtIndex:idx+1. |
170 |
arguments removeAtIndex:idx. |
|
71 | 171 |
]. |
172 |
]. |
|
173 |
displayVar isNil ifTrue:[ |
|
5 | 174 |
displayVar := OperatingSystem getEnvironment:'DISPLAY'. |
175 |
]. |
|
176 |
display := displayVar. |
|
177 |
||
178 |
displayVar notNil ifTrue:[ |
|
8 | 179 |
((displayVar startsWith:':0') |
180 |
or:[(displayVar startsWith:'unix:') |
|
181 |
or:[displayVar startsWith:'shm:']]) ifTrue:[ |
|
182 |
"running on a local display" |
|
7 | 183 |
display := OperatingSystem getHostName. |
5 | 184 |
] ifFalse:[ |
7 | 185 |
(displayVar endsWith:':0') ifTrue:[ |
186 |
display := displayVar copyTo:(displayVar size - 2) |
|
187 |
] ifFalse:[ |
|
188 |
(displayVar endsWith:':0.0') ifTrue:[ |
|
189 |
display := displayVar copyTo:(displayVar size - 4) |
|
190 |
] |
|
191 |
] |
|
5 | 192 |
]. |
193 |
display isNil ifTrue:[ |
|
195 | 194 |
'display.rc [warning]: cannot determine display I am running on' errorPrintCR. |
5 | 195 |
] ifFalse:[ |
23 | 196 |
" |
197 |
if there is a corresponding file d_<displayName>.rc ... |
|
25 | 198 |
thats the one to take. |
23 | 199 |
" |
7 | 200 |
s := Smalltalk systemFileStreamFor:('d_' , display , '.rc'). |
201 |
s notNil ifTrue:[ |
|
202 |
displayType := display. |
|
203 |
s close. |
|
204 |
]. |
|
8 | 205 |
|
25 | 206 |
" |
207 |
if the X-server gives some info, |
|
208 |
take that as a base |
|
209 |
" |
|
210 |
displayType isNil ifTrue:[ |
|
121
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
211 |
|serverVendor| |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
212 |
serverVendor := Display serverVendor. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
213 |
|
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
214 |
serverVendor = 'The XFree86 Project, Inc' |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
215 |
ifTrue:[ |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
216 |
displayType := 'xfree' |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
217 |
]. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
218 |
serverVendor = 'Silicon Graphics' |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
219 |
ifTrue:[ |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
220 |
displayType := 'iris' |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
221 |
]. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
222 |
serverVendor = 'International Business Machines' |
25 | 223 |
ifTrue:[ |
224 |
displayType := 'aix' |
|
225 |
]. |
|
226 |
]. |
|
227 |
||
228 |
" |
|
229 |
otherwise ... |
|
230 |
" |
|
7 | 231 |
displayType isNil ifTrue:[ |
23 | 232 |
" |
233 |
just an example - stuff can also be hardwired here ... |
|
234 |
" |
|
7 | 235 |
display notNil ifTrue:[ |
236 |
(display startsWith:'clam') ifTrue:[ |
|
237 |
displayType := 'next' |
|
238 |
]. |
|
239 |
(display startsWith:'porty') ifTrue:[ |
|
240 |
displayType := 'portable' |
|
241 |
]. |
|
242 |
(display startsWith:'blue') ifTrue:[ |
|
243 |
displayType := 'iris' |
|
244 |
]. |
|
245 |
(display startsWith:'sun') ifTrue:[ |
|
246 |
displayType := 'sun' |
|
247 |
]. |
|
248 |
(display startsWith:'hp') ifTrue:[ |
|
249 |
displayType := 'hpux' |
|
250 |
]. |
|
23 | 251 |
" |
252 |
if, in your organization, the display type can |
|
253 |
be deduced from the hostname, |
|
254 |
use something like: |
|
255 |
" |
|
8 | 256 |
"/ (display startsWith:'slsv') ifTrue:[ |
23 | 257 |
"/ "all those machines at SEL are suns" |
8 | 258 |
"/ displayType := 'sun' |
259 |
"/ ]. |
|
23 | 260 |
"/ (display startsWith:'frxt') ifTrue:[ |
261 |
"/ "all those machines at AEG are xterminals" |
|
262 |
"/ displayType := 'xterminal' |
|
263 |
"/ ]. |
|
264 |
"/ (display startsWith:'frlx') ifTrue:[ |
|
265 |
"/ "all those machines at AEG are linux boxes with olwm" |
|
266 |
"/ displayType := 'linux_olwm' |
|
267 |
"/ ]. |
|
7 | 268 |
]. |
269 |
]. |
|
5 | 270 |
]. |
271 |
||
25 | 272 |
" |
273 |
final fallback: take OperatingSystem if we are running a local |
|
274 |
connection. |
|
26 | 275 |
the used name is one of: |
276 |
d_next.rc |
|
277 |
d_iris.rc |
|
278 |
etc. |
|
25 | 279 |
" |
5 | 280 |
displayType isNil ifTrue:[ |
7 | 281 |
"use type of machine smalltalk is running on as default ..." |
5 | 282 |
|
7 | 283 |
(displayVar startsWith:':0') ifTrue:[ |
284 |
displayType := OperatingSystem getSystemType. |
|
285 |
] ifFalse:[ |
|
286 |
(displayVar startsWith:(OperatingSystem getHostName , ':0')) ifTrue:[ |
|
287 |
displayType := OperatingSystem getSystemType. |
|
288 |
] |
|
289 |
] |
|
5 | 290 |
] |
291 |
]. |
|
292 |
||
293 |
"now, if the above mess found something, we have it in displayType; |
|
294 |
fileIn d_<displayType>.rc" |
|
295 |
||
296 |
displayType notNil ifTrue:[ |
|
297 |
(Smalltalk at:#'_ImageDisplayName') ~= displayType ifTrue:[ |
|
120
3cfc91f3bb3c
Set supportsDeepIcons to default value (false), when DisplayType changes
Stefan Vogel <sv@exept.de>
parents:
92
diff
changeset
|
298 |
"Default for supportsDeepIcons is false. |
3cfc91f3bb3c
Set supportsDeepIcons to default value (false), when DisplayType changes
Stefan Vogel <sv@exept.de>
parents:
92
diff
changeset
|
299 |
Set default value only when ImageDisplayName changes |
3cfc91f3bb3c
Set supportsDeepIcons to default value (false), when DisplayType changes
Stefan Vogel <sv@exept.de>
parents:
92
diff
changeset
|
300 |
and d_displayType is called. |
3cfc91f3bb3c
Set supportsDeepIcons to default value (false), when DisplayType changes
Stefan Vogel <sv@exept.de>
parents:
92
diff
changeset
|
301 |
" |
3cfc91f3bb3c
Set supportsDeepIcons to default value (false), when DisplayType changes
Stefan Vogel <sv@exept.de>
parents:
92
diff
changeset
|
302 |
Display supportsDeepIcons:false. |
84 | 303 |
Smalltalk isStandAloneApp ifFalse:[ |
195 | 304 |
('display.rc [info]: trying display setup ''d_' , displayType , '.rc'' ...') infoPrintCR. |
84 | 305 |
]. |
7 | 306 |
Smalltalk fileIn:('d_' , displayType , '.rc') |
5 | 307 |
]. |
308 |
Smalltalk at:#'_ImageDisplayName' put:displayType |
|
309 |
] |
|
310 |
! |
|
311 |
||
312 |
"* |
|
121
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
313 |
* now, this is a nice one: |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
314 |
* |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
315 |
* if the image was saved on a different type of display, ask |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
316 |
* user, if he/she'd like to have the style changed. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
317 |
*" |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
318 |
|depthChange colorChange greyChange reconfigure| |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
319 |
|
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
320 |
depthChange := false. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
321 |
colorChange := false. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
322 |
greyChange := false. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
323 |
|
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
324 |
(Smalltalk includesKey:#'_ImageDisplayDepth') ifTrue:[ |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
325 |
depthChange := ((Smalltalk at:#'_ImageDisplayDepth') ~~ Display depth) |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
326 |
]. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
327 |
(Smalltalk includesKey:#'_ImageDisplayHasColor') ifTrue:[ |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
328 |
colorChange := ((Smalltalk at:#'_ImageDisplayHasColors') ~~ Display hasColors) |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
329 |
]. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
330 |
(Smalltalk includesKey:#'_ImageDisplayHasGreyscales') ifTrue:[ |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
331 |
greyChange := ((Smalltalk at:#'_ImageDisplayHasGreyscales') ~~ Display hasGreyscales) |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
332 |
]. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
333 |
(depthChange or:[colorChange or:[greyChange]]) ifTrue:[ |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
334 |
reconfigure := self confirm:'Display capabilities have changed |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
335 |
|
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
336 |
Do you want to reconfigure the view style ?'. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
337 |
|
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
338 |
reconfigure ifTrue:[ |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
339 |
Display knownViews do:[:aView | |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
340 |
aView notNil ifTrue:[ |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
341 |
aView reinitStyle. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
342 |
] |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
343 |
]. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
344 |
]. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
345 |
]. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
346 |
|
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
347 |
Smalltalk at:#'_ImageDisplayDepth' put:Display depth. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
348 |
Smalltalk at:#'_ImageDisplayHasColors' put:Display hasColors. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
349 |
Smalltalk at:#'_ImageDisplayHasGreyscales' put:Display hasGreyscales. |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
350 |
! |
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
351 |
|
0974ee733cf4
Move display specific stuff from smalltalk(_r).rc to display.rc.
Stefan Vogel <sv@exept.de>
parents:
120
diff
changeset
|
352 |
"* |
5 | 353 |
* set a default style, if not been set by rc-file |
354 |
* this is set according the system we are running on. |
|
355 |
* Notice: normally, the below is not needed, since the style |
|
356 |
* is always set by the d_xxx.rc file. |
|
357 |
* Except, when the d_xxx.rc is not present. |
|
358 |
*" |
|
359 |
|type| |
|
360 |
||
361 |
View defaultStyle isNil ifTrue:[ |
|
362 |
type := OperatingSystem getSystemType. |
|
363 |
type = 'sunos' ifTrue:[ |
|
7 | 364 |
View defaultStyle:#openwin |
5 | 365 |
]. |
366 |
type = 'next' ifTrue:[ |
|
7 | 367 |
View defaultStyle:#next |
5 | 368 |
]. |
369 |
type = 'iris' ifTrue:[ |
|
7 | 370 |
View defaultStyle:#iris |
5 | 371 |
]. |
372 |
type = 'linux' ifTrue:[ |
|
7 | 373 |
View defaultStyle:#iris |
5 | 374 |
]. |
375 |
type = 'hpux' ifTrue:[ |
|
26 | 376 |
View defaultStyle:#'motif' |
23 | 377 |
]. |
378 |
type = 'ultrix' ifTrue:[ |
|
26 | 379 |
View defaultStyle:#'motif_dec2' |
380 |
]. |
|
381 |
type = 'os2' ifTrue:[ |
|
382 |
View defaultStyle:#'os2' |
|
383 |
]. |
|
212 | 384 |
(type = 'mswindows' |
213 | 385 |
or:[type = 'win32' |
212 | 386 |
or:[type = 'nt' |
213 | 387 |
or:[type = 'win95']]]) ifTrue:[ |
26 | 388 |
View defaultStyle:#'mswindows' |
389 |
]. |
|
8 | 390 |
View defaultStyle isNil ifTrue:[ |
391 |
Display hasGreyscales ifTrue:[ |
|
392 |
View defaultStyle:#iris |
|
393 |
] ifFalse:[ |
|
394 |
View defaultStyle:#normal |
|
395 |
] |
|
396 |
]. |
|
195 | 397 |
'display.rc [info]: no style set - default to ' infoPrint. |
123
a974136fe017
startup infoPrinting suppressable (-q flag)
Claus Gittinger <cg@exept.de>
parents:
121
diff
changeset
|
398 |
View defaultStyle infoPrintCR |
5 | 399 |
] |
400 |
! |