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