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