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