0
|
1 |
"*
|
|
2 |
* $Header$
|
|
3 |
* startup configuration for smalltalk
|
|
4 |
*
|
|
5 |
* everything in here are plain smalltalk expressions
|
|
6 |
* statements with in a group are separated by a period.
|
|
7 |
* each group of statements has to be delimited by an exclamation
|
|
8 |
* character.
|
|
9 |
* avoid exclas in comments (or double them)
|
|
10 |
* nested comments are not allowed - take care.
|
|
11 |
* (this is fileOut-format)
|
|
12 |
*"
|
|
13 |
|
|
14 |
"*
|
|
15 |
* check for display beeing compiled into the system;
|
|
16 |
* if not, enter a simple read-eval-print loop
|
|
17 |
*"
|
|
18 |
Display isNil ifTrue:[
|
|
19 |
'oops - no display' printNewline.
|
|
20 |
Smalltalk readEvalPrint.
|
|
21 |
Smalltalk exit
|
|
22 |
]
|
|
23 |
!
|
|
24 |
|
|
25 |
"*
|
|
26 |
* this makes X-errors to be handled immediately (so you see,
|
|
27 |
* where it occured) but slows down the system soooo muuuucccchhh ..
|
|
28 |
* if commented out, errors will be reported asynchronously.
|
|
29 |
* (I enable this, when things go bad during startup)
|
|
30 |
*"
|
|
31 |
"Display unBuffered"!
|
|
32 |
|
|
33 |
"*
|
|
34 |
* this starts incremental GC earlier
|
|
35 |
* (default is 500000)
|
|
36 |
*"
|
|
37 |
"
|
|
38 |
ObjectMemory incrementalGCLimit:100000
|
|
39 |
"
|
|
40 |
!
|
|
41 |
|
|
42 |
"*
|
|
43 |
* you can override the view style (which is otherwise defined
|
|
44 |
* in the View.rs resource file)
|
|
45 |
*"
|
|
46 |
"View defaultStyle:#iris "
|
|
47 |
"View defaultStyle:#motif "
|
|
48 |
"View defaultStyle:#next "
|
|
49 |
"View defaultStyle:#normal "
|
|
50 |
!
|
|
51 |
|
|
52 |
"*
|
|
53 |
* define the language (you can also set the LANG-shell variable)
|
|
54 |
* (currently only #english and #german are supported)
|
|
55 |
*"
|
|
56 |
"Language := #german"
|
|
57 |
"Language := #english"
|
|
58 |
!
|
|
59 |
|
|
60 |
"*
|
|
61 |
* define how views look
|
|
62 |
* (setting View3D to true is fancy)
|
|
63 |
*"
|
|
64 |
View3D := (Display depth > 1)
|
|
65 |
"View3D := false "
|
|
66 |
!
|
|
67 |
|
|
68 |
"*
|
|
69 |
* dont want the 3rd button
|
|
70 |
* (some x-servers dont produce button2 but button3 events)
|
|
71 |
* this xlates the 3rd button into 2nd button
|
|
72 |
*"
|
|
73 |
XWorkstation buttonTranslation:#(1 2 2) !
|
|
74 |
|
|
75 |
"*
|
|
76 |
* this handles all variant display stuff
|
|
77 |
* (i.e. things which might change, when DISPLAY is set different)
|
|
78 |
*"
|
|
79 |
Smalltalk fileIn:'display.rc'
|
|
80 |
!
|
|
81 |
|
|
82 |
"*
|
|
83 |
* this defines stuff relating to the machine we are running on
|
|
84 |
*"
|
|
85 |
Smalltalk fileIn:'host.rc'
|
|
86 |
!
|
|
87 |
|
|
88 |
"*
|
|
89 |
* start some views ...
|
|
90 |
* you can add all stuff you'd like to come up by default
|
|
91 |
* the first time
|
|
92 |
*"
|
|
93 |
|
|
94 |
"*
|
|
95 |
* start a Transcript
|
|
96 |
*"
|
|
97 |
Stdout showCr:'starting Transcript ...'.
|
|
98 |
"Smalltalk debugOn."
|
|
99 |
TextCollector newTranscript!
|
|
100 |
|
|
101 |
"
|
|
102 |
you can change colors too ..
|
|
103 |
"
|
|
104 |
(View defaultStyle == #iris) ifTrue:[
|
|
105 |
(Display hasColors and:[Display depth > 4]) ifTrue:[
|
|
106 |
Transcript foregroundColor:(Color lightGrey) backgroundColor:(Color red:0 green:0 blue:25);
|
|
107 |
cursorForegroundColor:(Color black) backgroundColor:(Color green);
|
|
108 |
selectionForegroundColor:(Color black) backgroundColor:(Color grey);
|
|
109 |
viewBackground:(Color red:0 green:0 blue:25)
|
|
110 |
] ifFalse:[
|
|
111 |
Transcript foregroundColor:(Color white) backgroundColor:(Color black);
|
|
112 |
cursorForegroundColor:(Color black) backgroundColor:(Color white);
|
|
113 |
selectionForegroundColor:(Color black) backgroundColor:(Color veryLightGrey);
|
|
114 |
viewBackground:(Color black)
|
|
115 |
]
|
|
116 |
]
|
|
117 |
!
|
|
118 |
|
|
119 |
"*
|
|
120 |
* start the Launcher
|
|
121 |
*"
|
|
122 |
Stdout showCr:'starting main-menu ...'.
|
|
123 |
Launcher start!
|
|
124 |
|
|
125 |
"*
|
|
126 |
* start a SystemBrowser
|
|
127 |
* - I dont want one (using Launcher)
|
|
128 |
*"
|
|
129 |
"
|
|
130 |
SystemBrowser start
|
|
131 |
"
|
|
132 |
!
|
|
133 |
|
|
134 |
"*
|
|
135 |
* start a FileBrowser
|
|
136 |
* - I dont want one (using Launcher)
|
|
137 |
*"
|
|
138 |
"
|
|
139 |
FileBrowser start
|
|
140 |
"
|
|
141 |
!
|
|
142 |
|
|
143 |
"*
|
|
144 |
* start a Workspace
|
|
145 |
* - I dont want one (using Launcher)
|
|
146 |
*"
|
|
147 |
"
|
|
148 |
Workspace start
|
|
149 |
"
|
|
150 |
!
|
|
151 |
|
|
152 |
|
|
153 |
"*
|
|
154 |
* if things go very badly, turn on message tracing ...
|
|
155 |
*"
|
|
156 |
"
|
|
157 |
Smalltalk debugOn.
|
|
158 |
"
|
|
159 |
"*
|
|
160 |
* if error occurs, and debugger has problems coming up
|
|
161 |
*"
|
|
162 |
"
|
|
163 |
" "
|
|
164 |
Debugger := MiniDebugger.
|
|
165 |
" "
|
|
166 |
!
|
|
167 |
|
|
168 |
"*
|
|
169 |
* see smalltalk_r.rc for what this is for ...
|
|
170 |
*"
|
|
171 |
Smalltalk at:#'_ImageDisplayDepth' put:Display depth.
|
|
172 |
Smalltalk at:#'_ImageDisplayHasColors' put:Display hasColors.
|
|
173 |
Smalltalk at:#'_ImageDisplayHasGreyscales' put:Display hasGreyscales.
|
|
174 |
!
|