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