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