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