author | Claus Gittinger <cg@exept.de> |
Thu, 02 Jan 1997 20:08:40 +0100 | |
changeset 891 | 26ac48ced53b |
parent 864 | 6ea7ea821b44 |
child 893 | 39307a122c30 |
permissions | -rw-r--r-- |
88 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
864 | 3 |
All Rights Reserved |
88 | 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 |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
13 |
ApplicationModel subclass:#Launcher |
891 | 14 |
instanceVariableNames:'myMenu buttonPanel transcript infoView infoProcess helpIsOn |
15 |
isMainLauncher' |
|
16 |
classVariableNames:'CachedAboutIcon OpenLaunchers' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'Interface-Smalltalk' |
|
86 | 19 |
! |
20 |
||
760 | 21 |
!Launcher class methodsFor:'documentation'! |
88 | 22 |
|
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
864 | 26 |
All Rights Reserved |
88 | 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 |
" |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
39 |
Of course, it is possible to change the Launcher class itself |
105 | 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 |
||
760 | 93 |
!Launcher class methodsFor:'accessing'! |
660
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 |
OpenLaunchers do:[:aLauncher | |
662
b5efd05fa256
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
661
diff
changeset
|
100 |
aLauncher window graphicsDevice == Screen current ifTrue:[ |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
101 |
^ aLauncher |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
102 |
] |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
103 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
104 |
^ nil. |
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 |
" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
107 |
Launcher current |
660
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 |
|
662
b5efd05fa256
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
661
diff
changeset
|
110 |
"Modified: 5.7.1996 / 17:55:28 / cg" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
111 |
"Modified: 9.9.1996 / 22:41:36 / stefan" |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
112 |
! ! |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
113 |
|
760 | 114 |
!Launcher class methodsFor:'defaults'! |
86 | 115 |
|
116 |
aboutIcon |
|
117 |
|image| |
|
118 |
||
119 |
CachedAboutIcon notNil ifTrue:[^ CachedAboutIcon]. |
|
120 |
||
121 |
image := Image fromFile:'SmalltalkX.xbm'. |
|
92 | 122 |
image notNil ifTrue:[ |
580 | 123 |
|green dark| |
124 |
||
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
125 |
Screen current hasColors ifTrue:[ |
580 | 126 |
green := (Color red:0 green:80 blue:20) "darkened". |
127 |
dark := Color gray:10. |
|
128 |
image photometric:#palette. |
|
129 |
] ifFalse:[ |
|
130 |
dark := Color black. |
|
131 |
green := Color white. |
|
132 |
image photometric:#blackIs0. |
|
133 |
]. |
|
134 |
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
|
135 |
"/ 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
|
136 |
"/ image := (Image implementorForDepth:Screen current depth) fromImage:image. |
144 | 137 |
"/ ] |
86 | 138 |
]. |
139 |
CachedAboutIcon := image. |
|
140 |
^ image |
|
141 |
||
142 |
" |
|
92 | 143 |
CachedAboutIcon := nil. |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
144 |
Launcher aboutIcon |
92 | 145 |
" |
144 | 146 |
|
580 | 147 |
"Modified: 28.5.1996 / 20:55:15 / cg" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
148 |
"Modified: 9.9.1996 / 22:41:23 / stefan" |
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:[ |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
166 |
image := image magnifiedBy:0.4. |
219 | 167 |
]. |
168 |
^ image |
|
169 |
||
170 |
" |
|
171 |
CachedAboutIcon := nil. |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
172 |
Launcher aboutIcon. |
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
173 |
Launcher smallAboutIcon. |
219 | 174 |
" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
175 |
|
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
176 |
"Modified: 9.9.1996 / 22:42:12 / stefan" |
219 | 177 |
! ! |
178 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
179 |
!Launcher methodsFor:'actions - about & help'! |
219 | 180 |
|
181 |
about |
|
182 |
|box| |
|
183 |
||
184 |
box := AboutBox new. |
|
185 |
box autoHideAfter:10 with:[]. |
|
186 |
box showAtCenter |
|
187 |
! |
|
188 |
||
727 | 189 |
showBookPrintDocument |
190 |
self showDocumentation:'BOOK.html' |
|
191 |
||
192 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
193 |
"Created: 12.9.1996 / 01:53:30 / cg" |
|
194 |
! |
|
195 |
||
219 | 196 |
showDocumentation:aRelativeDocFilePath |
197 |
" |
|
198 |
although that one is not yet finished, |
|
199 |
its better than nothing ... |
|
200 |
" |
|
555 | 201 |
HTMLDocumentView notNil ifTrue:[ |
202 |
" |
|
203 |
temporary kludge; |
|
204 |
not all machines can autoload binaries; |
|
205 |
however, on my SGI (which can) we want it |
|
206 |
to load automatically. |
|
207 |
" |
|
208 |
HTMLDocumentView isLoaded ifFalse:[ |
|
209 |
ErrorSignal catch:[HTMLDocumentView autoload] |
|
210 |
]. |
|
211 |
HTMLDocumentView isLoaded ifTrue:[ |
|
212 |
HTMLDocumentView openFullOnDocumentationFile:aRelativeDocFilePath. |
|
213 |
^ self |
|
214 |
]. |
|
219 | 215 |
]. |
216 |
||
217 |
self warn:'Sorry, the ST/X HTML reader is not (yet) |
|
218 |
included in this architectures release. |
|
219 |
||
220 |
Please use Mosaic, netscape, chimera or any |
|
221 |
other HTML viewer to see the documentation. |
|
222 |
||
223 |
The documentation is found in the ''doc/online'' directory.'. |
|
224 |
||
225 |
"Modified: 31.8.1995 / 13:11:08 / claus" |
|
555 | 226 |
"Modified: 21.5.1996 / 14:15:57 / cg" |
219 | 227 |
! |
228 |
||
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
229 |
showLicenceConditions |
860
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
230 |
|lang doc| |
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
231 |
|
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
232 |
((lang := Smalltalk language) = 'de' |
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
233 |
or:[lang = 'german']) ifTrue:[ |
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
234 |
doc := 'german/LICENCE.STX.html' |
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
235 |
] ifFalse:[ |
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
236 |
doc := 'english/LICENCE.STX.html' |
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
237 |
]. |
864 | 238 |
doc := resources at:'LICENCEFILE' default:doc. |
860
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
239 |
self showDocumentation:('../' , doc) |
739
cce1e1dab15e
Licence is in german/LICENCE.STX.html.
Stefan Vogel <sv@exept.de>
parents:
738
diff
changeset
|
240 |
|
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
241 |
"Created: 14.9.1996 / 12:35:00 / cg" |
739
cce1e1dab15e
Licence is in german/LICENCE.STX.html.
Stefan Vogel <sv@exept.de>
parents:
738
diff
changeset
|
242 |
"Modified: 23.9.1996 / 17:03:15 / stefan" |
864 | 243 |
"Modified: 11.11.1996 / 14:17:07 / cg" |
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
244 |
! |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
245 |
|
496 | 246 |
startClassDocumentation |
247 |
self showDocumentation:'classDoc/TOP.html' |
|
248 |
||
249 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
250 |
"Created: 22.4.1996 / 21:03:56 / cg" |
|
251 |
! |
|
252 |
||
483 | 253 |
startDocumentationIndex |
254 |
self showDocumentation:'index.html' |
|
255 |
||
256 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
257 |
"Created: 17.4.1996 / 22:08:55 / cg" |
|
258 |
! |
|
259 |
||
219 | 260 |
startDocumentationTool |
261 |
self showDocumentation:'TOP.html' |
|
262 |
||
263 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
264 |
! |
|
265 |
||
776 | 266 |
startWhatsNewDocumentation |
267 |
self showDocumentation:'whatsNew.html' |
|
268 |
||
269 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
270 |
"Created: 18.10.1996 / 14:00:35 / cg" |
|
271 |
! |
|
272 |
||
219 | 273 |
toggleActiveHelp:aBoolean |
274 |
ActiveHelp notNil ifTrue:[ |
|
864 | 275 |
helpIsOn := aBoolean. |
276 |
helpIsOn ifTrue:[ |
|
277 |
ActiveHelp start |
|
278 |
] ifFalse:[ |
|
279 |
ActiveHelp stop |
|
280 |
] |
|
219 | 281 |
]. |
282 |
! ! |
|
283 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
284 |
!Launcher methodsFor:'actions - classes'! |
219 | 285 |
|
286 |
browseImplementors |
|
287 |
|enterBox| |
|
288 |
||
289 |
enterBox := EnterBox title:(resources at:'Browse implementors of:') withCRs. |
|
290 |
enterBox okText:(resources at:'browse'). |
|
291 |
enterBox action:[:selectorName | |
|
864 | 292 |
|cls| |
293 |
||
294 |
self withWaitCursorDo:[SystemBrowser browseImplementorsOf:selectorName] |
|
219 | 295 |
]. |
296 |
enterBox showAtPointer |
|
297 |
! |
|
298 |
||
574 | 299 |
browseResources |
589 | 300 |
|enterBox t| |
574 | 301 |
|
302 |
enterBox := EnterBox title:(resources at:'Resource symbol (nil for any):') withCRs. |
|
303 |
enterBox okText:(resources at:'browse'). |
|
304 |
enterBox action:[:resourceName | |
|
305 |
|rsc| |
|
306 |
||
307 |
(resourceName isNil or:[resourceName isEmpty]) ifTrue:[ |
|
589 | 308 |
t := 'methods with any resource'. |
574 | 309 |
rsc := nil |
310 |
] ifFalse:[ |
|
589 | 311 |
t := 'methods with ' , resourceName , '-resource'. |
574 | 312 |
rsc := resourceName asSymbolIfInterned. |
313 |
]. |
|
314 |
self withWaitCursorDo:[ |
|
315 |
SystemBrowser browseForResource:rsc |
|
316 |
in:(Smalltalk allClasses) |
|
589 | 317 |
title:t |
574 | 318 |
] |
319 |
]. |
|
320 |
enterBox showAtPointer |
|
321 |
||
322 |
"Created: 28.5.1996 / 13:15:16 / cg" |
|
589 | 323 |
"Modified: 29.5.1996 / 17:30:38 / cg" |
574 | 324 |
! |
325 |
||
219 | 326 |
browseSenders |
327 |
|enterBox| |
|
328 |
||
329 |
enterBox := EnterBox title:(resources at:'Browse senders of:') withCRs. |
|
330 |
enterBox okText:(resources at:'browse'). |
|
331 |
enterBox action:[:selectorName | |
|
864 | 332 |
|cls| |
333 |
||
334 |
self withWaitCursorDo:[SystemBrowser browseAllCallsOn:selectorName] |
|
219 | 335 |
]. |
336 |
enterBox showAtPointer |
|
337 |
! |
|
338 |
||
339 |
startChangesBrowser |
|
340 |
self withWaitCursorDo:[ChangesBrowser open] |
|
341 |
! |
|
342 |
||
343 |
startClassBrowser |
|
344 |
SystemBrowser askThenBrowseClass |
|
345 |
! |
|
346 |
||
347 |
startClassHierarchyBrowser |
|
348 |
SystemBrowser askThenBrowseClassHierarchy |
|
349 |
! |
|
350 |
||
351 |
startClassTreeView |
|
352 |
self withWaitCursorDo:[ClassTreeGraphView open] |
|
353 |
! |
|
354 |
||
355 |
startFileBrowser |
|
356 |
self withWaitCursorDo:[FileBrowser open] |
|
357 |
! |
|
358 |
||
359 |
startFullClassBrowser |
|
360 |
SystemBrowser askThenBrowseFullClassProtocol |
|
361 |
! |
|
362 |
||
490 | 363 |
startJavaBrowser |
364 |
JavaBrowser notNil ifTrue:[ |
|
365 |
self withWaitCursorDo:[JavaBrowser open] |
|
366 |
] |
|
367 |
||
368 |
"Created: 18.4.1996 / 15:55:44 / cg" |
|
369 |
"Modified: 19.4.1996 / 16:39:08 / cg" |
|
370 |
! |
|
371 |
||
219 | 372 |
startSystemBrowser |
373 |
self withWaitCursorDo:[SystemBrowser open] |
|
374 |
! |
|
375 |
||
376 |
startWorkspace |
|
377 |
Workspace open |
|
378 |
! ! |
|
379 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
380 |
!Launcher methodsFor:'actions - demos'! |
219 | 381 |
|
382 |
openDemo:className |
|
536
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
383 |
|cls| |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
384 |
|
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
385 |
cls := Smalltalk at:className. |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
386 |
cls isNil ifTrue:[ |
837 | 387 |
self warn:(resources string:'sorry, the %1 class is not available.' with:className). |
536
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
388 |
] ifFalse:[ |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
389 |
Autoload autoloadFailedSignal handle:[:ex | |
837 | 390 |
self warn:(resources string:'sorry, the %1 class seems to be not available.' with:className) |
536
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
391 |
] do:[ |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
392 |
(Smalltalk at:className) open |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
393 |
] |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
394 |
] |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
395 |
|
837 | 396 |
"Modified: 6.11.1996 / 18:18:05 / cg" |
219 | 397 |
! |
398 |
||
399 |
startTetris |
|
400 |
Tetris open |
|
401 |
! |
|
402 |
||
403 |
startTicTacToe |
|
404 |
TicTacToeGame open |
|
405 |
! |
|
406 |
||
407 |
startTicTacToe2 |
|
408 |
TicTacToeGame open2UserGame |
|
409 |
! ! |
|
410 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
411 |
!Launcher methodsFor:'actions - file'! |
219 | 412 |
|
413 |
exit |
|
414 |
(self confirm:(resources string:'Are you certain you want to exit without saving ?')) |
|
415 |
ifTrue:[ |
|
864 | 416 |
self saveAllViews. |
417 |
Smalltalk exit |
|
219 | 418 |
] |
419 |
! |
|
420 |
||
421 |
objectModuleDialog |
|
422 |
|allModules moduleNames |
|
423 |
allObjects methodObjects methodNames |
|
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
424 |
cObjects cObjectNames |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
425 |
otherObjects otherObjectNames |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
426 |
box l handles unloadButton |
219 | 427 |
list1 list2 listView1 listView2 |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
428 |
y panel |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
429 |
showBuiltIn showModules showMethods showCObjects showOthers |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
430 |
moduleListUpdater check canDoIt menu| |
219 | 431 |
|
432 |
showBuiltIn := true asValue. |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
433 |
canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
434 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
435 |
showModules := canDoIt asValue. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
436 |
showMethods := canDoIt asValue. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
437 |
showCObjects := canDoIt asValue. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
438 |
showOthers := canDoIt asValue. |
219 | 439 |
|
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
440 |
list1 := SelectionInList new. |
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
441 |
list2 := SelectionInList new. |
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
442 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
443 |
moduleListUpdater := [ |
458 | 444 |
|l| |
219 | 445 |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
446 |
list2 list:nil. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
447 |
|
458 | 448 |
l := Array new. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
449 |
handles := Array new. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
450 |
|
458 | 451 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
452 |
allModules := ObjectMemory binaryModuleInfo asOrderedCollection. |
|
453 |
(showBuiltIn value and:[showModules value]) ifFalse:[ |
|
454 |
allModules := allModules select:[:i | |
|
455 |
|wantToSee| |
|
219 | 456 |
|
821
a81a0fb108d0
changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents:
815
diff
changeset
|
457 |
wantToSee := i dynamic. |
458 | 458 |
showBuiltIn value ifTrue:[ |
459 |
wantToSee := wantToSee not |
|
460 |
]. |
|
461 |
wantToSee |
|
462 |
] |
|
463 |
]. |
|
821
a81a0fb108d0
changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents:
815
diff
changeset
|
464 |
|
458 | 465 |
"/ sorting by reverse id brings newest ones to the top (a side effect) |
821
a81a0fb108d0
changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents:
815
diff
changeset
|
466 |
allModules sort:[:a :b | (a id) > (b id)]. |
a81a0fb108d0
changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents:
815
diff
changeset
|
467 |
moduleNames := allModules collect:[:entry | entry name]. |
458 | 468 |
l := l , moduleNames. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
469 |
handles := handles , allModules. |
458 | 470 |
]. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
471 |
|
458 | 472 |
showMethods value ifTrue:[ |
473 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
474 |
methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray. |
|
475 |
methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[ |
|
476 |
'compiled method - removed' , ' (in ' , mH pathName , ')' |
|
477 |
] ifFalse:[ |
|
478 |
'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')' |
|
479 |
]. |
|
480 |
]. |
|
481 |
l := l , methodNames. |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
482 |
handles := handles , methodObjects. |
458 | 483 |
]. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
484 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
485 |
showCObjects value ifTrue:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
486 |
allObjects := ObjectFileLoader loadedObjectHandles. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
487 |
cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
488 |
cObjectNames := cObjects collect:[:entry | entry pathName]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
489 |
l := l , cObjectNames. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
490 |
handles := handles , cObjects. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
491 |
]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
492 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
493 |
showOthers value ifTrue:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
494 |
allObjects := ObjectFileLoader loadedObjectHandles. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
495 |
otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
496 |
or:[h isMethodHandle |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
497 |
or:[h isClassLibHandle]]) not]) asArray. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
498 |
otherObjectNames := otherObjects collect:[:entry | entry pathName]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
499 |
l := l , otherObjectNames. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
500 |
handles := handles , otherObjects. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
501 |
]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
502 |
|
458 | 503 |
list1 list:l. |
504 |
unloadButton disable. |
|
505 |
]. |
|
219 | 506 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
507 |
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
|
508 |
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
|
509 |
showMethods onChangeSend:#value to:moduleListUpdater. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
510 |
showCObjects onChangeSend:#value to:moduleListUpdater. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
511 |
showOthers onChangeSend:#value to:moduleListUpdater. |
219 | 512 |
|
513 |
box := Dialog new. |
|
514 |
box label:(resources string:'Module dialog'). |
|
515 |
||
516 |
listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
517 |
listView1 model:list1. |
|
518 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
519 |
listView1 action:[:sel | |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
520 |
|info classNames tabs module| |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
521 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
522 |
listView1 middleButtonMenu:nil. |
219 | 523 |
|
467
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
524 |
box withWaitCursorDo:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
525 |
|nm fileName addr entry1 entry2 entry3 method| |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
526 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
527 |
tabs := TabulatorSpecification unit:#inch positions:#(0 2.6). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
528 |
|
467
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
529 |
(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
|
530 |
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
|
531 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
532 |
info isNil ifTrue:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
533 |
"/ selected a method, cObject or unknown |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
534 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
535 |
module := handles at:sel. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
536 |
fileName := module pathName. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
537 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
538 |
module isMethodHandle ifTrue:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
539 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
540 |
(method := module method) isNil ifTrue:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
541 |
nm := '** removed **'. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
542 |
] ifFalse:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
543 |
menu := PopUpMenu |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
544 |
labels:#('inspect' 'browse') |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
545 |
selectors:#(inspect browse). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
546 |
menu actionAt:#inspect put:[ method inspect ]. |
827
c74f542ba50b
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
821
diff
changeset
|
547 |
menu actionAt:#browse put:[ |who| |
c74f542ba50b
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
821
diff
changeset
|
548 |
who := method who. |
c74f542ba50b
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
821
diff
changeset
|
549 |
SystemBrowser |
c74f542ba50b
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
821
diff
changeset
|
550 |
openInClass:(who methodClass) |
c74f542ba50b
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
821
diff
changeset
|
551 |
selector:(who methodSelector) |
c74f542ba50b
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
821
diff
changeset
|
552 |
]. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
553 |
listView1 middleButtonMenu:menu. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
554 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
555 |
nm := (method whoString) asText emphasizeAllWith:(#color->Color blue). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
556 |
]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
557 |
entry1 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
558 |
entry1 colAt:1 put:'compiled method'; colAt:2 put:nm. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
559 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
560 |
entry2 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
561 |
entry2 colAt:1 put:'path'; colAt:2 put:fileName. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
562 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
563 |
entry3 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
564 |
entry3 colAt:1 put:'address'; colAt:2 put:('(16r) ' , (method code hexPrintString leftPaddedTo:8 with:$0)). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
565 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
566 |
list2 list:(Array with:entry1 with:entry2 with:entry3). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
567 |
] ifFalse:[ |
673 | 568 |
(module isFunctionObjectHandle |
569 |
and:[module functions notEmpty]) ifTrue:[ |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
570 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
571 |
menu := PopUpMenu |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
572 |
labels:#('inspect') |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
573 |
selectors:#(inspect). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
574 |
menu actionAt:#inspect put:[ module functions inspect ]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
575 |
listView1 middleButtonMenu:menu. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
576 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
577 |
list2 list:((module functions select:[:f | f notNil]) |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
578 |
collect:[:f | |entry| |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
579 |
entry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
580 |
entry colAt:1 put:(f name asText emphasizeAllWith:(#color->Color blue)). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
581 |
entry colAt:2 put:('address: (16r) ' , (f code hexPrintString leftPaddedTo:8 with:$0)). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
582 |
entry |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
583 |
]). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
584 |
] ifFalse:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
585 |
list2 list:#('nothing known about contents (no functions have been extracted)'). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
586 |
] |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
587 |
]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
588 |
|
458 | 589 |
unloadButton enable. |
590 |
] ifFalse:[ |
|
467
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
591 |
"/ selected a package |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
592 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
593 |
"/ 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
|
594 |
|
821
a81a0fb108d0
changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents:
815
diff
changeset
|
595 |
classNames := info classNames asSortedCollection. |
467
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
596 |
classNames := classNames collect:[:cName | |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
597 |
|cls entry rev listEntry| |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
598 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
599 |
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
|
600 |
listEntry colAt:1 put:cName. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
601 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
602 |
cls := Smalltalk classNamed:cName. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
603 |
cls isNil ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
604 |
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
|
605 |
] ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
606 |
rev := cls binaryRevision. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
607 |
rev notNil ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
608 |
cls isLoaded ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
609 |
entry := '(stub for: ' , rev. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
610 |
] ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
611 |
entry :='(bin: ' , rev. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
612 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
613 |
cls revision ~= rev ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
614 |
entry := entry , ' / src: ' , cls revision |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
615 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
616 |
listEntry colAt:2 put:entry , ')' |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
617 |
] ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
618 |
cls revision notNil ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
619 |
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
|
620 |
] |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
621 |
] |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
622 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
623 |
listEntry |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
624 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
625 |
list2 list:classNames. |
821
a81a0fb108d0
changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents:
815
diff
changeset
|
626 |
info dynamic ifTrue:[ |
467
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
627 |
unloadButton enable. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
628 |
] ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
629 |
unloadButton disable. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
630 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
631 |
] |
458 | 632 |
] |
219 | 633 |
]. |
634 |
||
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
635 |
|
219 | 636 |
panel := HorizontalPanelView new. |
637 |
||
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
638 |
panel add:(l := Label label:'show:'). |
219 | 639 |
l adjust:#left; borderWidth:0. |
347 | 640 |
panel add:(check := CheckBox label:'builtin' model:showBuiltIn). |
641 |
box makeTabable:check. |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
642 |
panel add:(check := CheckBox label:'classLibs' model:showModules). |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
643 |
canDoIt ifFalse:[ |
458 | 644 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
645 |
] ifTrue:[ |
458 | 646 |
box makeTabable:check. |
347 | 647 |
]. |
219 | 648 |
panel add:(check := CheckBox label:'methods' model:showMethods). |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
649 |
canDoIt ifFalse:[ |
458 | 650 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
651 |
] ifTrue:[ |
458 | 652 |
box makeTabable:check. |
347 | 653 |
]. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
654 |
panel add:(check := CheckBox label:'c-objects' model:showCObjects). |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
655 |
canDoIt ifFalse:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
656 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
657 |
] ifTrue:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
658 |
box makeTabable:check. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
659 |
]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
660 |
panel add:(check := CheckBox label:'others' model:showOthers). |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
661 |
canDoIt ifFalse:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
662 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
663 |
] ifTrue:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
664 |
box makeTabable:check. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
665 |
]. |
219 | 666 |
|
667 |
panel horizontalLayout:#fitSpace. |
|
458 | 668 |
"/ panel horizontalLayout:#leftSpace. |
219 | 669 |
|
347 | 670 |
box addComponent:panel tabable:false. |
219 | 671 |
|
347 | 672 |
box addVerticalSpace. |
219 | 673 |
box addComponent:listView1 tabable:true. |
674 |
listView1 topInset:(View viewSpacing + panel preferredExtent y). |
|
675 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
676 |
||
677 |
l := box addTextLabel:(resources string:'contained classes/subsets:'). |
|
678 |
l adjust:#left; borderWidth:0. |
|
679 |
l origin:0.0@0.4 corner:1.0@0.4. |
|
680 |
l topInset:(View viewSpacing). |
|
681 |
l bottomInset:((l preferredExtent y) negated - View viewSpacing). |
|
682 |
||
683 |
listView2 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
684 |
listView2 model:list2; printItems:false. |
|
685 |
box addComponent:listView2 tabable:true. |
|
686 |
listView2 origin:0.0@0.4 corner:1.0@1.0. "/ ; inset:2. |
|
687 |
listView2 disable. |
|
688 |
||
689 |
unloadButton := Button label:(resources string:'unload'). |
|
690 |
unloadButton action:[ |
|
458 | 691 |
self withWaitCursorDo:[ |
692 |
box withWaitCursorDo:[ |
|
693 |
|info idx pathName| |
|
219 | 694 |
|
458 | 695 |
idx := list1 selectionIndex. |
696 |
info := allModules at:idx ifAbsent:nil. |
|
219 | 697 |
|
672 | 698 |
list1 selectionIndex:nil. |
699 |
||
458 | 700 |
info isNil ifTrue:[ |
701 |
"/ selected a method |
|
740
95ef743fb8aa
fixed unload of method-modules
Claus Gittinger <cg@exept.de>
parents:
739
diff
changeset
|
702 |
"/ idx := idx - allModules size. |
672 | 703 |
pathName := (handles at:idx) pathName. |
219 | 704 |
|
458 | 705 |
] ifFalse:[ |
706 |
"/ selected a package |
|
821
a81a0fb108d0
changes for new moduleInfo reply
Claus Gittinger <cg@exept.de>
parents:
815
diff
changeset
|
707 |
pathName := info pathName. |
458 | 708 |
]. |
709 |
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
|
710 |
moduleListUpdater value. |
458 | 711 |
unloadButton disable. |
712 |
] |
|
713 |
] |
|
219 | 714 |
]. |
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
715 |
moduleListUpdater value. |
219 | 716 |
|
717 |
box addButton:unloadButton. |
|
718 |
box addAbortButtonLabelled:(resources string:'close'). |
|
719 |
||
720 |
y := box yPosition. |
|
721 |
listView2 topInset:(l preferredExtent y + 5). |
|
722 |
listView2 bottomInset:(box preferredExtent y - y). |
|
723 |
||
458 | 724 |
"/ box width:(400 min:(box device width * 2 // 3)); |
725 |
"/ height:(450 min:(box device height - 50)); |
|
726 |
"/ sizeFixed:true. |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
727 |
box open. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
728 |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
729 |
box destroy. |
219 | 730 |
|
731 |
"Modified: 17.9.1995 / 16:47:50 / claus" |
|
827
c74f542ba50b
use new Method>>who interface
Claus Gittinger <cg@exept.de>
parents:
821
diff
changeset
|
732 |
"Modified: 1.11.1996 / 16:36:14 / cg" |
219 | 733 |
! |
734 |
||
735 |
snapshot |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
736 |
|fileName| |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
737 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
738 |
fileName := DialogBox |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
739 |
request:(resources at:'filename for image:') withCRs |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
740 |
initialAnswer:(ObjectMemory nameForSnapshot) |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
741 |
okLabel:(resources at:'save') |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
742 |
title:(resources string:'save image') |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
743 |
onCancel:nil. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
744 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
745 |
fileName notNil ifTrue:[ |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
746 |
self showCursor:Cursor write. |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
747 |
[ |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
748 |
(ObjectMemory snapShotOn:fileName) ifFalse:[ |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
749 |
" |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
750 |
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
|
751 |
" |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
752 |
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
|
753 |
] |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
754 |
] valueNowOrOnUnwindDo:[ |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
755 |
self restoreCursors. |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
756 |
]. |
219 | 757 |
]. |
758 |
||
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
759 |
"Modified: 1.6.1996 / 17:02:45 / cg" |
219 | 760 |
! |
761 |
||
762 |
snapshotAndExit |
|
590 | 763 |
|fileName ok| |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
764 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
765 |
fileName := DialogBox |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
766 |
request:(resources at:'filename for image:') withCRs |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
767 |
initialAnswer:(ObjectMemory nameForSnapshot) |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
768 |
okLabel:(resources at:'save & exit') |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
769 |
title:(resources string:'save image & exit') |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
770 |
onCancel:nil. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
771 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
772 |
fileName notNil ifTrue:[ |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
773 |
self showCursor:Cursor write. |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
774 |
[ |
590 | 775 |
ok := ObjectMemory snapShotOn:fileName. |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
776 |
] valueNowOrOnUnwindDo:[ |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
777 |
self restoreCursors. |
590 | 778 |
]. |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
779 |
|
590 | 780 |
ok ifFalse:[ |
781 |
" |
|
782 |
snapshot failed for some reason (disk full, no permission etc.) |
|
783 |
Do NOT exit in this case. |
|
784 |
" |
|
785 |
self warn:(resources string:'failed to save snapshot image (disk full or not writable)'). |
|
786 |
] ifTrue:[ |
|
787 |
" |
|
788 |
saveAllViews tells all views to shutdown neatly |
|
789 |
(i.e. offer a chance to save the contents to a file). |
|
790 |
||
791 |
This is NOT required - all data should be in the snapshot ... |
|
792 |
... however, if remote disks/mountable filesystems are involved, |
|
793 |
which may not be present the next time, it may make sense to |
|
794 |
uncomment it and query for saving - time will show which is better. |
|
795 |
" |
|
796 |
" |
|
797 |
self saveAllViews. |
|
798 |
" |
|
799 |
Smalltalk exit |
|
404 | 800 |
] |
219 | 801 |
]. |
802 |
||
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
803 |
"Modified: 1.6.1996 / 17:02:07 / cg" |
219 | 804 |
! ! |
805 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
806 |
!Launcher methodsFor:'actions - goodies'! |
219 | 807 |
|
808 |
startCalendar |
|
809 |
Calendar open |
|
810 |
! |
|
811 |
||
812 |
startClock |
|
813 |
RoundClock open |
|
814 |
! |
|
815 |
||
816 |
startMailTool |
|
817 |
MailView open |
|
818 |
! |
|
819 |
||
820 |
startNewsTool |
|
821 |
NewsView open |
|
822 |
! ! |
|
823 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
824 |
!Launcher methodsFor:'actions - projects'! |
219 | 825 |
|
826 |
newProject |
|
827 |
Project notNil ifTrue:[ |
|
864 | 828 |
(ProjectView for:(Project new)) open |
219 | 829 |
] |
830 |
! |
|
831 |
||
832 |
selectProject |
|
833 |
|list box| |
|
834 |
||
835 |
Project notNil ifTrue:[ |
|
549 | 836 |
list := Project allInstances. |
837 |
box := ListSelectionBox new. |
|
838 |
box list:(list collect:[:p | p name]). |
|
839 |
box title:(resources string:'select a project'). |
|
840 |
box action:[:selection | |
|
841 |
|project| |
|
842 |
||
843 |
project := list detect:[:p | p name = selection] ifNone:[nil]. |
|
844 |
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
|
845 |
transcript showCR:'no such project.' |
549 | 846 |
] ifFalse:[ |
847 |
project showViews. |
|
848 |
Project current:project |
|
849 |
] |
|
850 |
]. |
|
851 |
box showAtPointer. |
|
852 |
box destroy |
|
219 | 853 |
] |
549 | 854 |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
855 |
"Modified: 5.7.1996 / 13:12:53 / cg" |
86 | 856 |
! ! |
857 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
858 |
!Launcher methodsFor:'actions - settings'! |
219 | 859 |
|
860 |
compilerSettings |
|
861 |
|box warnings warnSTX warnUnderscore warnOldStyle allowUnderscore immutableArrays |
|
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
862 |
warnSTXBox warnUnderscoreBox warnOldStyleBox warnCommonMistakes warnCommonMistakesBox |
219 | 863 |
stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions |
833
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
864 |
stcLibraries stcLibraryPath cc ccOptions historyLines catchRedefs keepSourceOptions keepSource |
780 | 865 |
constantFoldingOptions constantFolding justInTimeCompilation fullSingleStep |
782 | 866 |
warnEnabler check component oldIndent t supportsJustInTimeCompilation y |
867 |
y2 fullLineNumbers| |
|
219 | 868 |
|
869 |
warnings := Compiler warnings asValue. |
|
870 |
||
871 |
warnSTX := Compiler warnSTXSpecials asValue. |
|
872 |
warnUnderscore := Compiler warnUnderscoreInIdentifier asValue. |
|
873 |
warnOldStyle := Compiler warnOldStyleAssignment asValue. |
|
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
874 |
warnCommonMistakes := Compiler warnCommonMistakes asValue. |
219 | 875 |
allowUnderscore := Compiler allowUnderscoreInIdentifier asValue. |
876 |
immutableArrays := Compiler arraysAreImmutable asValue. |
|
782 | 877 |
fullLineNumbers := (Compiler lineNumberInfo == #full) asValue. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
878 |
|
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
879 |
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
|
880 |
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
|
881 |
constantFolding selectionIndex:3. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
882 |
|
219 | 883 |
stcCompilationOptions := #( always default never). |
695 | 884 |
stcCompilation := SelectionInList new |
885 |
list:(resources array:#('always' |
|
886 |
'primitive code only' |
|
887 |
'never' |
|
888 |
)). |
|
219 | 889 |
stcCompilation selectionIndex:2. |
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
890 |
(supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation) |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
891 |
ifTrue:[ |
780 | 892 |
justInTimeCompilation := ObjectMemory justInTimeCompilation:nil. |
893 |
fullSingleStep := ObjectMemory fullSingleStepSupport:nil. |
|
695 | 894 |
] ifFalse:[ |
780 | 895 |
justInTimeCompilation := false. |
896 |
fullSingleStep := false. |
|
695 | 897 |
]. |
898 |
justInTimeCompilation := justInTimeCompilation asValue. |
|
780 | 899 |
fullSingleStep := fullSingleStep asValue. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
900 |
|
219 | 901 |
stcIncludes := Compiler stcCompilationIncludes asValue. |
902 |
stcDefines := Compiler stcCompilationDefines asValue. |
|
903 |
stcOptions := Compiler stcCompilationOptions asValue. |
|
833
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
904 |
ccOptions := Compiler ccCompilationOptions asValue. |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
905 |
cc := Compiler ccPath asValue. |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
906 |
|
232 | 907 |
ObjectFileLoader notNil ifTrue:[ |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
908 |
(t := ObjectFileLoader searchedLibraries) notNil ifTrue:[ |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
909 |
stcLibraries := (String fromStringCollection:t separatedBy:' ') asValue. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
910 |
]. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
911 |
(t := ObjectFileLoader libPath) notNil ifTrue:[ |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
912 |
stcLibraryPath := t asValue. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
913 |
] |
232 | 914 |
]. |
219 | 915 |
|
916 |
catchRedefs := Class catchMethodRedefinitions asValue. |
|
917 |
historyLines := (HistoryManager notNil and:[HistoryManager isActive]) asValue. |
|
918 |
||
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
919 |
keepSourceOptions := #( keep reference absReference sourceReference discard ). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
920 |
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
|
921 |
keepSource selectionIndex:1. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
922 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
923 |
warnEnabler := [ |
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
924 |
warnings value ifTrue:[ |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
925 |
warnSTXBox enable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
926 |
warnOldStyleBox enable. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
927 |
warnCommonMistakesBox enable. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
928 |
allowUnderscore value ifTrue:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
929 |
warnUnderscoreBox enable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
930 |
] ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
931 |
warnUnderscoreBox disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
932 |
]. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
933 |
] ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
934 |
warnSTXBox disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
935 |
warnUnderscoreBox disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
936 |
warnOldStyleBox disable. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
937 |
warnCommonMistakesBox disable. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
938 |
]]. |
219 | 939 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
940 |
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
|
941 |
allowUnderscore onChangeSend:#value to:warnEnabler. |
219 | 942 |
|
943 |
box := DialogBox new. |
|
944 |
box label:(resources string:'Compiler settings'). |
|
945 |
||
946 |
box addCheckBox:(resources string:'catch method redefinitions') on:catchRedefs. |
|
947 |
check := box addCheckBox:(resources string:'keep history line in methods') on:historyLines. |
|
948 |
HistoryManager isNil ifTrue:[check disable]. |
|
949 |
||
378 | 950 |
box addPopUpList:(resources string:'fileIn source mode:') on:keepSource. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
951 |
keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
952 |
|
219 | 953 |
box addHorizontalLine. |
954 |
||
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
955 |
supportsJustInTimeCompilation ifTrue:[ |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
956 |
component := box |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
957 |
addCheckBox:(resources string:'just in time compilation to machine code') |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
958 |
on:justInTimeCompilation. |
780 | 959 |
|
960 |
component := box |
|
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
961 |
addCheckBox:(resources string:'detailed single step support') |
780 | 962 |
on:fullSingleStep. |
963 |
||
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
964 |
box addHorizontalLine. |
695 | 965 |
]. |
966 |
||
232 | 967 |
ObjectFileLoader notNil ifTrue:[ |
695 | 968 |
compilationList := box addPopUpList:(resources string:'stc compilation to machine code') on:stcCompilation. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
969 |
stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2). |
219 | 970 |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
971 |
component := box |
833
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
972 |
addLabelledInputField:(resources string:'include directories:') |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
973 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
974 |
on:stcIncludes |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
975 |
tabable:true |
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
976 |
separateAtX:0.3. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
977 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
695 | 978 |
component preferredExtent:(250 @ component preferredExtent y). |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
979 |
|
737 | 980 |
"/ box addVerticalSpace. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
981 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
982 |
component := box |
833
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
983 |
addLabelledInputField:(resources string:'defines:') |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
984 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
985 |
on:stcDefines |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
986 |
tabable:true |
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
987 |
separateAtX:0.3. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
988 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
695 | 989 |
component preferredExtent:(250 @ component preferredExtent y). |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
990 |
|
737 | 991 |
"/ box addVerticalSpace. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
992 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
993 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
994 |
addLabelledInputField:(resources string:'stc options:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
995 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
996 |
on:stcOptions |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
997 |
tabable:true |
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
998 |
separateAtX:0.3. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
999 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
695 | 1000 |
component preferredExtent:(250 @ component preferredExtent y). |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1001 |
|
833
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1002 |
"/ box addVerticalSpace. |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1003 |
|
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1004 |
component := box |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1005 |
addLabelledInputField:(resources string:'cc command:') |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1006 |
adjust:#right |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1007 |
on:cc |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1008 |
tabable:true |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1009 |
separateAtX:0.3. |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1010 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1011 |
component preferredExtent:(250 @ component preferredExtent y). |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1012 |
|
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1013 |
component := box |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1014 |
addLabelledInputField:(resources string:'cc options:') |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1015 |
adjust:#right |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1016 |
on:ccOptions |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1017 |
tabable:true |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1018 |
separateAtX:0.3. |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1019 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1020 |
component preferredExtent:(250 @ component preferredExtent y). |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1021 |
|
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1022 |
stcLibraries notNil ifTrue:[ |
737 | 1023 |
"/ box addVerticalSpace. |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1024 |
|
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1025 |
component := box |
833
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1026 |
addLabelledInputField:(resources string:'C-libraries:') |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1027 |
adjust:#right |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1028 |
on:stcLibraries |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1029 |
tabable:true |
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1030 |
separateAtX:0.3. |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1031 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
695 | 1032 |
component preferredExtent:(250 @ component preferredExtent y). |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1033 |
]. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1034 |
|
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1035 |
stcLibraryPath notNil ifTrue:[ |
737 | 1036 |
"/ box addVerticalSpace. |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1037 |
|
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1038 |
component := box |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1039 |
addLabelledInputField:(resources string:'stc libPath:') |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1040 |
adjust:#right |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1041 |
on:stcLibraryPath |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1042 |
tabable:true |
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1043 |
separateAtX:0.3. |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1044 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
695 | 1045 |
component preferredExtent:(250 @ component preferredExtent y). |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1046 |
]. |
219 | 1047 |
|
737 | 1048 |
"/ box addVerticalSpace. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1049 |
box addHorizontalLine. |
219 | 1050 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1051 |
"/ if there is no compiler around, |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1052 |
"/ change to compile nothing, and disable the checkBoxes |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1053 |
Compiler canCreateMachineCode ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1054 |
stcCompilation selectionIndex:3. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1055 |
compilationList disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1056 |
]. |
219 | 1057 |
]. |
1058 |
||
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1059 |
y := box yPosition. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1060 |
|
737 | 1061 |
"/ box addVerticalSpace. |
782 | 1062 |
component := box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore. |
1063 |
component width:0.4. |
|
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1064 |
|
737 | 1065 |
"/ box addVerticalSpace. |
782 | 1066 |
component := box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays. |
1067 |
component width:0.4. |
|
1068 |
y2 := box yPosition. |
|
1069 |
||
1070 |
box yPosition:y. |
|
1071 |
box leftIndent:0. |
|
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1072 |
|
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1073 |
component :=box addPopUpList:(resources string:'constant folding:') on:constantFolding. |
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1074 |
component superView left:0.5; width:0.5. |
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1075 |
constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1). |
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1076 |
|
782 | 1077 |
component := box addCheckBox:(resources string:'full lineNumber info') on:fullLineNumbers. |
1078 |
component left:0.5; width:0.4. |
|
1079 |
box yPosition:(box yPosition max:y2). |
|
1080 |
||
695 | 1081 |
|
219 | 1082 |
box addHorizontalLine. |
1083 |
||
1084 |
box addCheckBox:(resources string:'warnings') on:warnings. |
|
737 | 1085 |
"/ box addVerticalSpace. |
343 | 1086 |
oldIndent := box leftIndent. |
219 | 1087 |
box leftIndent:30. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1088 |
|
737 | 1089 |
y := box yPosition. |
1090 |
||
760 | 1091 |
warnSTXBox := box addCheckBox:(resources string:'ST/X extensions') on:warnSTX. |
737 | 1092 |
warnSTXBox width:0.4. |
1093 |
"/ box addVerticalSpace. |
|
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1094 |
|
219 | 1095 |
warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore. |
737 | 1096 |
warnUnderscoreBox width:0.4. |
1097 |
"/ box addVerticalSpace. |
|
1098 |
||
1099 |
box yPosition:y. |
|
1100 |
box leftIndent:0. |
|
219 | 1101 |
warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle. |
737 | 1102 |
warnOldStyleBox left:0.5; width:0.4. |
1103 |
"/ box addVerticalSpace. |
|
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1104 |
|
679 | 1105 |
warnCommonMistakesBox := box addCheckBox:(resources string:'common mistakes') on:warnCommonMistakes. |
737 | 1106 |
warnCommonMistakesBox left:0.5; width:0.4. |
1107 |
"/ box addVerticalSpace. |
|
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1108 |
|
343 | 1109 |
box leftIndent:oldIndent. |
219 | 1110 |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1111 |
box |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1112 |
addHelpButtonFor:'Launcher/compilerSettings.html'; |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1113 |
addAbortButton; |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1114 |
addOkButton. |
219 | 1115 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1116 |
warnEnabler value. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1117 |
box open. |
219 | 1118 |
|
1119 |
box accepted ifTrue:[ |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1120 |
HistoryManager notNil ifTrue:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1121 |
historyLines value ifTrue:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1122 |
HistoryManager activate |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1123 |
] ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1124 |
HistoryManager deactivate |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1125 |
]. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1126 |
]. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1127 |
Class catchMethodRedefinitions:catchRedefs value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1128 |
ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1129 |
Compiler warnings:warnings value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1130 |
Compiler warnSTXSpecials:warnSTX value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1131 |
Compiler warnOldStyleAssignment:warnOldStyle value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1132 |
Compiler warnUnderscoreInIdentifier:warnUnderscore value. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1133 |
Compiler warnCommonMistakes:warnCommonMistakes value. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1134 |
Compiler allowUnderscoreInIdentifier:allowUnderscore value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1135 |
Compiler arraysAreImmutable:immutableArrays value. |
782 | 1136 |
fullLineNumbers value ifTrue:[ |
1137 |
Compiler lineNumberInfo:#full. |
|
1138 |
] ifFalse:[ |
|
1139 |
Compiler lineNumberInfo:true |
|
1140 |
]. |
|
1141 |
||
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1142 |
Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1143 |
Compiler stcCompilationIncludes:stcIncludes value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1144 |
Compiler stcCompilationDefines:stcDefines value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1145 |
Compiler stcCompilationOptions:stcOptions value. |
833
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1146 |
Compiler ccCompilationOptions:ccOptions value. |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1147 |
Compiler ccPath:cc value. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1148 |
Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex). |
700 | 1149 |
|
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
1150 |
supportsJustInTimeCompilation ifTrue:[ |
700 | 1151 |
justInTimeCompilation value ifTrue:[ |
1152 |
Method allInstancesDo:[:m | m checked:false]. |
|
1153 |
]. |
|
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
1154 |
ObjectMemory justInTimeCompilation:justInTimeCompilation value. |
780 | 1155 |
ObjectMemory fullSingleStepSupport:fullSingleStep value. |
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
1156 |
]. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1157 |
ObjectFileLoader notNil ifTrue:[ |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1158 |
stcLibraries notNil ifTrue:[ |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1159 |
ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords). |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1160 |
]. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1161 |
stcLibraryPath notNil ifTrue:[ |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1162 |
ObjectFileLoader libPath:(stcLibraryPath value). |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1163 |
] |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1164 |
] |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1165 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1166 |
box destroy |
219 | 1167 |
|
1168 |
"Modified: 10.9.1995 / 19:19:18 / claus" |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1169 |
"Modified: 9.9.1996 / 22:42:47 / stefan" |
833
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1170 |
"Modified: 5.11.1996 / 18:00:06 / cg" |
219 | 1171 |
! |
1172 |
||
594 | 1173 |
displaySettings |
1174 |
|box |
|
614 | 1175 |
sizes sizeNames sizeList sizeX sizeY deepIcons |
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
1176 |
isColorMonitor useFixPalette idx ditherStyles ditherSyms ditherList |
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
1177 |
y component screen visual| |
594 | 1178 |
|
1179 |
sizeNames := #( |
|
1180 |
'9'' (212mm x 160mm) GAS plasma/LCD' |
|
1181 |
'11.3'' (235mm x 175mm) LCD' |
|
1182 |
'16'' (275mm x 208mm)' |
|
636 | 1183 |
'17'' (315mm x 245mm) SUN ELC' |
594 | 1184 |
'17'' (325mm x 245mm)' |
635 | 1185 |
'19'' (340mm x 270mm) (NCD)' |
594 | 1186 |
'20'' (350mm x 280mm) (SGI)' |
1187 |
'21'' (365mm x 285mm) (Eizo / Nanao)' |
|
1188 |
). |
|
1189 |
sizes := #( (212 160) |
|
1190 |
(235 175) |
|
1191 |
(275 208) |
|
636 | 1192 |
(315 245) |
594 | 1193 |
(325 245) |
635 | 1194 |
(340 270) |
594 | 1195 |
(350 280) |
1196 |
(365 285) |
|
1197 |
). |
|
1198 |
||
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1199 |
screen := Screen current. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1200 |
visual := screen visualType. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1201 |
|
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1202 |
isColorMonitor := screen hasColors asValue. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1203 |
deepIcons := screen supportsDeepIcons asValue. |
670
7c958acbc5e8
fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents:
668
diff
changeset
|
1204 |
useFixPalette := screen fixColors notNil asValue. |
594 | 1205 |
|
1206 |
sizeList := SelectionInList with:sizeNames. |
|
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1207 |
sizeX := screen widthInMillimeter asValue. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1208 |
sizeY := screen heightInMillimeter asValue. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1209 |
|
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1210 |
ditherList := SelectionInList with:sizeNames. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1211 |
|
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1212 |
(visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1213 |
ditherStyles := #('threshold' 'ordered dither' 'error diffusion'). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1214 |
ditherSyms := #(threshold ordered floydSteinberg). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1215 |
] ifFalse:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1216 |
visual ~~ #TrueColor ifTrue:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1217 |
ditherStyles := #('nearest color' 'error diffusion'). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1218 |
ditherSyms := #(ordered floydSteinberg). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1219 |
] |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1220 |
]. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1221 |
ditherSyms notNil ifTrue:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1222 |
ditherList list:ditherStyles. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1223 |
ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1224 |
]. |
594 | 1225 |
|
1226 |
box := DialogBox new. |
|
1227 |
box label:(resources string:'Display screen settings'). |
|
1228 |
||
1229 |
(box addTextLabel:(resources string:'Actual visible screen area:')) |
|
1230 |
adjust:#left. |
|
1231 |
||
1232 |
(box addPopUpList:(resources string:'common sizes:') on:sizeList) |
|
1233 |
label:'monitor size'. |
|
1234 |
||
1235 |
idx := sizes findFirst:[:entry | |
|
1236 |
((entry at:1) = sizeX value) |
|
1237 |
and:[((entry at:2) = sizeY value)] |
|
1238 |
]. |
|
1239 |
idx ~~ 0 ifTrue:[ |
|
1240 |
sizeList selectionIndex:idx |
|
1241 |
]. |
|
1242 |
||
1243 |
sizeList onChangeSend:#value to:[ |
|
1244 |
|idx| |
|
1245 |
||
1246 |
idx := sizeList selectionIndex. |
|
1247 |
sizeX value:((sizes at:idx) at:1). |
|
1248 |
sizeY value:((sizes at:idx) at:2). |
|
1249 |
]. |
|
1250 |
||
1251 |
y := box yPosition. |
|
1252 |
component := box addTextLabel:(resources string:'screen size:'). |
|
1253 |
component width:0.3; adjust:#right; borderWidth:0. |
|
1254 |
||
1255 |
box yPosition:y. |
|
1256 |
component := box addInputFieldOn:sizeX tabable:true. |
|
1257 |
component width:0.25; left:0.3; |
|
595 | 1258 |
immediateAccept:false; acceptOnLeave:false; |
594 | 1259 |
cursorMovementWhenUpdating:#beginOfLine; |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1260 |
converter:(PrintConverter new initForInteger); |
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1261 |
model:sizeX. |
594 | 1262 |
|
1263 |
box yPosition:y. |
|
1264 |
component := box addTextLabel:(' x '). |
|
1265 |
component width:0.1; left:0.55; adjust:#center; borderWidth:0. |
|
1266 |
||
1267 |
box yPosition:y. |
|
1268 |
component := box addInputFieldOn:sizeY tabable:true. |
|
1269 |
component width:0.25; left:0.65; |
|
595 | 1270 |
immediateAccept:false; acceptOnLeave:false; |
594 | 1271 |
cursorMovementWhenUpdating:#beginOfLine; |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1272 |
converter:(PrintConverter new initForInteger); |
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1273 |
model:sizeY. |
594 | 1274 |
|
1275 |
box yPosition:y. |
|
1276 |
component := box addTextLabel:('(mm)'). |
|
1277 |
component width:0.1; left:0.9; adjust:#center; borderWidth:0. |
|
1278 |
||
1279 |
box addVerticalSpace. |
|
1280 |
box addHorizontalLine. |
|
1281 |
box addVerticalSpace. |
|
1282 |
||
1283 |
box addCheckBox:(resources string:'color monitor') on:isColorMonitor. |
|
1284 |
||
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1285 |
visual == #PseudoColor ifTrue:[ |
622
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1286 |
box addVerticalSpace. |
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1287 |
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
|
1288 |
]. |
594 | 1289 |
|
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1290 |
ditherSyms notNil ifTrue:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1291 |
box addVerticalSpace. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1292 |
component := box addPopUpList:(resources string:'image display:') on:ditherList. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1293 |
component label:'image display'. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1294 |
component superView horizontalLayout:#leftSpace. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1295 |
]. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1296 |
|
614 | 1297 |
box addVerticalSpace. |
1298 |
box addCheckBox:(resources string:'allow colored/grayscale icons') on:deepIcons. |
|
1299 |
||
594 | 1300 |
box |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1301 |
addHelpButtonFor:'Launcher/screenSettings.html'; |
594 | 1302 |
addAbortButton; addOkButton. |
1303 |
box open. |
|
1304 |
||
1305 |
box accepted ifTrue:[ |
|
632 | 1306 |
Image flushDeviceImages. |
1307 |
||
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1308 |
screen visualType == #PseudoColor ifTrue:[ |
622
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1309 |
useFixPalette value ifTrue:[ |
638
5541c2f7836f
warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
1310 |
Color colorAllocationFailSignal handle:[:ex | |
5541c2f7836f
warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
1311 |
self warn:(resources string:'Could not allocate colors.'). |
5541c2f7836f
warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
1312 |
] do:[ |
670
7c958acbc5e8
fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents:
668
diff
changeset
|
1313 |
Color getColorsRed:6 green:6 blue:4 on:screen |
638
5541c2f7836f
warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
1314 |
] |
622
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1315 |
] ifFalse:[ |
670
7c958acbc5e8
fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents:
668
diff
changeset
|
1316 |
screen releaseFixColors |
622
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1317 |
] |
594 | 1318 |
]. |
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1319 |
screen hasColors:isColorMonitor value. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1320 |
screen widthInMillimeter:sizeX value. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1321 |
screen heightInMillimeter:sizeY value. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1322 |
|
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1323 |
screen supportsDeepIcons:deepIcons value. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1324 |
ditherSyms notNil ifTrue:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1325 |
Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1326 |
]. |
614 | 1327 |
|
594 | 1328 |
self withWaitCursorDo:[ |
1329 |
View defaultStyle:(View defaultStyle). |
|
1330 |
]. |
|
1331 |
]. |
|
1332 |
box destroy |
|
1333 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1334 |
"Modified: 9.9.1996 / 22:43:04 / stefan" |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1335 |
"Modified: 30.9.1996 / 23:25:22 / cg" |
594 | 1336 |
! |
1337 |
||
398 | 1338 |
fontSettings |
406 | 1339 |
(self fontBoxForEncoding:nil) ifTrue:[ |
1340 |
self reopenLauncher. |
|
1341 |
] |
|
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
1342 |
|
398 | 1343 |
"Created: 26.2.1996 / 22:52:51 / cg" |
406 | 1344 |
"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
|
1345 |
! |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
1346 |
|
219 | 1347 |
keyboardSetting |
1348 |
|mappings listOfRawKeys listOfFunctions |
|
1349 |
box l |
|
1350 |
list1 list2 listView1 listView2 |
|
1351 |
frame selectionForwarder macroForwarder macroTextView y| |
|
1352 |
||
1353 |
mappings := Screen current keyboardMap. |
|
1354 |
||
1355 |
listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort. |
|
1356 |
listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort. |
|
1357 |
||
1358 |
selectionForwarder := Plug new. |
|
1359 |
selectionForwarder respondTo:#showFunction |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1360 |
with:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1361 |
|raw| |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1362 |
raw := list1 selection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1363 |
list2 retractInterestsFor:selectionForwarder. |
568 | 1364 |
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
|
1365 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1366 |
]. |
219 | 1367 |
selectionForwarder respondTo:#showRawKey |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1368 |
with:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1369 |
|f raw| |
219 | 1370 |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1371 |
f := list2 selection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1372 |
list1 retractInterestsFor:selectionForwarder. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1373 |
raw := mappings keyAtValue:f asString. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1374 |
raw isNil ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1375 |
raw := mappings keyAtValue:f first. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1376 |
raw isNil ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1377 |
raw := mappings keyAtValue:f asSymbol. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1378 |
] |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1379 |
]. |
568 | 1380 |
list1 selection:raw. |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1381 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1382 |
]. |
219 | 1383 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1384 |
macroForwarder := [ |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1385 |
|f macro indent| |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1386 |
f := list2 selection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1387 |
(f startsWith:'Cmd') ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1388 |
f := f copyFrom:4 |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1389 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1390 |
macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1391 |
macro notNil ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1392 |
macro := macro asStringCollection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1393 |
indent := macro |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1394 |
inject:99999 into:[:min :element | |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1395 |
|stripped| |
219 | 1396 |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1397 |
stripped := element withoutLeadingSeparators. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1398 |
stripped size == 0 ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1399 |
min |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1400 |
] ifFalse:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1401 |
min min:(element size - stripped size) |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1402 |
] |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1403 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1404 |
indent ~~ 0 ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1405 |
macro := macro collect:[:line | |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1406 |
line size > indent ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1407 |
line copyFrom:indent+1 |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1408 |
] ifFalse:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1409 |
line |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1410 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1411 |
] |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1412 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1413 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1414 |
macroTextView contents:macro. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1415 |
]. |
219 | 1416 |
|
1417 |
list1 := SelectionInList with:listOfRawKeys. |
|
1418 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
|
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
1419 |
|
219 | 1420 |
list2 := SelectionInList with:listOfFunctions. |
1421 |
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
|
1422 |
list2 onChangeSend:#value to:macroForwarder. |
219 | 1423 |
|
1424 |
box := Dialog new. |
|
1425 |
box label:(resources string:'Keyboard mappings'). |
|
1426 |
||
1427 |
l := box addTextLabel:(resources string:'KEY_MSG') withCRs. |
|
1428 |
l adjust:#left; borderWidth:0. |
|
1429 |
||
1430 |
frame := View new. |
|
1431 |
frame extent:300 @ 300. |
|
1432 |
frame borderWidth:0. |
|
1433 |
||
1434 |
listView1 := ScrollableView for:SelectionInListView in:frame. |
|
1435 |
listView1 model:list1. |
|
1436 |
listView1 origin:0.0@0.0 corner:0.5@1.0; inset:2. |
|
1437 |
||
1438 |
listView2 := ScrollableView for:SelectionInListView in:frame. |
|
1439 |
listView2 model:list2. |
|
1440 |
listView2 origin:0.5@0.0 corner:1.0@1.0; inset:2. |
|
1441 |
||
1442 |
frame topInset:box yPosition. |
|
1443 |
box addComponent:frame withExtent:350@200. |
|
1444 |
box makeTabable:listView1. |
|
1445 |
box makeTabable:listView2. |
|
1446 |
frame origin:0.0@0.0 corner:1.0@0.6. |
|
1447 |
||
1448 |
box addVerticalSpace. |
|
1449 |
||
1450 |
l := box addTextLabel:(resources string:'Macro text (if any):') withCRs. |
|
1451 |
l adjust:#left; borderWidth:0. |
|
1452 |
l origin:0.0@0.6 corner:1.0@0.6. |
|
1453 |
l topInset:(View viewSpacing). |
|
1454 |
l bottomInset:(l preferredExtent y negated - View viewSpacing). |
|
1455 |
||
1456 |
macroTextView := HVScrollableView for:TextView miniScroller:true. |
|
1457 |
box addComponent:macroTextView tabable:true. |
|
1458 |
macroTextView origin:0.0@0.6 corner:1.0@1.0. |
|
1459 |
y := box yPosition. |
|
1460 |
||
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1461 |
box |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1462 |
addHelpButtonFor:'Launcher/keyboardSetting.html'; |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1463 |
"addAbortButton;" |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1464 |
addOkButton. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1465 |
|
219 | 1466 |
macroTextView topInset:(l preferredExtent y + 5). |
1467 |
macroTextView bottomInset:(box preferredExtent y - y). |
|
1468 |
||
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1469 |
box open. |
219 | 1470 |
|
1471 |
box accepted ifTrue:[ |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1472 |
"no action yet ..." |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1473 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1474 |
box destroy |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1475 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1476 |
"Modified: 31.5.1996 / 22:55:51 / cg" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1477 |
"Modified: 9.9.1996 / 22:43:17 / stefan" |
219 | 1478 |
! |
1479 |
||
1480 |
languageSetting |
|
777
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1481 |
|listOfLanguages translatedLanguages switch box| |
219 | 1482 |
|
1483 |
" |
|
410 | 1484 |
get list of supported languages from the launchers resources ... |
219 | 1485 |
" |
410 | 1486 |
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
|
1487 |
translatedLanguages := resources array:listOfLanguages. |
219 | 1488 |
|
1489 |
box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs. |
|
1490 |
box label:(resources string:'Language selection'). |
|
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
1491 |
box list:translatedLanguages. |
219 | 1492 |
box initialText:(Language). |
1493 |
box action:[:newLanguage | |
|
410 | 1494 |
self withWaitCursorDo:[ |
777
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1495 |
|fontPref idx language oldLanguage enc answer matchingFonts| |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1496 |
|
410 | 1497 |
idx := translatedLanguages indexOf:newLanguage withoutSeparators. |
1498 |
idx ~~ 0 ifTrue:[ |
|
1499 |
language := listOfLanguages at:idx |
|
1500 |
] ifFalse:[ |
|
1501 |
language := newLanguage |
|
1502 |
]. |
|
777
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1503 |
|
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1504 |
"/ check if the new language needs a differently encoded font; |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1505 |
"/ ask user to switch font and allow cancellation. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1506 |
"/ Otherwise, you are left with unreadable menu & button items ... |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1507 |
|
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1508 |
oldLanguage := Smalltalk language. |
514
e48fbcbc358d
do not directly access the Language variable
Claus Gittinger <cg@exept.de>
parents:
511
diff
changeset
|
1509 |
Smalltalk language:language asSymbol. |
777
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1510 |
ResourcePack flushCachedResourcePacks. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1511 |
fontPref := self class classResources at:'PREFERRED_FONT_ENCODING'. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1512 |
Smalltalk language:oldLanguage. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1513 |
|
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1514 |
switch := true. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1515 |
enc := MenuView defaultFont encoding. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1516 |
(fontPref match:enc) ifFalse:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1517 |
"/ look if there is one at all. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1518 |
matchingFonts := Screen current listOfAvailableFonts select:[:f | fontPref match:f encoding]. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1519 |
matchingFonts size == 0 ifTrue:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1520 |
(Dialog |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1521 |
confirm:(resources |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1522 |
string:'your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)' |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1523 |
with:fontPref) withCRs) |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1524 |
ifFalse:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1525 |
switch := false |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1526 |
] |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1527 |
] ifFalse:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1528 |
answer := Dialog |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1529 |
confirmWithCancel:(resources |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1530 |
string:'menu font is not %1-encoded.\\Change it ?' |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1531 |
with:fontPref) withCRs |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1532 |
labels:(resources |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1533 |
array:#('cancel' 'no' 'yes')) |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1534 |
default:3. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1535 |
answer isNil ifTrue:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1536 |
switch := false |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1537 |
] ifFalse:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1538 |
answer ifTrue:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1539 |
switch := (self fontBoxForEncoding:fontPref) |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1540 |
] |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1541 |
]. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1542 |
]. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1543 |
]. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1544 |
|
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1545 |
switch ifTrue:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1546 |
transcript showCR:'change language to ' , newLanguage , ' ...'. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1547 |
Smalltalk language:language asSymbol. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1548 |
ResourcePack flushCachedResourcePacks |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1549 |
]. |
410 | 1550 |
]. |
777
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1551 |
switch ifTrue:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1552 |
self reopenLauncher. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1553 |
] |
219 | 1554 |
]. |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1555 |
box |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1556 |
addHelpButtonFor:'Launcher/languageSetting.html'. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1557 |
box open. |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1558 |
box destroy |
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
1559 |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1560 |
"Modified: 9.9.1996 / 22:43:27 / stefan" |
777
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
1561 |
"Modified: 18.10.1996 / 15:09:16 / cg" |
219 | 1562 |
! |
1563 |
||
341 | 1564 |
memorySettings |
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
1565 |
|box igcLimit igcFreeLimit igcFreeAmount newSpaceSize |
440 | 1566 |
compressLimit |
773
98efb7f5e8fa
prepared dynamic-compiler controls
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
1567 |
oldIncr component fields codeLimit codeTrigger| |
341 | 1568 |
|
1569 |
"/ |
|
1570 |
"/ extract relevant system settings ... |
|
1571 |
"/ |
|
1572 |
igcLimit := ObjectMemory incrementalGCLimit asValue. |
|
1573 |
igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue. |
|
1574 |
igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue. |
|
1575 |
newSpaceSize := ObjectMemory newSpaceSize asValue. |
|
1576 |
oldIncr := ObjectMemory oldSpaceIncrement asValue. |
|
440 | 1577 |
compressLimit := ObjectMemory oldSpaceCompressLimit asValue. |
774 | 1578 |
codeLimit := ObjectMemory dynamicCodeLimit asValue. |
1579 |
codeTrigger := ObjectMemory dynamicCodeGCTrigger asValue. |
|
341 | 1580 |
|
1581 |
"/ |
|
1582 |
"/ create a box on those values ... |
|
1583 |
"/ |
|
1584 |
fields := OrderedCollection new. |
|
1585 |
||
1586 |
box := DialogBox new. |
|
1587 |
box label:(resources string:'Memory manager settings'). |
|
1588 |
||
345 | 1589 |
box addTextLabel:'Warning - invalid settings may result in poor performance. |
341 | 1590 |
|
1591 |
You have been warned.'. |
|
1592 |
box addHorizontalLine. |
|
1593 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1594 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1595 |
addLabelledInputField:(resources string:'size of newSpace:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1596 |
adjust:#right |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1597 |
on:nil "/ newSpaceSize |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1598 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1599 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1600 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1601 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1602 |
component model:newSpaceSize. |
341 | 1603 |
fields add:component. |
1604 |
||
1605 |
box addHorizontalLine. |
|
1606 |
||
1607 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1608 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1609 |
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
|
1610 |
adjust:#right |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1611 |
on:nil "/ igcLimit |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1612 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1613 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1614 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1615 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1616 |
component model:igcLimit. |
341 | 1617 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1618 |
|
345 | 1619 |
box addTextLabel:'(start IGC whenever this amount has been allocated)'. |
341 | 1620 |
box addHorizontalLine. |
1621 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1622 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1623 |
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
|
1624 |
adjust:#right |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1625 |
on:nil "/ igcFreeLimit |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1626 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1627 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1628 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1629 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1630 |
component model:igcFreeLimit. |
341 | 1631 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1632 |
|
341 | 1633 |
box addTextLabel:'(start IGC whenever freespace drops below this)'. |
1634 |
box addHorizontalLine. |
|
1635 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1636 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1637 |
addLabelledInputField:(resources string:'incremental GC amount:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1638 |
adjust:#right |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1639 |
on:nil "/ igcFreeAmount |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1640 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1641 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1642 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1643 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1644 |
component model:igcFreeAmount. |
341 | 1645 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1646 |
|
345 | 1647 |
box addTextLabel:'(try to keep this amount for peak requests)'. |
341 | 1648 |
box addHorizontalLine. |
1649 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1650 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1651 |
addLabelledInputField:(resources string:'oldspace increment:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1652 |
adjust:#right |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1653 |
on:nil "/ oldIncr |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1654 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1655 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1656 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1657 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1658 |
component model:oldIncr. |
341 | 1659 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1660 |
|
345 | 1661 |
box addTextLabel:'(increase oldSpace in chunks of this size)'. |
341 | 1662 |
box addHorizontalLine. |
1663 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1664 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1665 |
addLabelledInputField:(resources string:'oldspace compress limit:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1666 |
adjust:#right |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1667 |
on:nil "/ compressLimit |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1668 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1669 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1670 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1671 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
1672 |
component model:compressLimit. |
440 | 1673 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1674 |
|
440 | 1675 |
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
|
1676 |
box addHorizontalLine. |
440 | 1677 |
|
774 | 1678 |
ObjectMemory supportsJustInTimeCompilation ifTrue:[ |
1679 |
component := box |
|
1680 |
addLabelledInputField:(resources string:'dynamic code limit:') |
|
1681 |
adjust:#right |
|
1682 |
on:nil |
|
1683 |
tabable:true |
|
1684 |
separateAtX:0.7. |
|
1685 |
component acceptOnLeave:false. |
|
1686 |
component converter:(PrintConverter new initForNumberOrNil). |
|
1687 |
component model:codeLimit. |
|
1688 |
fields add:component. |
|
1689 |
||
1690 |
box addTextLabel:'(flush dynamic compiled code to stay within this limit)'. |
|
1691 |
box addHorizontalLine. |
|
1692 |
||
1693 |
component := box |
|
1694 |
addLabelledInputField:(resources string:'dynamic code GC trigger:') |
|
1695 |
adjust:#right |
|
1696 |
on:nil |
|
1697 |
tabable:true |
|
1698 |
separateAtX:0.7. |
|
1699 |
component acceptOnLeave:false. |
|
1700 |
component converter:(PrintConverter new initForNumberOrNil). |
|
1701 |
component model:codeTrigger. |
|
1702 |
fields add:component. |
|
1703 |
||
1704 |
box addTextLabel:'(start incremental GC whenever this amount of code has been allocated)'. |
|
1705 |
box addHorizontalLine. |
|
1706 |
]. |
|
773
98efb7f5e8fa
prepared dynamic-compiler controls
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
1707 |
|
341 | 1708 |
box addAbortButton; addOkButton. |
1709 |
||
1710 |
"/ |
|
1711 |
"/ show the box ... |
|
1712 |
"/ |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1713 |
box open. |
341 | 1714 |
|
1715 |
"/ |
|
1716 |
"/ update system settings |
|
1717 |
"/ |
|
1718 |
box accepted ifTrue:[ |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1719 |
fields do:[:comp | comp accept]. |
341 | 1720 |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1721 |
igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1722 |
ObjectMemory freeSpaceGCAmount:igcFreeAmount value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1723 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1724 |
igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1725 |
ObjectMemory freeSpaceGCLimit:igcFreeLimit value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1726 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1727 |
igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1728 |
ObjectMemory incrementalGCLimit:igcLimit value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1729 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1730 |
newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1731 |
ObjectMemory newSpaceSize:newSpaceSize value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1732 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1733 |
oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1734 |
ObjectMemory oldSpaceIncrement:oldIncr value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1735 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1736 |
ObjectMemory oldSpaceCompressLimit:compressLimit value. |
774 | 1737 |
ObjectMemory dynamicCodeLimit:codeLimit value. |
1738 |
ObjectMemory dynamicCodeGCTrigger:codeTrigger value. |
|
341 | 1739 |
]. |
1740 |
box destroy |
|
1741 |
||
774 | 1742 |
"Modified: 17.10.1996 / 20:21:16 / cg" |
341 | 1743 |
! |
1744 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1745 |
messageSettings |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1746 |
|box vmInfo vmErrors displayErrors classInfos| |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1747 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1748 |
vmInfo := ObjectMemory infoPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1749 |
vmErrors := ObjectMemory debugPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1750 |
classInfos := Object infoPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1751 |
displayErrors := DeviceWorkstation errorPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1752 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1753 |
box := DialogBox new. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1754 |
box label:(resources string:'Messages'). |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1755 |
"/ box extent:200@300. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1756 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1757 |
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
|
1758 |
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
|
1759 |
box addHorizontalLine. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1760 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1761 |
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
|
1762 |
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
|
1763 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1764 |
box addAbortButton; addOkButton. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1765 |
box open. |
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1766 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1767 |
box accepted ifTrue:[ |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1768 |
ObjectMemory infoPrinting:vmInfo value. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1769 |
ObjectMemory debugPrinting:vmErrors value. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1770 |
Object infoPrinting:classInfos value. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1771 |
DeviceWorkstation errorPrinting:displayErrors value. |
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1772 |
]. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1773 |
box destroy |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1774 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1775 |
"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
|
1776 |
! |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1777 |
|
219 | 1778 |
miscSettings |
327 | 1779 |
|box check logDoits shadows updChanges changeFileName returnFocus |
711
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1780 |
loadBinaries compileLazy hostNameInLabel useManager hasManager |
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1781 |
repository repositoryHolder localSourceFirst |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1782 |
showAccelerators sourceCacheDir cacheEntry |
843 | 1783 |
component localCheck oldIndent nm fn manager |
1784 |
keepMethodHistory| |
|
1785 |
||
1786 |
"/ |
|
249 | 1787 |
"/ extract relevant system settings ... |
1788 |
"/ |
|
843 | 1789 |
keepMethodHistory := Class methodHistory notNil asValue. |
219 | 1790 |
logDoits := Smalltalk logDoits asValue. |
1791 |
shadows := PopUpView shadows asValue. |
|
1792 |
hostNameInLabel := StandardSystemView includeHostNameInLabel asValue. |
|
327 | 1793 |
returnFocus := Dialog returnFocusWhenClosingModalBoxes asValue. |
219 | 1794 |
updChanges := Class updatingChanges asValue. |
1795 |
changeFileName := ObjectMemory nameForChanges asValue. |
|
711
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1796 |
|
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1797 |
hasManager := AbstractSourceCodeManager notNil |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1798 |
and:[AbstractSourceCodeManager isLoaded]. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1799 |
|
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1800 |
hasManager ifTrue:[ |
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1801 |
useManager := (manager := Smalltalk at:#SourceCodeManager) notNil asValue. |
711
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1802 |
localSourceFirst := Class tryLocalSourceFirst asValue. |
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1803 |
manager notNil ifTrue:[ |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1804 |
repository := manager repositoryName. |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1805 |
repository notNil ifTrue:[ |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1806 |
repositoryHolder := repository asValue |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1807 |
] |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1808 |
]. |
711
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1809 |
] ifFalse:[ |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1810 |
useManager := false. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1811 |
localSourceFirst := false |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1812 |
]. |
420
2c169931d1ab
allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents:
410
diff
changeset
|
1813 |
showAccelerators := MenuView showAcceleratorKeys asValue. |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1814 |
sourceCacheDir := nil asValue. |
219 | 1815 |
|
1816 |
loadBinaries := Smalltalk loadBinaries asValue. |
|
1817 |
compileLazy := Autoload compileLazy asValue. |
|
1818 |
||
249 | 1819 |
"/ |
1820 |
"/ create a box on those values ... |
|
1821 |
"/ |
|
219 | 1822 |
box := DialogBox new. |
1823 |
box label:(resources string:'Other settings'). |
|
1824 |
||
845 | 1825 |
box addCheckBox:(resources string:'remember changed methods (for previous method in browser)') on:keepMethodHistory. |
219 | 1826 |
box addCheckBox:(resources string:'log compiles in changes file') on:updChanges. |
1827 |
box addCheckBox:(resources string:'log doIts in changes file') on:logDoits. |
|
249 | 1828 |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1829 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1830 |
addLabelledInputField:(resources string:'change file name:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1831 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1832 |
on:changeFileName |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1833 |
tabable:true |
492 | 1834 |
separateAtX:0.4. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1835 |
component immediateAccept:true; acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1836 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1837 |
"/ y := box yPosition. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1838 |
"/ 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
|
1839 |
"/ 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
|
1840 |
"/ box yPosition:y. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1841 |
"/ component := box addInputFieldOn:changeFileName tabable:true. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1842 |
"/ component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false. |
219 | 1843 |
|
1844 |
box addHorizontalLine. |
|
1845 |
||
1846 |
box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy. |
|
1847 |
check := box addCheckBox:(resources string:'if present, load binary objects when autoloading') on:loadBinaries. |
|
1848 |
ObjectFileLoader isNil ifTrue:[ |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1849 |
loadBinaries value:false. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1850 |
check disable |
219 | 1851 |
]. |
249 | 1852 |
|
711
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1853 |
hasManager ifTrue:[ |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1854 |
check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1855 |
oldIndent := box leftIndent. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1856 |
box leftIndent:30. |
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1857 |
|
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1858 |
repositoryHolder notNil ifTrue:[ |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1859 |
component := box |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1860 |
addLabelledInputField:(resources string:'repository:') |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1861 |
adjust:#right |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1862 |
on:repositoryHolder |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1863 |
tabable:true |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1864 |
separateAtX:0.4. |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1865 |
component immediateAccept:true; acceptOnLeave:false. |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1866 |
]. |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1867 |
|
711
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1868 |
localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1869 |
localCheck enableChannel:useManager. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1870 |
|
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1871 |
cacheEntry := box |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1872 |
addLabelledInputField:(resources string:'source cache dir:') |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1873 |
adjust:#right |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1874 |
on:sourceCacheDir |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1875 |
tabable:true |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1876 |
separateAtX:0.4. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1877 |
cacheEntry immediateAccept:true; acceptOnLeave:false. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1878 |
box leftIndent:oldIndent. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1879 |
cacheEntry enableChannel:useManager. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1880 |
|
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1881 |
(AbstractSourceCodeManager isNil |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1882 |
or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[ |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1883 |
useManager value:false. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1884 |
cacheEntry disable. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1885 |
check disable. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1886 |
localCheck enable. |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1887 |
] ifFalse:[ |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1888 |
sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName). |
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1889 |
]. |
249 | 1890 |
]. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1891 |
|
219 | 1892 |
box addHorizontalLine. |
1893 |
||
1894 |
box addCheckBox:(resources string:'shadows under popup views') on:shadows. |
|
327 | 1895 |
box addCheckBox:(resources string:'boxes return focus to previously active view') on:returnFocus. |
219 | 1896 |
box addCheckBox:(resources string:'hostname in window labels') on:hostNameInLabel. |
443 | 1897 |
box addCheckBox:(resources string:'show accelerator keys in menus') on:showAccelerators. |
219 | 1898 |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1899 |
box |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1900 |
addHelpButtonFor:'Launcher/miscSettings.html'; |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1901 |
addAbortButton; |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1902 |
addOkButton. |
249 | 1903 |
|
1904 |
"/ |
|
1905 |
"/ show the box ... |
|
1906 |
"/ |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1907 |
box open. |
219 | 1908 |
|
249 | 1909 |
"/ |
1910 |
"/ update system settings |
|
1911 |
"/ |
|
219 | 1912 |
box accepted ifTrue:[ |
843 | 1913 |
Class keepMethodHistory:keepMethodHistory value. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1914 |
Smalltalk logDoits:logDoits value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1915 |
PopUpView shadows:shadows value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1916 |
Class updateChanges:updChanges value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1917 |
Autoload compileLazy:compileLazy value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1918 |
Smalltalk loadBinaries:loadBinaries value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1919 |
StandardSystemView includeHostNameInLabel:hostNameInLabel value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1920 |
ObjectMemory nameForChanges:changeFileName value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1921 |
Dialog returnFocusWhenClosingModalBoxes:returnFocus value. |
420
2c169931d1ab
allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents:
410
diff
changeset
|
1922 |
MenuView showAcceleratorKeys:showAccelerators value. |
327 | 1923 |
|
711
748349e59632
only show sourceCodeManager items, if its present
Claus Gittinger <cg@exept.de>
parents:
709
diff
changeset
|
1924 |
(hasManager and:[useManager value]) ifTrue:[ |
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1925 |
manager isNil ifTrue:[ |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1926 |
Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager). |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1927 |
manager := Smalltalk at:#SourceCodeManager. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1928 |
]. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1929 |
Class tryLocalSourceFirst:(localSourceFirst value). |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1930 |
nm := sourceCacheDir value. |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1931 |
(fn := nm asFilename) exists ifFalse:[ |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1932 |
(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
|
1933 |
fn makeDirectory; |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1934 |
makeReadableForAll; |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1935 |
makeWritableForAll; |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1936 |
makeExecutableForAll. |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1937 |
] |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1938 |
]. |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1939 |
(fn exists |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1940 |
and:[fn isDirectory |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1941 |
and:[fn isReadable |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1942 |
and:[fn isWritable]]]) ifTrue:[ |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1943 |
AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value). |
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1944 |
]. |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1945 |
repositoryHolder notNil ifTrue:[ |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1946 |
manager repositoryName:repositoryHolder value. |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1947 |
manager initialize |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
1948 |
]. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1949 |
] ifFalse:[ |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1950 |
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
|
1951 |
] |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1952 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1953 |
box destroy |
219 | 1954 |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1955 |
"Modified: 9.9.1996 / 22:43:36 / stefan" |
845 | 1956 |
"Modified: 7.11.1996 / 19:45:54 / cg" |
219 | 1957 |
! |
1958 |
||
347 | 1959 |
printerSettings |
1960 |
|box |
|
595 | 1961 |
possiblePrinters possibleTypes printerType printCommand |
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
1962 |
pageFormat landscape updater |
601 | 1963 |
formatLabel formatComponent landscapeLabel landscapeComponent |
709 | 1964 |
topMargin leftMargin rightMargin bottomMargin unitList unit |
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
1965 |
topMarginComponent leftMarginComponent |
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
1966 |
rightMarginComponent |
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
1967 |
bottomMarginComponent supportsColor supportsColorComponent |
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
1968 |
y y1 commandListPop component commandList row| |
347 | 1969 |
|
1970 |
possiblePrinters := PrinterStream withAllSubclasses asArray. |
|
1971 |
possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName]. |
|
1972 |
||
1973 |
printerType := SelectionInList new list:(resources array:possibleTypes). |
|
1974 |
printerType selectionIndex:(possiblePrinters identityIndexOf:Printer). |
|
1975 |
printCommand := Printer printCommand asValue. |
|
1976 |
||
604 | 1977 |
pageFormat := SelectionInList new list:(Printer defaultPageFormats). |
1978 |
pageFormat selection:(Printer pageFormat). |
|
1979 |
landscape := Printer landscape asValue. |
|
1980 |
||
707 | 1981 |
topMargin := Printer topMargin asValue. |
1982 |
leftMargin := Printer leftMargin asValue. |
|
709 | 1983 |
rightMargin := Printer rightMargin asValue. |
707 | 1984 |
bottomMargin := Printer bottomMargin asValue. |
702 | 1985 |
supportsColor := Printer supportsColor asValue. |
601 | 1986 |
|
347 | 1987 |
box := DialogBox new. |
1988 |
box label:(resources string:'Printer settings'). |
|
1989 |
||
726 | 1990 |
"/ either use a popUpList ... |
1991 |
"/ box addPopUpList:(resources string:'printer type:') on:printerType. |
|
1992 |
||
1993 |
"/ or a comboList; |
|
1994 |
"/ which one looks better ? |
|
1995 |
y := box yPosition. |
|
1996 |
component := box addTextLabel:(resources string:'printer type:'). |
|
1997 |
component width:0.3; adjust:#right; borderWidth:0. |
|
1998 |
box yPosition:y. |
|
1999 |
component := box addComboListOn:printerType tabable:true. |
|
2000 |
component changeMessage:#selectionIndex:; useIndex:true. |
|
2001 |
component width:0.7; left:0.3. |
|
2002 |
"/ end of question |
|
347 | 2003 |
|
2004 |
y := box yPosition. |
|
2005 |
component := box addTextLabel:(resources string:'print command:'). |
|
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
2006 |
component width:0.3; adjust:#right; borderWidth:0. |
347 | 2007 |
box yPosition:y. |
598 | 2008 |
commandListPop := box addComboBoxOn:printCommand tabable:true. |
2009 |
"/ commandListPop := box addInputFieldOn:printCommand tabable:true. |
|
2010 |
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
|
2011 |
"/ some common print commands ... |
499
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2012 |
|
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2013 |
commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil. |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2014 |
commandList isNil ifTrue:[ |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2015 |
commandList := PrinterStream defaultCommands. |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2016 |
commandList isNil ifTrue:[ |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2017 |
commandList := #('lpr' |
598 | 2018 |
'lp' |
499
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2019 |
). |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2020 |
] |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2021 |
]. |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2022 |
|
598 | 2023 |
commandListPop list:commandList. |
347 | 2024 |
box addVerticalSpace. |
595 | 2025 |
box addHorizontalLine. |
2026 |
box addVerticalSpace. |
|
2027 |
||
2028 |
row := OrderedCollection new. |
|
601 | 2029 |
row add:(formatLabel := Label label:(resources string:'page format:')). |
676 | 2030 |
formatLabel borderWidth:0. |
601 | 2031 |
row add:(formatComponent := PopUpList on:pageFormat). |
2032 |
formatComponent label:'unknown'. |
|
2033 |
||
2034 |
row add:(landscapeLabel := Label label:(resources string:'landscape:')). |
|
676 | 2035 |
landscapeLabel borderWidth:0. |
601 | 2036 |
row add:(landscapeComponent := CheckToggle on:landscape). |
595 | 2037 |
|
2038 |
y := box yPosition. |
|
2039 |
box |
|
2040 |
addRow:(1 to:2) |
|
2041 |
fromX:0 |
|
2042 |
toX:0.5 |
|
2043 |
collect:[:idx | row at:idx] |
|
2044 |
tabable:false |
|
2045 |
horizontalLayout:#leftSpace |
|
2046 |
verticalLayout:#center. |
|
2047 |
y1 := box yPosition. |
|
2048 |
box yPosition:y. |
|
2049 |
||
2050 |
box |
|
2051 |
addRow:(3 to:4) |
|
2052 |
fromX:0.5 |
|
2053 |
toX:1.0 |
|
2054 |
collect:[:idx | row at:idx] |
|
2055 |
tabable:false |
|
2056 |
horizontalLayout:#leftSpace |
|
2057 |
verticalLayout:#center. |
|
2058 |
||
2059 |
box yPosition:(box yPosition max:y1). |
|
2060 |
||
601 | 2061 |
box makeTabable:(formatComponent). |
2062 |
box makeTabable:(landscapeComponent). |
|
2063 |
||
2064 |
box addVerticalSpace. |
|
2065 |
box addHorizontalLine. |
|
2066 |
box addVerticalSpace. |
|
2067 |
||
2068 |
y := box yPosition. |
|
2069 |
||
707 | 2070 |
topMarginComponent := box |
603 | 2071 |
addLabelledInputField:(resources string:'top margin:') |
601 | 2072 |
adjust:#right |
707 | 2073 |
on:nil "/ topMargin |
601 | 2074 |
tabable:true |
2075 |
from:0.0 to:0.5 |
|
2076 |
separateAtX:0.6. |
|
707 | 2077 |
topMarginComponent converter:(PrintConverter new initForNumber). |
2078 |
topMarginComponent model:topMargin. |
|
601 | 2079 |
y1 := box yPosition. |
2080 |
||
2081 |
box yPosition:y. |
|
2082 |
unitList := SelectionInList with:#('inch' 'mm'). |
|
2083 |
unitList selectionIndex:1. |
|
2084 |
||
605 | 2085 |
component := box addComponent:(PopUpList on:unitList). |
2086 |
component |
|
603 | 2087 |
left:0.6; |
2088 |
width:0.3. |
|
601 | 2089 |
|
2090 |
box yPosition:y1. |
|
2091 |
||
707 | 2092 |
leftMarginComponent := box |
603 | 2093 |
addLabelledInputField:(resources string:'left margin:') |
601 | 2094 |
adjust:#right |
707 | 2095 |
on:nil "/ leftMargin |
601 | 2096 |
tabable:true |
2097 |
from:0.0 to:0.5 |
|
2098 |
separateAtX:0.6. |
|
707 | 2099 |
leftMarginComponent converter:(PrintConverter new initForNumber). |
2100 |
leftMarginComponent model:leftMargin. |
|
2101 |
||
709 | 2102 |
rightMarginComponent := box |
2103 |
addLabelledInputField:(resources string:'right margin:') |
|
2104 |
adjust:#right |
|
2105 |
on:nil "/ rightMargin |
|
2106 |
tabable:true |
|
2107 |
from:0.0 to:0.5 |
|
2108 |
separateAtX:0.6. |
|
2109 |
rightMarginComponent converter:(PrintConverter new initForNumber). |
|
2110 |
rightMarginComponent model:rightMargin. |
|
2111 |
||
707 | 2112 |
bottomMarginComponent := box |
603 | 2113 |
addLabelledInputField:(resources string:'bottom margin:') |
601 | 2114 |
adjust:#right |
707 | 2115 |
on:nil "/ bottomMargin |
601 | 2116 |
tabable:true |
2117 |
from:0.0 to:0.5 |
|
2118 |
separateAtX:0.6. |
|
707 | 2119 |
bottomMarginComponent converter:(PrintConverter new initForNumber). |
2120 |
bottomMarginComponent model:bottomMargin. |
|
601 | 2121 |
|
702 | 2122 |
box addHorizontalLine. |
2123 |
supportsColorComponent := box addCheckBox:(resources string:'Color printer') on:supportsColor. |
|
2124 |
box addVerticalSpace. |
|
2125 |
||
601 | 2126 |
updater := [ |p fg hasPageSize hasMargins| |
598 | 2127 |
|
2128 |
printerType selectionIndex ~~ 0 ifTrue:[ |
|
2129 |
p := possiblePrinters at:(printerType selectionIndex). |
|
601 | 2130 |
hasPageSize := p supportsPageSizes. |
604 | 2131 |
hasMargins := p supportsMargins. |
598 | 2132 |
] ifFalse:[ |
601 | 2133 |
hasPageSize := false. |
2134 |
hasMargins := false. |
|
598 | 2135 |
]. |
601 | 2136 |
hasPageSize ifTrue:[ |
597 | 2137 |
fg := Button new foregroundColor. |
601 | 2138 |
formatComponent enable. |
2139 |
landscapeComponent enable. |
|
2140 |
||
2141 |
formatComponent label:p pageFormat. |
|
2142 |
pageFormat value:(p pageFormat). |
|
2143 |
landscape value:(p landscape). |
|
597 | 2144 |
] ifFalse:[ |
2145 |
fg := Button new disabledForegroundColor. |
|
601 | 2146 |
formatComponent disable. |
2147 |
landscapeComponent disable. |
|
2148 |
||
2149 |
formatComponent label:'unknown'. |
|
2150 |
landscape value:nil. |
|
597 | 2151 |
]. |
601 | 2152 |
hasMargins ifTrue:[ |
2153 |
unitList selectionIndex == 2 ifTrue:[ |
|
2154 |
unit := #mm |
|
2155 |
] ifFalse:[ |
|
2156 |
unit := #inch |
|
2157 |
]. |
|
2158 |
||
707 | 2159 |
topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit). |
2160 |
leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit). |
|
709 | 2161 |
rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit). |
707 | 2162 |
bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit). |
2163 |
||
2164 |
topMarginComponent enable. |
|
2165 |
leftMarginComponent enable. |
|
709 | 2166 |
rightMarginComponent enable. |
707 | 2167 |
bottomMarginComponent enable. |
601 | 2168 |
] ifFalse:[ |
707 | 2169 |
topMarginComponent disable. |
2170 |
leftMarginComponent disable. |
|
709 | 2171 |
rightMarginComponent disable. |
707 | 2172 |
bottomMarginComponent disable. |
601 | 2173 |
]. |
2174 |
formatLabel foregroundColor:fg. |
|
2175 |
landscapeLabel foregroundColor:fg. |
|
2176 |
||
598 | 2177 |
p notNil ifTrue:[ |
2178 |
commandList := p defaultCommands. |
|
2179 |
commandList notNil ifTrue:[ |
|
2180 |
commandListPop list:commandList |
|
2181 |
]. |
|
2182 |
||
2183 |
printCommand value:(p printCommand). |
|
702 | 2184 |
]. |
2185 |
p supportsPostscript ifFalse:[ |
|
2186 |
supportsColorComponent disable. |
|
2187 |
supportsColor value:false |
|
2188 |
] ifTrue:[ |
|
2189 |
supportsColorComponent enable. |
|
2190 |
supportsColor value:(Printer supportsColor). |
|
598 | 2191 |
] |
597 | 2192 |
]. |
601 | 2193 |
unitList onChangeSend:#value to:updater. |
598 | 2194 |
printerType onChangeSend:#value to:updater. |
2195 |
updater value. |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
2196 |
|
608 | 2197 |
box addVerticalSpace; |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
2198 |
addHelpButtonFor:'Launcher/printerSettings.html'; |
608 | 2199 |
addAbortButton; addOkButton. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
2200 |
box open. |
347 | 2201 |
|
2202 |
box accepted ifTrue:[ |
|
598 | 2203 |
Printer := possiblePrinters at:(printerType selectionIndex). |
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
2204 |
Printer printCommand:printCommand value. |
595 | 2205 |
|
601 | 2206 |
Printer supportsPageSizes ifTrue:[ |
2207 |
Printer pageFormat:(pageFormat selection). |
|
2208 |
Printer landscape:(landscape value). |
|
2209 |
]. |
|
2210 |
Printer supportsMargins ifTrue:[ |
|
2211 |
unitList selectionIndex == 2 ifTrue:[ |
|
2212 |
unit := #mm |
|
2213 |
] ifFalse:[ |
|
2214 |
unit := #inch |
|
2215 |
]. |
|
707 | 2216 |
Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch). |
2217 |
Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch). |
|
709 | 2218 |
Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch). |
707 | 2219 |
Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch). |
601 | 2220 |
]. |
702 | 2221 |
Printer supportsPostscript ifTrue:[ |
2222 |
Printer supportsColor:supportsColor value. |
|
2223 |
]. |
|
347 | 2224 |
]. |
2225 |
box destroy |
|
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
2226 |
|
707 | 2227 |
"Modified: 5.9.1996 / 21:45:19 / cg" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
2228 |
"Modified: 9.9.1996 / 22:43:51 / stefan" |
347 | 2229 |
! |
2230 |
||
853 | 2231 |
restoreSettings |
2232 |
"a temporary kludge - we need a central systemSettings object for this, |
|
2233 |
which can be saved/restored with a single store/read." |
|
2234 |
||
2235 |
|fileName| |
|
2236 |
||
2237 |
fileName := Dialog |
|
855 | 2238 |
requestFileName:(resources string:'restore settings from:') |
853 | 2239 |
default:'settings.stx' |
2240 |
ok:(resources string:'restore') |
|
2241 |
abort:(resources string:'cancel') |
|
2242 |
pattern:'*.stx' |
|
2243 |
fromDirectory:nil. |
|
2244 |
||
2245 |
(fileName isNil or:[fileName isEmpty]) ifTrue:[ |
|
2246 |
"/ canceled |
|
2247 |
^ self |
|
2248 |
]. |
|
2249 |
||
2250 |
self withWaitCursorDo:[ |
|
2251 |
Smalltalk fileIn:fileName. |
|
2252 |
||
2253 |
self reopenLauncher. |
|
2254 |
]. |
|
2255 |
||
855 | 2256 |
"Modified: 9.11.1996 / 01:53:21 / cg" |
853 | 2257 |
! |
2258 |
||
2259 |
saveSettings |
|
2260 |
"a temporary kludge - we need a central systemSettings object for this, |
|
2261 |
which can be saved/restored with a single store/read." |
|
2262 |
||
2263 |
|s screen fileName| |
|
2264 |
||
2265 |
fileName := Dialog |
|
855 | 2266 |
requestFileName:(resources string:'save settings in:') |
853 | 2267 |
default:'settings.stx' |
2268 |
ok:(resources string:'save') |
|
2269 |
abort:(resources string:'cancel') |
|
2270 |
pattern:'*.stx' |
|
2271 |
fromDirectory:nil. |
|
2272 |
||
2273 |
(fileName isNil or:[fileName isEmpty]) ifTrue:[ |
|
2274 |
"/ canceled |
|
2275 |
^ self |
|
2276 |
]. |
|
2277 |
||
2278 |
s := fileName asFilename writeStream. |
|
2279 |
s isNil ifTrue:[ |
|
2280 |
self warn:'cannot write the ''' , fileName , ''' file'. |
|
2281 |
^ self |
|
2282 |
]. |
|
2283 |
||
2284 |
s nextPutLine:'"/ ST/X saved settings'; |
|
2285 |
nextPutLine:'"/ DO NOT MODIFY MANUALLY'; |
|
2286 |
nextPutLine:'"/'; |
|
2287 |
nextPutLine:'"/ this file was automatically generated by the'; |
|
2288 |
nextPutLine:'"/ ''save settings'' function of the Launcher'; |
|
2289 |
nextPutLine:'"/'. |
|
2290 |
s cr. |
|
2291 |
||
2292 |
s nextPutLine:'"/'. |
|
2293 |
s nextPutLine:'"/ saved by ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ' at ' , AbsoluteTime now printString. |
|
2294 |
s nextPutLine:'"/'. |
|
2295 |
s cr. |
|
2296 |
||
2297 |
s nextPutLine:'"/'. |
|
2298 |
s nextPutLine:'"/ Display settings:'. |
|
2299 |
s nextPutLine:'"/'. |
|
2300 |
s nextPutLine:'"/ only restore the display settings, if on the same Display ...'. |
|
2301 |
s nextPutLine:'Display displayName = ' , (Display displayName storeString) , ' ifTrue:['. |
|
2302 |
screen := Screen current. |
|
2303 |
screen fixColors notNil ifTrue:[ |
|
2304 |
s nextPutLine:' Image flushDeviceImages.'. |
|
2305 |
s nextPutLine:' Color colorAllocationFailSignal catch:['. |
|
2306 |
s nextPutLine:' Color getColorsRed:6 green:6 blue:4 on:Display'. |
|
2307 |
s nextPutLine:' ].'. |
|
2308 |
] ifFalse:[ |
|
2309 |
s nextPutLine:' Display releaseFixColors.'. |
|
2310 |
]. |
|
2311 |
s nextPutLine:' Display hasColors: ' , (screen hasColors storeString) , '.'. |
|
2312 |
s nextPutLine:' Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'. |
|
2313 |
s nextPutLine:' Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'. |
|
2314 |
s nextPutLine:' Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'. |
|
2315 |
s nextPutLine:' Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'. |
|
2316 |
s nextPutLine:' View defaultStyle:(View defaultStyle). "/ to flush any device images'. |
|
2317 |
s nextPutLine:'].'. |
|
2318 |
s cr. |
|
2319 |
||
2320 |
s nextPutLine:'"/'. |
|
2321 |
s nextPutLine:'"/ Compiler settings:'. |
|
2322 |
s nextPutLine:'"/'. |
|
2323 |
s nextPutLine:'Compiler warnSTXSpecials: ' , (Compiler warnSTXSpecials storeString) , '.'; |
|
2324 |
nextPutLine:'Compiler warnUnderscoreInIdentifier: ' , (Compiler warnUnderscoreInIdentifier storeString) , '.'; |
|
2325 |
nextPutLine:'Compiler warnOldStyleAssignment: ' , (Compiler warnOldStyleAssignment storeString) , '.'; |
|
2326 |
nextPutLine:'Compiler warnCommonMistakes: ' , (Compiler warnCommonMistakes storeString) , '.'; |
|
2327 |
nextPutLine:'Compiler allowUnderscoreInIdentifier: ' , (Compiler allowUnderscoreInIdentifier storeString) , '.'; |
|
2328 |
nextPutLine:'Compiler arraysAreImmutable: ' , (Compiler arraysAreImmutable storeString) , '.'; |
|
2329 |
nextPutLine:'Compiler lineNumberInfo: ' , (Compiler lineNumberInfo storeString) , '.'; |
|
2330 |
||
2331 |
nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.'; |
|
2332 |
||
2333 |
nextPutLine:'Compiler stcCompilationIncludes: ' , (Compiler stcCompilationIncludes storeString) , '.'; |
|
2334 |
nextPutLine:'Compiler stcCompilationDefines: ' , (Compiler stcCompilationDefines storeString) , '.'; |
|
2335 |
nextPutLine:'Compiler stcCompilationOptions: ' , (Compiler stcCompilationOptions storeString) , '.'; |
|
2336 |
nextPutLine:'Compiler ccCompilationOptions: ' , (Compiler ccCompilationOptions storeString) , '.'; |
|
2337 |
nextPutLine:'Compiler ccPath: ' , (Compiler ccPath storeString) , '.'; |
|
2338 |
||
2339 |
nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.'; |
|
2340 |
nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'. |
|
2341 |
||
2342 |
HistoryManager isActive ifTrue:[ |
|
2343 |
s nextPutLine:'HistoryManager activate.'. |
|
2344 |
] ifFalse:[ |
|
2345 |
s nextPutLine:'HistoryManager deactivate.'. |
|
2346 |
]. |
|
2347 |
||
2348 |
ObjectFileLoader notNil ifTrue:[ |
|
2349 |
s nextPutLine:'ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'. |
|
2350 |
s nextPutLine:'ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'. |
|
2351 |
]. |
|
2352 |
||
2353 |
s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'. |
|
2354 |
s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'. |
|
2355 |
||
2356 |
s cr. |
|
2357 |
s nextPutLine:'"/'. |
|
2358 |
s nextPutLine:'"/ Info & Debug Messages:'. |
|
2359 |
s nextPutLine:'"/'. |
|
2360 |
s nextPutLine:'ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '.'; |
|
2361 |
nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.'; |
|
2362 |
nextPutLine:'Object infoPrinting: ' , (Object infoPrinting storeString) , '.'; |
|
2363 |
nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'. |
|
2364 |
||
2365 |
||
2366 |
s cr. |
|
2367 |
s nextPutLine:'"/'. |
|
2368 |
s nextPutLine:'"/ Misc settings:'. |
|
2369 |
s nextPutLine:'"/'. |
|
2370 |
s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.'; |
|
2371 |
nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.'; |
|
2372 |
nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.'; |
|
2373 |
nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.'; |
|
2374 |
nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.'; |
|
2375 |
||
2376 |
"/ claus - I dont think its a good idea to save those ... |
|
2377 |
nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.'; |
|
2378 |
nextPutLine:'"/ ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.'; |
|
2379 |
||
2380 |
nextPutLine:'Dialog returnFocusWhenClosingModalBoxes: ' , (Dialog returnFocusWhenClosingModalBoxes storeString) , '.'; |
|
2381 |
nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.'; |
|
2382 |
nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'. |
|
2383 |
||
2384 |
s cr. |
|
2385 |
s nextPutLine:'"/'. |
|
2386 |
s nextPutLine:'"/ Printer settings:'. |
|
2387 |
s nextPutLine:'"/'. |
|
2388 |
s nextPutLine:'Printer := ' , (Printer name) , '.'; |
|
2389 |
nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'. |
|
2390 |
||
2391 |
Printer supportsPageSizes ifTrue:[ |
|
2392 |
s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'. |
|
2393 |
s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'. |
|
2394 |
]. |
|
2395 |
Printer supportsMargins ifTrue:[ |
|
2396 |
s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'. |
|
2397 |
s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'. |
|
2398 |
s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'. |
|
2399 |
s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'. |
|
2400 |
]. |
|
2401 |
Printer supportsPostscript ifTrue:[ |
|
2402 |
s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'. |
|
2403 |
]. |
|
2404 |
||
2405 |
s cr. |
|
2406 |
s nextPutLine:'"/'. |
|
2407 |
s nextPutLine:'"/ Font settings:'. |
|
2408 |
s nextPutLine:'"/'. |
|
2409 |
s nextPutLine:'View defaultFont: ' , (View defaultFont storeString) , '.'. |
|
2410 |
s nextPutLine:'Label defaultFont: ' , (Label defaultFont storeString) , '.'. |
|
2411 |
s nextPutLine:'Button defaultFont: ' , (Button defaultFont storeString) , '.'. |
|
2412 |
s nextPutLine:'Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'. |
|
2413 |
s nextPutLine:'SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'. |
|
2414 |
s nextPutLine:'MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'. |
|
2415 |
s nextPutLine:'PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'. |
|
2416 |
s nextPutLine:'TextView defaultFont: ' , (TextView defaultFont storeString) , '.'. |
|
2417 |
s nextPutLine:'EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'. |
|
2418 |
s nextPutLine:'CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'. |
|
2419 |
||
2420 |
s cr. |
|
2421 |
s nextPutLine:'"/'. |
|
2422 |
s nextPutLine:'"/ Language setting:'. |
|
2423 |
s nextPutLine:'"/'. |
|
2424 |
s nextPutLine:'Smalltalk language: ' , (Smalltalk language storeString) , '.'. |
|
2425 |
s nextPutLine:'Smalltalk languageTerritory: ' , (Smalltalk languageTerritory storeString) , '.'. |
|
2426 |
s close. |
|
2427 |
||
2428 |
" |
|
2429 |
Transcript topView application saveSettings |
|
2430 |
" |
|
2431 |
||
855 | 2432 |
"Modified: 9.11.1996 / 01:53:14 / cg" |
853 | 2433 |
! |
2434 |
||
219 | 2435 |
viewStyleSetting |
2436 |
|listOfStyles resourceDir dir box |
|
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2437 |
list listView scrView infoLabel infoForwarder newStyle| |
219 | 2438 |
|
2439 |
" |
|
2440 |
search resources directory for a list of .style files ... |
|
2441 |
" |
|
2442 |
||
2443 |
resourceDir := Smalltalk getSystemFileName:'resources'. |
|
2444 |
resourceDir isNil ifTrue:[ |
|
549 | 2445 |
self warn:'no styles found (missing ''resources'' directory)'. |
2446 |
^ self |
|
219 | 2447 |
]. |
2448 |
dir := FileDirectory directoryNamed:resourceDir. |
|
2449 |
||
2450 |
listOfStyles := dir select:[:aFileName | aFileName endsWith:'.style']. |
|
2451 |
listOfStyles := listOfStyles collect:[:aFileName | aFileName copyWithoutLast:6]. |
|
2452 |
listOfStyles sort. |
|
2453 |
||
2454 |
"/ old code: used a standard ListSelectionBox |
|
2455 |
"/ changed to intercept selection and add info-output. |
|
2456 |
||
2457 |
"/ box := ListSelectionBox title:(resources string:'STYLE_MSG') withCRs. |
|
2458 |
"/ box label:(resources string:'Style selection'). |
|
2459 |
"/ box list:listOfStyles. |
|
2460 |
"/ box initialText:View defaultStyle. |
|
2461 |
"/ box selectAction:[:newStyle | |
|
2462 |
"/ ]. |
|
2463 |
"/ box action:[:newStyle | |
|
2464 |
"/ 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
|
2465 |
"/ transcript showCR:'change style to ' , newStyle , ' ...'. |
219 | 2466 |
"/ View defaultStyle:newStyle asSymbol. |
2467 |
"/ ] |
|
2468 |
"/ ]. |
|
2469 |
"/ box showAtPointer |
|
2470 |
||
2471 |
"/ new code: build box 'by 'hand' |
|
2472 |
"/ |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
2473 |
infoForwarder := [ |
549 | 2474 |
|nm sheet comment| |
2475 |
nm := list selection. |
|
2476 |
sheet := ViewStyle fromFile:(nm , '.style'). |
|
2477 |
comment := sheet at:#comment ifAbsent:''. |
|
2478 |
infoLabel label:comment withCRs asStringCollection |
|
2479 |
]. |
|
219 | 2480 |
|
2481 |
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
|
2482 |
list onChangeSend:#value to:infoForwarder. |
219 | 2483 |
|
2484 |
box := Dialog new. |
|
2485 |
box label:(resources string:'Style selection'). |
|
2486 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2487 |
(box addTextLabel:(resources string:'STYLE_MSG') withCRs) adjust:#left. |
219 | 2488 |
listView := SelectionInListView on:list. |
2489 |
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
|
2490 |
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
|
2491 |
|
219 | 2492 |
box addVerticalSpace. |
2493 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2494 |
(infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft. |
219 | 2495 |
|
2496 |
box addAbortButton; addOkButton. |
|
568 | 2497 |
list selection:(View defaultStyle). |
219 | 2498 |
|
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2499 |
box stickAtBottomWithVariableHeight:scrView. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2500 |
box stickAtBottomWithFixHeight:infoLabel. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
2501 |
box open. |
219 | 2502 |
|
2503 |
box accepted ifTrue:[ |
|
549 | 2504 |
newStyle := list selection. |
2505 |
newStyle notNil ifTrue:[ |
|
2506 |
self withWaitCursorDo:[ |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2507 |
transcript showCR:'change style to ' , newStyle , ' ...'. |
549 | 2508 |
View defaultStyle:newStyle asSymbol. |
2509 |
]. |
|
2510 |
self reopenLauncher. |
|
2511 |
] |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
2512 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
2513 |
box destroy |
549 | 2514 |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2515 |
"Modified: 5.7.1996 / 13:13:22 / cg" |
219 | 2516 |
! ! |
2517 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
2518 |
!Launcher methodsFor:'actions - tools'! |
219 | 2519 |
|
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2520 |
compressingGarbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2521 |
ObjectMemory verboseGarbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2522 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2523 |
"Created: 12.5.1996 / 15:30:15 / cg" |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2524 |
! |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2525 |
|
815 | 2526 |
findAndDestroyWindow |
2527 |
|v| |
|
2528 |
||
2529 |
v := self findWindow. |
|
2530 |
v notNil ifTrue:[ |
|
2531 |
v destroy. |
|
2532 |
]. |
|
2533 |
||
2534 |
"Created: 28.10.1996 / 14:39:23 / cg" |
|
2535 |
! |
|
2536 |
||
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2537 |
findAndRaiseWindow |
815 | 2538 |
|v| |
2539 |
||
2540 |
v := self findWindow. |
|
2541 |
v notNil ifTrue:[ |
|
2542 |
v raiseDeiconified. |
|
2543 |
]. |
|
2544 |
||
2545 |
"Modified: 28.10.1996 / 14:39:04 / cg" |
|
2546 |
! |
|
2547 |
||
2548 |
findWindow |
|
2549 |
"a helper for find & destroy and find & raise operations; |
|
2550 |
let user choose a view and return it; return nil on cancel" |
|
2551 |
||
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2552 |
|knownTopViews nameList box| |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2553 |
|
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2554 |
knownTopViews := IdentitySet new. |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2555 |
Screen allScreens do:[:aScreen | |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2556 |
aScreen knownViews do:[:aView | |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2557 |
aView notNil ifTrue:[ |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2558 |
knownTopViews add:aView topView |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2559 |
] |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2560 |
] |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2561 |
]. |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2562 |
|
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2563 |
knownTopViews := knownTopViews select:[:aView | aView windowGroup notNil |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2564 |
and:[aView windowGroup isModal not]]. |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2565 |
|
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2566 |
knownTopViews := knownTopViews asOrderedCollection. |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2567 |
knownTopViews sort:[:v1 :v2 | v1 label < v2 label]. |
815 | 2568 |
nameList := knownTopViews collect:[:v | |
2569 |
|isDead wg p| |
|
2570 |
||
2571 |
((wg := v windowGroup) notNil |
|
2572 |
and:[(p := wg process) notNil |
|
2573 |
and:[p state ~~ #dead]]) ifTrue:[ |
|
2574 |
v label |
|
2575 |
] ifFalse:[ |
|
2576 |
v label , ' (dead ?)' |
|
2577 |
] |
|
2578 |
]. |
|
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2579 |
|
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2580 |
box := ListSelectionBox new. |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2581 |
box noEnterField. |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2582 |
box list:nameList. |
772 | 2583 |
box label:(resources string:'view selection'). |
2584 |
box title:(resources string:'select a view to raise deiconified:') withCRs. |
|
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2585 |
box action:[:selection | |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2586 |
|v| |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2587 |
|
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2588 |
v := knownTopViews at:box selectionIndex. |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2589 |
box destroy. |
815 | 2590 |
^ v |
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2591 |
]. |
815 | 2592 |
box extent:400@300. |
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2593 |
box showAtPointer. |
815 | 2594 |
^ nil |
2595 |
||
772 | 2596 |
"Modified: 16.10.1996 / 12:41:39 / cg" |
815 | 2597 |
"Created: 28.10.1996 / 14:38:41 / cg" |
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2598 |
! |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
2599 |
|
219 | 2600 |
fullScreenHardcopy |
2601 |
"after a second (to allow redraw of views under menu ...), |
|
2602 |
save the contents of the whole screen." |
|
2603 |
||
738 | 2604 |
Processor |
2605 |
addTimedBlock:[ |
|
2606 |
self |
|
2607 |
saveScreenImage:(Image fromScreen) |
|
2608 |
defaultName:'screen' |
|
2609 |
] |
|
2610 |
afterSeconds:1 |
|
2611 |
||
2612 |
"Modified: 23.9.1996 / 14:36:14 / cg" |
|
219 | 2613 |
! |
99 | 2614 |
|
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2615 |
garbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2616 |
ObjectMemory reclaimSymbols |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2617 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2618 |
"Created: 12.5.1996 / 15:28:03 / cg" |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2619 |
! |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2620 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2621 |
globalGarbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2622 |
ObjectMemory reclaimSymbols |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2623 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2624 |
"Created: 12.5.1996 / 15:28:13 / cg" |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2625 |
! |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2626 |
|
219 | 2627 |
removeAllBreakAndTracePoints |
2628 |
MessageTracer cleanup |
|
2629 |
! |
|
2630 |
||
2631 |
screenHardcopy |
|
2632 |
"after a second (to allow redraw of views under menu ...), |
|
2633 |
let user specify a rectangular area on the screen |
|
2634 |
and save its contents." |
|
2635 |
||
2636 |
|area| |
|
2637 |
||
738 | 2638 |
Processor |
2639 |
addTimedBlock:[ |
|
2640 |
area := Rectangle fromUser. |
|
2641 |
(area width > 0 and:[area height > 0]) ifTrue:[ |
|
2642 |
self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy' |
|
2643 |
] |
|
2644 |
] |
|
2645 |
afterSeconds:1 |
|
2646 |
||
2647 |
"Modified: 23.9.1996 / 14:36:28 / cg" |
|
219 | 2648 |
! |
2649 |
||
2650 |
startEventMonitor |
|
2651 |
EventMonitor open |
|
2652 |
! |
|
2653 |
||
2654 |
startFullWindowTreeView |
|
2655 |
WindowTreeView open |
|
2656 |
! |
|
2657 |
||
2658 |
startMemoryMonitor |
|
2659 |
MemoryMonitor open |
|
2660 |
! |
|
2661 |
||
2662 |
startMemoryUsageView |
|
2663 |
MemoryUsageView open |
|
2664 |
! |
|
2665 |
||
2666 |
startProcessMonitor |
|
2667 |
ProcessMonitor open |
|
2668 |
! |
|
2669 |
||
434 | 2670 |
startStopEventTrace |
503 | 2671 |
|v wg| |
434 | 2672 |
|
2673 |
v := Screen current viewFromUser. |
|
2674 |
v notNil ifTrue:[ |
|
2675 |
v := v topView. |
|
503 | 2676 |
wg := v windowGroup. |
2677 |
wg notNil ifTrue:[ |
|
2678 |
"/ |
|
2679 |
"/ toggle eventTrace in its windowGroup |
|
2680 |
"/ |
|
2681 |
wg traceEvents:(wg preEventHook isNil) |
|
434 | 2682 |
] |
2683 |
] |
|
2684 |
||
2685 |
"Created: 7.3.1996 / 14:44:22 / cg" |
|
503 | 2686 |
"Modified: 24.4.1996 / 10:27:11 / cg" |
434 | 2687 |
! |
2688 |
||
219 | 2689 |
startWindowTreeView |
2690 |
|v| |
|
2691 |
||
2692 |
v := self pickAView. |
|
2693 |
v notNil ifTrue:[ |
|
864 | 2694 |
WindowTreeView openOn:v topView |
219 | 2695 |
] |
2696 |
! |
|
2697 |
||
2698 |
viewDestroy |
|
2699 |
"let user pick a view and destroy it. |
|
2700 |
Even allow destroying non-smalltalk views |
|
2701 |
(also for views which I forgot due to some error)" |
|
2702 |
||
2703 |
|device p v id| |
|
2704 |
||
2705 |
(Delay forSeconds:1) wait. |
|
2706 |
||
2707 |
device := Screen current. |
|
2708 |
p := device pointFromUser. |
|
2709 |
id := device viewIdFromPoint:p. |
|
2710 |
v := device viewFromId:id. |
|
2711 |
v notNil ifTrue:[ |
|
864 | 2712 |
v topView destroy. |
2713 |
^ self |
|
219 | 2714 |
]. |
2715 |
id = device rootView id ifTrue:[ |
|
864 | 2716 |
^ self |
219 | 2717 |
]. |
298 | 2718 |
(Dialog confirm:'mhmh, this may not a be smalltalk view\(Or I somehow forgot about it).\Destroy anyway ?' withCRs) |
219 | 2719 |
ifTrue:[ |
864 | 2720 |
device destroyView:nil withId:id |
219 | 2721 |
]. |
2722 |
||
2723 |
"Modified: 18.9.1995 / 23:13:32 / claus" |
|
298 | 2724 |
"Modified: 14.12.1995 / 22:02:26 / cg" |
219 | 2725 |
! |
2726 |
||
2727 |
viewHardcopy |
|
2728 |
"after a second (to allow redraw of views under menu ...), |
|
2729 |
let user specify a view and save its contents." |
|
2730 |
||
738 | 2731 |
Processor |
2732 |
addTimedBlock:[ |
|
2733 |
|v| |
|
2734 |
||
2735 |
v := Screen current viewFromUser. |
|
2736 |
v notNil ifTrue:[ |
|
2737 |
self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy' |
|
2738 |
] |
|
2739 |
] |
|
2740 |
afterSeconds:1 |
|
2741 |
||
2742 |
"Modified: 23.9.1996 / 14:36:48 / cg" |
|
219 | 2743 |
! |
2744 |
||
2745 |
viewInspect |
|
2746 |
"let user pick a view and inspect it. Only smalltalk views are allowed" |
|
2747 |
||
2748 |
|v| |
|
2749 |
||
2750 |
v := self pickAView. |
|
2751 |
v notNil ifTrue:[ |
|
226 | 2752 |
"/ v topView inspect |
864 | 2753 |
v inspect |
219 | 2754 |
] |
2755 |
||
2756 |
! ! |
|
2757 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
2758 |
!Launcher methodsFor:'change & update'! |
219 | 2759 |
|
2760 |
update:something with:aParameter from:changedObject |
|
2761 |
((something == #currentProject) |
|
2762 |
or:[changedObject == Project]) ifTrue:[ |
|
864 | 2763 |
self changed:#info. |
2764 |
^ self |
|
219 | 2765 |
]. |
2766 |
! ! |
|
2767 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
2768 |
!Launcher methodsFor:'dynamic menus'! |
658 | 2769 |
|
2770 |
addMenu:name withItems:items actions:actions |
|
2771 |
"dynamically add a new (user-)menu to the menu panel. |
|
2772 |
This allows applications to install items for themself |
|
2773 |
dynamically in the launcher." |
|
2774 |
||
2775 |
|subMenu| |
|
2776 |
||
2777 |
myMenu add:name selector:(name asSymbol) before:#help. |
|
2778 |
subMenu := MenuView forMenu:myMenu. |
|
2779 |
subMenu labels:items. |
|
2780 |
subMenu actions:actions. |
|
2781 |
myMenu at:name putMenu:subMenu |
|
2782 |
||
2783 |
" |
|
2784 |
|launcher actionBlocks| |
|
2785 |
||
2786 |
actionBlocks := Array new:3. |
|
2787 |
actionBlocks at:1 put:[Transcript showCR:'foo']. |
|
2788 |
actionBlocks at:2 put:[Transcript showCR:'bar']. |
|
2789 |
||
2790 |
launcher := Transcript topView application. |
|
2791 |
launcher |
|
2792 |
addMenu:'misc' |
|
2793 |
withItems:#('foo' 'bar') |
|
2794 |
actions:actionBlocks |
|
2795 |
" |
|
2796 |
||
2797 |
" |
|
2798 |
|launcher actionBlocks| |
|
2799 |
||
2800 |
actionBlocks := Array new:3. |
|
2801 |
actionBlocks at:1 put:[RDoItServer startServer]. |
|
2802 |
actionBlocks at:2 put:[RDoItServer killServer]. |
|
2803 |
||
2804 |
launcher := Transcript topView application. |
|
2805 |
launcher |
|
2806 |
addMenu:'misc' |
|
2807 |
withItems:#('start rdoit server' 'stop rdoit server') |
|
2808 |
actions:actionBlocks |
|
2809 |
" |
|
2810 |
||
2811 |
"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
|
2812 |
! |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2813 |
|
668 | 2814 |
menuAt:nameSymbol |
2815 |
"return a menu by name" |
|
2816 |
||
2817 |
^ myMenu subMenuAt:nameSymbol |
|
2818 |
||
2819 |
" |
|
2820 |
|launcher demoMenu| |
|
2821 |
||
2822 |
launcher := Transcript topView application. |
|
2823 |
demoMenu := launcher menuAt:#demos. |
|
2824 |
demoMenu |
|
2825 |
addLabels:#('-' 'fooBar') |
|
2826 |
selectors:#(nil fooBar). |
|
2827 |
demoMenu actionAt:#fooBar put:[Transcript showCR:'fooBar'] |
|
2828 |
" |
|
2829 |
||
2830 |
"Created: 11.7.1996 / 15:35:13 / cg" |
|
2831 |
"Modified: 11.7.1996 / 15:42:25 / cg" |
|
2832 |
! |
|
2833 |
||
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2834 |
removeMenu:name |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2835 |
"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
|
2836 |
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
|
2837 |
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
|
2838 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2839 |
myMenu remove:name |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2840 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2841 |
" |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2842 |
|launcher actionBlocks| |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2843 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2844 |
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
|
2845 |
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
|
2846 |
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
|
2847 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2848 |
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
|
2849 |
launcher |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2850 |
addMenu:'misc' |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2851 |
withItems:#('foo' 'bar') |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2852 |
actions:actionBlocks. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2853 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2854 |
Delay waitForSeconds:10. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2855 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2856 |
launcher removeMenu:'misc' |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2857 |
" |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2858 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2859 |
"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
|
2860 |
"Modified: 5.7.1996 / 11:54:36 / cg" |
658 | 2861 |
! ! |
2862 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
2863 |
!Launcher methodsFor:'help'! |
219 | 2864 |
|
2865 |
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
|
2866 |
|sel s buttons| |
219 | 2867 |
|
2868 |
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
|
2869 |
s := 'TRANSCRIPT_HELP' |
219 | 2870 |
]. |
2871 |
||
2872 |
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
|
2873 |
s := 'INFOVIEW_HELP' |
219 | 2874 |
]. |
2875 |
||
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2876 |
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
|
2877 |
(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
|
2878 |
"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
|
2879 |
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
|
2880 |
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
|
2881 |
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
|
2882 |
]. |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2883 |
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
|
2884 |
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
|
2885 |
]. |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2886 |
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
|
2887 |
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
|
2888 |
]. |
219 | 2889 |
]. |
2890 |
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
|
2891 |
^ resources string:s |
219 | 2892 |
]. |
2893 |
^ nil |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2894 |
|
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2895 |
"Modified: 26.2.1996 / 23:08:19 / cg" |
219 | 2896 |
! ! |
2897 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
2898 |
!Launcher methodsFor:'infoview update'! |
219 | 2899 |
|
2900 |
info |
|
891 | 2901 |
|project projectName projectDir packageName defNameSpace| |
219 | 2902 |
|
2903 |
(Project isNil or:[(project := Project current) isNil]) ifTrue:[ |
|
864 | 2904 |
projectName := '* none *'. |
2905 |
projectDir := '.'. |
|
2906 |
packageName := '* none *'. |
|
219 | 2907 |
] ifFalse:[ |
864 | 2908 |
projectName := project name. |
2909 |
projectDir := project directory. |
|
2910 |
packageName := project packageName. |
|
891 | 2911 |
defNameSpace := project defaultNameSpace. |
2912 |
]. |
|
2913 |
defNameSpace isNil ifTrue:[ |
|
2914 |
defNameSpace := Smalltalk. |
|
219 | 2915 |
]. |
2916 |
||
2917 |
^ resources |
|
891 | 2918 |
string:'project: ''%1'' fileOut to: ''%3'' package: ''%2'' nameSpace: ''%4''' |
2919 |
withArgs:(Array |
|
864 | 2920 |
with:projectName |
2921 |
with:packageName |
|
891 | 2922 |
with:(projectDir contractTo:30) |
2923 |
with:defNameSpace name) |
|
2924 |
||
2925 |
"Modified: 2.1.1997 / 20:08:10 / cg" |
|
319
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
2926 |
! |
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
2927 |
|
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
2928 |
showActivity:someMessage |
500 | 2929 |
"some activityNotification to be forwarded to the user; |
2930 |
show it in the transcript here." |
|
2931 |
||
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2932 |
transcript showCR:someMessage; endEntry |
319
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
2933 |
|
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
2934 |
"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
|
2935 |
"Modified: 5.7.1996 / 13:13:15 / cg" |
99 | 2936 |
! ! |
2937 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
2938 |
!Launcher methodsFor:'initialize / release'! |
86 | 2939 |
|
219 | 2940 |
addTopViewsToCurrentProject |
2941 |
"ignored here - the launcher is always global (i.e. not project private)." |
|
2942 |
||
2943 |
^ self |
|
2944 |
! |
|
2945 |
||
2946 |
buttonPanelSpec |
|
2947 |
"return a spec for the buttons in the panel; |
|
2948 |
entries consists of selector and bitmap-filename. |
|
2949 |
nil selectors are taken as separators (see setupButtonPanel)" |
|
98 | 2950 |
|
219 | 2951 |
^ #( |
490 | 2952 |
#(startSystemBrowser 'SBrowser32x32.xbm') |
2953 |
#(startFileBrowser 'FBrowser32x32.xbm') |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
2954 |
"/ #(startWorkspace 'Workspace32x32.xbm') |
490 | 2955 |
#(nil nil) |
2956 |
#(startChangesBrowser 'CBrowser32x32.xbm') |
|
219 | 2957 |
"/ #(nil nil) |
2958 |
"/ #(nil nil) |
|
2959 |
"/ #(startDocumentationTool 'book11.ico') |
|
2960 |
) |
|
230 | 2961 |
|
2962 |
"Created: 4.12.1995 / 20:16:18 / cg" |
|
490 | 2963 |
"Modified: 19.4.1996 / 16:37:46 / cg" |
219 | 2964 |
! |
2965 |
||
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2966 |
closeDownViews |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2967 |
OpenLaunchers remove:self ifAbsent:nil. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2968 |
super closeDownViews. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2969 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2970 |
"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
|
2971 |
! |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2972 |
|
219 | 2973 |
closeRequest |
2974 |
(self confirm:(resources string:'really close %1 ?' with:self class name)) ifTrue:[ |
|
864 | 2975 |
super closeRequest |
219 | 2976 |
] |
2977 |
! |
|
2978 |
||
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2979 |
disableDangerousMenuItemsInRemoteLauncher |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2980 |
"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
|
2981 |
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
|
2982 |
These operations have to |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2983 |
be performed on the main screen." |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2984 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2985 |
isMainLauncher ifFalse:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2986 |
(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
|
2987 |
(myMenu menuAt:#projects) disableAll. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2988 |
(myMenu menuAt:#settings) disableAll. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2989 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2990 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2991 |
"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
|
2992 |
"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
|
2993 |
! |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2994 |
|
219 | 2995 |
focusSequence |
2996 |
^ (Array with:myMenu) |
|
2997 |
, |
|
2998 |
(buttonPanel subViews select:[:element | element isKindOf:Button]) |
|
2999 |
"/ , (Array with:Transcript) |
|
98 | 3000 |
! |
3001 |
||
93 | 3002 |
openInterface |
98 | 3003 |
"sent by my superclass to open up my interface" |
93 | 3004 |
|
615 | 3005 |
|top icn w scrn sz| |
86 | 3006 |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3007 |
"/ 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
|
3008 |
"/ 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
|
3009 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3010 |
Transcript notNil ifTrue:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3011 |
Transcript ~~ Stderr ifTrue:[ |
662
b5efd05fa256
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
661
diff
changeset
|
3012 |
isMainLauncher := (Transcript graphicsDevice == device). |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3013 |
] ifFalse:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3014 |
isMainLauncher := true |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3015 |
] |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3016 |
] ifFalse:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3017 |
isMainLauncher := true |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3018 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3019 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3020 |
top := StandardSystemView onDevice:device. |
205 | 3021 |
top label:'Smalltalk/X'; iconLabel:'ST/X Launcher'. |
86 | 3022 |
top extent:(400@300 ). |
3023 |
||
615 | 3024 |
icn := self class aboutIcon. |
686 | 3025 |
icn notNil ifTrue:[ |
3026 |
icn := icn magnifiedTo:(sz := Screen current preferredIconSize). |
|
3027 |
]. |
|
616 | 3028 |
|
3029 |
((scrn := Screen current) supportsDeepIcons not |
|
617 | 3030 |
and:[scrn supportsIconViews |
3031 |
and:[scrn depth > 1]]) ifTrue:[ |
|
616 | 3032 |
w := View extent:sz. |
3033 |
w viewBackground:icn. |
|
3034 |
top iconView:w |
|
3035 |
] ifFalse:[ |
|
3036 |
top icon:icn. |
|
3037 |
]. |
|
615 | 3038 |
|
3039 |
"/ (scrn := Screen current) supportsDeepIcons ifTrue:[ |
|
3040 |
"/ icn := self class aboutIcon. |
|
3041 |
"/ icn notNil ifTrue:[ |
|
3042 |
"/ icn := icn magnifiedTo:(sz := scrn preferredIconSize). |
|
3043 |
"/ icn := Depth8Image fromImage:icn. |
|
3044 |
"/ top icon:icn |
|
3045 |
"/ ]. |
|
3046 |
||
3047 |
"/ ] ifFalse:[ |
|
3048 |
"/ scrn supportsIconViews ifTrue:[ |
|
3049 |
"/ icn := self class aboutIcon. |
|
3050 |
"/ icn notNil ifTrue:[ |
|
3051 |
"/ icn := icn magnifiedTo:(sz := scrn preferredIconSize). |
|
3052 |
"/ w := View extent:sz. |
|
3053 |
"/ w viewBackground:icn. |
|
3054 |
"/ top iconView:w |
|
3055 |
"/ ]. |
|
3056 |
"/ ] |
|
3057 |
"/ ]. |
|
92 | 3058 |
|
93 | 3059 |
self setupViewsIn:top. |
98 | 3060 |
|
3061 |
top application:self. |
|
86 | 3062 |
|
3063 |
" |
|
92 | 3064 |
open with higher prio to allow interaction even while things |
3065 |
are running ... |
|
86 | 3066 |
" |
92 | 3067 |
top openWithPriority:(Processor userSchedulingPriority + 1). |
490 | 3068 |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3069 |
OpenLaunchers isNil ifTrue:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3070 |
OpenLaunchers := OrderedCollection new. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3071 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3072 |
OpenLaunchers add:self. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3073 |
|
686 | 3074 |
"Modified: 25.7.1996 / 21:12:09 / cg" |
93 | 3075 |
! |
86 | 3076 |
|
219 | 3077 |
release |
3078 |
infoProcess notNil ifTrue:[ |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3079 |
infoProcess terminate. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3080 |
infoProcess := nil. |
219 | 3081 |
]. |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3082 |
OpenLaunchers remove:self ifAbsent:nil. |
219 | 3083 |
super release |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3084 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3085 |
"Modified: 5.7.1996 / 11:48:56 / cg" |
86 | 3086 |
! |
3087 |
||
219 | 3088 |
restarted |
3089 |
"image restart - since WindowGroup recreates the process with |
|
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
3090 |
the default priority, we have to raise the prio again. |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
3091 |
Mhmh - this looks like a bug to me ... |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
3092 |
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
|
3093 |
be reset to normal." |
86 | 3094 |
|
219 | 3095 |
Processor activeProcess priority:(Processor userSchedulingPriority + 1). |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
3096 |
|
219 | 3097 |
super restarted |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
3098 |
|
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
3099 |
"Modified: 1.6.1996 / 16:58:25 / cg" |
86 | 3100 |
! |
3101 |
||
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3102 |
saveAndTerminateRequest |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3103 |
"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
|
3104 |
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
|
3105 |
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
|
3106 |
we are already prepared for this ;-)" |
86 | 3107 |
|
219 | 3108 |
self snapshot. |
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3109 |
super saveAndTerminateRequest |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3110 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3111 |
"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
|
3112 |
"Modified: 5.7.1996 / 13:08:55 / cg" |
103 | 3113 |
! |
3114 |
||
86 | 3115 |
setupButtonPanelIn:aTopView |
3116 |
"create the buttonPanel" |
|
3117 |
||
368 | 3118 |
|spc mh buttonSize| |
86 | 3119 |
|
3120 |
spc := View viewSpacing // 2. |
|
3121 |
buttonPanel := HorizontalPanelView in:aTopView. |
|
3122 |
buttonPanel level:-1; borderWidth:0. |
|
3123 |
buttonPanel horizontalLayout:#leftSpace. |
|
3124 |
||
368 | 3125 |
buttonSize := self class buttonImageSize. |
3126 |
||
490 | 3127 |
"/ |
3128 |
"/ the buttonSpec is a collection of: |
|
3129 |
"/ #( selector iconFileName ) |
|
3130 |
"/ or: |
|
3131 |
"/ #( selector (className iconQuerySelector) ) |
|
3132 |
"/ or" |
|
3133 |
"/ #( nil ) |
|
3134 |
"/ |
|
90 | 3135 |
self buttonPanelSpec do:[:entry | |
490 | 3136 |
|sel b sep img iconSpec| |
86 | 3137 |
|
368 | 3138 |
sel := entry at:1. |
3139 |
sel isNil ifTrue:[ |
|
3140 |
sep := View in:buttonPanel. |
|
3141 |
sep extent:32@1; borderWidth:0. |
|
3142 |
] ifFalse:[ |
|
3143 |
b := Button in:buttonPanel. |
|
490 | 3144 |
iconSpec := entry at:2. |
3145 |
iconSpec isArray ifTrue:[ |
|
3146 |
img := (Smalltalk classNamed:(iconSpec at:1)) perform:(iconSpec at:2). |
|
3147 |
] ifFalse:[ |
|
3148 |
img := Image fromFile:iconSpec. |
|
3149 |
]. |
|
591 | 3150 |
(img notNil and:[buttonSize notNil]) ifTrue:[ |
3151 |
img extent ~= buttonSize ifTrue:[ |
|
3152 |
img := img magnifiedTo:buttonSize |
|
3153 |
] |
|
368 | 3154 |
]. |
3155 |
b form:img. |
|
3156 |
b model:self; changeMessage:sel |
|
3157 |
] |
|
86 | 3158 |
]. |
3159 |
||
100 | 3160 |
mh := myMenu height. |
3161 |
buttonPanel origin:0.0 @ (mh + spc) |
|
368 | 3162 |
corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)). |
86 | 3163 |
|
3164 |
buttonPanel leftInset:spc; rightInset:spc. |
|
490 | 3165 |
|
591 | 3166 |
"Modified: 29.5.1996 / 19:23:04 / cg" |
86 | 3167 |
! |
3168 |
||
90 | 3169 |
setupDemoMenu |
3170 |
"setup the demo pulldown menu" |
|
3171 |
||
3172 |
|m| |
|
3173 |
||
3174 |
myMenu at:#demos |
|
450 | 3175 |
putLabels:(resources array:#( |
3176 |
'goodies' |
|
3177 |
'games' |
|
3178 |
'geometric designs' |
|
3179 |
'simple animations' |
|
3180 |
'3D graphics' |
|
3181 |
'graphic editors' |
|
3182 |
)) |
|
3183 |
selectors:#( |
|
3184 |
goodies |
|
3185 |
games |
|
3186 |
geometricDesigns |
|
3187 |
simpleAnimations |
|
3188 |
#'3Dgraphics' |
|
3189 |
#graphicEditors |
|
3190 |
) |
|
3191 |
receiver:self. |
|
90 | 3192 |
|
3193 |
" |
|
3194 |
only to show two different ways of defining a popUpMenu, |
|
3195 |
we use labels:selectors:receiver: here: |
|
3196 |
" |
|
3197 |
m := myMenu menuAt:#demos. |
|
3198 |
m subMenuAt:#games |
|
3199 |
put:(PopUpMenu |
|
450 | 3200 |
labels:(resources array:#( |
3201 |
'Tetris' |
|
3202 |
'Tic Tac Toe' |
|
3203 |
'Tic Tac Toe (2 players)' |
|
3204 |
)) |
|
3205 |
selectors:#( |
|
3206 |
startTetris |
|
3207 |
startTicTacToe |
|
3208 |
startTicTacToe2 |
|
3209 |
) |
|
3210 |
receiver:self). |
|
90 | 3211 |
|
3212 |
" |
|
3213 |
and labels:selector:args:receiver: here: |
|
3214 |
" |
|
3215 |
m subMenuAt:#geometricDesigns |
|
3216 |
put:(PopUpMenu |
|
450 | 3217 |
labels:(resources array:#( |
3218 |
'Pen demo' |
|
3219 |
'Commander demo' |
|
3220 |
'-' |
|
3221 |
'Fractal plants demo' |
|
3222 |
'Fractal patterns demo' |
|
3223 |
)) |
|
3224 |
selector:#openDemo: |
|
3225 |
args:#( |
|
3226 |
PenDemo |
|
3227 |
CommanderDemo |
|
3228 |
nil |
|
3229 |
FractalPlantsDemo |
|
3230 |
FractalPatternsDemo |
|
3231 |
) |
|
3232 |
receiver:self). |
|
90 | 3233 |
|
3234 |
m subMenuAt:#simpleAnimations |
|
3235 |
put:(PopUpMenu |
|
450 | 3236 |
labels:(resources array:#( |
3237 |
'Animation' |
|
3238 |
'Globe demo' |
|
3239 |
)) |
|
3240 |
selector:#openDemo: |
|
3241 |
args:#( |
|
3242 |
Animation |
|
3243 |
GlobeDemo |
|
3244 |
) |
|
3245 |
receiver:self). |
|
90 | 3246 |
|
3247 |
m subMenuAt:#'3Dgraphics' |
|
3248 |
put:(PopUpMenu |
|
450 | 3249 |
labels:(resources |
3250 |
array:#( |
|
3251 |
'plane' |
|
3252 |
'tetra' |
|
3253 |
'cube (wireframe)' |
|
3254 |
'cube (solid)' |
|
3255 |
'sphere (wireframe)' |
|
3256 |
'doughnut (wireframe)' |
|
3257 |
'planet' |
|
3258 |
'teapot' |
|
3259 |
'logo' |
|
3260 |
'rubics cube' |
|
3261 |
'x/y graph' |
|
3262 |
'-' |
|
3263 |
'cube (light)' |
|
3264 |
'cube (light & texture)' |
|
3265 |
'sphere (light)' |
|
3266 |
'colored octahedron' |
|
3267 |
)) |
|
3268 |
selector:#openDemo: |
|
3269 |
args:#( |
|
3270 |
GLPlaneDemoView2 |
|
3271 |
GLTetraDemoView |
|
3272 |
GLWireCubeDemoView |
|
3273 |
GLCubeDemoView |
|
3274 |
GLWireSphereDemoView |
|
3275 |
GLDoughnutDemoView |
|
3276 |
GLPlanetDemoView |
|
3277 |
GLTeapotDemo |
|
3278 |
Logo3DView1 |
|
3279 |
RubicsCubeView |
|
3280 |
GLXYGraph |
|
3281 |
nil |
|
3282 |
GLCubeDemoView2 |
|
3283 |
GLBrickCubeDemoView |
|
3284 |
GLSphereDemoView2 |
|
3285 |
GLOctaHedronDemoView |
|
3286 |
) |
|
3287 |
receiver:self). |
|
90 | 3288 |
|
3289 |
m subMenuAt:#graphicEditors |
|
3290 |
put:(PopUpMenu |
|
450 | 3291 |
labels:(resources array:#( |
3292 |
'DrawTool' |
|
3293 |
'LogicTool' |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
3294 |
'Paint Demo' |
450 | 3295 |
)) |
3296 |
selector:#openDemo: |
|
3297 |
args:#( |
|
3298 |
DrawTool |
|
3299 |
LogicTool |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
3300 |
ColorDrawDemo3 |
450 | 3301 |
) |
3302 |
receiver:self). |
|
90 | 3303 |
|
91 | 3304 |
m subMenuAt:#goodies |
3305 |
put:(PopUpMenu |
|
450 | 3306 |
labels:(resources array:#( |
3307 |
'clock' |
|
3308 |
'calendar' |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
3309 |
'calculator' |
450 | 3310 |
'-' |
3311 |
'mail tool' |
|
3312 |
'news tool' |
|
3313 |
)) |
|
3314 |
selector:#openDemo: |
|
3315 |
args:#( |
|
3316 |
Clock |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
3317 |
Calendar |
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
3318 |
CalculatorView |
450 | 3319 |
nil |
3320 |
MailView |
|
3321 |
NewsView |
|
3322 |
) |
|
3323 |
receiver:self). |
|
3324 |
||
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
3325 |
"Modified: 11.4.1996 / 00:21:46 / cg" |
90 | 3326 |
! |
3327 |
||
219 | 3328 |
setupInfoViewIn:topView |
3329 |
|spc halfSpc| |
|
3330 |
||
3331 |
spc := View viewSpacing. |
|
3332 |
infoView := Label label:'' in:topView. |
|
3333 |
infoView adjust:#left; borderWidth:0. |
|
3334 |
infoView level:-1. |
|
3335 |
transcript superView bottomInset:(infoView height + spc). |
|
90 | 3336 |
|
219 | 3337 |
infoView is3D ifTrue:[ |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3338 |
halfSpc := spc // 2. |
219 | 3339 |
] ifFalse:[ |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3340 |
halfSpc := 0 |
219 | 3341 |
]. |
3342 |
infoView topInset:(infoView height negated - spc + transcript borderWidth); |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3343 |
bottomInset:halfSpc; |
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3344 |
leftInset:halfSpc; |
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3345 |
rightInset:halfSpc. |
219 | 3346 |
infoView origin:0.0 @ 1.0 corner:1.0 @ 1.0. |
3347 |
infoView model:self; aspect:#info; labelMessage:#info. |
|
3348 |
||
3349 |
Project notNil ifTrue:[ |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3350 |
Project addDependent:self. |
219 | 3351 |
] |
3352 |
||
3353 |
" |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3354 |
Launcher open |
219 | 3355 |
" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3356 |
|
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3357 |
"Modified: 9.9.1996 / 22:44:15 / stefan" |
93 | 3358 |
! |
3359 |
||
219 | 3360 |
setupMenu |
3361 |
"setup the pulldown menu" |
|
3362 |
||
3363 |
|l s icon| |
|
3364 |
||
3365 |
myMenu labels:(resources array:#( |
|
379 | 3366 |
about |
3367 |
file |
|
3368 |
classes |
|
3369 |
tools |
|
3370 |
projects |
|
3371 |
settings |
|
3372 |
demos |
|
3373 |
help)). |
|
219 | 3374 |
" |
3375 |
if there is a bitmap, change 'about' to the ST/X icon |
|
3376 |
" |
|
3377 |
icon := self class smallAboutIcon. |
|
3378 |
icon notNil ifTrue:[ |
|
377 | 3379 |
myMenu labels at:1 put:icon. |
3380 |
myMenu height:(myMenu height max:(icon height + (View viewSpacing * 2))) |
|
93 | 3381 |
]. |
219 | 3382 |
|
3383 |
myMenu selectors:#( |
|
377 | 3384 |
#about |
3385 |
#file |
|
3386 |
#classes |
|
3387 |
#tools |
|
3388 |
#projects |
|
3389 |
#settings |
|
3390 |
#demos |
|
3391 |
#help). |
|
219 | 3392 |
|
3393 |
myMenu at:#about |
|
377 | 3394 |
putLabels:(resources array:#( |
3395 |
'about Smalltalk/X ...' |
|
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
3396 |
'-' |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
3397 |
'licence conditions' |
377 | 3398 |
)) |
3399 |
selectors:#( |
|
3400 |
#about |
|
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
3401 |
nil |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
3402 |
#showLicenceConditions |
377 | 3403 |
) |
3404 |
receiver:self. |
|
219 | 3405 |
|
3406 |
l := #( |
|
377 | 3407 |
'file browser' |
3408 |
'-' |
|
3409 |
'modules ...' |
|
3410 |
'-' |
|
3411 |
'snapshot ...' |
|
3412 |
'snapshot & exit ...' |
|
3413 |
'exit smalltalk ...' |
|
3414 |
). |
|
219 | 3415 |
s := #( |
377 | 3416 |
#startFileBrowser |
3417 |
nil |
|
3418 |
#objectModuleDialog |
|
3419 |
nil |
|
3420 |
#snapshot |
|
3421 |
#snapshotAndExit |
|
3422 |
#exit |
|
3423 |
). |
|
219 | 3424 |
|
3425 |
myMenu at:#file |
|
377 | 3426 |
putLabels:(resources array:l) |
3427 |
selectors:s |
|
3428 |
receiver:self. |
|
219 | 3429 |
|
3430 |
myMenu at:#classes |
|
377 | 3431 |
putLabels:(resources array:#( |
3432 |
'system browser' |
|
3433 |
'class browser ...' |
|
3434 |
'full class browser ...' |
|
3435 |
'class hierarchy browser ...' |
|
3436 |
'class tree' |
|
3437 |
'-' |
|
3438 |
'implementors ...' |
|
3439 |
'senders ...' |
|
574 | 3440 |
'resource ...' |
377 | 3441 |
'-' |
3442 |
'change browser' |
|
3443 |
)) |
|
3444 |
selectors:#( |
|
3445 |
#startSystemBrowser |
|
3446 |
#startClassBrowser |
|
3447 |
#startFullClassBrowser |
|
3448 |
#startClassHierarchyBrowser |
|
3449 |
#startClassTreeView |
|
3450 |
nil |
|
3451 |
#browseImplementors |
|
3452 |
#browseSenders |
|
574 | 3453 |
#browseResources |
377 | 3454 |
nil |
3455 |
#startChangesBrowser |
|
3456 |
) |
|
3457 |
receiver:self. |
|
219 | 3458 |
|
490 | 3459 |
JavaBrowser notNil ifTrue:[ |
3460 |
(myMenu subMenuAt:#classes) |
|
3461 |
addLabels:(resources array:#('-' 'java browser')) |
|
3462 |
selectors:#(nil startJavaBrowser) |
|
3463 |
after:#startClassTreeView |
|
3464 |
]. |
|
3465 |
||
219 | 3466 |
myMenu at:#projects |
377 | 3467 |
putLabels:(resources array:#( |
3468 |
'new project' |
|
3469 |
'-' |
|
3470 |
'select project ...' |
|
3471 |
)) |
|
3472 |
selectors:#( |
|
3473 |
#newProject |
|
3474 |
nil |
|
3475 |
#selectProject |
|
3476 |
) |
|
3477 |
receiver:self. |
|
219 | 3478 |
|
3479 |
myMenu at:#settings |
|
377 | 3480 |
putLabels:(resources array:#( |
3481 |
'language ...' |
|
3482 |
'show keyboard mappings ...' |
|
3483 |
'view style ...' |
|
398 | 3484 |
'fonts ...' |
377 | 3485 |
'printer ...' |
3486 |
'messages ...' |
|
3487 |
'compilation ...' |
|
3488 |
'object memory ...' |
|
594 | 3489 |
'screen ...' |
377 | 3490 |
'misc ...' |
853 | 3491 |
'=' |
854 | 3492 |
'save settings ...' |
3493 |
'restore settings ...' |
|
377 | 3494 |
)) |
3495 |
selectors:#( |
|
3496 |
#languageSetting |
|
3497 |
#keyboardSetting |
|
3498 |
#viewStyleSetting |
|
398 | 3499 |
#fontSettings |
377 | 3500 |
#printerSettings |
3501 |
#messageSettings |
|
3502 |
#compilerSettings |
|
3503 |
#memorySettings |
|
594 | 3504 |
#displaySettings |
853 | 3505 |
#miscSettings |
3506 |
nil |
|
3507 |
#saveSettings |
|
3508 |
#restoreSettings |
|
377 | 3509 |
) |
3510 |
receiver:self. |
|
219 | 3511 |
|
3512 |
self setupToolsMenu. |
|
3513 |
self setupDemoMenu. |
|
3514 |
||
3515 |
ActiveHelp notNil ifTrue:[ |
|
377 | 3516 |
l := #( |
776 | 3517 |
'what''s new' |
3518 |
'index' |
|
3519 |
'-' |
|
3520 |
'ST/X online documentation' |
|
497 | 3521 |
'class documentation' |
538 | 3522 |
'-' |
727 | 3523 |
'print documentation ...' |
3524 |
'-' |
|
538 | 3525 |
'active help \c' |
377 | 3526 |
). |
3527 |
s := #( |
|
776 | 3528 |
#startWhatsNewDocumentation |
3529 |
#startDocumentationIndex |
|
3530 |
nil |
|
377 | 3531 |
#startDocumentationTool |
496 | 3532 |
#startClassDocumentation |
538 | 3533 |
nil |
727 | 3534 |
#showBookPrintDocument |
3535 |
nil |
|
538 | 3536 |
#toggleActiveHelp: |
377 | 3537 |
) |
219 | 3538 |
] ifFalse:[ |
377 | 3539 |
l := #( |
776 | 3540 |
'what''s new' |
483 | 3541 |
'index' |
776 | 3542 |
'-' |
3543 |
'ST/X online documentation' |
|
3544 |
'class documentation' |
|
3545 |
'-' |
|
727 | 3546 |
'print documentation ...' |
377 | 3547 |
). |
3548 |
s := #( |
|
776 | 3549 |
#startWhatsNewDocumentation |
3550 |
#startDocumentationIndex |
|
3551 |
nil |
|
377 | 3552 |
#startDocumentationTool |
496 | 3553 |
#startClassDocumentation |
776 | 3554 |
nil |
727 | 3555 |
#showBookPrintDocument |
377 | 3556 |
) |
219 | 3557 |
]. |
3558 |
||
3559 |
myMenu at:#help |
|
377 | 3560 |
putLabels:(resources array:l) |
3561 |
selectors:s |
|
3562 |
receiver:self. |
|
219 | 3563 |
|
3564 |
(ActiveHelp notNil |
|
3565 |
and:[ActiveHelp isActive]) ifTrue:[ |
|
377 | 3566 |
(myMenu menuAt:#help) checkToggleAt:#toggleActiveHelp: put:true |
219 | 3567 |
]. |
377 | 3568 |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3569 |
self disableDangerousMenuItemsInRemoteLauncher |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3570 |
|
854 | 3571 |
"Modified: 9.11.1996 / 01:49:40 / cg" |
93 | 3572 |
! |
3573 |
||
219 | 3574 |
setupOtherViewsIn:aTopView |
3575 |
"a hook - allows redefinition in your personal subclass. |
|
3576 |
For example, add a clock:" |
|
3577 |
||
3578 |
" |
|
3579 |
|sz clock space halfSpace| |
|
3580 |
||
3581 |
sz := buttonPanel innerHeight - (buttonPanel level abs*2). |
|
3582 |
space := View viewSpacing. |
|
3583 |
halfSpace := space // 2. |
|
93 | 3584 |
|
219 | 3585 |
buttonPanel rightInset:sz+(space * 2). |
93 | 3586 |
|
219 | 3587 |
clock := ClockView in:buttonPanel topView. |
3588 |
clock borderWidth:1. |
|
3589 |
clock showSeconds:false. |
|
3590 |
clock extent:(sz @ sz). |
|
3591 |
clock origin:(1.0 @ (buttonPanel origin y + halfSpace)). |
|
3592 |
clock leftInset:sz negated - 2 - halfSpace. |
|
3593 |
clock rightInset:halfSpace. |
|
3594 |
clock level:1. |
|
3595 |
" |
|
93 | 3596 |
! |
3597 |
||
3598 |
setupToolsMenu |
|
3599 |
"setup the tools pulldown menu" |
|
3600 |
||
3601 |
|m| |
|
3602 |
||
3603 |
myMenu at:#tools |
|
434 | 3604 |
putLabels:(resources array:#( |
3605 |
'workspace' |
|
3606 |
'-' |
|
3607 |
'monitors' |
|
3608 |
'-' |
|
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3609 |
'views' |
434 | 3610 |
'-' |
3611 |
'hardcopy' |
|
3612 |
'-' |
|
3613 |
'misc' |
|
3614 |
)) |
|
3615 |
selectors:#( |
|
3616 |
#startWorkspace |
|
3617 |
nil |
|
3618 |
#monitors |
|
3619 |
nil |
|
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3620 |
#views |
434 | 3621 |
nil |
3622 |
#hardcopy |
|
3623 |
nil |
|
3624 |
#misc |
|
3625 |
) |
|
3626 |
receiver:self. |
|
93 | 3627 |
|
3628 |
||
3629 |
m := myMenu menuAt:#tools. |
|
3630 |
m subMenuAt:#monitors |
|
3631 |
put:(PopUpMenu |
|
434 | 3632 |
labels:(resources array:#( |
3633 |
'process' |
|
3634 |
'memory' |
|
3635 |
'event view' |
|
3636 |
'event trace' |
|
3637 |
'-' |
|
3638 |
'memory usage' |
|
3639 |
)) |
|
3640 |
selectors:#( |
|
3641 |
#startProcessMonitor |
|
3642 |
#startMemoryMonitor |
|
3643 |
#startEventMonitor |
|
3644 |
#startStopEventTrace |
|
3645 |
nil |
|
3646 |
#startMemoryUsageView |
|
3647 |
) |
|
3648 |
receiver:self). |
|
93 | 3649 |
|
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3650 |
m subMenuAt:#views |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3651 |
put:(PopUpMenu |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3652 |
labels:(resources array:#( |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3653 |
'find & raise ...' |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3654 |
'-' |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3655 |
'view tree (all views)' |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3656 |
'view tree' |
815 | 3657 |
'select & inspect view' |
3658 |
'select & destroy view' |
|
3659 |
'find & destroy ...' |
|
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3660 |
)) |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3661 |
selectors:#( |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3662 |
#findAndRaiseWindow |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3663 |
nil |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3664 |
#startFullWindowTreeView |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3665 |
#startWindowTreeView |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3666 |
#viewInspect |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3667 |
#viewDestroy |
815 | 3668 |
#findAndDestroyWindow |
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3669 |
) |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3670 |
receiver:self). |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3671 |
|
120 | 3672 |
m subMenuAt:#misc |
3673 |
put:(PopUpMenu |
|
434 | 3674 |
labels:(resources array:#( |
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3675 |
'garbage collect' |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3676 |
'garbage collect & compress' |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3677 |
'-' |
434 | 3678 |
'remove all break/trace points' |
3679 |
)) |
|
3680 |
selectors:#( |
|
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3681 |
#garbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3682 |
#compressingGarbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3683 |
nil |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3684 |
#removeAllBreakAndTracePoints |
434 | 3685 |
) |
3686 |
receiver:self). |
|
120 | 3687 |
|
93 | 3688 |
m subMenuAt:#hardcopy |
3689 |
put:(PopUpMenu |
|
434 | 3690 |
labels:(resources array:#( |
3691 |
'screen' |
|
3692 |
'area' |
|
3693 |
'view' |
|
3694 |
)) |
|
3695 |
selectors:#( |
|
3696 |
#fullScreenHardcopy |
|
3697 |
#screenHardcopy |
|
3698 |
#viewHardcopy |
|
3699 |
) |
|
3700 |
receiver:self). |
|
93 | 3701 |
|
815 | 3702 |
"Modified: 28.10.1996 / 14:40:03 / cg" |
90 | 3703 |
! |
3704 |
||
219 | 3705 |
setupTranscriptIn:aView |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3706 |
|v launcher| |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3707 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3708 |
"/ 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
|
3709 |
"/ if so, do not close the real launcher. |
107 | 3710 |
|
219 | 3711 |
(Transcript notNil and:[Transcript ~~ Stderr]) ifTrue:[ |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3712 |
isMainLauncher ifTrue:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3713 |
launcher := Transcript topView application |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3714 |
] ifFalse:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3715 |
launcher := self class current. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3716 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3717 |
launcher notNil ifTrue:[ |
662
b5efd05fa256
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
661
diff
changeset
|
3718 |
launcher window graphicsDevice == device ifTrue:[ |
661 | 3719 |
OpenLaunchers remove:launcher ifAbsent:nil. |
3720 |
launcher window destroy. |
|
3721 |
] |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3722 |
] |
110 | 3723 |
]. |
3724 |
||
219 | 3725 |
v := HVScrollableView |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3726 |
for:TextCollector |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3727 |
miniScrollerH:true |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3728 |
miniScrollerV:false |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3729 |
in:aView. |
93 | 3730 |
|
219 | 3731 |
v origin:(0.0 @ (buttonPanel corner y + View viewSpacing)) |
3732 |
corner:(1.0 @ 1.0). |
|
3733 |
transcript := v scrolledView. |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3734 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3735 |
isMainLauncher ifTrue:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3736 |
transcript beTranscript. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3737 |
] ifFalse:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3738 |
transcript showCR:'**************** Notice ***********************'. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3739 |
transcript showCR:'** this is NOT the Transcript **'. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3740 |
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
|
3741 |
transcript showCR:'** **'. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3742 |
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
|
3743 |
transcript showCR:'***********************************************'. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3744 |
] |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3745 |
|
662
b5efd05fa256
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
661
diff
changeset
|
3746 |
"Modified: 5.7.1996 / 17:55:15 / cg" |
94 | 3747 |
! |
3748 |
||
219 | 3749 |
setupViewsIn:topView |
3750 |
"create the pulldown menu, buttonPanel and transcript view" |
|
86 | 3751 |
|
219 | 3752 |
|tFont| |
131 | 3753 |
|
219 | 3754 |
topView model:self. |
86 | 3755 |
|
219 | 3756 |
myMenu := PullDownMenu in:topView. |
3757 |
myMenu origin:0.0 @ 0.0 corner:(1.0 @ myMenu height). |
|
86 | 3758 |
|
219 | 3759 |
self setupMenu. |
3760 |
self setupButtonPanelIn:topView. |
|
3761 |
self setupTranscriptIn:topView. |
|
3762 |
self setupInfoViewIn:topView. |
|
3763 |
self setupOtherViewsIn:topView. |
|
118 | 3764 |
|
219 | 3765 |
tFont := transcript font. |
3766 |
topView extent:(((tFont widthOf:'3')*60) max:myMenu preferredExtent x) |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3767 |
@ |
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3768 |
((tFont height) * 20). |
118 | 3769 |
|
219 | 3770 |
" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3771 |
Launcher open |
219 | 3772 |
" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3773 |
|
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3774 |
"Modified: 9.9.1996 / 22:44:31 / stefan" |
86 | 3775 |
! ! |
3776 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3777 |
!Launcher methodsFor:'private'! |
86 | 3778 |
|
406 | 3779 |
fontBoxForEncoding:encodingMatch |
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
3780 |
|box y b |
406 | 3781 |
labelDef buttonDef listDef menuDef textDef |
3782 |
models labels allOfThem filter| |
|
3783 |
||
3784 |
encodingMatch notNil ifTrue:[ |
|
3785 |
filter := [:f | f encoding notNil |
|
3786 |
and:[encodingMatch match:f encoding]]. |
|
3787 |
]. |
|
3788 |
||
3789 |
models := OrderedCollection new. |
|
3790 |
labels := OrderedCollection new. |
|
3791 |
||
3792 |
models add:(allOfThem := nil asValue). |
|
3793 |
models add:(labelDef := Label defaultFont asValue). |
|
3794 |
models add:(buttonDef := Button defaultFont asValue). |
|
3795 |
models add:(listDef := SelectionInListView defaultFont asValue). |
|
3796 |
models add:(menuDef := MenuView defaultFont asValue). |
|
3797 |
models add:(textDef := TextView defaultFont asValue). |
|
3798 |
||
3799 |
box := Dialog new. |
|
3800 |
box label:(resources string:'Font settings'). |
|
3801 |
||
3802 |
models |
|
3803 |
with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text')) |
|
3804 |
do:[:model :title | |
|
427 | 3805 |
|y2 lbl f i| |
406 | 3806 |
|
3807 |
f := model value. |
|
3808 |
||
3809 |
(box addTextLabel:title) adjust:#left. |
|
3810 |
||
3811 |
y := box yPosition. |
|
631
76013574eb04
Settings.Fonts menu: Add ... to Change button labels.
Stefan Vogel <sv@exept.de>
parents:
630
diff
changeset
|
3812 |
b := box addComponent:(Button label:(resources string:'change ...')) tabable:true. |
406 | 3813 |
b relativeExtent:nil; extent:(b preferredExtent). |
3814 |
y2 := box yPosition. |
|
3815 |
box yPosition:y. |
|
427 | 3816 |
i := box leftIndent. |
406 | 3817 |
box leftIndent:(b widthIncludingBorder + View viewSpacing). |
3818 |
(lbl := box addTextLabel:'') |
|
3819 |
adjust:#left; |
|
3820 |
font:(model value); |
|
3821 |
labelChannel:(BlockValue |
|
3822 |
with:[:v | |f| |
|
3823 |
f := v value. |
|
3824 |
f isNil ifTrue:[ |
|
3825 |
'' |
|
3826 |
] ifFalse:[ |
|
3827 |
f userFriendlyName |
|
3828 |
] |
|
3829 |
] |
|
3830 |
argument:model). |
|
3831 |
labels add:lbl. |
|
3832 |
||
427 | 3833 |
box leftIndent:i. |
406 | 3834 |
box yPosition:(box yPosition max:y2). |
3835 |
box addVerticalSpace. |
|
3836 |
box addHorizontalLine. |
|
3837 |
box addVerticalSpace. |
|
3838 |
||
3839 |
b action:[ |
|
3840 |
|f| |
|
3841 |
||
3842 |
f := FontPanel |
|
3843 |
fontFromUserInitial:(model value) |
|
3844 |
title:(resources string:'font for %1' with:title) |
|
3845 |
filter:filter. |
|
3846 |
f notNil ifTrue:[ |
|
3847 |
model == allOfThem ifTrue:[ |
|
3848 |
models do:[:m | m value:f]. |
|
3849 |
labels do:[:l | l font:f] |
|
3850 |
] ifFalse:[ |
|
3851 |
model value:f. |
|
3852 |
lbl font:f. |
|
3853 |
]. |
|
3854 |
] |
|
3855 |
]. |
|
3856 |
model == allOfThem ifTrue:[ |
|
3857 |
box addVerticalSpace |
|
3858 |
] |
|
3859 |
]. |
|
3860 |
||
3861 |
box addAbortButton; addOkButton. |
|
3862 |
(box addButton:(Button label:(resources string:'defaults')) before:nil) |
|
3863 |
action:[ |
|
3864 |
"/ fetch defaults |
|
3865 |
View updateAllStyleCaches. |
|
3866 |
labelDef value: Label defaultFont. |
|
3867 |
buttonDef value: Button defaultFont. |
|
3868 |
listDef value: SelectionInListView defaultFont. |
|
3869 |
menuDef value: MenuView defaultFont. |
|
3870 |
textDef value: TextView defaultFont. |
|
3871 |
]. |
|
3872 |
||
3873 |
box open. |
|
3874 |
box accepted ifTrue:[ |
|
3875 |
Label defaultFont:labelDef value. |
|
3876 |
Button defaultFont:buttonDef value. |
|
3877 |
Toggle defaultFont:buttonDef value. |
|
3878 |
SelectionInListView defaultFont:listDef value. |
|
3879 |
MenuView defaultFont:menuDef value. |
|
3880 |
PullDownMenu defaultFont:menuDef value. |
|
3881 |
TextView defaultFont:textDef value. |
|
3882 |
EditTextView defaultFont:textDef value. |
|
3883 |
CodeView defaultFont:textDef value. |
|
3884 |
]. |
|
592
5a03a69bc5a3
oops - menuAction is now called with arg if there is one
Claus Gittinger <cg@exept.de>
parents:
591
diff
changeset
|
3885 |
box destroy. |
406 | 3886 |
^ box accepted |
3887 |
||
3888 |
"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
|
3889 |
"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
|
3890 |
"Modified: 17.6.1996 / 13:38:48 / stefan" |
406 | 3891 |
! |
3892 |
||
219 | 3893 |
pickAView |
3894 |
|v| |
|
3895 |
||
3896 |
(Delay forSeconds:1) wait. |
|
3897 |
v := Screen current viewFromUser. |
|
3898 |
v isNil ifTrue:[ |
|
864 | 3899 |
self warn:'sorry, this is not a smalltalk view'. |
3900 |
^ nil |
|
219 | 3901 |
]. |
3902 |
^ v |
|
3903 |
! |
|
3904 |
||
106 | 3905 |
reopenLauncher |
3906 |
"for now (since style & language settings currently do |
|
3907 |
not affect living views ...)" |
|
3908 |
||
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
3909 |
|contents fontPref enc newLauncher| |
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
3910 |
|
777
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3911 |
"/ moved the stuff below to the language-setting |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3912 |
"/ dialog (ask before changing the language, to have |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3913 |
"/ proper texts in the dialogs). |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3914 |
"/ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3915 |
"/ fontPref := self class classResources at:'PREFERRED_FONT_ENCODING'. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3916 |
"/ enc := MenuView defaultFont encoding. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3917 |
"/ (fontPref match:enc) ifFalse:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3918 |
"/ (self confirm:'menu font is not ' , fontPref , '-encoded.\\Change it ?' withCRs) |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3919 |
"/ ifTrue:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3920 |
"/ self fontBoxForEncoding:fontPref |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3921 |
"/ ] |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3922 |
"/ ]. |
106 | 3923 |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3924 |
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
|
3925 |
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
|
3926 |
newLauncher window waitUntilVisible. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3927 |
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
|
3928 |
|
777
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
3929 |
"Modified: 18.10.1996 / 15:04:06 / cg" |
106 | 3930 |
! |
3931 |
||
100 | 3932 |
saveAllViews |
86 | 3933 |
"tell each topview that we are going to terminate and give it chance |
3934 |
to save its contents." |
|
3935 |
||
3936 |
ObjectMemory changed:#aboutToExit |
|
3937 |
! |
|
3938 |
||
93 | 3939 |
saveScreenImage:anImage defaultName:defaultName |
3940 |
"save an image into a file |
|
3941 |
- ask user for filename using a fileSelectionBox." |
|
3942 |
||
3943 |
|fileName| |
|
3944 |
||
3945 |
fileName := Dialog |
|
382 | 3946 |
requestFileName:(resources string:'save image in:') |
3947 |
default:(defaultName , '.tiff') |
|
3948 |
ok:(resources string:'save') |
|
3949 |
abort:(resources string:'cancel') |
|
3950 |
pattern:'*.tiff'. |
|
93 | 3951 |
|
3952 |
fileName notNil ifTrue:[ |
|
382 | 3953 |
anImage saveOn:fileName |
93 | 3954 |
]. |
382 | 3955 |
|
3956 |
"Modified: 21.2.1996 / 13:09:28 / cg" |
|
86 | 3957 |
! ! |
3958 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3959 |
!Launcher methodsFor:'queries'! |
90 | 3960 |
|
219 | 3961 |
processName |
3962 |
"for monitors only - my name" |
|
142 | 3963 |
|
219 | 3964 |
^ '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
|
3965 |
! |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3966 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3967 |
transcript |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3968 |
"my transcript" |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3969 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3970 |
^ transcript |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3971 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3972 |
"Created: 5.7.1996 / 13:04:36 / cg" |
90 | 3973 |
! ! |
3974 |
||
760 | 3975 |
!Launcher class methodsFor:'documentation'! |
86 | 3976 |
|
219 | 3977 |
version |
891 | 3978 |
^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.218 1997-01-02 19:08:40 cg Exp $' |
86 | 3979 |
! ! |