1 "* |
1 "* |
2 * $Header$ |
2 * $Header$ |
3 * |
3 * |
4 * ST/X startup configuration file: |
4 * ST/X startup display configuration file: |
5 * |
5 * |
6 * DONT add site specific things here - use your own d_xxx.rc file instead |
6 * DONT add site specific things here - use your own d_xxx.rc file instead |
7 * where xxx stands for your displays hostname(s) |
7 * where xxx stands for your displays hostname(s) |
8 * |
8 * |
9 * display related configuration: |
9 * display related configuration: |
10 * first do some common setup, then try to find a |
10 * first do some common setup, then try to figure out |
|
11 * the kind of display and find a |
11 * display specific initialization file. |
12 * display specific initialization file. |
12 *" |
13 *" |
13 |
14 |
14 "* |
15 "* |
15 * mouse-button translation |
16 * mouse-button translation |
16 * |
17 * |
17 * (allowed are #select #menu and #paste) |
18 * (currently, allowed are 1 2 and #paste) |
|
19 * 1 - button1; used to select (i.e. left button) |
|
20 * 2 - button2; pops up a menu (i.e. middle button) |
|
21 * #paste - paste the clipBoard contents |
18 * |
22 * |
19 * the following line puts paste onto the right button (as in xterm): |
23 * the following line puts paste onto the right button (as in xterm): |
20 *" |
24 *" |
21 "/ Screen buttonTranslation:#(select #menu #paste). |
25 Screen buttonTranslation:#(1 2 #paste). |
22 |
26 |
23 "* |
27 "* |
24 * while that one puts the pop-up menu both on the middle and right buttons: |
28 * while that one puts the pop-up menu both on the middle and right buttons: |
25 *" |
29 *" |
26 "/ Screen buttonTranslation:#(select #menu #menu). |
|
27 Screen buttonTranslation:#(1 2 2). |
30 Screen buttonTranslation:#(1 2 2). |
28 |
31 |
29 "* |
32 "* |
30 * lefthanders can use: |
33 * lefthanders can use: |
31 *" |
34 *" |
32 "/ Screen buttonTranslation:#(#menu #menu #select). |
35 "/ Screen buttonTranslation:#(2 2 1). |
33 ! |
36 ! |
34 |
37 |
35 "* |
38 "* |
36 * define extensions for image files (i.e. extension-to-readerClass |
39 * define extensions for image files (i.e. extension-to-readerClass |
37 * mappings). Some of the readers are autoloaded (see patches file). |
40 * mappings). Some of the readers are autoloaded (see patches file). |
136 rdr := Smalltalk at:#IrisRGBReader ifAbsent:nil. |
139 rdr := Smalltalk at:#IrisRGBReader ifAbsent:nil. |
137 rdr notNil ifTrue:[ |
140 rdr notNil ifTrue:[ |
138 MIMETypes defineImageType:'image/x-rgb' suffix:'rgb' reader:rdr. |
141 MIMETypes defineImageType:'image/x-rgb' suffix:'rgb' reader:rdr. |
139 ]. |
142 ]. |
140 |
143 |
141 "/ experimanetal and not yet delivered |
144 "/ experimanetal and not yet finished / delivered |
142 |
145 |
143 "/ rdr := Smalltalk at:#PNGReader ifAbsent:nil. |
146 "/ rdr := Smalltalk at:#PNGReader ifAbsent:nil. |
144 "/ rdr notNil ifTrue:[ |
147 "/ rdr notNil ifTrue:[ |
145 "/ MIMETypes defineImageType:'image/x-png' suffix:'png' reader:rdr. |
148 "/ MIMETypes defineImageType:'image/x-png' suffix:'png' reader:rdr. |
146 "/ ]. |
149 "/ ]. |
153 "/ rdr := Smalltalk at:#CMURasterReader ifAbsent:nil. |
156 "/ rdr := Smalltalk at:#CMURasterReader ifAbsent:nil. |
154 "/ rdr notNil ifTrue:[ |
157 "/ rdr notNil ifTrue:[ |
155 "/ MIMETypes defineImageType:'image/x-cmu-raster' suffix:'ras' reader:rdr. |
158 "/ MIMETypes defineImageType:'image/x-cmu-raster' suffix:'ras' reader:rdr. |
156 "/ ]. |
159 "/ ]. |
157 |
160 |
158 "/ movie formats - experimanetal and not yet complete |
161 "/ movie formats - experimanetal and not yet complete / finished / delivered |
159 |
162 |
160 "/ rdr := Smalltalk at:#FLIReader ifAbsent:nil. |
163 "/ rdr := Smalltalk at:#FLIReader ifAbsent:nil. |
161 "/ rdr notNil ifTrue:[ |
164 "/ rdr notNil ifTrue:[ |
162 "/ MIMETypes defineImageType:'video/x-fli' suffix:'fli' reader:rdr. |
165 "/ MIMETypes defineImageType:'video/x-fli' suffix:'fli' reader:rdr. |
163 "/ ]. |
166 "/ ]. |
280 displayType isNil ifTrue:[ |
283 displayType isNil ifTrue:[ |
281 " |
284 " |
282 just an example - stuff can also be hardwired here ... |
285 just an example - stuff can also be hardwired here ... |
283 " |
286 " |
284 display notNil ifTrue:[ |
287 display notNil ifTrue:[ |
285 (display startsWith:'clam') ifTrue:[ |
288 " |
286 displayType := 'next' |
289 if, in your organization, all displays are of the |
287 ]. |
290 same type, |
288 (display startsWith:'porty') ifTrue:[ |
291 use something like: |
289 displayType := 'portable' |
292 " |
290 ]. |
293 "/ OperatingSystem getDomainName = '<yourDomain>.de' ifTrue:[ |
291 (display startsWith:'blue') ifTrue:[ |
294 "/ displayType := 'myDisplayType' |
292 displayType := 'iris' |
295 "/ ]. |
293 ]. |
296 |
294 (display startsWith:'sun') ifTrue:[ |
|
295 displayType := 'sun' |
|
296 ]. |
|
297 (display startsWith:'hp') ifTrue:[ |
|
298 displayType := 'hpux' |
|
299 ]. |
|
300 " |
297 " |
301 if, in your organization, the display type can |
298 if, in your organization, the display type can |
302 be deduced from the hostname, |
299 be deduced from the hostname, |
303 use something like: |
300 use something like: |
|
301 (take the exept code below as a guide ...) |
304 " |
302 " |
305 "/ (display startsWith:'slsv') ifTrue:[ |
303 "/ (display startsWith:'slsv') ifTrue:[ |
306 "/ "all those machines at SEL are suns" |
304 "/ "all those machines at SEL are suns" |
307 "/ displayType := 'sun' |
305 "/ displayType := 'sun' |
308 "/ ]. |
306 "/ ]. |
312 "/ ]. |
310 "/ ]. |
313 "/ (display startsWith:'frlx') ifTrue:[ |
311 "/ (display startsWith:'frlx') ifTrue:[ |
314 "/ "all those machines at AEG are linux boxes with olwm" |
312 "/ "all those machines at AEG are linux boxes with olwm" |
315 "/ displayType := 'linux_olwm' |
313 "/ displayType := 'linux_olwm' |
316 "/ ]. |
314 "/ ]. |
|
315 |
|
316 OperatingSystem getDomainName = 'exept.de' ifTrue:[ |
|
317 (display startsWith:'clam') ifTrue:[ |
|
318 displayType := 'next' |
|
319 ]. |
|
320 (display startsWith:'porty') ifTrue:[ |
|
321 displayType := 'portable' |
|
322 ]. |
|
323 (display startsWith:'blue') ifTrue:[ |
|
324 displayType := 'iris' |
|
325 ]. |
|
326 (display startsWith:'sun') ifTrue:[ |
|
327 displayType := 'sun' |
|
328 ]. |
|
329 (display startsWith:'sol') ifTrue:[ |
|
330 displayType := 'sun' |
|
331 ]. |
|
332 (display startsWith:'hp') ifTrue:[ |
|
333 displayType := 'hpux' |
|
334 ]. |
|
335 ]. |
317 ]. |
336 ]. |
318 ]. |
337 ]. |
319 ]. |
338 ]. |
320 |
339 |
321 " |
340 " |
444 View defaultStyle:#'mswindows95' |
463 View defaultStyle:#'mswindows95' |
445 ] ifFalse:[ |
464 ] ifFalse:[ |
446 View defaultStyle:#'mswindows' |
465 View defaultStyle:#'mswindows' |
447 ] |
466 ] |
448 ]. |
467 ]. |
|
468 |
|
469 "/ final fallBack ... |
|
470 |
449 View defaultStyle isNil ifTrue:[ |
471 View defaultStyle isNil ifTrue:[ |
450 Display hasGreyscales ifTrue:[ |
472 Display hasGreyscales ifTrue:[ |
451 View defaultStyle:#iris |
473 View defaultStyle:#iris |
452 ] ifFalse:[ |
474 ] ifFalse:[ |
453 View defaultStyle:#normal |
475 View defaultStyle:#normal |