author | Claus Gittinger <cg@exept.de> |
Wed, 24 Apr 1996 10:42:05 +0200 | |
changeset 503 | 94b826e911b2 |
parent 500 | 6824f44e589b |
child 505 | a7f41006fb0b |
permissions | -rw-r--r-- |
88 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
86 | 12 |
|
13 |
ApplicationModel subclass:#NewLauncher |
|
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
14 |
instanceVariableNames:'myMenu buttonPanel transcript infoView infoProcess helpIsOn' |
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
15 |
classVariableNames:'CachedAboutIcon' |
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
16 |
poolDictionaries:'' |
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
17 |
category:'Interface-Smalltalk' |
86 | 18 |
! |
19 |
||
88 | 20 |
!NewLauncher class methodsFor:'documentation'! |
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
25 |
All Rights Reserved |
|
26 |
||
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
105 | 36 |
customization |
37 |
" |
|
38 |
Of course, it is possible to change the NewLauncher class itself |
|
39 |
as appropriate, however, we suggest you create a subclass (say MyLauncher), |
|
40 |
define it as autoloaded in the patches file, and redefined some methods |
|
41 |
there. That way, your changes are easier to reintroduce in case of |
|
42 |
an ST/X upgrade. |
|
43 |
||
44 |
||
45 |
adding more buttons to the button-panel: |
|
46 |
||
47 |
see the method #buttonPanelSpec; |
|
48 |
it defines a list of selectors and icons, which is used by |
|
49 |
#setupButtonPanelIn:. |
|
50 |
There, for each entry, a button with that icon is created, |
|
51 |
which sends a selector-message to the launcher. |
|
52 |
||
53 |
Add entries to that list, and define appropriate methods. |
|
54 |
For example, to add a button which opens a drawTool, |
|
55 |
change #buttonPanelSpec to: |
|
56 |
||
57 |
buttonPanelSpec |
|
58 |
^ #( |
|
59 |
#(startSystemBrowser 'SBrowser32x32.xbm') |
|
60 |
#(startFileBrowser 'FBrowser32x32.xbm') |
|
61 |
#(nil nil) |
|
62 |
#(startChangesBrowser 'CBrowser32x32.xbm') |
|
63 |
#(nil nil) |
|
64 |
#(nil nil) |
|
65 |
#(startDrawTool 'DrawTool.xbm') |
|
66 |
) |
|
67 |
||
68 |
the panel adjusts its height as appropriate - you may want to |
|
69 |
create new (small) icons for a good look. |
|
70 |
||
71 |
adding an entry to a menu: |
|
72 |
||
73 |
see the #setupMenu method; either add another top-menu, or |
|
74 |
add entries to an existing menu. |
|
88 | 75 |
" |
219 | 76 |
! |
77 |
||
78 |
documentation |
|
79 |
" |
|
80 |
a new launcher, combining old Launchers menu and transcript into |
|
81 |
one view. (you no longer have to move two views around all the time ...). |
|
82 |
||
83 |
Also, this app makes first use of the new compatibility framework; |
|
84 |
you will notice, that this is a subclass of ApplicationModel. |
|
85 |
New applications will no longer be built as subclasses of standardSystemView. |
|
86 |
" |
|
88 | 87 |
! ! |
88 |
||
86 | 89 |
!NewLauncher class methodsFor:'defaults'! |
90 |
||
91 |
aboutIcon |
|
92 |
|image| |
|
93 |
||
94 |
CachedAboutIcon notNil ifTrue:[^ CachedAboutIcon]. |
|
95 |
||
96 |
image := Image fromFile:'SmalltalkX.xbm'. |
|
92 | 97 |
image notNil ifTrue:[ |
86 | 98 |
|green dark| |
99 |
||
100 |
Display hasColors ifTrue:[ |
|
105 | 101 |
green := (Color red:0 green:80 blue:20) "darkened". |
86 | 102 |
dark := Color grey:10. |
102 | 103 |
image photometric:#palette. |
86 | 104 |
] ifFalse:[ |
100 | 105 |
dark := Color black. |
106 |
green := Color white. |
|
102 | 107 |
image photometric:#blackIs0. |
86 | 108 |
]. |
102 | 109 |
image colorMap:(Array with:dark with:green). |
144 | 110 |
"/ Display depth > 2 ifTrue:[ |
111 |
"/ image := (Image implementorForDepth:Display depth) fromImage:image. |
|
112 |
"/ ] |
|
86 | 113 |
]. |
114 |
CachedAboutIcon := image. |
|
115 |
^ image |
|
116 |
||
117 |
" |
|
92 | 118 |
CachedAboutIcon := nil. |
119 |
NewLauncher aboutIcon |
|
120 |
" |
|
144 | 121 |
|
122 |
"Modified: 20.10.1995 / 21:54:58 / cg" |
|
219 | 123 |
! |
124 |
||
368 | 125 |
buttonImageSize |
490 | 126 |
"images in buttonPanel are sized to this. |
127 |
Can be redefined in subclasses to return nil (no scaling) |
|
128 |
or any other useful size" |
|
129 |
||
130 |
^ 32@32 |
|
131 |
||
132 |
"Modified: 19.4.1996 / 16:36:17 / cg" |
|
368 | 133 |
! |
134 |
||
219 | 135 |
smallAboutIcon |
136 |
|image| |
|
137 |
||
138 |
image := self aboutIcon. |
|
139 |
image notNil ifTrue:[ |
|
140 |
image := image magnifiedBy:0.4. |
|
141 |
]. |
|
142 |
^ image |
|
143 |
||
144 |
" |
|
145 |
CachedAboutIcon := nil. |
|
146 |
NewLauncher aboutIcon. |
|
147 |
NewLauncher smallAboutIcon. |
|
148 |
" |
|
149 |
! ! |
|
150 |
||
151 |
!NewLauncher methodsFor:'actions - about & help'! |
|
152 |
||
153 |
about |
|
154 |
|box| |
|
155 |
||
156 |
box := AboutBox new. |
|
157 |
box autoHideAfter:10 with:[]. |
|
158 |
box showAtCenter |
|
159 |
! |
|
160 |
||
161 |
showDocumentation:aRelativeDocFilePath |
|
162 |
" |
|
163 |
although that one is not yet finished, |
|
164 |
its better than nothing ... |
|
165 |
" |
|
166 |
XtHTML notNil ifTrue:[ |
|
167 |
" |
|
168 |
temporary kludge; |
|
169 |
not all machines can autoload binaries; |
|
170 |
however, on my SGI (which can) we want it |
|
171 |
to load automatically. |
|
172 |
" |
|
173 |
XtHTML isLoaded ifFalse:[ |
|
174 |
(OperatingSystem getSystemType = 'iris') ifTrue:[ |
|
175 |
ErrorSignal catch:[XtHTML autoload] |
|
176 |
] |
|
177 |
]. |
|
178 |
XtHTML isLoaded ifTrue:[ |
|
179 |
XtHTML openFullOnDocumentationFile:aRelativeDocFilePath. |
|
180 |
^ self |
|
181 |
]. |
|
182 |
]. |
|
183 |
||
184 |
self warn:'Sorry, the ST/X HTML reader is not (yet) |
|
185 |
included in this architectures release. |
|
186 |
||
187 |
Please use Mosaic, netscape, chimera or any |
|
188 |
other HTML viewer to see the documentation. |
|
189 |
||
190 |
The documentation is found in the ''doc/online'' directory.'. |
|
191 |
||
192 |
"Modified: 31.8.1995 / 13:11:08 / claus" |
|
193 |
! |
|
194 |
||
496 | 195 |
startClassDocumentation |
196 |
self showDocumentation:'classDoc/TOP.html' |
|
197 |
||
198 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
199 |
"Created: 22.4.1996 / 21:03:56 / cg" |
|
200 |
! |
|
201 |
||
483 | 202 |
startDocumentationIndex |
203 |
self showDocumentation:'index.html' |
|
204 |
||
205 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
206 |
"Created: 17.4.1996 / 22:08:55 / cg" |
|
207 |
! |
|
208 |
||
219 | 209 |
startDocumentationTool |
210 |
self showDocumentation:'TOP.html' |
|
211 |
||
212 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
213 |
! |
|
214 |
||
215 |
toggleActiveHelp:aBoolean |
|
216 |
ActiveHelp notNil ifTrue:[ |
|
217 |
helpIsOn := aBoolean. |
|
218 |
helpIsOn ifTrue:[ |
|
219 |
ActiveHelp start |
|
220 |
] ifFalse:[ |
|
221 |
ActiveHelp stop |
|
222 |
] |
|
223 |
]. |
|
224 |
! ! |
|
225 |
||
226 |
!NewLauncher methodsFor:'actions - classes'! |
|
227 |
||
228 |
browseImplementors |
|
229 |
|enterBox| |
|
230 |
||
231 |
enterBox := EnterBox title:(resources at:'Browse implementors of:') withCRs. |
|
232 |
enterBox okText:(resources at:'browse'). |
|
233 |
enterBox action:[:selectorName | |
|
234 |
|cls| |
|
235 |
||
236 |
self withWaitCursorDo:[SystemBrowser browseImplementorsOf:selectorName] |
|
237 |
]. |
|
238 |
enterBox showAtPointer |
|
239 |
! |
|
240 |
||
241 |
browseSenders |
|
242 |
|enterBox| |
|
243 |
||
244 |
enterBox := EnterBox title:(resources at:'Browse senders of:') withCRs. |
|
245 |
enterBox okText:(resources at:'browse'). |
|
246 |
enterBox action:[:selectorName | |
|
247 |
|cls| |
|
248 |
||
249 |
self withWaitCursorDo:[SystemBrowser browseAllCallsOn:selectorName] |
|
250 |
]. |
|
251 |
enterBox showAtPointer |
|
252 |
! |
|
253 |
||
254 |
startChangesBrowser |
|
255 |
self withWaitCursorDo:[ChangesBrowser open] |
|
256 |
! |
|
257 |
||
258 |
startClassBrowser |
|
259 |
SystemBrowser askThenBrowseClass |
|
260 |
! |
|
261 |
||
262 |
startClassHierarchyBrowser |
|
263 |
SystemBrowser askThenBrowseClassHierarchy |
|
264 |
! |
|
265 |
||
266 |
startClassTreeView |
|
267 |
self withWaitCursorDo:[ClassTreeGraphView open] |
|
268 |
! |
|
269 |
||
270 |
startFileBrowser |
|
271 |
self withWaitCursorDo:[FileBrowser open] |
|
272 |
! |
|
273 |
||
274 |
startFullClassBrowser |
|
275 |
SystemBrowser askThenBrowseFullClassProtocol |
|
276 |
! |
|
277 |
||
490 | 278 |
startJavaBrowser |
279 |
JavaBrowser notNil ifTrue:[ |
|
280 |
self withWaitCursorDo:[JavaBrowser open] |
|
281 |
] |
|
282 |
||
283 |
"Created: 18.4.1996 / 15:55:44 / cg" |
|
284 |
"Modified: 19.4.1996 / 16:39:08 / cg" |
|
285 |
! |
|
286 |
||
219 | 287 |
startSystemBrowser |
288 |
self withWaitCursorDo:[SystemBrowser open] |
|
289 |
! |
|
290 |
||
291 |
startWorkspace |
|
292 |
Workspace open |
|
293 |
! ! |
|
294 |
||
295 |
!NewLauncher methodsFor:'actions - demos'! |
|
296 |
||
297 |
openDemo:className |
|
298 |
(Smalltalk at:className) open |
|
299 |
||
300 |
! |
|
301 |
||
302 |
startTetris |
|
303 |
Tetris open |
|
304 |
! |
|
305 |
||
306 |
startTicTacToe |
|
307 |
TicTacToeGame open |
|
308 |
! |
|
309 |
||
310 |
startTicTacToe2 |
|
311 |
TicTacToeGame open2UserGame |
|
312 |
! ! |
|
313 |
||
314 |
!NewLauncher methodsFor:'actions - file'! |
|
315 |
||
316 |
exit |
|
317 |
(self confirm:(resources string:'Are you certain you want to exit without saving ?')) |
|
318 |
ifTrue:[ |
|
319 |
self saveAllViews. |
|
320 |
Smalltalk exit |
|
321 |
] |
|
322 |
! |
|
323 |
||
324 |
objectModuleDialog |
|
325 |
|allModules moduleNames |
|
326 |
allObjects methodObjects methodNames |
|
327 |
box l unloadButton |
|
328 |
list1 list2 listView1 listView2 |
|
329 |
y panel showBuiltIn showModules showMethods moduleListUpdater check| |
|
330 |
||
331 |
showBuiltIn := true asValue. |
|
332 |
showModules := ObjectFileLoader notNil asValue. |
|
333 |
showMethods := ObjectFileLoader notNil asValue. |
|
334 |
||
335 |
moduleListUpdater := Plug new. |
|
336 |
moduleListUpdater |
|
458 | 337 |
respondTo:#getModules |
338 |
with:[ |
|
339 |
|l| |
|
219 | 340 |
|
458 | 341 |
l := Array new. |
342 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
|
343 |
allModules := ObjectMemory binaryModuleInfo asOrderedCollection. |
|
344 |
(showBuiltIn value and:[showModules value]) ifFalse:[ |
|
345 |
allModules := allModules select:[:i | |
|
346 |
|wantToSee| |
|
219 | 347 |
|
458 | 348 |
wantToSee := (i at:#dynamic). |
349 |
showBuiltIn value ifTrue:[ |
|
350 |
wantToSee := wantToSee not |
|
351 |
]. |
|
352 |
wantToSee |
|
353 |
] |
|
354 |
]. |
|
355 |
"/ sorting by reverse id brings newest ones to the top (a side effect) |
|
356 |
allModules sort:[:a :b | (a at:#id) > (b at:#id)]. |
|
357 |
moduleNames := allModules collect:[:entry | (entry at:#name)]. |
|
358 |
l := l , moduleNames. |
|
359 |
]. |
|
360 |
showMethods value ifTrue:[ |
|
361 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
362 |
methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray. |
|
363 |
methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[ |
|
364 |
'compiled method - removed' , ' (in ' , mH pathName , ')' |
|
365 |
] ifFalse:[ |
|
366 |
'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')' |
|
367 |
]. |
|
368 |
]. |
|
369 |
l := l , methodNames. |
|
370 |
]. |
|
371 |
list1 list:l. |
|
372 |
unloadButton disable. |
|
373 |
]. |
|
219 | 374 |
|
375 |
list1 := SelectionInList new. |
|
376 |
list2 := SelectionInList new. |
|
377 |
||
378 |
showBuiltIn onChangeSend:#getModules to:moduleListUpdater. |
|
379 |
showModules onChangeSend:#getModules to:moduleListUpdater. |
|
380 |
showMethods onChangeSend:#getModules to:moduleListUpdater. |
|
381 |
||
382 |
box := Dialog new. |
|
383 |
box label:(resources string:'Module dialog'). |
|
384 |
||
385 |
listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
386 |
listView1 model:list1. |
|
387 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
388 |
listView1 action:[:sel | |
|
458 | 389 |
|info classNames tabs| |
219 | 390 |
|
467
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
391 |
box withWaitCursorDo:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
392 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
393 |
info := allModules at:sel ifAbsent:nil. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
394 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
395 |
info isNil ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
396 |
"/ selected a method |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
397 |
list2 list:#(). |
458 | 398 |
unloadButton enable. |
399 |
] ifFalse:[ |
|
467
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
400 |
"/ selected a package |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
401 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
402 |
tabs := TabulatorSpecification unit:#inch positions:#(0 2.6). |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
403 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
404 |
"/ fill bottom list with class-info |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
405 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
406 |
classNames := (info at:#classNames) asSortedCollection. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
407 |
classNames := classNames collect:[:cName | |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
408 |
|cls entry rev listEntry| |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
409 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
410 |
listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
411 |
listEntry colAt:1 put:cName. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
412 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
413 |
cls := Smalltalk classNamed:cName. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
414 |
cls isNil ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
415 |
listEntry colAt:2 put:'(class removed)'. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
416 |
] ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
417 |
rev := cls binaryRevision. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
418 |
rev notNil ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
419 |
cls isLoaded ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
420 |
entry := '(stub for: ' , rev. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
421 |
] ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
422 |
entry :='(bin: ' , rev. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
423 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
424 |
cls revision ~= rev ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
425 |
entry := entry , ' / src: ' , cls revision |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
426 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
427 |
listEntry colAt:2 put:entry , ')' |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
428 |
] ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
429 |
cls revision notNil ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
430 |
listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
431 |
] |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
432 |
] |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
433 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
434 |
listEntry |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
435 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
436 |
list2 list:classNames. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
437 |
(info at:#dynamic) ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
438 |
unloadButton enable. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
439 |
] ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
440 |
unloadButton disable. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
441 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
442 |
] |
458 | 443 |
] |
219 | 444 |
]. |
445 |
||
446 |
panel := HorizontalPanelView new. |
|
447 |
||
245 | 448 |
panel add:(l := Label label:'modules shown:'). |
219 | 449 |
l adjust:#left; borderWidth:0. |
347 | 450 |
panel add:(check := CheckBox label:'builtin' model:showBuiltIn). |
451 |
box makeTabable:check. |
|
219 | 452 |
panel add:(check := CheckBox label:'modules' model:showModules). |
347 | 453 |
ObjectFileLoader isNil ifTrue:[ |
458 | 454 |
check disable |
347 | 455 |
] ifFalse:[ |
458 | 456 |
box makeTabable:check. |
347 | 457 |
]. |
219 | 458 |
panel add:(check := CheckBox label:'methods' model:showMethods). |
347 | 459 |
ObjectFileLoader isNil ifTrue:[ |
458 | 460 |
check disable |
347 | 461 |
] ifFalse:[ |
458 | 462 |
box makeTabable:check. |
347 | 463 |
]. |
219 | 464 |
|
465 |
panel horizontalLayout:#fitSpace. |
|
458 | 466 |
"/ panel horizontalLayout:#leftSpace. |
219 | 467 |
|
347 | 468 |
box addComponent:panel tabable:false. |
219 | 469 |
|
347 | 470 |
box addVerticalSpace. |
219 | 471 |
box addComponent:listView1 tabable:true. |
472 |
listView1 topInset:(View viewSpacing + panel preferredExtent y). |
|
473 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
474 |
||
475 |
l := box addTextLabel:(resources string:'contained classes/subsets:'). |
|
476 |
l adjust:#left; borderWidth:0. |
|
477 |
l origin:0.0@0.4 corner:1.0@0.4. |
|
478 |
l topInset:(View viewSpacing). |
|
479 |
l bottomInset:((l preferredExtent y) negated - View viewSpacing). |
|
480 |
||
481 |
listView2 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
482 |
listView2 model:list2; printItems:false. |
|
483 |
box addComponent:listView2 tabable:true. |
|
484 |
listView2 origin:0.0@0.4 corner:1.0@1.0. "/ ; inset:2. |
|
485 |
listView2 disable. |
|
486 |
||
487 |
unloadButton := Button label:(resources string:'unload'). |
|
488 |
unloadButton action:[ |
|
458 | 489 |
self withWaitCursorDo:[ |
490 |
box withWaitCursorDo:[ |
|
491 |
|info idx pathName| |
|
219 | 492 |
|
458 | 493 |
idx := list1 selectionIndex. |
494 |
info := allModules at:idx ifAbsent:nil. |
|
219 | 495 |
|
458 | 496 |
info isNil ifTrue:[ |
497 |
"/ selected a method |
|
498 |
idx := idx - allModules size. |
|
499 |
pathName := (methodObjects at:idx) pathName. |
|
219 | 500 |
|
458 | 501 |
] ifFalse:[ |
502 |
"/ selected a package |
|
503 |
pathName := (info at:#pathName). |
|
504 |
]. |
|
505 |
ObjectFileLoader unloadObjectFile:pathName. |
|
506 |
moduleListUpdater getModules. |
|
507 |
unloadButton disable. |
|
508 |
] |
|
509 |
] |
|
219 | 510 |
]. |
511 |
moduleListUpdater getModules. |
|
512 |
||
513 |
box addButton:unloadButton. |
|
514 |
box addAbortButtonLabelled:(resources string:'close'). |
|
515 |
||
516 |
y := box yPosition. |
|
517 |
listView2 topInset:(l preferredExtent y + 5). |
|
518 |
listView2 bottomInset:(box preferredExtent y - y). |
|
519 |
||
458 | 520 |
"/ box width:(400 min:(box device width * 2 // 3)); |
521 |
"/ height:(450 min:(box device height - 50)); |
|
522 |
"/ sizeFixed:true. |
|
219 | 523 |
box showAtPointer. |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
524 |
box destroy. |
219 | 525 |
|
526 |
"Modified: 17.9.1995 / 16:47:50 / claus" |
|
467
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
527 |
"Modified: 6.4.1996 / 23:56:46 / cg" |
219 | 528 |
! |
529 |
||
530 |
snapshot |
|
531 |
|saveBox| |
|
532 |
||
533 |
saveBox := EnterBox title:(resources at:'filename for image:') withCRs. |
|
534 |
saveBox okText:(resources at:'save'). |
|
535 |
saveBox action:[:fileName | |
|
404 | 536 |
(ObjectMemory snapShotOn:fileName) ifFalse:[ |
537 |
" |
|
538 |
snapshot failed for some reason (disk full, no permission etc.) |
|
539 |
" |
|
540 |
self warn:(resources string:'failed to save snapshot image (disk full or not writable)'). |
|
541 |
] |
|
219 | 542 |
]. |
543 |
||
544 |
saveBox initialText:(ObjectMemory nameForSnapshot). |
|
404 | 545 |
saveBox label:(resources string:'save image'). |
219 | 546 |
saveBox showAtPointer |
547 |
||
404 | 548 |
"Modified: 27.2.1996 / 01:15:44 / cg" |
219 | 549 |
! |
550 |
||
551 |
snapshotAndExit |
|
552 |
|saveBox| |
|
553 |
||
554 |
saveBox := EnterBox title:(resources at:'filename for image:') withCRs. |
|
555 |
saveBox okText:(resources at:'save & exit'). |
|
556 |
saveBox action:[:fileName | |
|
404 | 557 |
(ObjectMemory snapShotOn:fileName) ifFalse:[ |
558 |
" |
|
559 |
snapshot failed for some reason (disk full, no permission etc.) |
|
560 |
Do NOT exit in this case. |
|
561 |
" |
|
562 |
self warn:(resources string:'failed to save snapshot image (disk full or not writable)'). |
|
563 |
] ifTrue:[ |
|
564 |
" |
|
565 |
saveAllViews tells all views to shutdown neatly |
|
566 |
(i.e. offer a chance to save the contents to a file). |
|
219 | 567 |
|
404 | 568 |
This is NOT required - all data should be in the snapshot ... |
569 |
... however, if remote disks/mountable filesystems are involved, |
|
570 |
which may not be present the next time, it may make sense to |
|
571 |
uncomment it and query for saving - time will show which is better. |
|
572 |
" |
|
219 | 573 |
" |
404 | 574 |
self saveAllViews. |
219 | 575 |
" |
404 | 576 |
Smalltalk exit |
577 |
] |
|
219 | 578 |
]. |
579 |
||
580 |
saveBox initialText:(ObjectMemory nameForSnapshot). |
|
404 | 581 |
saveBox label:(resources string:'save image & exit'). |
219 | 582 |
saveBox showAtPointer |
583 |
||
404 | 584 |
"Modified: 27.2.1996 / 01:14:15 / cg" |
219 | 585 |
! ! |
586 |
||
587 |
!NewLauncher methodsFor:'actions - goodies'! |
|
588 |
||
589 |
startCalendar |
|
590 |
Calendar open |
|
591 |
! |
|
592 |
||
593 |
startClock |
|
594 |
RoundClock open |
|
595 |
! |
|
596 |
||
597 |
startMailTool |
|
598 |
MailView open |
|
599 |
! |
|
600 |
||
601 |
startNewsTool |
|
602 |
NewsView open |
|
603 |
! ! |
|
604 |
||
605 |
!NewLauncher methodsFor:'actions - projects'! |
|
606 |
||
607 |
newProject |
|
608 |
Project notNil ifTrue:[ |
|
609 |
(ProjectView for:(Project new)) open |
|
610 |
] |
|
611 |
! |
|
612 |
||
613 |
selectProject |
|
614 |
|list box| |
|
615 |
||
616 |
Project notNil ifTrue:[ |
|
617 |
list := Project allInstances. |
|
618 |
box := ListSelectionBox new. |
|
619 |
box list:(list collect:[:p | p name]). |
|
620 |
box title:(resources string:'select a project'). |
|
621 |
box action:[:selection | |
|
622 |
|project| |
|
623 |
||
624 |
project := list detect:[:p | p name = selection] ifNone:[nil]. |
|
625 |
project isNil ifTrue:[ |
|
626 |
Transcript showCr:'no such project.' |
|
627 |
] ifFalse:[ |
|
628 |
project showViews. |
|
629 |
Project current:project |
|
630 |
] |
|
631 |
]. |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
632 |
box showAtPointer. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
633 |
box destroy |
219 | 634 |
] |
86 | 635 |
! ! |
636 |
||
219 | 637 |
!NewLauncher methodsFor:'actions - settings'! |
638 |
||
639 |
compilerSettings |
|
640 |
|box warnings warnSTX warnUnderscore warnOldStyle allowUnderscore immutableArrays |
|
641 |
warnSTXBox warnUnderscoreBox warnOldStyleBox |
|
642 |
stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
643 |
stcLibraries historyLines sourceMode catchRedefs keepSourceOptions keepSource |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
644 |
foldConstants constantFoldingOptions constantFolding |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
645 |
warnEnabler check component oldIndent| |
219 | 646 |
|
647 |
warnings := Compiler warnings asValue. |
|
648 |
||
649 |
warnSTX := Compiler warnSTXSpecials asValue. |
|
650 |
warnUnderscore := Compiler warnUnderscoreInIdentifier asValue. |
|
651 |
warnOldStyle := Compiler warnOldStyleAssignment asValue. |
|
652 |
allowUnderscore := Compiler allowUnderscoreInIdentifier asValue. |
|
653 |
immutableArrays := Compiler arraysAreImmutable asValue. |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
654 |
|
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
655 |
constantFoldingOptions := #( nil #level1 #level2 #full ). |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
656 |
constantFolding := SelectionInList new list:(resources array:#('disabled' 'level1 (always safe)' 'level2 (usually safe)' 'full')). |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
657 |
constantFolding selectionIndex:3. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
658 |
|
219 | 659 |
stcCompilationOptions := #( always default never). |
660 |
stcCompilation := SelectionInList new list:(resources array:#('always' 'primitive code only' 'never')). |
|
661 |
stcCompilation selectionIndex:2. |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
662 |
|
219 | 663 |
stcIncludes := Compiler stcCompilationIncludes asValue. |
664 |
stcDefines := Compiler stcCompilationDefines asValue. |
|
665 |
stcOptions := Compiler stcCompilationOptions asValue. |
|
232 | 666 |
ObjectFileLoader notNil ifTrue:[ |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
667 |
stcLibraries := (String fromStringCollection:ObjectFileLoader searchedLibraries separatedBy:' ') asValue. |
232 | 668 |
]. |
219 | 669 |
|
670 |
catchRedefs := Class catchMethodRedefinitions asValue. |
|
671 |
historyLines := (HistoryManager notNil and:[HistoryManager isActive]) asValue. |
|
672 |
||
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
673 |
keepSourceOptions := #( keep reference absReference sourceReference discard ). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
674 |
keepSource := SelectionInList new list:(resources array:#('keep as string' 'reference to filename' 'reference to full path' 'append and ref in `st.src''' 'discard' )). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
675 |
keepSource selectionIndex:1. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
676 |
|
219 | 677 |
warnEnabler := Plug new. |
678 |
warnEnabler |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
679 |
respondTo:#check |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
680 |
with:[warnings value ifTrue:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
681 |
warnSTXBox enable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
682 |
warnOldStyleBox enable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
683 |
allowUnderscore value ifTrue:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
684 |
warnUnderscoreBox enable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
685 |
] ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
686 |
warnUnderscoreBox disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
687 |
]. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
688 |
] ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
689 |
warnSTXBox disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
690 |
warnUnderscoreBox disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
691 |
warnOldStyleBox disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
692 |
]]. |
219 | 693 |
|
694 |
warnings onChangeSend:#check to:warnEnabler. |
|
695 |
allowUnderscore onChangeSend:#check to:warnEnabler. |
|
696 |
||
697 |
box := DialogBox new. |
|
698 |
box label:(resources string:'Compiler settings'). |
|
699 |
||
700 |
box addCheckBox:(resources string:'catch method redefinitions') on:catchRedefs. |
|
701 |
check := box addCheckBox:(resources string:'keep history line in methods') on:historyLines. |
|
702 |
HistoryManager isNil ifTrue:[check disable]. |
|
703 |
||
378 | 704 |
box addPopUpList:(resources string:'fileIn source mode:') on:keepSource. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
705 |
keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
706 |
|
219 | 707 |
box addHorizontalLine. |
708 |
||
232 | 709 |
ObjectFileLoader notNil ifTrue:[ |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
710 |
compilationList := box addPopUpList:(resources string:'compilation to machine code') on:stcCompilation. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
711 |
stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2). |
219 | 712 |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
713 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
714 |
addLabelledInputField:(resources string:'stc include directories:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
715 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
716 |
on:stcIncludes |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
717 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
718 |
separateAtX:0.5. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
719 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
720 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
721 |
"/ y := box yPosition. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
722 |
"/ component := box addTextLabel:(resources string:'stc include directories:'). |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
723 |
"/ component width:0.5; adjust:#right; borderWidth:0. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
724 |
"/ box yPosition:y. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
725 |
"/ component := box addInputFieldOn:stcIncludes tabable:true. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
726 |
"/ component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
219 | 727 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
728 |
box addVerticalSpace. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
729 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
730 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
731 |
addLabelledInputField:(resources string:'stc defines:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
732 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
733 |
on:stcDefines |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
734 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
735 |
separateAtX:0.5. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
736 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
737 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
738 |
"/ y := box yPosition. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
739 |
"/ component := box addTextLabel:'stc defines:'. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
740 |
"/ component width:0.5; adjust:#right; borderWidth:0. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
741 |
"/ box yPosition:y. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
742 |
"/ component := box addInputFieldOn:stcDefines tabable:true. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
743 |
"/ component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
219 | 744 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
745 |
box addVerticalSpace. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
746 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
747 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
748 |
addLabelledInputField:(resources string:'stc options:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
749 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
750 |
on:stcOptions |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
751 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
752 |
separateAtX:0.5. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
753 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
754 |
"/ y := box yPosition. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
755 |
"/ component := box addTextLabel:'stc options:'. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
756 |
"/ component width:0.5; adjust:#right; borderWidth:0. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
757 |
"/ box yPosition:y. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
758 |
"/ component := box addInputFieldOn:stcOptions tabable:true. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
759 |
"/ component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
219 | 760 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
761 |
box addVerticalSpace. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
762 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
763 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
764 |
addLabelledInputField:(resources string:'stc C-libraries:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
765 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
766 |
on:stcLibraries |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
767 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
768 |
separateAtX:0.5. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
769 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
770 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
771 |
"/ y := box yPosition. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
772 |
"/ component := box addTextLabel:'stc C-libraries:'. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
773 |
"/ component width:0.5; adjust:#right; borderWidth:0. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
774 |
"/ box yPosition:y. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
775 |
"/ component := box addInputFieldOn:stcLibraries tabable:true. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
776 |
"/ component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
219 | 777 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
778 |
box addVerticalSpace. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
779 |
box addHorizontalLine. |
219 | 780 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
781 |
"/ if there is no compiler around, |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
782 |
"/ change to compile nothing, and disable the checkBoxes |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
783 |
Compiler canCreateMachineCode ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
784 |
stcCompilation selectionIndex:3. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
785 |
compilationList disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
786 |
]. |
219 | 787 |
]. |
788 |
||
378 | 789 |
box addPopUpList:(resources string:'constant folding:') on:constantFolding. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
790 |
constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1). |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
791 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
792 |
box addVerticalSpace. |
219 | 793 |
box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore. |
794 |
box addVerticalSpace. |
|
795 |
box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays. |
|
796 |
box addHorizontalLine. |
|
797 |
||
798 |
box addCheckBox:(resources string:'warnings') on:warnings. |
|
799 |
box addVerticalSpace. |
|
343 | 800 |
oldIndent := box leftIndent. |
219 | 801 |
box leftIndent:30. |
802 |
warnSTXBox := box addCheckBox:(resources string:'ST/X language extensions') on:warnSTX. |
|
803 |
box addVerticalSpace. |
|
804 |
warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore. |
|
805 |
box addVerticalSpace. |
|
806 |
warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle. |
|
807 |
box addVerticalSpace. |
|
343 | 808 |
box leftIndent:oldIndent. |
219 | 809 |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
810 |
box |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
811 |
addHelpButtonFor:'NewLauncher/compilerSettings.html'; |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
812 |
addAbortButton; |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
813 |
addOkButton. |
219 | 814 |
|
815 |
warnEnabler check. |
|
816 |
box showAtPointer. |
|
817 |
||
818 |
box accepted ifTrue:[ |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
819 |
HistoryManager notNil ifTrue:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
820 |
historyLines value ifTrue:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
821 |
HistoryManager activate |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
822 |
] ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
823 |
HistoryManager deactivate |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
824 |
]. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
825 |
]. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
826 |
Class catchMethodRedefinitions:catchRedefs value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
827 |
ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
828 |
Compiler warnings:warnings value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
829 |
Compiler warnSTXSpecials:warnSTX value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
830 |
Compiler warnOldStyleAssignment:warnOldStyle value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
831 |
Compiler warnUnderscoreInIdentifier:warnUnderscore value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
832 |
Compiler allowUnderscoreInIdentifier:allowUnderscore value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
833 |
Compiler arraysAreImmutable:immutableArrays value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
834 |
Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
835 |
Compiler stcCompilationIncludes:stcIncludes value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
836 |
Compiler stcCompilationDefines:stcDefines value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
837 |
Compiler stcCompilationOptions:stcOptions value. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
838 |
Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex). |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
839 |
ObjectFileLoader notNil ifTrue:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
840 |
ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
841 |
] |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
842 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
843 |
box destroy |
219 | 844 |
|
845 |
"Modified: 10.9.1995 / 19:19:18 / claus" |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
846 |
"Modified: 13.4.1996 / 13:51:37 / cg" |
219 | 847 |
! |
848 |
||
398 | 849 |
fontSettings |
406 | 850 |
(self fontBoxForEncoding:nil) ifTrue:[ |
851 |
self reopenLauncher. |
|
852 |
] |
|
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
853 |
|
398 | 854 |
"Created: 26.2.1996 / 22:52:51 / cg" |
406 | 855 |
"Modified: 27.2.1996 / 02:05:05 / cg" |
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
856 |
! |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
857 |
|
219 | 858 |
keyboardSetting |
859 |
|mappings listOfRawKeys listOfFunctions |
|
860 |
box l |
|
861 |
list1 list2 listView1 listView2 |
|
862 |
frame selectionForwarder macroForwarder macroTextView y| |
|
863 |
||
864 |
mappings := Screen current keyboardMap. |
|
865 |
||
866 |
listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort. |
|
867 |
listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort. |
|
868 |
||
869 |
selectionForwarder := Plug new. |
|
870 |
selectionForwarder respondTo:#showFunction |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
871 |
with:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
872 |
|raw| |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
873 |
raw := list1 selection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
874 |
list2 retractInterestsFor:selectionForwarder. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
875 |
list2 selection:(mappings at:raw asSymbol) asString. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
876 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
877 |
]. |
219 | 878 |
selectionForwarder respondTo:#showRawKey |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
879 |
with:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
880 |
|f raw| |
219 | 881 |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
882 |
f := list2 selection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
883 |
list1 retractInterestsFor:selectionForwarder. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
884 |
raw := mappings keyAtValue:f asString. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
885 |
raw isNil ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
886 |
raw := mappings keyAtValue:f first. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
887 |
raw isNil ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
888 |
raw := mappings keyAtValue:f asSymbol. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
889 |
] |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
890 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
891 |
list1 selection:raw. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
892 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
893 |
]. |
219 | 894 |
|
895 |
macroForwarder := Plug new. |
|
896 |
macroForwarder respondTo:#showMacro |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
897 |
with:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
898 |
|f macro indent| |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
899 |
f := list2 selection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
900 |
(f startsWith:'Cmd') ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
901 |
f := f copyFrom:4 |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
902 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
903 |
macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
904 |
macro notNil ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
905 |
macro := macro asStringCollection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
906 |
indent := macro |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
907 |
inject:99999 into:[:min :element | |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
908 |
|stripped| |
219 | 909 |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
910 |
stripped := element withoutLeadingSeparators. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
911 |
stripped size == 0 ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
912 |
min |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
913 |
] ifFalse:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
914 |
min min:(element size - stripped size) |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
915 |
] |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
916 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
917 |
indent ~~ 0 ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
918 |
macro := macro collect:[:line | |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
919 |
line size > indent ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
920 |
line copyFrom:indent+1 |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
921 |
] ifFalse:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
922 |
line |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
923 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
924 |
] |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
925 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
926 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
927 |
macroTextView contents:macro. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
928 |
]. |
219 | 929 |
|
930 |
list1 := SelectionInList with:listOfRawKeys. |
|
931 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
|
932 |
list2 := SelectionInList with:listOfFunctions. |
|
933 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
|
934 |
list2 onChangeSend:#showMacro to:macroForwarder. |
|
935 |
||
936 |
box := Dialog new. |
|
937 |
box label:(resources string:'Keyboard mappings'). |
|
938 |
||
939 |
l := box addTextLabel:(resources string:'KEY_MSG') withCRs. |
|
940 |
l adjust:#left; borderWidth:0. |
|
941 |
||
942 |
frame := View new. |
|
943 |
frame extent:300 @ 300. |
|
944 |
frame borderWidth:0. |
|
945 |
||
946 |
listView1 := ScrollableView for:SelectionInListView in:frame. |
|
947 |
listView1 model:list1. |
|
948 |
listView1 origin:0.0@0.0 corner:0.5@1.0; inset:2. |
|
949 |
||
950 |
listView2 := ScrollableView for:SelectionInListView in:frame. |
|
951 |
listView2 model:list2. |
|
952 |
listView2 origin:0.5@0.0 corner:1.0@1.0; inset:2. |
|
953 |
||
954 |
frame topInset:box yPosition. |
|
955 |
box addComponent:frame withExtent:350@200. |
|
956 |
box makeTabable:listView1. |
|
957 |
box makeTabable:listView2. |
|
958 |
frame origin:0.0@0.0 corner:1.0@0.6. |
|
959 |
||
960 |
box addVerticalSpace. |
|
961 |
||
962 |
l := box addTextLabel:(resources string:'Macro text (if any):') withCRs. |
|
963 |
l adjust:#left; borderWidth:0. |
|
964 |
l origin:0.0@0.6 corner:1.0@0.6. |
|
965 |
l topInset:(View viewSpacing). |
|
966 |
l bottomInset:(l preferredExtent y negated - View viewSpacing). |
|
967 |
||
968 |
macroTextView := HVScrollableView for:TextView miniScroller:true. |
|
969 |
box addComponent:macroTextView tabable:true. |
|
970 |
macroTextView origin:0.0@0.6 corner:1.0@1.0. |
|
971 |
y := box yPosition. |
|
972 |
||
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
973 |
box |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
974 |
addHelpButtonFor:'NewLauncher/keyboardSetting.html'; |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
975 |
"addAbortButton;" |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
976 |
addOkButton. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
977 |
|
219 | 978 |
macroTextView topInset:(l preferredExtent y + 5). |
979 |
macroTextView bottomInset:(box preferredExtent y - y). |
|
980 |
||
981 |
box showAtPointer. |
|
982 |
||
983 |
box accepted ifTrue:[ |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
984 |
"no action yet ..." |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
985 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
986 |
box destroy |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
987 |
|
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
988 |
"Modified: 2.3.1996 / 16:59:14 / cg" |
219 | 989 |
! |
990 |
||
991 |
languageSetting |
|
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
992 |
|listOfLanguages translatedLanguages idx language box| |
219 | 993 |
|
994 |
" |
|
410 | 995 |
get list of supported languages from the launchers resources ... |
219 | 996 |
" |
410 | 997 |
listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default'). |
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
998 |
translatedLanguages := resources array:listOfLanguages. |
219 | 999 |
|
1000 |
box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs. |
|
1001 |
box label:(resources string:'Language selection'). |
|
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
1002 |
box list:translatedLanguages. |
219 | 1003 |
box initialText:(Language). |
1004 |
box action:[:newLanguage | |
|
410 | 1005 |
self withWaitCursorDo:[ |
1006 |
Transcript showCr:'change language to ' , newLanguage , ' ...'. |
|
1007 |
idx := translatedLanguages indexOf:newLanguage withoutSeparators. |
|
1008 |
idx ~~ 0 ifTrue:[ |
|
1009 |
language := listOfLanguages at:idx |
|
1010 |
] ifFalse:[ |
|
1011 |
language := newLanguage |
|
1012 |
]. |
|
1013 |
Smalltalk at:#Language put:language asSymbol. |
|
1014 |
Smalltalk changed:#Language. |
|
1015 |
ResourcePack flushCachedResourcePacks |
|
1016 |
]. |
|
1017 |
self reopenLauncher. |
|
219 | 1018 |
]. |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1019 |
box |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1020 |
addHelpButtonFor:'NewLauncher/languageSetting.html'. |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1021 |
box showAtPointer. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1022 |
box destroy |
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
1023 |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1024 |
"Modified: 2.3.1996 / 16:59:37 / cg" |
219 | 1025 |
! |
1026 |
||
341 | 1027 |
memorySettings |
1028 |
|box check igcLimit igcFreeLimit igcFreeAmount newSpaceSize |
|
440 | 1029 |
compressLimit |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1030 |
oldIncr component fields| |
341 | 1031 |
|
1032 |
"/ |
|
1033 |
"/ extract relevant system settings ... |
|
1034 |
"/ |
|
1035 |
igcLimit := ObjectMemory incrementalGCLimit asValue. |
|
1036 |
igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue. |
|
1037 |
igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue. |
|
1038 |
newSpaceSize := ObjectMemory newSpaceSize asValue. |
|
1039 |
oldIncr := ObjectMemory oldSpaceIncrement asValue. |
|
440 | 1040 |
compressLimit := ObjectMemory oldSpaceCompressLimit asValue. |
341 | 1041 |
|
1042 |
"/ |
|
1043 |
"/ create a box on those values ... |
|
1044 |
"/ |
|
1045 |
fields := OrderedCollection new. |
|
1046 |
||
1047 |
box := DialogBox new. |
|
1048 |
box label:(resources string:'Memory manager settings'). |
|
1049 |
||
345 | 1050 |
box addTextLabel:'Warning - invalid settings may result in poor performance. |
341 | 1051 |
|
1052 |
You have been warned.'. |
|
1053 |
box addHorizontalLine. |
|
1054 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1055 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1056 |
addLabelledInputField:(resources string:'size of newSpace:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1057 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1058 |
on:newSpaceSize |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1059 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1060 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1061 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1062 |
component converter:(PrintConverter new initForNumber). |
341 | 1063 |
fields add:component. |
1064 |
||
1065 |
box addHorizontalLine. |
|
1066 |
||
1067 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1068 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1069 |
addLabelledInputField:(resources string:'incremental GC allocation trigger:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1070 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1071 |
on:igcLimit |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1072 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1073 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1074 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1075 |
component converter:(PrintConverter new initForNumber). |
341 | 1076 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1077 |
|
345 | 1078 |
box addTextLabel:'(start IGC whenever this amount has been allocated)'. |
341 | 1079 |
box addHorizontalLine. |
1080 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1081 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1082 |
addLabelledInputField:(resources string:'incremental GC freespace trigger:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1083 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1084 |
on:igcFreeLimit |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1085 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1086 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1087 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1088 |
component converter:(PrintConverter new initForNumber). |
341 | 1089 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1090 |
|
341 | 1091 |
box addTextLabel:'(start IGC whenever freespace drops below this)'. |
1092 |
box addHorizontalLine. |
|
1093 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1094 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1095 |
addLabelledInputField:(resources string:'incremental GC amount:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1096 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1097 |
on:igcFreeAmount |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1098 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1099 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1100 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1101 |
component converter:(PrintConverter new initForNumber). |
341 | 1102 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1103 |
|
345 | 1104 |
box addTextLabel:'(try to keep this amount for peak requests)'. |
341 | 1105 |
box addHorizontalLine. |
1106 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1107 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1108 |
addLabelledInputField:(resources string:'oldspace increment:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1109 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1110 |
on:oldIncr |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1111 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1112 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1113 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1114 |
component converter:(PrintConverter new initForNumber). |
341 | 1115 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1116 |
|
345 | 1117 |
box addTextLabel:'(increase oldSpace in chunks of this size)'. |
341 | 1118 |
box addHorizontalLine. |
1119 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1120 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1121 |
addLabelledInputField:(resources string:'oldspace compress limit:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1122 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1123 |
on:compressLimit |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1124 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1125 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1126 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1127 |
component converter:(PrintConverter new initForNumber). |
440 | 1128 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1129 |
|
440 | 1130 |
box addTextLabel:'(suppress compressing GC if more memory is in use)'. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1131 |
box addHorizontalLine. |
440 | 1132 |
|
341 | 1133 |
box addAbortButton; addOkButton. |
1134 |
||
1135 |
"/ |
|
1136 |
"/ show the box ... |
|
1137 |
"/ |
|
1138 |
box showAtPointer. |
|
1139 |
||
1140 |
"/ |
|
1141 |
"/ update system settings |
|
1142 |
"/ |
|
1143 |
box accepted ifTrue:[ |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1144 |
fields do:[:comp | comp accept]. |
341 | 1145 |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1146 |
igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1147 |
ObjectMemory freeSpaceGCAmount:igcFreeAmount value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1148 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1149 |
igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1150 |
ObjectMemory freeSpaceGCLimit:igcFreeLimit value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1151 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1152 |
igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1153 |
ObjectMemory incrementalGCLimit:igcLimit value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1154 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1155 |
newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1156 |
ObjectMemory newSpaceSize:newSpaceSize value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1157 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1158 |
oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1159 |
ObjectMemory oldSpaceIncrement:oldIncr value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1160 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1161 |
ObjectMemory oldSpaceCompressLimit:compressLimit value. |
341 | 1162 |
]. |
1163 |
box destroy |
|
1164 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1165 |
"Modified: 13.4.1996 / 13:51:23 / cg" |
341 | 1166 |
! |
1167 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1168 |
messageSettings |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1169 |
|box vmInfo vmErrors displayErrors classInfos| |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1170 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1171 |
vmInfo := ObjectMemory infoPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1172 |
vmErrors := ObjectMemory debugPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1173 |
classInfos := Object infoPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1174 |
displayErrors := DeviceWorkstation errorPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1175 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1176 |
box := DialogBox new. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1177 |
box label:(resources string:'Messages'). |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1178 |
"/ box extent:200@300. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1179 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1180 |
box addCheckBox:(resources string:'VM info messages') on:vmInfo. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1181 |
box addCheckBox:(resources string:'VM error messages') on:vmErrors. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1182 |
box addHorizontalLine. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1183 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1184 |
box addCheckBox:(resources string:'Display error messages (Xlib, Xtlib ...)') on:displayErrors. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1185 |
box addCheckBox:(resources string:'Other info messages') on:classInfos. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1186 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1187 |
box addAbortButton; addOkButton. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1188 |
box showAtPointer. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1189 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1190 |
box accepted ifTrue:[ |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1191 |
ObjectMemory infoPrinting:vmInfo value. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1192 |
ObjectMemory debugPrinting:vmErrors value. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1193 |
Object infoPrinting:classInfos value. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1194 |
DeviceWorkstation errorPrinting:displayErrors value. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1195 |
]. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1196 |
box destroy |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1197 |
! |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1198 |
|
219 | 1199 |
miscSettings |
327 | 1200 |
|box check logDoits shadows updChanges changeFileName returnFocus |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1201 |
loadBinaries compileLazy hostNameInLabel useManager localSourceFirst |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1202 |
showAccelerators sourceCacheDir cacheEntry |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1203 |
component localCheck oldIndent nm fn| |
219 | 1204 |
|
249 | 1205 |
"/ |
1206 |
"/ extract relevant system settings ... |
|
1207 |
"/ |
|
219 | 1208 |
logDoits := Smalltalk logDoits asValue. |
1209 |
shadows := PopUpView shadows asValue. |
|
1210 |
hostNameInLabel := StandardSystemView includeHostNameInLabel asValue. |
|
327 | 1211 |
returnFocus := Dialog returnFocusWhenClosingModalBoxes asValue. |
219 | 1212 |
updChanges := Class updatingChanges asValue. |
1213 |
changeFileName := ObjectMemory nameForChanges asValue. |
|
249 | 1214 |
useManager := (Smalltalk at:#SourceCodeManager) notNil asValue. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1215 |
localSourceFirst := Class tryLocalSourceFirst asValue. |
420
2c169931d1ab
allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents:
410
diff
changeset
|
1216 |
showAccelerators := MenuView showAcceleratorKeys asValue. |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1217 |
sourceCacheDir := nil asValue. |
219 | 1218 |
|
1219 |
loadBinaries := Smalltalk loadBinaries asValue. |
|
1220 |
compileLazy := Autoload compileLazy asValue. |
|
1221 |
||
249 | 1222 |
"/ |
1223 |
"/ create a box on those values ... |
|
1224 |
"/ |
|
219 | 1225 |
box := DialogBox new. |
1226 |
box label:(resources string:'Other settings'). |
|
1227 |
||
1228 |
box addCheckBox:(resources string:'log compiles in changes file') on:updChanges. |
|
1229 |
box addCheckBox:(resources string:'log doIts in changes file') on:logDoits. |
|
249 | 1230 |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1231 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1232 |
addLabelledInputField:(resources string:'change file name:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1233 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1234 |
on:changeFileName |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1235 |
tabable:true |
492 | 1236 |
separateAtX:0.4. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1237 |
component immediateAccept:true; acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1238 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1239 |
"/ y := box yPosition. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1240 |
"/ component := box addTextLabel:(resources string:'change file name:'). |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1241 |
"/ component width:0.5; adjust:#right; borderWidth:0. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1242 |
"/ box yPosition:y. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1243 |
"/ component := box addInputFieldOn:changeFileName tabable:true. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1244 |
"/ component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false. |
219 | 1245 |
|
1246 |
box addHorizontalLine. |
|
1247 |
||
1248 |
box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy. |
|
1249 |
check := box addCheckBox:(resources string:'if present, load binary objects when autoloading') on:loadBinaries. |
|
1250 |
ObjectFileLoader isNil ifTrue:[ |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1251 |
loadBinaries value:false. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1252 |
check disable |
219 | 1253 |
]. |
249 | 1254 |
|
250 | 1255 |
check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager. |
343 | 1256 |
oldIndent := box leftIndent. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1257 |
box leftIndent:30. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1258 |
localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst. |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1259 |
localCheck enableChannel:useManager. |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1260 |
|
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1261 |
cacheEntry := box |
493 | 1262 |
addLabelledInputField:(resources string:'source cache dir:') |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1263 |
adjust:#right |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1264 |
on:sourceCacheDir |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1265 |
tabable:true |
492 | 1266 |
separateAtX:0.4. |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1267 |
cacheEntry immediateAccept:true; acceptOnLeave:false. |
343 | 1268 |
box leftIndent:oldIndent. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1269 |
|
249 | 1270 |
(AbstractSourceCodeManager isNil |
1271 |
or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[ |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1272 |
useManager value:false. |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1273 |
cacheEntry disable. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1274 |
check disable. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1275 |
localCheck value:true. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1276 |
"/ localCheck disable |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1277 |
] ifFalse:[ |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1278 |
sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName). |
249 | 1279 |
]. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1280 |
|
219 | 1281 |
box addHorizontalLine. |
1282 |
||
1283 |
box addCheckBox:(resources string:'shadows under popup views') on:shadows. |
|
327 | 1284 |
box addCheckBox:(resources string:'boxes return focus to previously active view') on:returnFocus. |
219 | 1285 |
box addCheckBox:(resources string:'hostname in window labels') on:hostNameInLabel. |
443 | 1286 |
box addCheckBox:(resources string:'show accelerator keys in menus') on:showAccelerators. |
219 | 1287 |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1288 |
box |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1289 |
addHelpButtonFor:'NewLauncher/miscSettings.html'; |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1290 |
addAbortButton; |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1291 |
addOkButton. |
249 | 1292 |
|
1293 |
"/ |
|
1294 |
"/ show the box ... |
|
1295 |
"/ |
|
219 | 1296 |
box showAtPointer. |
1297 |
||
249 | 1298 |
"/ |
1299 |
"/ update system settings |
|
1300 |
"/ |
|
219 | 1301 |
box accepted ifTrue:[ |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1302 |
Smalltalk logDoits:logDoits value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1303 |
PopUpView shadows:shadows value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1304 |
Class updateChanges:updChanges value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1305 |
Autoload compileLazy:compileLazy value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1306 |
Smalltalk loadBinaries:loadBinaries value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1307 |
StandardSystemView includeHostNameInLabel:hostNameInLabel value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1308 |
ObjectMemory nameForChanges:changeFileName value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1309 |
Dialog returnFocusWhenClosingModalBoxes:returnFocus value. |
420
2c169931d1ab
allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents:
410
diff
changeset
|
1310 |
MenuView showAcceleratorKeys:showAccelerators value. |
327 | 1311 |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1312 |
useManager value ifTrue:[ |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1313 |
(Smalltalk at:#SourceCodeManager) isNil ifTrue:[ |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1314 |
Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager) |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1315 |
]. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1316 |
Class tryLocalSourceFirst:(localSourceFirst value). |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1317 |
nm := sourceCacheDir value. |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1318 |
(fn := nm asFilename) exists ifFalse:[ |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1319 |
(self confirm:(nm , ' does not exists\create ?' withCRs)) ifTrue:[ |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1320 |
fn makeDirectory; |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1321 |
makeReadableForAll; |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1322 |
makeWritableForAll; |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1323 |
makeExecutableForAll. |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1324 |
] |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1325 |
]. |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1326 |
(fn exists |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1327 |
and:[fn isDirectory |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1328 |
and:[fn isReadable |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1329 |
and:[fn isWritable]]]) ifTrue:[ |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1330 |
AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value). |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1331 |
] |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1332 |
] ifFalse:[ |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1333 |
Smalltalk at:#SourceCodeManager put:nil |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1334 |
] |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1335 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1336 |
box destroy |
219 | 1337 |
|
493 | 1338 |
"Modified: 19.4.1996 / 18:20:19 / cg" |
219 | 1339 |
! |
1340 |
||
347 | 1341 |
printerSettings |
1342 |
|box |
|
1343 |
possiblePrinters possibleTypes printerType printCommand printerList |
|
499
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1344 |
check y component oldIndent commandList| |
347 | 1345 |
|
1346 |
possiblePrinters := PrinterStream withAllSubclasses asArray. |
|
1347 |
possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName]. |
|
1348 |
||
1349 |
printerType := SelectionInList new list:(resources array:possibleTypes). |
|
1350 |
printerType selectionIndex:(possiblePrinters identityIndexOf:Printer). |
|
1351 |
printCommand := Printer printCommand asValue. |
|
1352 |
||
1353 |
box := DialogBox new. |
|
1354 |
box label:(resources string:'Printer settings'). |
|
1355 |
||
378 | 1356 |
printerList := box addPopUpList:(resources string:'printer type:') on:printerType. |
347 | 1357 |
|
1358 |
y := box yPosition. |
|
1359 |
component := box addTextLabel:(resources string:'print command:'). |
|
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1360 |
component width:0.3; adjust:#right; borderWidth:0. |
347 | 1361 |
box yPosition:y. |
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1362 |
component := box addComboBoxOn:printCommand tabable:true. |
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1363 |
"/ component := box addInputFieldOn:printCommand tabable:true. |
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1364 |
component width:0.7; left:0.3; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1365 |
"/ some common print commands ... |
499
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1366 |
|
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1367 |
commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil. |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1368 |
commandList isNil ifTrue:[ |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1369 |
commandList := PrinterStream defaultCommands. |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1370 |
commandList isNil ifTrue:[ |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1371 |
commandList := #('lpr' |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1372 |
'lpr -P<your-printer>' |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1373 |
'cat | rsh <printHost> lpr -h' |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1374 |
'cat >xxx ; ghostview xxx' |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1375 |
'cat > printfile' |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1376 |
). |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1377 |
] |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1378 |
]. |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1379 |
|
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1380 |
component list:commandList. |
347 | 1381 |
box addVerticalSpace. |
1382 |
||
1383 |
box addAbortButton; addOkButton. |
|
1384 |
box showAtPointer. |
|
1385 |
||
1386 |
box accepted ifTrue:[ |
|
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1387 |
Printer printCommand:printCommand value. |
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1388 |
Printer := possiblePrinters at:(printerType selectionIndex). |
347 | 1389 |
]. |
1390 |
box destroy |
|
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1391 |
|
499
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1392 |
"Modified: 23.4.1996 / 18:23:47 / cg" |
347 | 1393 |
! |
1394 |
||
219 | 1395 |
viewStyleSetting |
1396 |
|listOfStyles resourceDir dir box |
|
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1397 |
list listView scrView infoLabel infoForwarder newStyle| |
219 | 1398 |
|
1399 |
" |
|
1400 |
search resources directory for a list of .style files ... |
|
1401 |
" |
|
1402 |
||
1403 |
resourceDir := Smalltalk getSystemFileName:'resources'. |
|
1404 |
resourceDir isNil ifTrue:[ |
|
345 | 1405 |
self warn:'no styles found (missing ''resources'' directory)'. |
1406 |
^ self |
|
219 | 1407 |
]. |
1408 |
dir := FileDirectory directoryNamed:resourceDir. |
|
1409 |
||
1410 |
listOfStyles := dir select:[:aFileName | aFileName endsWith:'.style']. |
|
1411 |
listOfStyles := listOfStyles collect:[:aFileName | aFileName copyWithoutLast:6]. |
|
1412 |
listOfStyles sort. |
|
1413 |
||
1414 |
"/ old code: used a standard ListSelectionBox |
|
1415 |
"/ changed to intercept selection and add info-output. |
|
1416 |
||
1417 |
"/ box := ListSelectionBox title:(resources string:'STYLE_MSG') withCRs. |
|
1418 |
"/ box label:(resources string:'Style selection'). |
|
1419 |
"/ box list:listOfStyles. |
|
1420 |
"/ box initialText:View defaultStyle. |
|
1421 |
"/ box selectAction:[:newStyle | |
|
1422 |
"/ ]. |
|
1423 |
"/ box action:[:newStyle | |
|
1424 |
"/ transcript topView withCursor:Cursor wait do:[ |
|
1425 |
"/ Transcript showCr:'change style to ' , newStyle , ' ...'. |
|
1426 |
"/ View defaultStyle:newStyle asSymbol. |
|
1427 |
"/ ] |
|
1428 |
"/ ]. |
|
1429 |
"/ box showAtPointer |
|
1430 |
||
1431 |
"/ new code: build box 'by 'hand' |
|
1432 |
"/ |
|
1433 |
infoForwarder := Plug new. |
|
1434 |
infoForwarder respondTo:#showInfo |
|
345 | 1435 |
with:[ |
1436 |
|nm sheet comment| |
|
1437 |
nm := list selection. |
|
1438 |
sheet := ViewStyle fromFile:(nm , '.style'). |
|
1439 |
comment := sheet at:#comment ifAbsent:''. |
|
1440 |
infoLabel label:comment withCRs asStringCollection |
|
1441 |
]. |
|
219 | 1442 |
|
1443 |
list := SelectionInList with:listOfStyles. |
|
1444 |
list onChangeSend:#showInfo to:infoForwarder. |
|
1445 |
||
1446 |
box := Dialog new. |
|
1447 |
box label:(resources string:'Style selection'). |
|
1448 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1449 |
(box addTextLabel:(resources string:'STYLE_MSG') withCRs) adjust:#left. |
219 | 1450 |
listView := SelectionInListView on:list. |
1451 |
listView doubleClickAction:[:sel | box accept value:true. box hide]. |
|
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1452 |
scrView := box addComponent:(ScrollableView forView:listView) tabable:true. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1453 |
|
219 | 1454 |
box addVerticalSpace. |
1455 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1456 |
(infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft. |
219 | 1457 |
|
1458 |
box addAbortButton; addOkButton. |
|
1459 |
list selection:(View defaultStyle). |
|
1460 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1461 |
box stickAtBottomWithVariableHeight:scrView. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1462 |
box stickAtBottomWithFixHeight:infoLabel. |
219 | 1463 |
box showAtPointer. |
1464 |
||
1465 |
box accepted ifTrue:[ |
|
345 | 1466 |
newStyle := list selection. |
1467 |
newStyle notNil ifTrue:[ |
|
1468 |
self withWaitCursorDo:[ |
|
1469 |
Transcript showCr:'change style to ' , newStyle , ' ...'. |
|
1470 |
View defaultStyle:newStyle asSymbol. |
|
1471 |
]. |
|
1472 |
self reopenLauncher. |
|
1473 |
] |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1474 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1475 |
box destroy |
219 | 1476 |
! ! |
1477 |
||
1478 |
!NewLauncher methodsFor:'actions - tools'! |
|
1479 |
||
1480 |
fullScreenHardcopy |
|
1481 |
"after a second (to allow redraw of views under menu ...), |
|
1482 |
save the contents of the whole screen." |
|
1483 |
||
1484 |
Processor addTimedBlock:[ |
|
1485 |
self saveScreenImage:(Image fromScreen) defaultName:'screen' |
|
1486 |
] afterSeconds:1 |
|
1487 |
! |
|
99 | 1488 |
|
219 | 1489 |
removeAllBreakAndTracePoints |
1490 |
MessageTracer cleanup |
|
1491 |
! |
|
1492 |
||
1493 |
screenHardcopy |
|
1494 |
"after a second (to allow redraw of views under menu ...), |
|
1495 |
let user specify a rectangular area on the screen |
|
1496 |
and save its contents." |
|
1497 |
||
1498 |
|area| |
|
1499 |
||
1500 |
Processor addTimedBlock:[ |
|
1501 |
area := Rectangle fromUser. |
|
1502 |
(area width > 0 and:[area height > 0]) ifTrue:[ |
|
1503 |
self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy' |
|
1504 |
] |
|
1505 |
] afterSeconds:1 |
|
1506 |
! |
|
1507 |
||
1508 |
startEventMonitor |
|
1509 |
EventMonitor open |
|
1510 |
! |
|
1511 |
||
1512 |
startFullWindowTreeView |
|
1513 |
WindowTreeView open |
|
1514 |
! |
|
1515 |
||
1516 |
startMemoryMonitor |
|
1517 |
MemoryMonitor open |
|
1518 |
! |
|
1519 |
||
1520 |
startMemoryUsageView |
|
1521 |
MemoryUsageView open |
|
1522 |
! |
|
1523 |
||
1524 |
startProcessMonitor |
|
1525 |
ProcessMonitor open |
|
1526 |
! |
|
1527 |
||
434 | 1528 |
startStopEventTrace |
503 | 1529 |
|v wg| |
434 | 1530 |
|
1531 |
v := Screen current viewFromUser. |
|
1532 |
v notNil ifTrue:[ |
|
1533 |
v := v topView. |
|
503 | 1534 |
wg := v windowGroup. |
1535 |
wg notNil ifTrue:[ |
|
1536 |
"/ |
|
1537 |
"/ toggle eventTrace in its windowGroup |
|
1538 |
"/ |
|
1539 |
wg traceEvents:(wg preEventHook isNil) |
|
434 | 1540 |
] |
1541 |
] |
|
1542 |
||
1543 |
"Created: 7.3.1996 / 14:44:22 / cg" |
|
503 | 1544 |
"Modified: 24.4.1996 / 10:27:11 / cg" |
434 | 1545 |
! |
1546 |
||
219 | 1547 |
startWindowTreeView |
1548 |
|v| |
|
1549 |
||
1550 |
v := self pickAView. |
|
1551 |
v notNil ifTrue:[ |
|
1552 |
WindowTreeView openOn:v topView |
|
1553 |
] |
|
1554 |
! |
|
1555 |
||
1556 |
viewDestroy |
|
1557 |
"let user pick a view and destroy it. |
|
1558 |
Even allow destroying non-smalltalk views |
|
1559 |
(also for views which I forgot due to some error)" |
|
1560 |
||
1561 |
|device p v id| |
|
1562 |
||
1563 |
(Delay forSeconds:1) wait. |
|
1564 |
||
1565 |
device := Screen current. |
|
1566 |
p := device pointFromUser. |
|
1567 |
id := device viewIdFromPoint:p. |
|
1568 |
v := device viewFromId:id. |
|
1569 |
v notNil ifTrue:[ |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
1570 |
v topView destroy. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
1571 |
^ self |
219 | 1572 |
]. |
1573 |
id = device rootView id ifTrue:[ |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
1574 |
^ self |
219 | 1575 |
]. |
298 | 1576 |
(Dialog confirm:'mhmh, this may not a be smalltalk view\(Or I somehow forgot about it).\Destroy anyway ?' withCRs) |
219 | 1577 |
ifTrue:[ |
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
1578 |
device destroyView:nil withId:id |
219 | 1579 |
]. |
1580 |
||
1581 |
"Modified: 18.9.1995 / 23:13:32 / claus" |
|
298 | 1582 |
"Modified: 14.12.1995 / 22:02:26 / cg" |
219 | 1583 |
! |
1584 |
||
1585 |
viewHardcopy |
|
1586 |
"after a second (to allow redraw of views under menu ...), |
|
1587 |
let user specify a view and save its contents." |
|
1588 |
||
1589 |
Processor addTimedBlock:[ |
|
1590 |
|v| |
|
1591 |
||
1592 |
v := Screen current viewFromUser. |
|
1593 |
v notNil ifTrue:[ |
|
1594 |
self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy' |
|
1595 |
] |
|
1596 |
] afterSeconds:1 |
|
1597 |
! |
|
1598 |
||
1599 |
viewInspect |
|
1600 |
"let user pick a view and inspect it. Only smalltalk views are allowed" |
|
1601 |
||
1602 |
|v| |
|
1603 |
||
1604 |
v := self pickAView. |
|
1605 |
v notNil ifTrue:[ |
|
226 | 1606 |
"/ v topView inspect |
1607 |
v inspect |
|
219 | 1608 |
] |
1609 |
||
1610 |
! ! |
|
1611 |
||
1612 |
!NewLauncher methodsFor:'change & update'! |
|
1613 |
||
1614 |
update:something with:aParameter from:changedObject |
|
1615 |
((something == #currentProject) |
|
1616 |
or:[changedObject == Project]) ifTrue:[ |
|
1617 |
self changed:#info. |
|
1618 |
^ self |
|
1619 |
]. |
|
1620 |
! ! |
|
1621 |
||
1622 |
!NewLauncher methodsFor:'help'! |
|
1623 |
||
1624 |
helpTextFor:aComponent |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1625 |
|sel s buttons| |
219 | 1626 |
|
1627 |
aComponent == transcript ifTrue:[ |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1628 |
s := 'TRANSCRIPT_HELP' |
219 | 1629 |
]. |
1630 |
||
1631 |
aComponent == infoView ifTrue:[ |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1632 |
s := 'INFOVIEW_HELP' |
219 | 1633 |
]. |
1634 |
||
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1635 |
buttons := buttonPanel subViews. |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1636 |
(buttons notNil and:[buttons includes:aComponent]) ifTrue:[ |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1637 |
"kludge: look for its change selector" |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1638 |
sel := aComponent changeMessage. |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1639 |
sel == #startSystemBrowser ifTrue:[ |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1640 |
s := 'SBROWSER_BUTTON_HELP' |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1641 |
]. |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1642 |
sel == #startFileBrowser ifTrue:[ |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1643 |
s := 'FBROWSER_BUTTON_HELP' |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1644 |
]. |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1645 |
sel == #startChangesBrowser ifTrue:[ |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1646 |
s := 'CBROWSER_BUTTON_HELP' |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1647 |
]. |
219 | 1648 |
]. |
1649 |
s notNil ifTrue:[ |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1650 |
^ resources string:s |
219 | 1651 |
]. |
1652 |
^ nil |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1653 |
|
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
1654 |
"Modified: 26.2.1996 / 23:08:19 / cg" |
219 | 1655 |
! ! |
1656 |
||
1657 |
!NewLauncher methodsFor:'infoview update'! |
|
1658 |
||
1659 |
info |
|
1660 |
|project projectName projectDir packageName| |
|
1661 |
||
1662 |
(Project isNil or:[(project := Project current) isNil]) ifTrue:[ |
|
1663 |
projectName := '* none *'. |
|
1664 |
projectDir := '.'. |
|
1665 |
packageName := '* none *'. |
|
1666 |
] ifFalse:[ |
|
1667 |
projectName := project name. |
|
1668 |
projectDir := project directory. |
|
1669 |
packageName := project packageName. |
|
1670 |
]. |
|
1671 |
||
1672 |
^ resources |
|
1673 |
string:'project: ''%1'' fileOut to: ''%3'' package: ''%2''' |
|
1674 |
withArgs:(Array |
|
1675 |
with:projectName |
|
1676 |
with:packageName |
|
1677 |
with:(projectDir contractTo:30)) |
|
319
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1678 |
! |
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1679 |
|
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1680 |
showActivity:someMessage |
500 | 1681 |
"some activityNotification to be forwarded to the user; |
1682 |
show it in the transcript here." |
|
1683 |
||
319
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1684 |
Transcript showCr:someMessage; endEntry |
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1685 |
|
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1686 |
"Created: 23.12.1995 / 12:38:29 / cg" |
500 | 1687 |
"Modified: 23.4.1996 / 21:39:10 / cg" |
99 | 1688 |
! ! |
1689 |
||
93 | 1690 |
!NewLauncher methodsFor:'initialize / release'! |
86 | 1691 |
|
219 | 1692 |
addTopViewsToCurrentProject |
1693 |
"ignored here - the launcher is always global (i.e. not project private)." |
|
1694 |
||
1695 |
^ self |
|
1696 |
! |
|
1697 |
||
1698 |
buttonPanelSpec |
|
1699 |
"return a spec for the buttons in the panel; |
|
1700 |
entries consists of selector and bitmap-filename. |
|
1701 |
nil selectors are taken as separators (see setupButtonPanel)" |
|
98 | 1702 |
|
219 | 1703 |
^ #( |
490 | 1704 |
#(startSystemBrowser 'SBrowser32x32.xbm') |
1705 |
#(startFileBrowser 'FBrowser32x32.xbm') |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1706 |
"/ #(startWorkspace 'Workspace32x32.xbm') |
490 | 1707 |
#(nil nil) |
1708 |
#(startChangesBrowser 'CBrowser32x32.xbm') |
|
219 | 1709 |
"/ #(nil nil) |
1710 |
"/ #(nil nil) |
|
1711 |
"/ #(startDocumentationTool 'book11.ico') |
|
1712 |
) |
|
230 | 1713 |
|
1714 |
"Created: 4.12.1995 / 20:16:18 / cg" |
|
490 | 1715 |
"Modified: 19.4.1996 / 16:37:46 / cg" |
219 | 1716 |
! |
1717 |
||
1718 |
closeRequest |
|
1719 |
(self confirm:(resources string:'really close %1 ?' with:self class name)) ifTrue:[ |
|
1720 |
super closeRequest |
|
1721 |
] |
|
1722 |
! |
|
1723 |
||
1724 |
focusSequence |
|
1725 |
^ (Array with:myMenu) |
|
1726 |
, |
|
1727 |
(buttonPanel subViews select:[:element | element isKindOf:Button]) |
|
1728 |
"/ , (Array with:Transcript) |
|
98 | 1729 |
! |
1730 |
||
93 | 1731 |
openInterface |
98 | 1732 |
"sent by my superclass to open up my interface" |
93 | 1733 |
|
1734 |
|top icn w| |
|
86 | 1735 |
|
1736 |
top := StandardSystemView new. |
|
205 | 1737 |
top label:'Smalltalk/X'; iconLabel:'ST/X Launcher'. |
86 | 1738 |
top extent:(400@300 ). |
1739 |
||
92 | 1740 |
" |
1741 |
temporary kludge for SGI; |
|
1742 |
this will be moved into StandardSystemView and be done |
|
1743 |
automatically soon ... |
|
1744 |
" |
|
106 | 1745 |
Screen current serverVendor = 'Silicon Graphics' ifTrue:[ |
490 | 1746 |
icn := self class aboutIcon. |
1747 |
icn notNil ifTrue:[ |
|
1748 |
icn := icn magnifiedTo:86@68. |
|
1749 |
w := View extent:86@68. "/ icn extent. |
|
1750 |
w viewBackground:icn. |
|
1751 |
top iconView:w |
|
1752 |
] |
|
92 | 1753 |
]. |
1754 |
||
93 | 1755 |
self setupViewsIn:top. |
98 | 1756 |
|
1757 |
top application:self. |
|
86 | 1758 |
|
1759 |
" |
|
92 | 1760 |
open with higher prio to allow interaction even while things |
1761 |
are running ... |
|
86 | 1762 |
" |
92 | 1763 |
top openWithPriority:(Processor userSchedulingPriority + 1). |
490 | 1764 |
|
1765 |
"Modified: 18.4.1996 / 14:56:11 / cg" |
|
93 | 1766 |
! |
86 | 1767 |
|
219 | 1768 |
release |
1769 |
infoProcess notNil ifTrue:[ |
|
1770 |
infoProcess terminate. |
|
1771 |
infoProcess := nil. |
|
1772 |
]. |
|
1773 |
super release |
|
86 | 1774 |
! |
1775 |
||
219 | 1776 |
restarted |
1777 |
"image restart - since WindowGroup recreates the process with |
|
1778 |
default prio, we have to raise the prio again. |
|
1779 |
Mhmh - this looks like a bug to me ..." |
|
86 | 1780 |
|
219 | 1781 |
Processor activeProcess priority:(Processor userSchedulingPriority + 1). |
1782 |
super restarted |
|
86 | 1783 |
! |
1784 |
||
219 | 1785 |
saveAndTerminate |
90 | 1786 |
" |
219 | 1787 |
some windowManagers can send this, to shutDown an application |
1788 |
but let it save its state before, for restart. We are already |
|
1789 |
prepared for this ;-)" |
|
86 | 1790 |
|
219 | 1791 |
self snapshot. |
1792 |
super saveAndTerminate |
|
103 | 1793 |
! |
1794 |
||
86 | 1795 |
setupButtonPanelIn:aTopView |
1796 |
"create the buttonPanel" |
|
1797 |
||
368 | 1798 |
|spc mh buttonSize| |
86 | 1799 |
|
1800 |
spc := View viewSpacing // 2. |
|
1801 |
buttonPanel := HorizontalPanelView in:aTopView. |
|
1802 |
buttonPanel level:-1; borderWidth:0. |
|
1803 |
buttonPanel horizontalLayout:#leftSpace. |
|
1804 |
||
368 | 1805 |
buttonSize := self class buttonImageSize. |
1806 |
||
490 | 1807 |
"/ |
1808 |
"/ the buttonSpec is a collection of: |
|
1809 |
"/ #( selector iconFileName ) |
|
1810 |
"/ or: |
|
1811 |
"/ #( selector (className iconQuerySelector) ) |
|
1812 |
"/ or" |
|
1813 |
"/ #( nil ) |
|
1814 |
"/ |
|
90 | 1815 |
self buttonPanelSpec do:[:entry | |
490 | 1816 |
|sel b sep img iconSpec| |
86 | 1817 |
|
368 | 1818 |
sel := entry at:1. |
1819 |
sel isNil ifTrue:[ |
|
1820 |
sep := View in:buttonPanel. |
|
1821 |
sep extent:32@1; borderWidth:0. |
|
1822 |
] ifFalse:[ |
|
1823 |
b := Button in:buttonPanel. |
|
490 | 1824 |
iconSpec := entry at:2. |
1825 |
iconSpec isArray ifTrue:[ |
|
1826 |
img := (Smalltalk classNamed:(iconSpec at:1)) perform:(iconSpec at:2). |
|
1827 |
] ifFalse:[ |
|
1828 |
img := Image fromFile:iconSpec. |
|
1829 |
]. |
|
368 | 1830 |
buttonSize notNil ifTrue:[ |
1831 |
img := img magnifiedTo:buttonSize |
|
1832 |
]. |
|
1833 |
b form:img. |
|
1834 |
b model:self; changeMessage:sel |
|
1835 |
] |
|
86 | 1836 |
]. |
1837 |
||
100 | 1838 |
mh := myMenu height. |
1839 |
buttonPanel origin:0.0 @ (mh + spc) |
|
368 | 1840 |
corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)). |
86 | 1841 |
|
1842 |
buttonPanel leftInset:spc; rightInset:spc. |
|
490 | 1843 |
|
1844 |
"Modified: 18.4.1996 / 16:06:04 / cg" |
|
86 | 1845 |
! |
1846 |
||
90 | 1847 |
setupDemoMenu |
1848 |
"setup the demo pulldown menu" |
|
1849 |
||
1850 |
|m| |
|
1851 |
||
1852 |
myMenu at:#demos |
|
450 | 1853 |
putLabels:(resources array:#( |
1854 |
'goodies' |
|
1855 |
'games' |
|
1856 |
'geometric designs' |
|
1857 |
'simple animations' |
|
1858 |
'3D graphics' |
|
1859 |
'graphic editors' |
|
1860 |
)) |
|
1861 |
selectors:#( |
|
1862 |
goodies |
|
1863 |
games |
|
1864 |
geometricDesigns |
|
1865 |
simpleAnimations |
|
1866 |
#'3Dgraphics' |
|
1867 |
#graphicEditors |
|
1868 |
) |
|
1869 |
receiver:self. |
|
90 | 1870 |
|
1871 |
" |
|
1872 |
only to show two different ways of defining a popUpMenu, |
|
1873 |
we use labels:selectors:receiver: here: |
|
1874 |
" |
|
1875 |
m := myMenu menuAt:#demos. |
|
1876 |
m subMenuAt:#games |
|
1877 |
put:(PopUpMenu |
|
450 | 1878 |
labels:(resources array:#( |
1879 |
'Tetris' |
|
1880 |
'Tic Tac Toe' |
|
1881 |
'Tic Tac Toe (2 players)' |
|
1882 |
)) |
|
1883 |
selectors:#( |
|
1884 |
startTetris |
|
1885 |
startTicTacToe |
|
1886 |
startTicTacToe2 |
|
1887 |
) |
|
1888 |
receiver:self). |
|
90 | 1889 |
|
1890 |
" |
|
1891 |
and labels:selector:args:receiver: here: |
|
1892 |
" |
|
1893 |
m subMenuAt:#geometricDesigns |
|
1894 |
put:(PopUpMenu |
|
450 | 1895 |
labels:(resources array:#( |
1896 |
'Pen demo' |
|
1897 |
'Commander demo' |
|
1898 |
'-' |
|
1899 |
'Fractal plants demo' |
|
1900 |
'Fractal patterns demo' |
|
1901 |
)) |
|
1902 |
selector:#openDemo: |
|
1903 |
args:#( |
|
1904 |
PenDemo |
|
1905 |
CommanderDemo |
|
1906 |
nil |
|
1907 |
FractalPlantsDemo |
|
1908 |
FractalPatternsDemo |
|
1909 |
) |
|
1910 |
receiver:self). |
|
90 | 1911 |
|
1912 |
m subMenuAt:#simpleAnimations |
|
1913 |
put:(PopUpMenu |
|
450 | 1914 |
labels:(resources array:#( |
1915 |
'Animation' |
|
1916 |
'Globe demo' |
|
1917 |
)) |
|
1918 |
selector:#openDemo: |
|
1919 |
args:#( |
|
1920 |
Animation |
|
1921 |
GlobeDemo |
|
1922 |
) |
|
1923 |
receiver:self). |
|
90 | 1924 |
|
1925 |
m subMenuAt:#'3Dgraphics' |
|
1926 |
put:(PopUpMenu |
|
450 | 1927 |
labels:(resources |
1928 |
array:#( |
|
1929 |
'plane' |
|
1930 |
'tetra' |
|
1931 |
'cube (wireframe)' |
|
1932 |
'cube (solid)' |
|
1933 |
'sphere (wireframe)' |
|
1934 |
'doughnut (wireframe)' |
|
1935 |
'planet' |
|
1936 |
'teapot' |
|
1937 |
'logo' |
|
1938 |
'rubics cube' |
|
1939 |
'x/y graph' |
|
1940 |
'-' |
|
1941 |
'cube (light)' |
|
1942 |
'cube (light & texture)' |
|
1943 |
'sphere (light)' |
|
1944 |
'colored octahedron' |
|
1945 |
)) |
|
1946 |
selector:#openDemo: |
|
1947 |
args:#( |
|
1948 |
GLPlaneDemoView2 |
|
1949 |
GLTetraDemoView |
|
1950 |
GLWireCubeDemoView |
|
1951 |
GLCubeDemoView |
|
1952 |
GLWireSphereDemoView |
|
1953 |
GLDoughnutDemoView |
|
1954 |
GLPlanetDemoView |
|
1955 |
GLTeapotDemo |
|
1956 |
Logo3DView1 |
|
1957 |
RubicsCubeView |
|
1958 |
GLXYGraph |
|
1959 |
nil |
|
1960 |
GLCubeDemoView2 |
|
1961 |
GLBrickCubeDemoView |
|
1962 |
GLSphereDemoView2 |
|
1963 |
GLOctaHedronDemoView |
|
1964 |
) |
|
1965 |
receiver:self). |
|
90 | 1966 |
|
1967 |
m subMenuAt:#graphicEditors |
|
1968 |
put:(PopUpMenu |
|
450 | 1969 |
labels:(resources array:#( |
1970 |
'DrawTool' |
|
1971 |
'LogicTool' |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
1972 |
'Paint Demo' |
450 | 1973 |
)) |
1974 |
selector:#openDemo: |
|
1975 |
args:#( |
|
1976 |
DrawTool |
|
1977 |
LogicTool |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
1978 |
ColorDrawDemo3 |
450 | 1979 |
) |
1980 |
receiver:self). |
|
90 | 1981 |
|
91 | 1982 |
m subMenuAt:#goodies |
1983 |
put:(PopUpMenu |
|
450 | 1984 |
labels:(resources array:#( |
1985 |
'clock' |
|
1986 |
'calendar' |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
1987 |
'calculator' |
450 | 1988 |
'-' |
1989 |
'mail tool' |
|
1990 |
'news tool' |
|
1991 |
)) |
|
1992 |
selector:#openDemo: |
|
1993 |
args:#( |
|
1994 |
Clock |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
1995 |
Calendar |
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
1996 |
CalculatorView |
450 | 1997 |
nil |
1998 |
MailView |
|
1999 |
NewsView |
|
2000 |
) |
|
2001 |
receiver:self). |
|
2002 |
||
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
2003 |
"Modified: 11.4.1996 / 00:21:46 / cg" |
90 | 2004 |
! |
2005 |
||
219 | 2006 |
setupInfoViewIn:topView |
2007 |
|spc halfSpc| |
|
2008 |
||
2009 |
spc := View viewSpacing. |
|
2010 |
infoView := Label label:'' in:topView. |
|
2011 |
infoView adjust:#left; borderWidth:0. |
|
2012 |
infoView level:-1. |
|
2013 |
transcript superView bottomInset:(infoView height + spc). |
|
90 | 2014 |
|
219 | 2015 |
infoView is3D ifTrue:[ |
2016 |
halfSpc := spc // 2. |
|
2017 |
] ifFalse:[ |
|
2018 |
halfSpc := 0 |
|
2019 |
]. |
|
2020 |
infoView topInset:(infoView height negated - spc + transcript borderWidth); |
|
2021 |
bottomInset:halfSpc; |
|
2022 |
leftInset:halfSpc; |
|
2023 |
rightInset:halfSpc. |
|
2024 |
infoView origin:0.0 @ 1.0 corner:1.0 @ 1.0. |
|
2025 |
infoView model:self; aspect:#info; labelMessage:#info. |
|
2026 |
||
2027 |
Project notNil ifTrue:[ |
|
2028 |
Project addDependent:self. |
|
2029 |
] |
|
2030 |
||
2031 |
" |
|
2032 |
NewLauncher open |
|
2033 |
" |
|
93 | 2034 |
! |
2035 |
||
219 | 2036 |
setupMenu |
2037 |
"setup the pulldown menu" |
|
2038 |
||
2039 |
|l s icon| |
|
2040 |
||
2041 |
myMenu labels:(resources array:#( |
|
379 | 2042 |
about |
2043 |
file |
|
2044 |
classes |
|
2045 |
tools |
|
2046 |
projects |
|
2047 |
settings |
|
2048 |
demos |
|
2049 |
help)). |
|
219 | 2050 |
" |
2051 |
if there is a bitmap, change 'about' to the ST/X icon |
|
2052 |
" |
|
2053 |
icon := self class smallAboutIcon. |
|
2054 |
icon notNil ifTrue:[ |
|
377 | 2055 |
myMenu labels at:1 put:icon. |
2056 |
myMenu height:(myMenu height max:(icon height + (View viewSpacing * 2))) |
|
93 | 2057 |
]. |
219 | 2058 |
|
2059 |
myMenu selectors:#( |
|
377 | 2060 |
#about |
2061 |
#file |
|
2062 |
#classes |
|
2063 |
#tools |
|
2064 |
#projects |
|
2065 |
#settings |
|
2066 |
#demos |
|
2067 |
#help). |
|
219 | 2068 |
|
2069 |
myMenu at:#about |
|
377 | 2070 |
putLabels:(resources array:#( |
2071 |
'about Smalltalk/X ...' |
|
2072 |
)) |
|
2073 |
selectors:#( |
|
2074 |
#about |
|
2075 |
) |
|
2076 |
receiver:self. |
|
219 | 2077 |
|
2078 |
l := #( |
|
377 | 2079 |
'file browser' |
2080 |
'-' |
|
2081 |
'modules ...' |
|
2082 |
'-' |
|
2083 |
'snapshot ...' |
|
2084 |
'snapshot & exit ...' |
|
2085 |
'exit smalltalk ...' |
|
2086 |
). |
|
219 | 2087 |
s := #( |
377 | 2088 |
#startFileBrowser |
2089 |
nil |
|
2090 |
#objectModuleDialog |
|
2091 |
nil |
|
2092 |
#snapshot |
|
2093 |
#snapshotAndExit |
|
2094 |
#exit |
|
2095 |
). |
|
219 | 2096 |
|
2097 |
myMenu at:#file |
|
377 | 2098 |
putLabels:(resources array:l) |
2099 |
selectors:s |
|
2100 |
receiver:self. |
|
219 | 2101 |
|
2102 |
myMenu at:#classes |
|
377 | 2103 |
putLabels:(resources array:#( |
2104 |
'system browser' |
|
2105 |
'class browser ...' |
|
2106 |
'full class browser ...' |
|
2107 |
'class hierarchy browser ...' |
|
2108 |
'class tree' |
|
2109 |
'-' |
|
2110 |
'implementors ...' |
|
2111 |
'senders ...' |
|
2112 |
'-' |
|
2113 |
'change browser' |
|
2114 |
)) |
|
2115 |
selectors:#( |
|
2116 |
#startSystemBrowser |
|
2117 |
#startClassBrowser |
|
2118 |
#startFullClassBrowser |
|
2119 |
#startClassHierarchyBrowser |
|
2120 |
#startClassTreeView |
|
2121 |
nil |
|
2122 |
#browseImplementors |
|
2123 |
#browseSenders |
|
2124 |
nil |
|
2125 |
#startChangesBrowser |
|
2126 |
) |
|
2127 |
receiver:self. |
|
219 | 2128 |
|
490 | 2129 |
JavaBrowser notNil ifTrue:[ |
2130 |
(myMenu subMenuAt:#classes) |
|
2131 |
addLabels:(resources array:#('-' 'java browser')) |
|
2132 |
selectors:#(nil startJavaBrowser) |
|
2133 |
after:#startClassTreeView |
|
2134 |
]. |
|
2135 |
||
219 | 2136 |
myMenu at:#projects |
377 | 2137 |
putLabels:(resources array:#( |
2138 |
'new project' |
|
2139 |
'-' |
|
2140 |
'select project ...' |
|
2141 |
)) |
|
2142 |
selectors:#( |
|
2143 |
#newProject |
|
2144 |
nil |
|
2145 |
#selectProject |
|
2146 |
) |
|
2147 |
receiver:self. |
|
219 | 2148 |
|
2149 |
myMenu at:#settings |
|
377 | 2150 |
putLabels:(resources array:#( |
2151 |
'language ...' |
|
2152 |
'show keyboard mappings ...' |
|
2153 |
'view style ...' |
|
398 | 2154 |
'fonts ...' |
377 | 2155 |
'printer ...' |
2156 |
'messages ...' |
|
2157 |
'compilation ...' |
|
2158 |
'object memory ...' |
|
2159 |
'misc ...' |
|
2160 |
)) |
|
2161 |
selectors:#( |
|
2162 |
#languageSetting |
|
2163 |
#keyboardSetting |
|
2164 |
#viewStyleSetting |
|
398 | 2165 |
#fontSettings |
377 | 2166 |
#printerSettings |
2167 |
#messageSettings |
|
2168 |
#compilerSettings |
|
2169 |
#memorySettings |
|
2170 |
#miscSettings |
|
2171 |
) |
|
2172 |
receiver:self. |
|
219 | 2173 |
|
2174 |
self setupToolsMenu. |
|
2175 |
self setupDemoMenu. |
|
2176 |
||
2177 |
ActiveHelp notNil ifTrue:[ |
|
377 | 2178 |
l := #( |
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2179 |
'active help \c' |
377 | 2180 |
'ST/X documentation' |
497 | 2181 |
'class documentation' |
483 | 2182 |
'index' |
377 | 2183 |
). |
2184 |
s := #( |
|
2185 |
#toggleActiveHelp: |
|
2186 |
#startDocumentationTool |
|
496 | 2187 |
#startClassDocumentation |
483 | 2188 |
#startDocumentationIndex |
377 | 2189 |
) |
219 | 2190 |
] ifFalse:[ |
377 | 2191 |
l := #( |
2192 |
'ST/X documentation' |
|
497 | 2193 |
'class documentation' |
483 | 2194 |
'index' |
377 | 2195 |
). |
2196 |
s := #( |
|
2197 |
#startDocumentationTool |
|
496 | 2198 |
#startClassDocumentation |
483 | 2199 |
#startDocumentationIndex |
377 | 2200 |
) |
219 | 2201 |
]. |
2202 |
||
2203 |
myMenu at:#help |
|
377 | 2204 |
putLabels:(resources array:l) |
2205 |
selectors:s |
|
2206 |
receiver:self. |
|
219 | 2207 |
|
2208 |
(ActiveHelp notNil |
|
2209 |
and:[ActiveHelp isActive]) ifTrue:[ |
|
377 | 2210 |
(myMenu menuAt:#help) checkToggleAt:#toggleActiveHelp: put:true |
219 | 2211 |
]. |
377 | 2212 |
|
497 | 2213 |
"Modified: 22.4.1996 / 22:59:16 / cg" |
93 | 2214 |
! |
2215 |
||
219 | 2216 |
setupOtherViewsIn:aTopView |
2217 |
"a hook - allows redefinition in your personal subclass. |
|
2218 |
For example, add a clock:" |
|
2219 |
||
2220 |
" |
|
2221 |
|sz clock space halfSpace| |
|
2222 |
||
2223 |
sz := buttonPanel innerHeight - (buttonPanel level abs*2). |
|
2224 |
space := View viewSpacing. |
|
2225 |
halfSpace := space // 2. |
|
93 | 2226 |
|
219 | 2227 |
buttonPanel rightInset:sz+(space * 2). |
93 | 2228 |
|
219 | 2229 |
clock := ClockView in:buttonPanel topView. |
2230 |
clock borderWidth:1. |
|
2231 |
clock showSeconds:false. |
|
2232 |
clock extent:(sz @ sz). |
|
2233 |
clock origin:(1.0 @ (buttonPanel origin y + halfSpace)). |
|
2234 |
clock leftInset:sz negated - 2 - halfSpace. |
|
2235 |
clock rightInset:halfSpace. |
|
2236 |
clock level:1. |
|
2237 |
" |
|
93 | 2238 |
! |
2239 |
||
2240 |
setupToolsMenu |
|
2241 |
"setup the tools pulldown menu" |
|
2242 |
||
2243 |
|m| |
|
2244 |
||
2245 |
myMenu at:#tools |
|
434 | 2246 |
putLabels:(resources array:#( |
2247 |
'workspace' |
|
2248 |
'-' |
|
2249 |
'monitors' |
|
2250 |
'-' |
|
2251 |
'view tree (all views)' |
|
2252 |
'view tree' |
|
2253 |
'inspect view' |
|
2254 |
'destroy view' |
|
2255 |
'-' |
|
2256 |
'hardcopy' |
|
2257 |
'-' |
|
2258 |
'misc' |
|
2259 |
)) |
|
2260 |
selectors:#( |
|
2261 |
#startWorkspace |
|
2262 |
nil |
|
2263 |
#monitors |
|
2264 |
nil |
|
2265 |
#startFullWindowTreeView |
|
2266 |
#startWindowTreeView |
|
2267 |
#viewInspect |
|
2268 |
#viewDestroy |
|
2269 |
nil |
|
2270 |
#hardcopy |
|
2271 |
nil |
|
2272 |
#misc |
|
2273 |
) |
|
2274 |
receiver:self. |
|
93 | 2275 |
|
2276 |
||
2277 |
m := myMenu menuAt:#tools. |
|
2278 |
m subMenuAt:#monitors |
|
2279 |
put:(PopUpMenu |
|
434 | 2280 |
labels:(resources array:#( |
2281 |
'process' |
|
2282 |
'memory' |
|
2283 |
'event view' |
|
2284 |
'event trace' |
|
2285 |
'-' |
|
2286 |
'memory usage' |
|
2287 |
)) |
|
2288 |
selectors:#( |
|
2289 |
#startProcessMonitor |
|
2290 |
#startMemoryMonitor |
|
2291 |
#startEventMonitor |
|
2292 |
#startStopEventTrace |
|
2293 |
nil |
|
2294 |
#startMemoryUsageView |
|
2295 |
) |
|
2296 |
receiver:self). |
|
93 | 2297 |
|
120 | 2298 |
m subMenuAt:#misc |
2299 |
put:(PopUpMenu |
|
434 | 2300 |
labels:(resources array:#( |
2301 |
'remove all break/trace points' |
|
2302 |
)) |
|
2303 |
selectors:#( |
|
2304 |
#removeAllBreakAndTracePoints |
|
2305 |
) |
|
2306 |
receiver:self). |
|
120 | 2307 |
|
93 | 2308 |
m subMenuAt:#hardcopy |
2309 |
put:(PopUpMenu |
|
434 | 2310 |
labels:(resources array:#( |
2311 |
'screen' |
|
2312 |
'area' |
|
2313 |
'view' |
|
2314 |
)) |
|
2315 |
selectors:#( |
|
2316 |
#fullScreenHardcopy |
|
2317 |
#screenHardcopy |
|
2318 |
#viewHardcopy |
|
2319 |
) |
|
2320 |
receiver:self). |
|
93 | 2321 |
|
434 | 2322 |
"Modified: 7.3.1996 / 15:01:26 / cg" |
90 | 2323 |
! |
2324 |
||
219 | 2325 |
setupTranscriptIn:aView |
2326 |
|v| |
|
107 | 2327 |
|
219 | 2328 |
(Transcript notNil and:[Transcript ~~ Stderr]) ifTrue:[ |
2329 |
Transcript topView destroy. |
|
110 | 2330 |
]. |
2331 |
||
219 | 2332 |
v := HVScrollableView |
2333 |
for:TextCollector |
|
2334 |
miniScrollerH:true |
|
2335 |
miniScrollerV:false |
|
2336 |
in:aView. |
|
93 | 2337 |
|
219 | 2338 |
v origin:(0.0 @ (buttonPanel corner y + View viewSpacing)) |
2339 |
corner:(1.0 @ 1.0). |
|
2340 |
transcript := v scrolledView. |
|
2341 |
transcript beTranscript. |
|
94 | 2342 |
! |
2343 |
||
219 | 2344 |
setupViewsIn:topView |
2345 |
"create the pulldown menu, buttonPanel and transcript view" |
|
86 | 2346 |
|
219 | 2347 |
|tFont| |
131 | 2348 |
|
219 | 2349 |
topView model:self. |
86 | 2350 |
|
219 | 2351 |
myMenu := PullDownMenu in:topView. |
2352 |
myMenu origin:0.0 @ 0.0 corner:(1.0 @ myMenu height). |
|
86 | 2353 |
|
219 | 2354 |
self setupMenu. |
2355 |
self setupButtonPanelIn:topView. |
|
2356 |
self setupTranscriptIn:topView. |
|
2357 |
self setupInfoViewIn:topView. |
|
2358 |
self setupOtherViewsIn:topView. |
|
118 | 2359 |
|
219 | 2360 |
tFont := transcript font. |
2361 |
topView extent:(((tFont widthOf:'3')*60) max:myMenu preferredExtent x) |
|
2362 |
@ |
|
2363 |
((tFont height) * 20). |
|
118 | 2364 |
|
219 | 2365 |
" |
2366 |
NewLauncher open |
|
2367 |
" |
|
86 | 2368 |
! ! |
2369 |
||
2370 |
!NewLauncher methodsFor:'private'! |
|
2371 |
||
406 | 2372 |
fontBoxForEncoding:encodingMatch |
2373 |
|box defaultFont y b |
|
2374 |
labelDef buttonDef listDef menuDef textDef |
|
2375 |
models labels allOfThem filter| |
|
2376 |
||
2377 |
encodingMatch notNil ifTrue:[ |
|
2378 |
filter := [:f | f encoding notNil |
|
2379 |
and:[encodingMatch match:f encoding]]. |
|
2380 |
]. |
|
2381 |
||
2382 |
models := OrderedCollection new. |
|
2383 |
labels := OrderedCollection new. |
|
2384 |
||
2385 |
models add:(allOfThem := nil asValue). |
|
2386 |
models add:(labelDef := Label defaultFont asValue). |
|
2387 |
models add:(buttonDef := Button defaultFont asValue). |
|
2388 |
models add:(listDef := SelectionInListView defaultFont asValue). |
|
2389 |
models add:(menuDef := MenuView defaultFont asValue). |
|
2390 |
models add:(textDef := TextView defaultFont asValue). |
|
2391 |
||
2392 |
box := Dialog new. |
|
2393 |
box label:(resources string:'Font settings'). |
|
2394 |
||
2395 |
models |
|
2396 |
with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text')) |
|
2397 |
do:[:model :title | |
|
427 | 2398 |
|y2 lbl f i| |
406 | 2399 |
|
2400 |
f := model value. |
|
2401 |
||
2402 |
(box addTextLabel:title) adjust:#left. |
|
2403 |
||
2404 |
y := box yPosition. |
|
427 | 2405 |
b := box addComponent:(Button label:(resources string:'change')) tabable:true. |
406 | 2406 |
b relativeExtent:nil; extent:(b preferredExtent). |
2407 |
y2 := box yPosition. |
|
2408 |
box yPosition:y. |
|
427 | 2409 |
i := box leftIndent. |
406 | 2410 |
box leftIndent:(b widthIncludingBorder + View viewSpacing). |
2411 |
(lbl := box addTextLabel:'') |
|
2412 |
adjust:#left; |
|
2413 |
font:(model value); |
|
2414 |
labelChannel:(BlockValue |
|
2415 |
with:[:v | |f| |
|
2416 |
f := v value. |
|
2417 |
f isNil ifTrue:[ |
|
2418 |
'' |
|
2419 |
] ifFalse:[ |
|
2420 |
f userFriendlyName |
|
2421 |
] |
|
2422 |
] |
|
2423 |
argument:model). |
|
2424 |
labels add:lbl. |
|
2425 |
||
427 | 2426 |
box leftIndent:i. |
406 | 2427 |
box yPosition:(box yPosition max:y2). |
2428 |
box addVerticalSpace. |
|
2429 |
box addHorizontalLine. |
|
2430 |
box addVerticalSpace. |
|
2431 |
||
2432 |
b action:[ |
|
2433 |
|f| |
|
2434 |
||
2435 |
f := FontPanel |
|
2436 |
fontFromUserInitial:(model value) |
|
2437 |
title:(resources string:'font for %1' with:title) |
|
2438 |
filter:filter. |
|
2439 |
f notNil ifTrue:[ |
|
2440 |
model == allOfThem ifTrue:[ |
|
2441 |
models do:[:m | m value:f]. |
|
2442 |
labels do:[:l | l font:f] |
|
2443 |
] ifFalse:[ |
|
2444 |
model value:f. |
|
2445 |
lbl font:f. |
|
2446 |
]. |
|
2447 |
] |
|
2448 |
]. |
|
2449 |
model == allOfThem ifTrue:[ |
|
2450 |
box addVerticalSpace |
|
2451 |
] |
|
2452 |
]. |
|
2453 |
||
2454 |
box addAbortButton; addOkButton. |
|
2455 |
(box addButton:(Button label:(resources string:'defaults')) before:nil) |
|
2456 |
action:[ |
|
2457 |
"/ fetch defaults |
|
2458 |
View updateAllStyleCaches. |
|
2459 |
labelDef value: Label defaultFont. |
|
2460 |
buttonDef value: Button defaultFont. |
|
2461 |
listDef value: SelectionInListView defaultFont. |
|
2462 |
menuDef value: MenuView defaultFont. |
|
2463 |
textDef value: TextView defaultFont. |
|
2464 |
]. |
|
2465 |
||
2466 |
box open. |
|
2467 |
box accepted ifTrue:[ |
|
2468 |
Label defaultFont:labelDef value. |
|
2469 |
Button defaultFont:buttonDef value. |
|
2470 |
Toggle defaultFont:buttonDef value. |
|
2471 |
SelectionInListView defaultFont:listDef value. |
|
2472 |
MenuView defaultFont:menuDef value. |
|
2473 |
PullDownMenu defaultFont:menuDef value. |
|
2474 |
TextView defaultFont:textDef value. |
|
2475 |
EditTextView defaultFont:textDef value. |
|
2476 |
CodeView defaultFont:textDef value. |
|
2477 |
]. |
|
2478 |
^ box accepted |
|
2479 |
||
2480 |
"Created: 27.2.1996 / 01:44:16 / cg" |
|
427 | 2481 |
"Modified: 5.3.1996 / 01:46:23 / cg" |
406 | 2482 |
! |
2483 |
||
219 | 2484 |
pickAView |
2485 |
|v| |
|
2486 |
||
2487 |
(Delay forSeconds:1) wait. |
|
2488 |
v := Screen current viewFromUser. |
|
2489 |
v isNil ifTrue:[ |
|
2490 |
self warn:'sorry, this is not a smalltalk view'. |
|
2491 |
^ nil |
|
2492 |
]. |
|
2493 |
^ v |
|
2494 |
! |
|
2495 |
||
106 | 2496 |
reopenLauncher |
2497 |
"for now (since style & language settings currently do |
|
2498 |
not affect living views ...)" |
|
2499 |
||
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
2500 |
|contents fontPref enc fontList newDefault| |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
2501 |
|
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
2502 |
fontPref := self class classResources at:'PREFERRED_FONT_ENCODING'. |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
2503 |
enc := MenuView defaultFont encoding. |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
2504 |
(fontPref match:enc) ifFalse:[ |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
2505 |
(self confirm:'menu font is not ' , fontPref , '-encoded.\\Change it ?' withCRs) |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
2506 |
ifTrue:[ |
406 | 2507 |
self fontBoxForEncoding:fontPref |
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
2508 |
] |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
2509 |
]. |
106 | 2510 |
|
2511 |
contents := Transcript endEntry; contents. |
|
2512 |
self class open. |
|
2513 |
Transcript contents:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor |
|
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
2514 |
|
406 | 2515 |
"Modified: 27.2.1996 / 01:45:45 / cg" |
106 | 2516 |
! |
2517 |
||
100 | 2518 |
saveAllViews |
86 | 2519 |
"tell each topview that we are going to terminate and give it chance |
2520 |
to save its contents." |
|
2521 |
||
2522 |
ObjectMemory changed:#aboutToExit |
|
2523 |
! |
|
2524 |
||
93 | 2525 |
saveScreenImage:anImage defaultName:defaultName |
2526 |
"save an image into a file |
|
2527 |
- ask user for filename using a fileSelectionBox." |
|
2528 |
||
2529 |
|fileName| |
|
2530 |
||
2531 |
fileName := Dialog |
|
382 | 2532 |
requestFileName:(resources string:'save image in:') |
2533 |
default:(defaultName , '.tiff') |
|
2534 |
ok:(resources string:'save') |
|
2535 |
abort:(resources string:'cancel') |
|
2536 |
pattern:'*.tiff'. |
|
93 | 2537 |
|
2538 |
fileName notNil ifTrue:[ |
|
382 | 2539 |
anImage saveOn:fileName |
93 | 2540 |
]. |
382 | 2541 |
|
2542 |
"Modified: 21.2.1996 / 13:09:28 / cg" |
|
86 | 2543 |
! ! |
2544 |
||
219 | 2545 |
!NewLauncher methodsFor:'queries'! |
90 | 2546 |
|
219 | 2547 |
processName |
2548 |
"for monitors only - my name" |
|
142 | 2549 |
|
219 | 2550 |
^ 'ST/X Launcher' |
90 | 2551 |
! ! |
2552 |
||
219 | 2553 |
!NewLauncher class methodsFor:'documentation'! |
86 | 2554 |
|
219 | 2555 |
version |
503 | 2556 |
^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.115 1996-04-24 08:42:05 cg Exp $' |
86 | 2557 |
! ! |