author | Claus Gittinger <cg@exept.de> |
Thu, 23 Apr 1998 11:43:05 +0200 | |
changeset 1578 | df34791243c2 |
parent 1548 | 770b41022bfb |
child 1584 | 22c6fd8ab7d0 |
permissions | -rw-r--r-- |
88 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
1383 | 3 |
All Rights Reserved |
88 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
86 | 12 |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
13 |
ApplicationModel subclass:#Launcher |
1257
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
14 |
instanceVariableNames:'myMenu buttonPanel transcript infoView projectInfoHolder helpIsOn |
1199 | 15 |
isMainLauncher' |
16 |
classVariableNames:'CachedAboutIcon OpenLaunchers NotifyingEmergencyHandler' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'Interface-Smalltalk' |
|
86 | 19 |
! |
20 |
||
760 | 21 |
!Launcher class methodsFor:'documentation'! |
88 | 22 |
|
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
1383 | 26 |
All Rights Reserved |
88 | 27 |
|
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
105 | 37 |
customization |
38 |
" |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
39 |
Of course, it is possible to change the Launcher class itself |
105 | 40 |
as appropriate, however, we suggest you create a subclass (say MyLauncher), |
524 | 41 |
define it as autoloaded in the patches file, and redefine some methods |
42 |
in that class. |
|
43 |
That way, your changes are easier to reintroduce in case of an ST/X upgrade. |
|
105 | 44 |
|
45 |
||
46 |
adding more buttons to the button-panel: |
|
47 |
||
48 |
see the method #buttonPanelSpec; |
|
1383 | 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 |
||
1383 | 74 |
see the #setupMenu method; either add another top-menu, or |
75 |
add entries to an existing menu. |
|
76 |
All menu setup has been extracted into separate init-methods, |
|
77 |
so there is often only a need to redefine one of those |
|
78 |
(for example, to add your own demos, only redefine setupDemoMenu). |
|
79 |
To add a new master-item with its own pullDown, redefine setupMainMenu |
|
80 |
to include another selector and add the correspoonding menu there. |
|
88 | 81 |
" |
219 | 82 |
! |
83 |
||
84 |
documentation |
|
85 |
" |
|
86 |
a new launcher, combining old Launchers menu and transcript into |
|
87 |
one view. (you no longer have to move two views around all the time ...). |
|
88 |
||
89 |
Also, this app makes first use of the new compatibility framework; |
|
90 |
you will notice, that this is a subclass of ApplicationModel. |
|
91 |
New applications will no longer be built as subclasses of standardSystemView. |
|
511 | 92 |
|
921 | 93 |
See #customization for information regarding your own private |
94 |
launcher functions. |
|
95 |
||
954
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
96 |
Notice: |
1383 | 97 |
Since there can only be one SystemTranscript, opening a new launcher |
98 |
will automatically close the current one (except for a remote launcher, |
|
99 |
opened on another display). |
|
954
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
100 |
|
511 | 101 |
[author:] |
1383 | 102 |
Claus Gittinger |
921 | 103 |
|
104 |
[see also:] |
|
1383 | 105 |
Examples_misc::MyLauncher |
921 | 106 |
|
107 |
[start with:] |
|
1383 | 108 |
Launcher open |
219 | 109 |
" |
954
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
110 |
! |
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
111 |
|
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
112 |
examples |
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
113 |
" |
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
114 |
As ST/X can handle multiple screens, there is nothing (except fear ;-) |
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
115 |
from preventing you to work with your friend in the same image. |
965 | 116 |
To do this, evaluate (replace localhost by whatever): |
1383 | 117 |
[exBegin] |
118 |
|display2| |
|
119 |
||
120 |
display2 := XWorkstation new initializeFor:'localhost:0'. |
|
121 |
display2 isNil ifTrue:[ |
|
122 |
self warn:'cannot connect.'. |
|
123 |
] ifFalse:[ |
|
124 |
display2 startDispatch. |
|
125 |
display2 keyboardMap:(Display keyboardMap). |
|
126 |
Launcher openOnDevice:display2. |
|
127 |
] |
|
128 |
[exEnd] |
|
954
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
129 |
But you should be somewhat careful, the other guy may change things so |
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
130 |
that you are blocked (start high prio processes, change classes etc.) |
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
131 |
Anyway, a nice demo .... |
664cb25ee914
added documentation on remoteLauncher;
Claus Gittinger <cg@exept.de>
parents:
951
diff
changeset
|
132 |
" |
88 | 133 |
! ! |
134 |
||
760 | 135 |
!Launcher class methodsFor:'accessing'! |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
136 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
137 |
current |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
138 |
"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
|
139 |
(for access via addMenu/ removeMenu)" |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
140 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
141 |
OpenLaunchers do:[:aLauncher | |
1383 | 142 |
aLauncher window graphicsDevice == Screen current ifTrue:[ |
143 |
^ aLauncher |
|
144 |
] |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
145 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
146 |
^ nil. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
147 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
148 |
" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
149 |
Launcher current |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
150 |
" |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
151 |
|
662
b5efd05fa256
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
661
diff
changeset
|
152 |
"Modified: 5.7.1996 / 17:55:28 / cg" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
153 |
"Modified: 9.9.1996 / 22:41:36 / stefan" |
1458
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
154 |
! |
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
155 |
|
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
156 |
openLaunchers |
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
157 |
"return all opened launchers" |
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
158 |
|
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
159 |
^OpenLaunchers ? (OpenLaunchers := OrderedCollection new) |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
160 |
! ! |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
161 |
|
760 | 162 |
!Launcher class methodsFor:'defaults'! |
86 | 163 |
|
164 |
aboutIcon |
|
921 | 165 |
"return the icon shown in the about menu-item and used |
166 |
as ST/X about icon" |
|
167 |
||
86 | 168 |
|image| |
169 |
||
170 |
CachedAboutIcon notNil ifTrue:[^ CachedAboutIcon]. |
|
171 |
||
172 |
image := Image fromFile:'SmalltalkX.xbm'. |
|
92 | 173 |
image notNil ifTrue:[ |
1383 | 174 |
|green dark| |
175 |
||
176 |
Screen current hasColors ifTrue:[ |
|
177 |
green := (Color redPercent:0 greenPercent:80 bluePercent:20) "darkened". |
|
178 |
dark := Color grayPercent:10. |
|
179 |
image photometric:#palette. |
|
180 |
] ifFalse:[ |
|
181 |
dark := Color black. |
|
182 |
green := Color white. |
|
183 |
image photometric:#blackIs0. |
|
184 |
]. |
|
185 |
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
|
186 |
"/ 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
|
187 |
"/ image := (Image implementorForDepth:Screen current depth) fromImage:image. |
144 | 188 |
"/ ] |
86 | 189 |
]. |
190 |
CachedAboutIcon := image. |
|
191 |
^ image |
|
192 |
||
193 |
" |
|
92 | 194 |
CachedAboutIcon := nil. |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
195 |
Launcher aboutIcon |
92 | 196 |
" |
144 | 197 |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
198 |
"Modified: 9.9.1996 / 22:41:23 / stefan" |
921 | 199 |
"Modified: 8.1.1997 / 15:01:30 / cg" |
219 | 200 |
! |
201 |
||
368 | 202 |
buttonImageSize |
490 | 203 |
"images in buttonPanel are sized to this. |
204 |
Can be redefined in subclasses to return nil (no scaling) |
|
205 |
or any other useful size" |
|
206 |
||
1357 | 207 |
<resource: #style (#'launcher.buttonSize')> |
208 |
||
209 |
^ View styleSheet at:'launcher.buttonSize' default:(32@32) |
|
210 |
||
211 |
"Modified: / 26.10.1997 / 17:07:40 / cg" |
|
368 | 212 |
! |
213 |
||
915 | 214 |
notifyingEmergencyHandler |
921 | 215 |
"return a block (used as an emergency handler |
216 |
for exceptions), which does errorNotification before going |
|
217 |
into the debugger." |
|
218 |
||
960 | 219 |
"Remember the handlerBlock, to be able to determine if the current |
220 |
handler is the notifying one." |
|
221 |
||
915 | 222 |
NotifyingEmergencyHandler isNil ifTrue:[ |
1383 | 223 |
NotifyingEmergencyHandler := Exception notifyingEmergencyHandler |
915 | 224 |
]. |
225 |
^ NotifyingEmergencyHandler |
|
226 |
||
227 |
"Created: 7.1.1997 / 22:18:19 / cg" |
|
960 | 228 |
"Modified: 15.1.1997 / 21:15:38 / cg" |
915 | 229 |
! |
230 |
||
219 | 231 |
smallAboutIcon |
921 | 232 |
"return the icon shown in the about menu-item" |
233 |
||
219 | 234 |
|image| |
235 |
||
236 |
image := self aboutIcon. |
|
237 |
image notNil ifTrue:[ |
|
1383 | 238 |
image := image magnifiedBy:0.4. |
219 | 239 |
]. |
240 |
^ image |
|
241 |
||
242 |
" |
|
243 |
CachedAboutIcon := nil. |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
244 |
Launcher aboutIcon. |
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
245 |
Launcher smallAboutIcon. |
219 | 246 |
" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
247 |
|
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
248 |
"Modified: 9.9.1996 / 22:42:12 / stefan" |
921 | 249 |
"Modified: 8.1.1997 / 15:02:56 / cg" |
219 | 250 |
! ! |
251 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
252 |
!Launcher methodsFor:'actions - about & help'! |
219 | 253 |
|
254 |
about |
|
921 | 255 |
"show an about box" |
256 |
||
219 | 257 |
|box| |
258 |
||
259 |
box := AboutBox new. |
|
260 |
box autoHideAfter:10 with:[]. |
|
261 |
box showAtCenter |
|
921 | 262 |
|
263 |
"Modified: 8.1.1997 / 14:37:07 / cg" |
|
219 | 264 |
! |
265 |
||
727 | 266 |
showBookPrintDocument |
921 | 267 |
"open an HTML browser on the 'book'-printing document" |
268 |
||
727 | 269 |
self showDocumentation:'BOOK.html' |
270 |
||
271 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
272 |
"Created: 12.9.1996 / 01:53:30 / cg" |
|
921 | 273 |
"Modified: 8.1.1997 / 14:42:59 / cg" |
727 | 274 |
! |
275 |
||
219 | 276 |
showDocumentation:aRelativeDocFilePath |
921 | 277 |
"open an HTML browser on some document" |
278 |
||
219 | 279 |
" |
280 |
although that one is not yet finished, |
|
281 |
its better than nothing ... |
|
282 |
" |
|
555 | 283 |
HTMLDocumentView notNil ifTrue:[ |
1383 | 284 |
" |
285 |
temporary kludge; |
|
286 |
not all machines can autoload binaries; |
|
287 |
however, on my SGI (which can) we want it |
|
288 |
to load automatically. |
|
289 |
" |
|
290 |
HTMLDocumentView isLoaded ifFalse:[ |
|
291 |
ErrorSignal catch:[HTMLDocumentView autoload] |
|
292 |
]. |
|
293 |
HTMLDocumentView isLoaded ifTrue:[ |
|
294 |
HTMLDocumentView openFullOnDocumentationFile:aRelativeDocFilePath. |
|
295 |
^ self |
|
296 |
]. |
|
219 | 297 |
]. |
298 |
||
1312 | 299 |
self warn:'Sorry, the ST/X HTML reader is not |
300 |
included in this release. |
|
219 | 301 |
|
302 |
Please use Mosaic, netscape, chimera or any |
|
303 |
other HTML viewer to see the documentation. |
|
304 |
||
305 |
The documentation is found in the ''doc/online'' directory.'. |
|
306 |
||
307 |
"Modified: 31.8.1995 / 13:11:08 / claus" |
|
921 | 308 |
"Modified: 8.1.1997 / 14:42:42 / cg" |
219 | 309 |
! |
310 |
||
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
311 |
showLicenceConditions |
921 | 312 |
"open an HTML browser on the 'LICENCE' document" |
313 |
||
860
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
314 |
|lang doc| |
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
315 |
|
1578 | 316 |
Smalltalk releaseIdentification = 'ST/X_free_demo_vsn' ifTrue:[ |
317 |
doc := 'english/LICENCE_DEMO_STX.html' |
|
860
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
318 |
] ifFalse:[ |
1578 | 319 |
((lang := Smalltalk language) = 'de' |
320 |
or:[lang = 'german']) ifTrue:[ |
|
321 |
doc := 'german/LICENCE_STX.html' |
|
322 |
] ifFalse:[ |
|
323 |
doc := 'english/LICENCE_STX.html' |
|
324 |
]. |
|
860
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
325 |
]. |
864 | 326 |
doc := resources at:'LICENCEFILE' default:doc. |
860
fa31564f3072
changes for nationel licence texts
Claus Gittinger <cg@exept.de>
parents:
855
diff
changeset
|
327 |
self showDocumentation:('../' , doc) |
739
cce1e1dab15e
Licence is in german/LICENCE.STX.html.
Stefan Vogel <sv@exept.de>
parents:
738
diff
changeset
|
328 |
|
1578 | 329 |
"Created: / 14.9.1996 / 12:35:00 / cg" |
330 |
"Modified: / 23.9.1996 / 17:03:15 / stefan" |
|
331 |
"Modified: / 23.4.1998 / 11:42:26 / cg" |
|
733
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
332 |
! |
1cd5a9644c57
added licence-display menu-item;
Claus Gittinger <cg@exept.de>
parents:
727
diff
changeset
|
333 |
|
496 | 334 |
startClassDocumentation |
921 | 335 |
"open an HTML browser on the 'classDoc/TOP' document" |
336 |
||
496 | 337 |
self showDocumentation:'classDoc/TOP.html' |
338 |
||
339 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
340 |
"Created: 22.4.1996 / 21:03:56 / cg" |
|
921 | 341 |
"Modified: 8.1.1997 / 14:42:04 / cg" |
496 | 342 |
! |
343 |
||
483 | 344 |
startDocumentationIndex |
921 | 345 |
"open an HTML browser on the 'index' document" |
346 |
||
483 | 347 |
self showDocumentation:'index.html' |
348 |
||
349 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
350 |
"Created: 17.4.1996 / 22:08:55 / cg" |
|
921 | 351 |
"Modified: 8.1.1997 / 14:41:23 / cg" |
483 | 352 |
! |
353 |
||
219 | 354 |
startDocumentationTool |
921 | 355 |
"open an HTML browser on the 'TOP' document" |
356 |
||
219 | 357 |
self showDocumentation:'TOP.html' |
358 |
||
359 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
921 | 360 |
"Modified: 8.1.1997 / 14:41:38 / cg" |
219 | 361 |
! |
362 |
||
1366 | 363 |
startLauncherHelp |
364 |
"open an HTML browser on the 'launcher-help' document" |
|
365 |
||
366 |
self showDocumentation:'help/launcher/launcher.html' |
|
367 |
||
368 |
"Modified: / 31.8.1995 / 13:11:28 / claus" |
|
369 |
"Modified: / 8.1.1997 / 14:41:23 / cg" |
|
370 |
"Created: / 31.10.1997 / 15:59:28 / cg" |
|
371 |
! |
|
372 |
||
776 | 373 |
startWhatsNewDocumentation |
921 | 374 |
"open an HTML browser on the 'whatsNew.html' document" |
375 |
||
776 | 376 |
self showDocumentation:'whatsNew.html' |
377 |
||
378 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
379 |
"Created: 18.10.1996 / 14:00:35 / cg" |
|
921 | 380 |
"Modified: 8.1.1997 / 14:39:32 / cg" |
776 | 381 |
! |
382 |
||
219 | 383 |
toggleActiveHelp:aBoolean |
921 | 384 |
"turn on/off active help" |
385 |
||
219 | 386 |
ActiveHelp notNil ifTrue:[ |
1383 | 387 |
helpIsOn := aBoolean. |
388 |
helpIsOn ifTrue:[ |
|
389 |
ActiveHelp start |
|
390 |
] ifFalse:[ |
|
391 |
ActiveHelp stop |
|
392 |
] |
|
219 | 393 |
]. |
921 | 394 |
|
395 |
"Modified: 8.1.1997 / 14:37:30 / cg" |
|
219 | 396 |
! ! |
397 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
398 |
!Launcher methodsFor:'actions - classes'! |
219 | 399 |
|
1366 | 400 |
browseAllBreakAndTracePoints |
401 |
"open a browser showing all breakPointed/traced methods |
|
402 |
(but, to get rid of them, there is also a menu itme to remove them all)" |
|
403 |
||
404 |
|methods| |
|
405 |
||
406 |
methods := WrappedMethod allInstances. |
|
407 |
SystemBrowser browseMethods:methods title:'all breakPointed/traced methods' |
|
408 |
||
409 |
"Modified: 14.1.1997 / 12:51:17 / cg" |
|
410 |
"Created: 14.1.1997 / 12:55:23 / cg" |
|
411 |
! |
|
412 |
||
219 | 413 |
browseImplementors |
921 | 414 |
"open an implementors- browser after asking for a selector" |
415 |
||
1366 | 416 |
|enterBox selector| |
417 |
||
418 |
enterBox := EnterBox |
|
1383 | 419 |
title:(resources at:'Browse implementors of:') withCRs |
420 |
okText:(resources at:'browse') |
|
421 |
action:[:acceptedString | selector := acceptedString]. |
|
1366 | 422 |
enterBox showAtPointer. |
423 |
||
424 |
selector notNil ifTrue:[ |
|
1383 | 425 |
self withWaitCursorDo:[ |
426 |
SystemBrowser browseImplementorsOf:selector |
|
427 |
] |
|
219 | 428 |
]. |
1366 | 429 |
|
430 |
"Modified: / 31.10.1997 / 15:43:45 / cg" |
|
219 | 431 |
! |
432 |
||
574 | 433 |
browseResources |
921 | 434 |
"open a resource- browser after asking for a resource string" |
435 |
||
1234
8cbd3a1ab97d
added help to resource-search dialog.
Claus Gittinger <cg@exept.de>
parents:
1220
diff
changeset
|
436 |
|box resourceHolder valueHolder component rsrc value t anyString| |
8cbd3a1ab97d
added help to resource-search dialog.
Claus Gittinger <cg@exept.de>
parents:
1220
diff
changeset
|
437 |
|
8cbd3a1ab97d
added help to resource-search dialog.
Claus Gittinger <cg@exept.de>
parents:
1220
diff
changeset
|
438 |
anyString := resources string:'* any *'. |
930 | 439 |
|
964 | 440 |
resourceHolder := ValueHolder newString. |
930 | 441 |
valueHolder := '*' asValue. |
442 |
||
443 |
box := DialogBox new. |
|
444 |
box label:(resources at:'Resource search:'). |
|
445 |
component := box addTextLabel:(resources at:'Search for methods which contain a\particular resource specification') withCRs. |
|
446 |
component adjust:#left. |
|
447 |
box addVerticalSpace:10. |
|
448 |
||
1034 | 449 |
component := box addTextLabel:(resources at:'Resource symbol (empty for any; no matchPattern allowed):') withCRs. |
932
d370fa068ade
allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
450 |
component adjust:#left. |
970
4d14ab7bd326
better browse-resource dialog
Claus Gittinger <cg@exept.de>
parents:
968
diff
changeset
|
451 |
component := box addComboBoxOn:resourceHolder tabable:true. |
1234
8cbd3a1ab97d
added help to resource-search dialog.
Claus Gittinger <cg@exept.de>
parents:
1220
diff
changeset
|
452 |
component list:((Array with:anyString) , #('canvas' 'menu' 'keyboard' 'style' 'image' 'programMenu' nil 'needsFix')). |
1034 | 453 |
|
454 |
component := box addTextLabel:(resources at:'Resource value (* for any; matchPattern is allowed):') withCRs. |
|
932
d370fa068ade
allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
455 |
component adjust:#left. |
d370fa068ade
allow button size to be specified in the styleSheet
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
456 |
box addInputFieldOn:valueHolder tabable:true. |
930 | 457 |
|
458 |
box addVerticalSpace:10. |
|
1234
8cbd3a1ab97d
added help to resource-search dialog.
Claus Gittinger <cg@exept.de>
parents:
1220
diff
changeset
|
459 |
box addHelpButtonFor:'programming/language.html#RESOURCEDEFS'. |
930 | 460 |
box addAbortButton; addOkButton. |
461 |
||
462 |
box showAtPointer. |
|
463 |
box destroy. |
|
464 |
||
465 |
box accepted ifTrue:[ |
|
1383 | 466 |
rsrc := resourceHolder value. |
467 |
value := valueHolder value. |
|
468 |
||
469 |
(rsrc isNil or:[rsrc isEmpty or:[rsrc = '*' or:[rsrc = anyString]]]) ifTrue:[ |
|
470 |
t := 'methods with any resource'. |
|
471 |
rsrc := nil |
|
472 |
] ifFalse:[ |
|
473 |
t := 'methods with #' , rsrc , '-resource'. |
|
474 |
rsrc := rsrc withoutSeparators asSymbol |
|
475 |
]. |
|
476 |
(value isNil or:[value isEmpty or:[value = '*']]) ifTrue:[ |
|
477 |
t := t , ' and any value'. |
|
478 |
value := nil |
|
479 |
] ifFalse:[ |
|
480 |
t := t , ' and value ' , value. |
|
481 |
]. |
|
482 |
self withWaitCursorDo:[ |
|
483 |
SystemBrowser browseForResource:rsrc |
|
484 |
containing:value |
|
485 |
in:(Smalltalk allClasses) |
|
486 |
title:t |
|
487 |
] |
|
574 | 488 |
]. |
489 |
||
490 |
"Created: 28.5.1996 / 13:15:16 / cg" |
|
1234
8cbd3a1ab97d
added help to resource-search dialog.
Claus Gittinger <cg@exept.de>
parents:
1220
diff
changeset
|
491 |
"Modified: 3.7.1997 / 14:15:37 / cg" |
574 | 492 |
! |
493 |
||
219 | 494 |
browseSenders |
921 | 495 |
"open a senders- browser after asking for a selector" |
496 |
||
1366 | 497 |
|enterBox selector| |
498 |
||
499 |
enterBox := EnterBox |
|
1383 | 500 |
title:(resources at:'Browse senders of:') withCRs |
501 |
okText:(resources at:'browse') |
|
502 |
action:[:acceptedString | selector := acceptedString]. |
|
1366 | 503 |
enterBox showAtPointer. |
504 |
||
505 |
selector notNil ifTrue:[ |
|
1383 | 506 |
self withWaitCursorDo:[ |
507 |
SystemBrowser browseAllCallsOn:selector |
|
508 |
] |
|
219 | 509 |
]. |
1366 | 510 |
|
511 |
"Modified: / 31.10.1997 / 15:44:11 / cg" |
|
512 |
! |
|
513 |
||
514 |
browseUndeclared |
|
515 |
"open a browser on methods refering to undeclared variables" |
|
516 |
||
517 |
self withWaitCursorDo:[ |
|
1383 | 518 |
SystemBrowser |
519 |
browseReferendsOf:(Smalltalk underclaredPrefix , '*') |
|
520 |
title:(resources string:'references to undeclared variables') |
|
521 |
warnIfNone:true |
|
1366 | 522 |
] |
523 |
||
524 |
"Modified: / 31.10.1997 / 15:43:18 / cg" |
|
525 |
! |
|
526 |
||
527 |
removeAllBreakAndTracePoints |
|
528 |
"remove all break- and trace points" |
|
529 |
||
530 |
MessageTracer cleanup |
|
531 |
||
532 |
"Modified: 8.1.1997 / 14:55:27 / cg" |
|
219 | 533 |
! |
534 |
||
535 |
startChangesBrowser |
|
921 | 536 |
"open a changebrowser" |
537 |
||
219 | 538 |
self withWaitCursorDo:[ChangesBrowser open] |
921 | 539 |
|
540 |
"Modified: 8.1.1997 / 14:47:07 / cg" |
|
219 | 541 |
! |
542 |
||
543 |
startClassBrowser |
|
921 | 544 |
"open a classBrowser; asks for class" |
545 |
||
219 | 546 |
SystemBrowser askThenBrowseClass |
921 | 547 |
|
548 |
"Modified: 8.1.1997 / 14:48:16 / cg" |
|
219 | 549 |
! |
550 |
||
551 |
startClassHierarchyBrowser |
|
921 | 552 |
"open a classHierarchyBrowser; asks for class" |
553 |
||
219 | 554 |
SystemBrowser askThenBrowseClassHierarchy |
921 | 555 |
|
556 |
"Modified: 8.1.1997 / 14:48:28 / cg" |
|
219 | 557 |
! |
558 |
||
559 |
startClassTreeView |
|
921 | 560 |
"open a classHierarchyTree view" |
561 |
||
219 | 562 |
self withWaitCursorDo:[ClassTreeGraphView open] |
921 | 563 |
|
564 |
"Modified: 8.1.1997 / 14:48:38 / cg" |
|
219 | 565 |
! |
566 |
||
567 |
startFileBrowser |
|
921 | 568 |
"open a fileBrowser" |
569 |
||
219 | 570 |
self withWaitCursorDo:[FileBrowser open] |
921 | 571 |
|
572 |
"Modified: 8.1.1997 / 14:48:47 / cg" |
|
219 | 573 |
! |
574 |
||
575 |
startFullClassBrowser |
|
921 | 576 |
"open a fullClass systemBrowser; asks for class" |
577 |
||
219 | 578 |
SystemBrowser askThenBrowseFullClassProtocol |
921 | 579 |
|
580 |
"Modified: 8.1.1997 / 14:48:06 / cg" |
|
219 | 581 |
! |
582 |
||
490 | 583 |
startJavaBrowser |
921 | 584 |
"open a javaBrowser (not included in the standard distribution)" |
585 |
||
490 | 586 |
JavaBrowser notNil ifTrue:[ |
1383 | 587 |
self withWaitCursorDo:[JavaBrowser open] |
490 | 588 |
] |
589 |
||
590 |
"Created: 18.4.1996 / 15:55:44 / cg" |
|
921 | 591 |
"Modified: 8.1.1997 / 14:47:31 / cg" |
490 | 592 |
! |
593 |
||
219 | 594 |
startSystemBrowser |
921 | 595 |
"open a systemBrowser" |
596 |
||
219 | 597 |
self withWaitCursorDo:[SystemBrowser open] |
921 | 598 |
|
599 |
"Modified: 8.1.1997 / 14:47:43 / cg" |
|
219 | 600 |
! |
601 |
||
602 |
startWorkspace |
|
921 | 603 |
"open a workspace" |
604 |
||
219 | 605 |
Workspace open |
921 | 606 |
|
607 |
"Modified: 8.1.1997 / 14:47:49 / cg" |
|
219 | 608 |
! ! |
609 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
610 |
!Launcher methodsFor:'actions - demos'! |
219 | 611 |
|
612 |
openDemo:className |
|
921 | 613 |
"open a demo, given its name. |
614 |
Looks in both the Smalltalk- and the Demos-Namespace |
|
615 |
for that class." |
|
616 |
||
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
617 |
self openApplication:className nameSpace:Demos |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
618 |
|
921 | 619 |
"Modified: 8.1.1997 / 14:51:02 / cg" |
219 | 620 |
! |
621 |
||
1008 | 622 |
openGame:className |
623 |
"open a game, given its name. |
|
624 |
Looks in both the Smalltalk- and the Games-Namespace |
|
625 |
for that class." |
|
626 |
||
627 |
self openApplication:className nameSpace:Games |
|
628 |
||
629 |
"Modified: 8.1.1997 / 14:51:18 / cg" |
|
630 |
"Created: 28.1.1997 / 00:49:21 / cg" |
|
631 |
! |
|
632 |
||
219 | 633 |
startTetris |
921 | 634 |
"opens a tetris game" |
635 |
||
1008 | 636 |
self openGame:'Tetris' |
637 |
||
638 |
"Modified: 28.1.1997 / 00:49:40 / cg" |
|
219 | 639 |
! |
640 |
||
641 |
startTicTacToe |
|
921 | 642 |
"opens a ticTacToe game against the machine" |
643 |
||
1008 | 644 |
self openGame:'TicTacToeGame' |
645 |
||
646 |
"Modified: 28.1.1997 / 00:49:44 / cg" |
|
219 | 647 |
! |
648 |
||
649 |
startTicTacToe2 |
|
921 | 650 |
"opens a 2-user ticTacToe game" |
651 |
||
1008 | 652 |
self openApplication:'TicTacToeGame' nameSpace:Games with:#open2UserGame |
653 |
||
654 |
"Modified: 28.1.1997 / 00:49:50 / cg" |
|
219 | 655 |
! ! |
656 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
657 |
!Launcher methodsFor:'actions - file'! |
219 | 658 |
|
659 |
exit |
|
921 | 660 |
"stop ST/X - after asking for confirmation" |
661 |
||
219 | 662 |
(self confirm:(resources string:'Are you certain you want to exit without saving ?')) |
663 |
ifTrue:[ |
|
1383 | 664 |
self saveAllViews. |
665 |
Smalltalk exit |
|
219 | 666 |
] |
921 | 667 |
|
668 |
"Modified: 8.1.1997 / 14:50:00 / cg" |
|
219 | 669 |
! |
670 |
||
671 |
objectModuleDialog |
|
921 | 672 |
"opens a moduleInfo dialog" |
673 |
||
219 | 674 |
|allModules moduleNames |
675 |
allObjects methodObjects methodNames |
|
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
676 |
cObjects cObjectNames |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
677 |
otherObjects otherObjectNames |
1383 | 678 |
box l handles unloadButton unloadAndRemoveButton |
219 | 679 |
list1 list2 listView1 listView2 |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
680 |
y panel |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
681 |
showBuiltIn showModules showMethods showCObjects showOthers |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
682 |
moduleListUpdater check canDoIt menu| |
219 | 683 |
|
684 |
showBuiltIn := true asValue. |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
685 |
canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
686 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
687 |
showModules := canDoIt asValue. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
688 |
showMethods := canDoIt asValue. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
689 |
showCObjects := canDoIt asValue. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
690 |
showOthers := canDoIt asValue. |
219 | 691 |
|
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
692 |
list1 := SelectionInList new. |
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
693 |
list2 := SelectionInList new. |
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
694 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
695 |
moduleListUpdater := [ |
1383 | 696 |
|l| |
697 |
||
698 |
list2 list:nil. |
|
699 |
||
700 |
l := Array new. |
|
701 |
handles := Array new. |
|
702 |
||
703 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
|
704 |
allModules := ObjectMemory binaryModuleInfo asOrderedCollection. |
|
705 |
(showBuiltIn value and:[showModules value]) ifFalse:[ |
|
706 |
allModules := allModules select:[:i | |
|
707 |
|wantToSee| |
|
708 |
||
709 |
wantToSee := i dynamic. |
|
710 |
showBuiltIn value ifTrue:[ |
|
711 |
wantToSee := wantToSee not |
|
712 |
]. |
|
713 |
wantToSee |
|
714 |
] |
|
715 |
]. |
|
716 |
||
717 |
"/ sorting by reverse id brings newest ones to the top (a side effect) |
|
718 |
allModules sort:[:a :b | (a id) > (b id)]. |
|
719 |
moduleNames := allModules collect:[:entry | entry name]. |
|
720 |
l := l , moduleNames. |
|
721 |
handles := handles , allModules. |
|
722 |
]. |
|
723 |
||
724 |
showMethods value ifTrue:[ |
|
725 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
726 |
methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray. |
|
727 |
methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[ |
|
728 |
'compiled method - removed' , ' (in ' , mH pathName , ')' |
|
729 |
] ifFalse:[ |
|
730 |
'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')' |
|
731 |
]. |
|
732 |
]. |
|
733 |
l := l , methodNames. |
|
734 |
handles := handles , methodObjects. |
|
735 |
]. |
|
736 |
||
737 |
showCObjects value ifTrue:[ |
|
738 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
739 |
cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray. |
|
740 |
cObjectNames := cObjects collect:[:entry | entry pathName]. |
|
741 |
l := l , cObjectNames. |
|
742 |
handles := handles , cObjects. |
|
743 |
]. |
|
744 |
||
745 |
showOthers value ifTrue:[ |
|
746 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
747 |
otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle |
|
748 |
or:[h isMethodHandle |
|
749 |
or:[h isClassLibHandle]]) not]) asArray. |
|
750 |
otherObjectNames := otherObjects collect:[:entry | entry pathName]. |
|
751 |
l := l , otherObjectNames. |
|
752 |
handles := handles , otherObjects. |
|
753 |
]. |
|
754 |
||
755 |
list1 list:l. |
|
756 |
unloadButton disable. |
|
757 |
unloadAndRemoveButton disable. |
|
758 |
]. |
|
219 | 759 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
760 |
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
|
761 |
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
|
762 |
showMethods onChangeSend:#value to:moduleListUpdater. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
763 |
showCObjects onChangeSend:#value to:moduleListUpdater. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
764 |
showOthers onChangeSend:#value to:moduleListUpdater. |
219 | 765 |
|
766 |
box := Dialog new. |
|
767 |
box label:(resources string:'Module dialog'). |
|
768 |
||
769 |
listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
770 |
listView1 model:list1. |
|
771 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
772 |
listView1 action:[:sel | |
|
1383 | 773 |
|info classNames tabs module| |
774 |
||
775 |
listView1 middleButtonMenu:nil. |
|
776 |
||
777 |
box withWaitCursorDo:[ |
|
778 |
|nm fileName addr entry1 entry2 entry3 method| |
|
779 |
||
780 |
tabs := TabulatorSpecification unit:#inch positions:#(0 2.6). |
|
781 |
||
782 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
|
783 |
info := allModules at:sel ifAbsent:nil. |
|
784 |
]. |
|
785 |
info isNil ifTrue:[ |
|
786 |
"/ selected a method, cObject or unknown |
|
787 |
||
788 |
module := handles at:sel. |
|
789 |
fileName := module pathName. |
|
790 |
||
791 |
module isMethodHandle ifTrue:[ |
|
792 |
||
793 |
(method := module method) isNil ifTrue:[ |
|
794 |
nm := '** removed **'. |
|
795 |
] ifFalse:[ |
|
796 |
menu := PopUpMenu |
|
797 |
labels:#('inspect' 'browse') |
|
798 |
selectors:#(inspect browse). |
|
799 |
menu actionAt:#inspect put:[ method inspect ]. |
|
800 |
menu actionAt:#browse put:[ |who| |
|
801 |
who := method who. |
|
802 |
SystemBrowser |
|
803 |
openInClass:(who methodClass) |
|
804 |
selector:(who methodSelector) |
|
805 |
]. |
|
806 |
listView1 middleButtonMenu:menu. |
|
807 |
||
808 |
nm := (method whoString) asText emphasizeAllWith:(#color->Color blue). |
|
809 |
]. |
|
810 |
entry1 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
811 |
entry1 colAt:1 put:'compiled method'; colAt:2 put:nm. |
|
812 |
||
813 |
entry2 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
814 |
entry2 colAt:1 put:'path'; colAt:2 put:fileName. |
|
815 |
||
816 |
entry3 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
817 |
entry3 colAt:1 put:'address'; colAt:2 put:('(16r) ' , (method code hexPrintString leftPaddedTo:8 with:$0)). |
|
818 |
||
819 |
list2 list:(Array with:entry1 with:entry2 with:entry3). |
|
820 |
] ifFalse:[ |
|
821 |
(module isFunctionObjectHandle |
|
822 |
and:[module functions notEmpty]) ifTrue:[ |
|
823 |
||
824 |
menu := PopUpMenu |
|
825 |
labels:#('inspect') |
|
826 |
selectors:#(inspect). |
|
827 |
menu actionAt:#inspect put:[ module functions inspect ]. |
|
828 |
listView1 middleButtonMenu:menu. |
|
829 |
||
830 |
list2 list:((module functions select:[:f | f notNil]) |
|
831 |
collect:[:f | |entry| |
|
832 |
entry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
833 |
entry colAt:1 put:(f name asText emphasizeAllWith:(#color->Color blue)). |
|
834 |
entry colAt:2 put:('address: (16r) ' , (f code hexPrintString leftPaddedTo:8 with:$0)). |
|
835 |
entry |
|
836 |
]). |
|
837 |
] ifFalse:[ |
|
838 |
list2 list:#('nothing known about contents (no functions have been extracted)'). |
|
839 |
] |
|
840 |
]. |
|
841 |
||
842 |
unloadButton enable. |
|
843 |
unloadAndRemoveButton disable. |
|
844 |
] ifFalse:[ |
|
845 |
"/ selected a package |
|
846 |
||
847 |
"/ fill bottom list with class-info |
|
848 |
||
849 |
classNames := info classNames asSortedCollection. |
|
850 |
classNames := classNames select:[:cName | |
|
851 |
|cls| |
|
852 |
||
853 |
cls := Smalltalk classNamed:cName. |
|
854 |
cls isNil ifTrue:[ |
|
855 |
true "a removed class" |
|
856 |
] ifFalse:[ |
|
857 |
cls isPrivate not |
|
858 |
]. |
|
859 |
]. |
|
860 |
||
861 |
classNames := classNames collect:[:cName | |
|
862 |
|cls entry rev listEntry| |
|
863 |
||
864 |
listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
|
865 |
listEntry colAt:1 put:cName. |
|
866 |
||
867 |
cls := Smalltalk classNamed:cName. |
|
868 |
cls isNil ifTrue:[ |
|
869 |
listEntry colAt:2 put:'(class removed)'. |
|
870 |
] ifFalse:[ |
|
871 |
rev := cls binaryRevision. |
|
872 |
rev notNil ifTrue:[ |
|
873 |
cls isLoaded ifFalse:[ |
|
874 |
entry := '(stub for: ' , rev. |
|
875 |
] ifTrue:[ |
|
876 |
entry :='(bin: ' , rev. |
|
877 |
]. |
|
878 |
cls revision ~= rev ifTrue:[ |
|
879 |
entry := entry , ' / src: ' , cls revision |
|
880 |
]. |
|
881 |
listEntry colAt:2 put:entry , ')' |
|
882 |
] ifFalse:[ |
|
883 |
cls revision notNil ifTrue:[ |
|
884 |
listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' |
|
885 |
] |
|
886 |
] |
|
887 |
]. |
|
888 |
listEntry |
|
889 |
]. |
|
890 |
list2 list:classNames. |
|
891 |
info dynamic ifTrue:[ |
|
892 |
unloadButton enable. |
|
893 |
unloadAndRemoveButton enable. |
|
894 |
] ifFalse:[ |
|
895 |
unloadButton disable. |
|
896 |
unloadAndRemoveButton disable. |
|
897 |
]. |
|
898 |
] |
|
899 |
] |
|
219 | 900 |
]. |
901 |
||
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
902 |
|
219 | 903 |
panel := HorizontalPanelView new. |
904 |
||
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
905 |
panel add:(l := Label label:'show:'). |
219 | 906 |
l adjust:#left; borderWidth:0. |
347 | 907 |
panel add:(check := CheckBox label:'builtin' model:showBuiltIn). |
908 |
box makeTabable:check. |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
909 |
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
|
910 |
canDoIt ifFalse:[ |
1383 | 911 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
912 |
] ifTrue:[ |
1383 | 913 |
box makeTabable:check. |
347 | 914 |
]. |
219 | 915 |
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
|
916 |
canDoIt ifFalse:[ |
1383 | 917 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
918 |
] ifTrue:[ |
1383 | 919 |
box makeTabable:check. |
347 | 920 |
]. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
921 |
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
|
922 |
canDoIt ifFalse:[ |
1383 | 923 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
924 |
] ifTrue:[ |
1383 | 925 |
box makeTabable:check. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
926 |
]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
927 |
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
|
928 |
canDoIt ifFalse:[ |
1383 | 929 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
930 |
] ifTrue:[ |
1383 | 931 |
box makeTabable:check. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
932 |
]. |
219 | 933 |
|
934 |
panel horizontalLayout:#fitSpace. |
|
458 | 935 |
"/ panel horizontalLayout:#leftSpace. |
219 | 936 |
|
347 | 937 |
box addComponent:panel tabable:false. |
219 | 938 |
|
347 | 939 |
box addVerticalSpace. |
219 | 940 |
box addComponent:listView1 tabable:true. |
941 |
listView1 topInset:(View viewSpacing + panel preferredExtent y). |
|
942 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
943 |
||
944 |
l := box addTextLabel:(resources string:'contained classes/subsets:'). |
|
945 |
l adjust:#left; borderWidth:0. |
|
946 |
l origin:0.0@0.4 corner:1.0@0.4. |
|
947 |
l topInset:(View viewSpacing). |
|
948 |
l bottomInset:((l preferredExtent y) negated - View viewSpacing). |
|
949 |
||
950 |
listView2 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
951 |
listView2 model:list2; printItems:false. |
|
952 |
box addComponent:listView2 tabable:true. |
|
953 |
listView2 origin:0.0@0.4 corner:1.0@1.0. "/ ; inset:2. |
|
954 |
listView2 disable. |
|
955 |
||
956 |
unloadButton := Button label:(resources string:'unload'). |
|
957 |
unloadButton action:[ |
|
1383 | 958 |
self withWaitCursorDo:[ |
959 |
box withWaitCursorDo:[ |
|
960 |
|info idx pathName| |
|
961 |
||
962 |
idx := list1 selectionIndex. |
|
963 |
info := allModules at:idx ifAbsent:nil. |
|
964 |
||
965 |
list1 selectionIndex:nil. |
|
966 |
||
967 |
info isNil ifTrue:[ |
|
968 |
"/ selected a method |
|
969 |
"/ idx := idx - allModules size. |
|
970 |
pathName := (handles at:idx) pathName. |
|
971 |
||
972 |
] ifFalse:[ |
|
973 |
"/ selected a package |
|
974 |
pathName := info pathName. |
|
975 |
]. |
|
976 |
ObjectFileLoader unloadObjectFile:pathName. |
|
977 |
moduleListUpdater value. |
|
978 |
unloadButton disable. |
|
979 |
] |
|
980 |
] |
|
219 | 981 |
]. |
1383 | 982 |
|
983 |
unloadAndRemoveButton := Button label:(resources string:'remove classes & unload'). |
|
984 |
unloadAndRemoveButton action:[ |
|
985 |
self withWaitCursorDo:[ |
|
986 |
box withWaitCursorDo:[ |
|
987 |
|info idx pathName| |
|
988 |
||
989 |
idx := list1 selectionIndex. |
|
990 |
info := allModules at:idx ifAbsent:nil. |
|
991 |
||
992 |
list1 selectionIndex:nil. |
|
993 |
||
994 |
info isNil ifTrue:[ |
|
995 |
"/ selected a method |
|
996 |
"/ idx := idx - allModules size. |
|
997 |
pathName := (handles at:idx) pathName. |
|
998 |
||
999 |
] ifFalse:[ |
|
1000 |
"/ selected a package |
|
1001 |
pathName := info pathName. |
|
1002 |
]. |
|
1003 |
ObjectFileLoader unloadObjectFileAndRemoveClasses:pathName. |
|
1004 |
moduleListUpdater value. |
|
1005 |
unloadAndRemoveButton disable. |
|
1006 |
] |
|
1007 |
] |
|
1008 |
]. |
|
1009 |
||
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1010 |
moduleListUpdater value. |
219 | 1011 |
|
1012 |
box addButton:unloadButton. |
|
1383 | 1013 |
box addButton:unloadAndRemoveButton. |
1351 | 1014 |
box addAbortButtonLabelled:(resources string:'dismiss'). |
219 | 1015 |
|
1016 |
y := box yPosition. |
|
1017 |
listView2 topInset:(l preferredExtent y + 5). |
|
1018 |
listView2 bottomInset:(box preferredExtent y - y). |
|
1019 |
||
458 | 1020 |
"/ box width:(400 min:(box device width * 2 // 3)); |
1021 |
"/ height:(450 min:(box device height - 50)); |
|
1022 |
"/ sizeFixed:true. |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1023 |
box open. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1024 |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1025 |
box destroy. |
219 | 1026 |
|
1381
f3f5b2f1fe80
skip private & removed classes in moduleDialog
Claus Gittinger <cg@exept.de>
parents:
1376
diff
changeset
|
1027 |
"Modified: / 17.9.1995 / 16:47:50 / claus" |
1383 | 1028 |
"Modified: / 12.12.1997 / 22:19:13 / cg" |
219 | 1029 |
! |
1030 |
||
1031 |
snapshot |
|
921 | 1032 |
"saves a snapshot image, after asking for a fileName" |
1033 |
||
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1034 |
|fileName| |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1035 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1036 |
fileName := DialogBox |
1383 | 1037 |
request:(resources at:'filename for image:') withCRs |
1038 |
initialAnswer:(ObjectMemory nameForSnapshot) |
|
1039 |
okLabel:(resources at:'save') |
|
1040 |
title:(resources string:'save image') |
|
1041 |
onCancel:nil. |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1042 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1043 |
fileName notNil ifTrue:[ |
1383 | 1044 |
self showCursor:Cursor write. |
1045 |
[ |
|
1046 |
(ObjectMemory snapShotOn:fileName) ifFalse:[ |
|
1047 |
" |
|
1048 |
snapshot failed for some reason (disk full, no permission etc.) |
|
1049 |
" |
|
1050 |
self warn:(resources string:'failed to save snapshot image (disk full or not writable)'). |
|
1051 |
] |
|
1052 |
] valueNowOrOnUnwindDo:[ |
|
1053 |
self restoreCursors. |
|
1054 |
]. |
|
219 | 1055 |
]. |
1056 |
||
921 | 1057 |
"Modified: 8.1.1997 / 14:50:29 / cg" |
219 | 1058 |
! |
1059 |
||
1060 |
snapshotAndExit |
|
921 | 1061 |
"saves a snapshot image and exits, after asking for a fileName" |
1062 |
||
590 | 1063 |
|fileName ok| |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1064 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1065 |
fileName := DialogBox |
1383 | 1066 |
request:(resources at:'filename for image:') withCRs |
1067 |
initialAnswer:(ObjectMemory nameForSnapshot) |
|
1068 |
okLabel:(resources at:'save & exit') |
|
1069 |
title:(resources string:'save image & exit') |
|
1070 |
onCancel:nil. |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1071 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1072 |
fileName notNil ifTrue:[ |
1383 | 1073 |
self showCursor:Cursor write. |
1074 |
[ |
|
1075 |
ok := ObjectMemory snapShotOn:fileName. |
|
1076 |
] valueNowOrOnUnwindDo:[ |
|
1077 |
self restoreCursors. |
|
1078 |
]. |
|
1079 |
||
1080 |
ok ifFalse:[ |
|
1081 |
" |
|
1082 |
snapshot failed for some reason (disk full, no permission etc.) |
|
1083 |
Do NOT exit in this case. |
|
1084 |
" |
|
1085 |
self warn:(resources string:'failed to save snapshot image (disk full or not writable)'). |
|
1086 |
] ifTrue:[ |
|
1087 |
" |
|
1088 |
saveAllViews tells all views to shutdown neatly |
|
1089 |
(i.e. offer a chance to save the contents to a file). |
|
1090 |
||
1091 |
This is NOT required - all data should be in the snapshot ... |
|
1092 |
... however, if remote disks/mountable filesystems are involved, |
|
1093 |
which may not be present the next time, it may make sense to |
|
1094 |
uncomment it and query for saving - time will show which is better. |
|
1095 |
" |
|
590 | 1096 |
" |
1383 | 1097 |
self saveAllViews. |
590 | 1098 |
" |
1383 | 1099 |
Smalltalk exit |
1100 |
] |
|
219 | 1101 |
]. |
1102 |
||
921 | 1103 |
"Modified: 8.1.1997 / 14:50:36 / cg" |
219 | 1104 |
! ! |
1105 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1106 |
!Launcher methodsFor:'actions - goodies'! |
219 | 1107 |
|
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1108 |
openGoodie:className |
921 | 1109 |
"open a goodie, given its name. |
1110 |
Looks in both the Smalltalk- and the Goodies-Namespace |
|
1111 |
for that class." |
|
1112 |
||
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1113 |
self openApplication:className nameSpace:Goodies |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1114 |
|
921 | 1115 |
"Modified: 8.1.1997 / 14:51:18 / cg" |
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1116 |
! |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1117 |
|
219 | 1118 |
startCalendar |
921 | 1119 |
"open a calendar goodie" |
1120 |
||
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1121 |
self openGoodie:'Calendar' |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1122 |
|
921 | 1123 |
"Modified: 8.1.1997 / 14:51:29 / cg" |
219 | 1124 |
! |
1125 |
||
1126 |
startClock |
|
921 | 1127 |
"open a clock goodie" |
1128 |
||
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1129 |
self openGoodie:'RoundClock' |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1130 |
|
921 | 1131 |
"Modified: 8.1.1997 / 14:51:34 / cg" |
219 | 1132 |
! |
1133 |
||
1134 |
startMailTool |
|
921 | 1135 |
"open a mailView goodie" |
1136 |
||
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1137 |
self openGoodie:'MailView' |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1138 |
|
921 | 1139 |
"Modified: 8.1.1997 / 14:51:42 / cg" |
219 | 1140 |
! |
1141 |
||
1142 |
startNewsTool |
|
921 | 1143 |
"open a newsTool goodie" |
1144 |
||
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1145 |
self openGoodie:'NewsView' |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
1146 |
|
921 | 1147 |
"Modified: 8.1.1997 / 14:51:48 / cg" |
219 | 1148 |
! ! |
1149 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1150 |
!Launcher methodsFor:'actions - projects'! |
219 | 1151 |
|
1152 |
newProject |
|
921 | 1153 |
"creates a new project & opens a projectView for it" |
1154 |
||
219 | 1155 |
Project notNil ifTrue:[ |
1383 | 1156 |
(ProjectView for:(Project new)) open |
219 | 1157 |
] |
921 | 1158 |
|
1159 |
"Modified: 8.1.1997 / 14:52:07 / cg" |
|
219 | 1160 |
! |
1161 |
||
1162 |
selectProject |
|
921 | 1163 |
"asks for and switch to another project" |
1164 |
||
219 | 1165 |
|list box| |
1166 |
||
1167 |
Project notNil ifTrue:[ |
|
1383 | 1168 |
list := Project allInstances. |
1169 |
box := ListSelectionBox new. |
|
1170 |
box list:(list collect:[:p | p name]). |
|
1171 |
box title:(resources string:'select a project'). |
|
1172 |
box action:[:selection | |
|
1173 |
|project| |
|
1174 |
||
1175 |
project := list detect:[:p | p name = selection] ifNone:[nil]. |
|
1176 |
project isNil ifTrue:[ |
|
1177 |
transcript showCR:'no such project.' |
|
1178 |
] ifFalse:[ |
|
1179 |
project showViews. |
|
1180 |
Project current:project |
|
1181 |
] |
|
1182 |
]. |
|
1183 |
box showAtPointer. |
|
1184 |
box destroy |
|
219 | 1185 |
] |
549 | 1186 |
|
921 | 1187 |
"Modified: 8.1.1997 / 14:52:20 / cg" |
86 | 1188 |
! ! |
1189 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1190 |
!Launcher methodsFor:'actions - settings'! |
219 | 1191 |
|
1192 |
compilerSettings |
|
921 | 1193 |
"open a dialog on compiler related settings" |
1194 |
||
1312 | 1195 |
|box warnings warnSTX warnUnderscore warnDollar warnOldStyle |
1196 |
allowDollar allowUnderscore immutableArrays |
|
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1197 |
warnSTXBox warnUnderscoreBox warnOldStyleBox warnCommonMistakes warnCommonMistakesBox |
1312 | 1198 |
warnCompatibility warnCompatibilityBox warnDollarBox |
219 | 1199 |
stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions |
1354 | 1200 |
stcLibraries stcLibraryPath cc ccOptions historyLines fullHistoryUpdate catchRedefs keepSourceOptions keepSource |
1180
464a3dd1f90a
added compatibility warnings checkBox.
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
1201 |
constantFoldingOptions constantFolding justInTimeCompilation |
782 | 1202 |
warnEnabler check component oldIndent t supportsJustInTimeCompilation y |
1250
a0c335cfb6a9
moved lazyLoading and binaryLoading to compiler sections
Claus Gittinger <cg@exept.de>
parents:
1242
diff
changeset
|
1203 |
y2 fullDebugSupport yMax |
1296
db1d3cdf023a
disbable stc-setting fields if objectfileloading is not possible
Claus Gittinger <cg@exept.de>
parents:
1295
diff
changeset
|
1204 |
compileLazy loadBinaries canLoadBinaries| |
db1d3cdf023a
disbable stc-setting fields if objectfileloading is not possible
Claus Gittinger <cg@exept.de>
parents:
1295
diff
changeset
|
1205 |
|
db1d3cdf023a
disbable stc-setting fields if objectfileloading is not possible
Claus Gittinger <cg@exept.de>
parents:
1295
diff
changeset
|
1206 |
canLoadBinaries := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
1250
a0c335cfb6a9
moved lazyLoading and binaryLoading to compiler sections
Claus Gittinger <cg@exept.de>
parents:
1242
diff
changeset
|
1207 |
loadBinaries := Smalltalk loadBinaries asValue. |
a0c335cfb6a9
moved lazyLoading and binaryLoading to compiler sections
Claus Gittinger <cg@exept.de>
parents:
1242
diff
changeset
|
1208 |
compileLazy := Autoload compileLazy asValue. |
a0c335cfb6a9
moved lazyLoading and binaryLoading to compiler sections
Claus Gittinger <cg@exept.de>
parents:
1242
diff
changeset
|
1209 |
|
219 | 1210 |
|
1211 |
warnings := Compiler warnings asValue. |
|
1212 |
||
1213 |
warnSTX := Compiler warnSTXSpecials asValue. |
|
1214 |
warnUnderscore := Compiler warnUnderscoreInIdentifier asValue. |
|
1312 | 1215 |
warnDollar := Compiler warnDollarInIdentifier asValue. |
219 | 1216 |
warnOldStyle := Compiler warnOldStyleAssignment asValue. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1217 |
warnCommonMistakes := Compiler warnCommonMistakes asValue. |
1180
464a3dd1f90a
added compatibility warnings checkBox.
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
1218 |
warnCompatibility := Compiler warnPossibleIncompatibilities asValue. |
219 | 1219 |
allowUnderscore := Compiler allowUnderscoreInIdentifier asValue. |
1312 | 1220 |
allowDollar := Compiler allowDollarInIdentifier asValue. |
219 | 1221 |
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
|
1222 |
|
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1223 |
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
|
1224 |
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
|
1225 |
constantFolding selectionIndex:3. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1226 |
|
219 | 1227 |
stcCompilationOptions := #( always default never). |
695 | 1228 |
stcCompilation := SelectionInList new |
1383 | 1229 |
list:(resources array:#('always' |
1230 |
'primitive code only' |
|
1231 |
'never' |
|
1232 |
)). |
|
219 | 1233 |
stcCompilation selectionIndex:2. |
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
1234 |
(supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation) |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
1235 |
ifTrue:[ |
1383 | 1236 |
justInTimeCompilation := ObjectMemory justInTimeCompilation:nil. |
1237 |
fullDebugSupport := ObjectMemory fullSingleStepSupport:nil. |
|
695 | 1238 |
] ifFalse:[ |
1383 | 1239 |
justInTimeCompilation := false. |
1240 |
fullDebugSupport := (Compiler lineNumberInfo == #full) asValue. |
|
695 | 1241 |
]. |
1242 |
justInTimeCompilation := justInTimeCompilation asValue. |
|
1180
464a3dd1f90a
added compatibility warnings checkBox.
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
1243 |
fullDebugSupport := fullDebugSupport asValue. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1244 |
|
219 | 1245 |
stcIncludes := Compiler stcCompilationIncludes asValue. |
1246 |
stcDefines := Compiler stcCompilationDefines asValue. |
|
1247 |
stcOptions := Compiler stcCompilationOptions asValue. |
|
833
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1248 |
ccOptions := Compiler ccCompilationOptions asValue. |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1249 |
cc := Compiler ccPath asValue. |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1250 |
|
232 | 1251 |
ObjectFileLoader notNil ifTrue:[ |
1383 | 1252 |
(t := ObjectFileLoader searchedLibraries) notNil ifTrue:[ |
1253 |
stcLibraries := (String fromStringCollection:t separatedBy:' ') asValue. |
|
1254 |
]. |
|
1255 |
(t := ObjectFileLoader libPath) notNil ifTrue:[ |
|
1256 |
stcLibraryPath := t asValue. |
|
1257 |
] |
|
232 | 1258 |
]. |
219 | 1259 |
|
1260 |
catchRedefs := Class catchMethodRedefinitions asValue. |
|
1361 | 1261 |
historyLines := HistoryManager notNil and:[HistoryManager isLoaded and:[HistoryManager isActive]]. |
1262 |
historyLines ifFalse:[ |
|
1383 | 1263 |
fullHistoryUpdate := false |
1361 | 1264 |
] ifTrue:[ |
1383 | 1265 |
fullHistoryUpdate := HistoryManager fullHistoryUpdate asValue. |
1361 | 1266 |
]. |
1267 |
historyLines := historyLines asValue. |
|
219 | 1268 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1269 |
keepSourceOptions := #( keep reference absReference sourceReference discard ). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1270 |
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
|
1271 |
keepSource selectionIndex:1. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1272 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1273 |
warnEnabler := [ |
1383 | 1274 |
warnings value ifTrue:[ |
1275 |
warnSTXBox enable. |
|
1276 |
warnOldStyleBox enable. |
|
1277 |
warnCommonMistakesBox enable. |
|
1278 |
warnCompatibilityBox enable. |
|
1279 |
allowUnderscore value ifTrue:[ |
|
1280 |
warnUnderscoreBox enable. |
|
1281 |
] ifFalse:[ |
|
1282 |
warnUnderscoreBox disable. |
|
1283 |
]. |
|
1284 |
allowDollar value ifTrue:[ |
|
1285 |
warnDollarBox enable. |
|
1286 |
] ifFalse:[ |
|
1287 |
warnDollarBox disable. |
|
1288 |
]. |
|
1289 |
] ifFalse:[ |
|
1290 |
warnSTXBox disable. |
|
1291 |
warnUnderscoreBox disable. |
|
1292 |
warnDollarBox disable. |
|
1293 |
warnOldStyleBox disable. |
|
1294 |
warnCommonMistakesBox disable. |
|
1295 |
warnCompatibilityBox disable. |
|
1296 |
]]. |
|
219 | 1297 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1298 |
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
|
1299 |
allowUnderscore onChangeSend:#value to:warnEnabler. |
1312 | 1300 |
allowDollar onChangeSend:#value to:warnEnabler. |
219 | 1301 |
|
1302 |
box := DialogBox new. |
|
1303 |
box label:(resources string:'Compiler settings'). |
|
1304 |
||
1305 |
box addCheckBox:(resources string:'catch method redefinitions') on:catchRedefs. |
|
1354 | 1306 |
y := box yPosition. |
219 | 1307 |
check := box addCheckBox:(resources string:'keep history line in methods') on:historyLines. |
1308 |
HistoryManager isNil ifTrue:[check disable]. |
|
1354 | 1309 |
box yPosition:y. |
1310 |
check := box addCheckBox:(resources string:'keep full class history') on:fullHistoryUpdate. |
|
1311 |
check left:0.5. |
|
1312 |
HistoryManager isNil ifTrue:[check disable] ifFalse:[check enableChannel:historyLines]. |
|
219 | 1313 |
|
378 | 1314 |
box addPopUpList:(resources string:'fileIn source mode:') on:keepSource. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1315 |
keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1316 |
|
219 | 1317 |
box addHorizontalLine. |
1318 |
||
1250
a0c335cfb6a9
moved lazyLoading and binaryLoading to compiler sections
Claus Gittinger <cg@exept.de>
parents:
1242
diff
changeset
|
1319 |
box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy. |
a0c335cfb6a9
moved lazyLoading and binaryLoading to compiler sections
Claus Gittinger <cg@exept.de>
parents:
1242
diff
changeset
|
1320 |
check := box addCheckBox:(resources string:'if present, load binary objects when autoloading') on:loadBinaries. |
1296
db1d3cdf023a
disbable stc-setting fields if objectfileloading is not possible
Claus Gittinger <cg@exept.de>
parents:
1295
diff
changeset
|
1321 |
canLoadBinaries ifFalse:[ |
1383 | 1322 |
loadBinaries value:false. |
1323 |
check disable |
|
1250
a0c335cfb6a9
moved lazyLoading and binaryLoading to compiler sections
Claus Gittinger <cg@exept.de>
parents:
1242
diff
changeset
|
1324 |
]. |
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
1325 |
supportsJustInTimeCompilation ifTrue:[ |
1383 | 1326 |
component := box |
1327 |
addCheckBox:(resources string:'just in time compilation to machine code') |
|
1328 |
on:justInTimeCompilation. |
|
695 | 1329 |
]. |
1330 |
||
1250
a0c335cfb6a9
moved lazyLoading and binaryLoading to compiler sections
Claus Gittinger <cg@exept.de>
parents:
1242
diff
changeset
|
1331 |
box addHorizontalLine. |
a0c335cfb6a9
moved lazyLoading and binaryLoading to compiler sections
Claus Gittinger <cg@exept.de>
parents:
1242
diff
changeset
|
1332 |
|
232 | 1333 |
ObjectFileLoader notNil ifTrue:[ |
1383 | 1334 |
compilationList := box addPopUpList:(resources string:'stc compilation to machine code') on:stcCompilation. |
1335 |
stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2). |
|
1336 |
||
1337 |
component := box |
|
1338 |
addLabelledInputField:(resources string:'include directories:') |
|
1339 |
adjust:#right |
|
1340 |
on:stcIncludes |
|
1341 |
tabable:true |
|
1342 |
separateAtX:0.3. |
|
1343 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1344 |
component preferredExtent:(250 @ component preferredExtent y). |
|
1345 |
canLoadBinaries ifFalse:[component disable]. |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1346 |
|
737 | 1347 |
"/ box addVerticalSpace. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1348 |
|
1383 | 1349 |
component := box |
1350 |
addLabelledInputField:(resources string:'defines:') |
|
1351 |
adjust:#right |
|
1352 |
on:stcDefines |
|
1353 |
tabable:true |
|
1354 |
separateAtX:0.3. |
|
1355 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1356 |
component preferredExtent:(250 @ component preferredExtent y). |
|
1357 |
canLoadBinaries ifFalse:[component disable]. |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1358 |
|
737 | 1359 |
"/ box addVerticalSpace. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1360 |
|
1383 | 1361 |
component := box |
1362 |
addLabelledInputField:(resources string:'stc options:') |
|
1363 |
adjust:#right |
|
1364 |
on:stcOptions |
|
1365 |
tabable:true |
|
1366 |
separateAtX:0.3. |
|
1367 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1368 |
component preferredExtent:(250 @ component preferredExtent y). |
|
1369 |
canLoadBinaries ifFalse:[component disable]. |
|
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1370 |
|
833
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1371 |
"/ box addVerticalSpace. |
f4d9acc94617
more control over cc flags/command
Claus Gittinger <cg@exept.de>
parents:
827
diff
changeset
|
1372 |
|
1383 | 1373 |
component := box |
1374 |
addLabelledInputField:(resources string:'cc command:') |
|
1375 |
adjust:#right |
|
1376 |
on:cc |
|
1377 |
tabable:true |
|
1378 |
separateAtX:0.3. |
|
1379 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1380 |
component preferredExtent:(250 @ component preferredExtent y). |
|
1381 |
canLoadBinaries ifFalse:[component disable]. |
|
1382 |
||
1383 |
component := box |
|
1384 |
addLabelledInputField:(resources string:'cc options:') |
|
1385 |
adjust:#right |
|
1386 |
on:ccOptions |
|
1387 |
tabable:true |
|
1388 |
separateAtX:0.3. |
|
1389 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1390 |
component preferredExtent:(250 @ component preferredExtent y). |
|
1391 |
canLoadBinaries ifFalse:[component disable]. |
|
1392 |
||
1393 |
stcLibraries notNil ifTrue:[ |
|
737 | 1394 |
"/ box addVerticalSpace. |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1395 |
|
1383 | 1396 |
component := box |
1397 |
addLabelledInputField:(resources string:'C-libraries:') |
|
1398 |
adjust:#right |
|
1399 |
on:stcLibraries |
|
1400 |
tabable:true |
|
1401 |
separateAtX:0.3. |
|
1402 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1403 |
component preferredExtent:(250 @ component preferredExtent y). |
|
1404 |
canLoadBinaries ifFalse:[component disable]. |
|
1405 |
]. |
|
1406 |
||
1407 |
stcLibraryPath notNil ifTrue:[ |
|
737 | 1408 |
"/ box addVerticalSpace. |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1409 |
|
1383 | 1410 |
component := box |
1411 |
addLabelledInputField:(resources string:'stc libPath:') |
|
1412 |
adjust:#right |
|
1413 |
on:stcLibraryPath |
|
1414 |
tabable:true |
|
1415 |
separateAtX:0.3. |
|
1416 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1417 |
component preferredExtent:(250 @ component preferredExtent y). |
|
1418 |
canLoadBinaries ifFalse:[component disable]. |
|
1419 |
]. |
|
219 | 1420 |
|
737 | 1421 |
"/ box addVerticalSpace. |
1383 | 1422 |
box addHorizontalLine. |
1423 |
||
1424 |
"/ if there is no compiler around, |
|
1425 |
"/ change to compile nothing, and disable the checkBoxes |
|
1426 |
Compiler canCreateMachineCode ifFalse:[ |
|
1427 |
stcCompilation selectionIndex:3. |
|
1428 |
compilationList disable. |
|
1429 |
]. |
|
219 | 1430 |
]. |
1431 |
||
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1432 |
y := box yPosition. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1433 |
|
782 | 1434 |
component := box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore. |
1435 |
component width:0.4. |
|
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1436 |
|
1312 | 1437 |
component := box addCheckBox:(resources string:'allow dollar in identifiers') on:allowDollar. |
1438 |
component width:0.4. |
|
1439 |
||
782 | 1440 |
component := box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays. |
1441 |
component width:0.4. |
|
1442 |
y2 := box yPosition. |
|
1443 |
||
1444 |
box yPosition:y. |
|
1445 |
box leftIndent:0. |
|
783
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1446 |
|
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1447 |
component :=box addPopUpList:(resources string:'constant folding:') on:constantFolding. |
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1448 |
component superView left:0.5; width:0.5. |
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1449 |
constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1). |
0f64a5d1bad2
reorganized compiler-settings dialog
Claus Gittinger <cg@exept.de>
parents:
782
diff
changeset
|
1450 |
|
1180
464a3dd1f90a
added compatibility warnings checkBox.
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
1451 |
component := box addCheckBox:(resources string:'full debug info') on:fullDebugSupport. |
782 | 1452 |
component left:0.5; width:0.4. |
1453 |
box yPosition:(box yPosition max:y2). |
|
1454 |
||
695 | 1455 |
|
219 | 1456 |
box addHorizontalLine. |
1457 |
||
1458 |
box addCheckBox:(resources string:'warnings') on:warnings. |
|
737 | 1459 |
"/ box addVerticalSpace. |
343 | 1460 |
oldIndent := box leftIndent. |
219 | 1461 |
box leftIndent:30. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1462 |
|
737 | 1463 |
y := box yPosition. |
1464 |
||
760 | 1465 |
warnSTXBox := box addCheckBox:(resources string:'ST/X extensions') on:warnSTX. |
737 | 1466 |
warnSTXBox width:0.4. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1467 |
|
219 | 1468 |
warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore. |
737 | 1469 |
warnUnderscoreBox width:0.4. |
1180
464a3dd1f90a
added compatibility warnings checkBox.
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
1470 |
|
1312 | 1471 |
warnDollarBox := box addCheckBox:(resources string:'dollars in identifiers') on:warnDollar. |
1472 |
warnDollarBox width:0.4. |
|
1180
464a3dd1f90a
added compatibility warnings checkBox.
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
1473 |
|
464a3dd1f90a
added compatibility warnings checkBox.
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
1474 |
yMax := box yPosition. |
737 | 1475 |
|
1476 |
box yPosition:y. |
|
1477 |
box leftIndent:0. |
|
219 | 1478 |
warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle. |
737 | 1479 |
warnOldStyleBox left:0.5; width:0.4. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1480 |
|
679 | 1481 |
warnCommonMistakesBox := box addCheckBox:(resources string:'common mistakes') on:warnCommonMistakes. |
737 | 1482 |
warnCommonMistakesBox left:0.5; width:0.4. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1483 |
|
1312 | 1484 |
warnCompatibilityBox := box addCheckBox:(resources string:'possible incompatibilities') on:warnCompatibility. |
1485 |
warnCompatibilityBox left:0.5; width:0.4. |
|
1486 |
||
343 | 1487 |
box leftIndent:oldIndent. |
1180
464a3dd1f90a
added compatibility warnings checkBox.
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
1488 |
box yPosition:(yMax max: box yPosition). |
219 | 1489 |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1490 |
box |
1383 | 1491 |
addHelpButtonFor:'Launcher/compilerSettings.html'; |
1492 |
addAbortButton; |
|
1493 |
addOkButton. |
|
219 | 1494 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1495 |
warnEnabler value. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1496 |
box open. |
219 | 1497 |
|
1498 |
box accepted ifTrue:[ |
|
1383 | 1499 |
HistoryManager notNil ifTrue:[ |
1500 |
HistoryManager fullHistoryUpdate:fullHistoryUpdate value. |
|
1501 |
historyLines value ifTrue:[ |
|
1502 |
HistoryManager activate |
|
1503 |
] ifFalse:[ |
|
1504 |
HistoryManager deactivate |
|
1505 |
]. |
|
1506 |
]. |
|
1507 |
Class catchMethodRedefinitions:catchRedefs value. |
|
1508 |
ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex). |
|
1509 |
Compiler warnings:warnings value. |
|
1510 |
Compiler warnSTXSpecials:warnSTX value. |
|
1511 |
Compiler warnOldStyleAssignment:warnOldStyle value. |
|
1512 |
Compiler warnUnderscoreInIdentifier:warnUnderscore value. |
|
1513 |
Compiler warnDollarInIdentifier:warnDollar value. |
|
1514 |
Compiler warnCommonMistakes:warnCommonMistakes value. |
|
1515 |
Compiler warnPossibleIncompatibilities:warnCompatibility value. |
|
1516 |
Compiler allowUnderscoreInIdentifier:allowUnderscore value. |
|
1517 |
Compiler allowDollarInIdentifier:allowDollar value. |
|
1518 |
Compiler arraysAreImmutable:immutableArrays value. |
|
1519 |
fullDebugSupport value ifTrue:[ |
|
1520 |
Compiler lineNumberInfo:#full. |
|
1521 |
] ifFalse:[ |
|
1522 |
Compiler lineNumberInfo:true |
|
1523 |
]. |
|
1524 |
||
1525 |
Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex). |
|
1526 |
Compiler stcCompilationIncludes:stcIncludes value. |
|
1527 |
Compiler stcCompilationDefines:stcDefines value. |
|
1528 |
Compiler stcCompilationOptions:stcOptions value. |
|
1529 |
Compiler ccCompilationOptions:ccOptions value. |
|
1530 |
Compiler ccPath:cc value. |
|
1531 |
Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex). |
|
1532 |
||
1533 |
supportsJustInTimeCompilation ifTrue:[ |
|
1534 |
justInTimeCompilation value ifTrue:[ |
|
1535 |
Method allInstancesDo:[:m | m checked:false]. |
|
1536 |
]. |
|
1537 |
ObjectMemory justInTimeCompilation:justInTimeCompilation value. |
|
1538 |
ObjectMemory fullSingleStepSupport:fullDebugSupport value. |
|
1539 |
]. |
|
1540 |
ObjectFileLoader notNil ifTrue:[ |
|
1541 |
stcLibraries notNil ifTrue:[ |
|
1542 |
ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords). |
|
1543 |
]. |
|
1544 |
stcLibraryPath notNil ifTrue:[ |
|
1545 |
ObjectFileLoader libPath:(stcLibraryPath value). |
|
1546 |
] |
|
1547 |
]. |
|
1548 |
Autoload compileLazy:compileLazy value. |
|
1549 |
Smalltalk loadBinaries:loadBinaries value. |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1550 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1551 |
box destroy |
219 | 1552 |
|
1354 | 1553 |
"Modified: / 10.9.1995 / 19:19:18 / claus" |
1554 |
"Modified: / 9.9.1996 / 22:42:47 / stefan" |
|
1361 | 1555 |
"Modified: / 29.10.1997 / 15:48:31 / cg" |
219 | 1556 |
! |
1557 |
||
594 | 1558 |
displaySettings |
921 | 1559 |
"open a dialog on display related settings" |
1560 |
||
1106
650465f9b173
read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents:
1105
diff
changeset
|
1561 |
|box listOfSizes sizeInfos |
614 | 1562 |
sizes sizeNames sizeList sizeX sizeY deepIcons |
1196 | 1563 |
isColorMonitor useFixPalette useFixGrayPalette idx ditherStyles ditherSyms ditherList |
1220
552a2ab14c0a
allow setting of the clipBoards encoding.
Claus Gittinger <cg@exept.de>
parents:
1199
diff
changeset
|
1564 |
y component screen visual clipEncodings clipEncodingSyms clipEncodingList| |
594 | 1565 |
|
1106
650465f9b173
read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents:
1105
diff
changeset
|
1566 |
listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default. |
650465f9b173
read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents:
1105
diff
changeset
|
1567 |
listOfSizes == #default ifTrue:[ |
1383 | 1568 |
"/ nothing in resource file; offer at least some. |
1569 |
sizeInfos := #( |
|
1570 |
( '11.3'' (235mm x 175mm) LCD' (235 175) ) |
|
1571 |
( '17'' (325mm x 245mm)' (325 245) ) |
|
1572 |
( '19'' (340mm x 270mm)' (340 270) ) |
|
1573 |
( '20'' (350mm x 280mm)' (350 280) ) |
|
1574 |
( '21'' (365mm x 285mm)' (365 285) ) |
|
1575 |
). |
|
1106
650465f9b173
read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents:
1105
diff
changeset
|
1576 |
] ifFalse:[ |
1383 | 1577 |
sizeInfos := resources array:listOfSizes. |
1106
650465f9b173
read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents:
1105
diff
changeset
|
1578 |
]. |
650465f9b173
read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents:
1105
diff
changeset
|
1579 |
sizeNames := sizeInfos collect:[:entry | entry at:1]. |
650465f9b173
read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents:
1105
diff
changeset
|
1580 |
sizes := sizeInfos collect:[:entry | entry at:2]. |
594 | 1581 |
|
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1582 |
screen := Screen current. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1583 |
visual := screen visualType. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1584 |
|
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1585 |
isColorMonitor := screen hasColors asValue. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1586 |
deepIcons := screen supportsDeepIcons asValue. |
670
7c958acbc5e8
fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents:
668
diff
changeset
|
1587 |
useFixPalette := screen fixColors notNil asValue. |
1196 | 1588 |
useFixGrayPalette := screen fixGrayColors notNil asValue. |
594 | 1589 |
|
1590 |
sizeList := SelectionInList with:sizeNames. |
|
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1591 |
sizeX := screen widthInMillimeter asValue. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1592 |
sizeY := screen heightInMillimeter asValue. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1593 |
|
1220
552a2ab14c0a
allow setting of the clipBoards encoding.
Claus Gittinger <cg@exept.de>
parents:
1199
diff
changeset
|
1594 |
clipEncodingSyms := #(nil #iso8859 #jis #jis7 #sjis #euc #big5). |
552a2ab14c0a
allow setting of the clipBoards encoding.
Claus Gittinger <cg@exept.de>
parents:
1199
diff
changeset
|
1595 |
clipEncodings := resources array:#('untranslated' 'iso8859' 'jis' 'jis7' 'shift-JIS' 'EUC' 'big5'). |
552a2ab14c0a
allow setting of the clipBoards encoding.
Claus Gittinger <cg@exept.de>
parents:
1199
diff
changeset
|
1596 |
clipEncodingList := SelectionInList new. |
552a2ab14c0a
allow setting of the clipBoards encoding.
Claus Gittinger <cg@exept.de>
parents:
1199
diff
changeset
|
1597 |
clipEncodingList list:clipEncodings. |
552a2ab14c0a
allow setting of the clipBoards encoding.
Claus Gittinger <cg@exept.de>
parents:
1199
diff
changeset
|
1598 |
clipEncodingList selectionIndex:(clipEncodingSyms indexOf:screen clipBoardEncoding ifAbsent:1). |
552a2ab14c0a
allow setting of the clipBoards encoding.
Claus Gittinger <cg@exept.de>
parents:
1199
diff
changeset
|
1599 |
|
1048 | 1600 |
ditherList := SelectionInList new. |
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1601 |
|
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1602 |
(visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[ |
1383 | 1603 |
ditherStyles := #('threshold' 'ordered dither' 'error diffusion'). |
1604 |
ditherSyms := #(threshold ordered floydSteinberg). |
|
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1605 |
] ifFalse:[ |
1383 | 1606 |
visual ~~ #TrueColor ifTrue:[ |
1607 |
ditherStyles := #('nearest color' 'error diffusion'). |
|
1608 |
ditherSyms := #(ordered floydSteinberg). |
|
1609 |
] |
|
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1610 |
]. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1611 |
ditherSyms notNil ifTrue:[ |
1383 | 1612 |
ditherList list:ditherStyles. |
1613 |
ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold). |
|
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1614 |
]. |
594 | 1615 |
|
1616 |
box := DialogBox new. |
|
1617 |
box label:(resources string:'Display screen settings'). |
|
1618 |
||
1619 |
(box addTextLabel:(resources string:'Actual visible screen area:')) |
|
1383 | 1620 |
adjust:#left. |
594 | 1621 |
|
1622 |
(box addPopUpList:(resources string:'common sizes:') on:sizeList) |
|
1383 | 1623 |
label:'monitor size'. |
594 | 1624 |
|
1625 |
idx := sizes findFirst:[:entry | |
|
1383 | 1626 |
((entry at:1) = sizeX value) |
1627 |
and:[((entry at:2) = sizeY value)] |
|
1628 |
]. |
|
594 | 1629 |
idx ~~ 0 ifTrue:[ |
1383 | 1630 |
sizeList selectionIndex:idx |
594 | 1631 |
]. |
1632 |
||
1633 |
sizeList onChangeSend:#value to:[ |
|
1383 | 1634 |
|idx| |
1635 |
||
1636 |
idx := sizeList selectionIndex. |
|
1637 |
sizeX value:((sizes at:idx) at:1). |
|
1638 |
sizeY value:((sizes at:idx) at:2). |
|
1639 |
]. |
|
594 | 1640 |
|
1641 |
y := box yPosition. |
|
1642 |
component := box addTextLabel:(resources string:'screen size:'). |
|
1643 |
component width:0.3; adjust:#right; borderWidth:0. |
|
1644 |
||
1645 |
box yPosition:y. |
|
1129 | 1646 |
component := box addInputFieldOn:nil tabable:true. |
594 | 1647 |
component width:0.25; left:0.3; |
1383 | 1648 |
immediateAccept:false; acceptOnLeave:false; |
1649 |
cursorMovementWhenUpdating:#beginOfLine; |
|
1650 |
converter:(PrintConverter new initForInteger); |
|
1651 |
model:sizeX. |
|
594 | 1652 |
|
1653 |
box yPosition:y. |
|
1654 |
component := box addTextLabel:(' x '). |
|
1655 |
component width:0.1; left:0.55; adjust:#center; borderWidth:0. |
|
1656 |
||
1657 |
box yPosition:y. |
|
1129 | 1658 |
component := box addInputFieldOn:nil tabable:true. |
594 | 1659 |
component width:0.25; left:0.65; |
1383 | 1660 |
immediateAccept:false; acceptOnLeave:false; |
1661 |
cursorMovementWhenUpdating:#beginOfLine; |
|
1662 |
converter:(PrintConverter new initForInteger); |
|
1663 |
model:sizeY. |
|
594 | 1664 |
|
1665 |
box yPosition:y. |
|
1666 |
component := box addTextLabel:('(mm)'). |
|
1667 |
component width:0.1; left:0.9; adjust:#center; borderWidth:0. |
|
1668 |
||
1492 | 1669 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
594 | 1670 |
|
1192 | 1671 |
(box addTextLabel:(resources string:'Screen: depth: %1 visual: %2 (%3)' |
1383 | 1672 |
with:Screen current depth printString |
1673 |
with:Screen current visualType |
|
1674 |
with:Screen current serverVendor)) |
|
1675 |
adjust:#left. |
|
1192 | 1676 |
|
1492 | 1677 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
1192 | 1678 |
|
594 | 1679 |
box addCheckBox:(resources string:'color monitor') on:isColorMonitor. |
1680 |
||
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1681 |
visual == #PseudoColor ifTrue:[ |
1383 | 1682 |
box addVerticalSpace. |
1683 |
component := box addCheckBox:(resources string:'use fix color palette %1' with:'(4x8x4)') on:useFixPalette. |
|
1684 |
||
1685 |
box addVerticalSpace. |
|
1686 |
component := box addCheckBox:(resources string:'use fix gray color palette %1' with:'(32)') on:useFixGrayPalette. |
|
622
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1687 |
]. |
594 | 1688 |
|
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1689 |
ditherSyms notNil ifTrue:[ |
1383 | 1690 |
box addVerticalSpace. |
1691 |
component := box addPopUpList:(resources string:'image display:') on:ditherList. |
|
1692 |
component defaultLabel:'image display'. |
|
1693 |
component superView horizontalLayout:#leftSpace. |
|
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1694 |
]. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1695 |
|
614 | 1696 |
box addVerticalSpace. |
1697 |
box addCheckBox:(resources string:'allow colored/grayscale icons') on:deepIcons. |
|
1698 |
||
1492 | 1699 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
1220
552a2ab14c0a
allow setting of the clipBoards encoding.
Claus Gittinger <cg@exept.de>
parents:
1199
diff
changeset
|
1700 |
|
552a2ab14c0a
allow setting of the clipBoards encoding.
Claus Gittinger <cg@exept.de>
parents:
1199
diff
changeset
|
1701 |
component := box addPopUpList:(resources string:'clipBoard encoding:') on:clipEncodingList. |
552a2ab14c0a
allow setting of the clipBoards encoding.
Claus Gittinger <cg@exept.de>
parents:
1199
diff
changeset
|
1702 |
component superView horizontalLayout:#leftSpace. |
552a2ab14c0a
allow setting of the clipBoards encoding.
Claus Gittinger <cg@exept.de>
parents:
1199
diff
changeset
|
1703 |
|
594 | 1704 |
box |
1383 | 1705 |
addHelpButtonFor:'Launcher/screenSettings.html'; |
1706 |
addAbortButton; addOkButton. |
|
594 | 1707 |
box open. |
1708 |
||
1709 |
box accepted ifTrue:[ |
|
1383 | 1710 |
Image flushDeviceImages. |
1711 |
||
1712 |
screen visualType == #PseudoColor ifTrue:[ |
|
1713 |
useFixPalette value ifTrue:[ |
|
1714 |
Color colorAllocationFailSignal handle:[:ex | |
|
1715 |
self warn:(resources string:'Could not allocate colors.'). |
|
1716 |
] do:[ |
|
1717 |
Color getColorsRed:4 green:8 blue:4 on:screen |
|
1718 |
] |
|
1719 |
] ifFalse:[ |
|
1720 |
screen releaseFixColors |
|
1721 |
]. |
|
1722 |
||
1723 |
useFixGrayPalette value ifTrue:[ |
|
1724 |
Color colorAllocationFailSignal handle:[:ex | |
|
1725 |
self warn:(resources string:'Could not allocate colors.'). |
|
1726 |
] do:[ |
|
1727 |
Color getGrayColors:32 on:screen |
|
1728 |
] |
|
1729 |
] ifFalse:[ |
|
1730 |
screen releaseFixGrayColors |
|
1731 |
] |
|
1732 |
]. |
|
1733 |
screen hasColors:isColorMonitor value. |
|
1734 |
screen widthInMillimeter:sizeX value. |
|
1735 |
screen heightInMillimeter:sizeY value. |
|
1736 |
||
1737 |
screen supportsDeepIcons:deepIcons value. |
|
1738 |
ditherSyms notNil ifTrue:[ |
|
1739 |
Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex). |
|
1740 |
]. |
|
1741 |
||
1742 |
self withWaitCursorDo:[ |
|
1743 |
View defaultStyle:(View defaultStyle). |
|
1744 |
]. |
|
1745 |
||
1746 |
screen clipBoardEncoding:(clipEncodingSyms at:clipEncodingList selectionIndex). |
|
594 | 1747 |
]. |
1748 |
box destroy |
|
1749 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1750 |
"Modified: 9.9.1996 / 22:43:04 / stefan" |
1242
78421182813d
use 4x8x4 (instead of 6x8x4) colorMap
Claus Gittinger <cg@exept.de>
parents:
1234
diff
changeset
|
1751 |
"Modified: 21.7.1997 / 19:26:49 / cg" |
594 | 1752 |
! |
1753 |
||
398 | 1754 |
fontSettings |
921 | 1755 |
"open a dialog on font related settings" |
1756 |
||
406 | 1757 |
(self fontBoxForEncoding:nil) ifTrue:[ |
1383 | 1758 |
self reopenLauncher. |
406 | 1759 |
] |
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
1760 |
|
398 | 1761 |
"Created: 26.2.1996 / 22:52:51 / cg" |
921 | 1762 |
"Modified: 8.1.1997 / 14:52:49 / cg" |
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
1763 |
! |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
1764 |
|
219 | 1765 |
keyboardSetting |
921 | 1766 |
"open a dialog on keyboard related settings" |
1767 |
||
219 | 1768 |
|mappings listOfRawKeys listOfFunctions |
1769 |
box l |
|
1770 |
list1 list2 listView1 listView2 |
|
1771 |
frame selectionForwarder macroForwarder macroTextView y| |
|
1772 |
||
1773 |
mappings := Screen current keyboardMap. |
|
1774 |
||
1775 |
listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort. |
|
1776 |
listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort. |
|
1777 |
||
1778 |
selectionForwarder := Plug new. |
|
1779 |
selectionForwarder respondTo:#showFunction |
|
1383 | 1780 |
with:[ |
1781 |
|raw| |
|
1782 |
raw := list1 selection. |
|
1783 |
list2 retractInterestsFor:selectionForwarder. |
|
1784 |
list2 selection:(mappings at:raw asSymbol) asString. |
|
1785 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
|
1786 |
]. |
|
219 | 1787 |
selectionForwarder respondTo:#showRawKey |
1383 | 1788 |
with:[ |
1789 |
|f raw| |
|
1790 |
||
1791 |
f := list2 selection. |
|
1792 |
list1 retractInterestsFor:selectionForwarder. |
|
1793 |
raw := mappings keyAtValue:f asString. |
|
1794 |
raw isNil ifTrue:[ |
|
1795 |
raw := mappings keyAtValue:f first. |
|
1796 |
raw isNil ifTrue:[ |
|
1797 |
raw := mappings keyAtValue:f asSymbol. |
|
1798 |
] |
|
1799 |
]. |
|
1800 |
list1 selection:raw. |
|
1801 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
|
1802 |
]. |
|
219 | 1803 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1804 |
macroForwarder := [ |
1383 | 1805 |
|f macro indent| |
1806 |
f := list2 selection. |
|
1807 |
(f startsWith:'Cmd') ifTrue:[ |
|
1808 |
f := f copyFrom:4 |
|
1809 |
]. |
|
1810 |
macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil. |
|
1811 |
macro notNil ifTrue:[ |
|
1812 |
macro := macro asStringCollection. |
|
1813 |
indent := macro |
|
1814 |
inject:99999 into:[:min :element | |
|
1815 |
|stripped| |
|
1816 |
||
1817 |
stripped := element withoutLeadingSeparators. |
|
1818 |
stripped size == 0 ifTrue:[ |
|
1819 |
min |
|
1820 |
] ifFalse:[ |
|
1821 |
min min:(element size - stripped size) |
|
1822 |
] |
|
1823 |
]. |
|
1824 |
indent ~~ 0 ifTrue:[ |
|
1825 |
macro := macro collect:[:line | |
|
1826 |
line size > indent ifTrue:[ |
|
1827 |
line copyFrom:indent+1 |
|
1828 |
] ifFalse:[ |
|
1829 |
line |
|
1830 |
]. |
|
1831 |
] |
|
1832 |
]. |
|
1833 |
]. |
|
1834 |
macroTextView contents:macro. |
|
1835 |
]. |
|
219 | 1836 |
|
1837 |
list1 := SelectionInList with:listOfRawKeys. |
|
1838 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
|
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
1839 |
|
219 | 1840 |
list2 := SelectionInList with:listOfFunctions. |
1841 |
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
|
1842 |
list2 onChangeSend:#value to:macroForwarder. |
219 | 1843 |
|
1844 |
box := Dialog new. |
|
1845 |
box label:(resources string:'Keyboard mappings'). |
|
1846 |
||
1847 |
l := box addTextLabel:(resources string:'KEY_MSG') withCRs. |
|
1848 |
l adjust:#left; borderWidth:0. |
|
1849 |
||
1850 |
frame := View new. |
|
1851 |
frame extent:300 @ 300. |
|
1852 |
frame borderWidth:0. |
|
1853 |
||
1854 |
listView1 := ScrollableView for:SelectionInListView in:frame. |
|
1855 |
listView1 model:list1. |
|
1856 |
listView1 origin:0.0@0.0 corner:0.5@1.0; inset:2. |
|
1857 |
||
1858 |
listView2 := ScrollableView for:SelectionInListView in:frame. |
|
1859 |
listView2 model:list2. |
|
1860 |
listView2 origin:0.5@0.0 corner:1.0@1.0; inset:2. |
|
1861 |
||
1862 |
frame topInset:box yPosition. |
|
1863 |
box addComponent:frame withExtent:350@200. |
|
1864 |
box makeTabable:listView1. |
|
1865 |
box makeTabable:listView2. |
|
1866 |
frame origin:0.0@0.0 corner:1.0@0.6. |
|
1867 |
||
1868 |
box addVerticalSpace. |
|
1869 |
||
1870 |
l := box addTextLabel:(resources string:'Macro text (if any):') withCRs. |
|
1871 |
l adjust:#left; borderWidth:0. |
|
1872 |
l origin:0.0@0.6 corner:1.0@0.6. |
|
1873 |
l topInset:(View viewSpacing). |
|
1874 |
l bottomInset:(l preferredExtent y negated - View viewSpacing). |
|
1875 |
||
1876 |
macroTextView := HVScrollableView for:TextView miniScroller:true. |
|
1877 |
box addComponent:macroTextView tabable:true. |
|
1878 |
macroTextView origin:0.0@0.6 corner:1.0@1.0. |
|
1879 |
y := box yPosition. |
|
1880 |
||
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1881 |
box |
1383 | 1882 |
addHelpButtonFor:'Launcher/keyboardSetting.html'; |
1883 |
"addAbortButton;" |
|
1884 |
addOkButtonLabelled:(resources string:'dismiss'). |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1885 |
|
219 | 1886 |
macroTextView topInset:(l preferredExtent y + 5). |
1887 |
macroTextView bottomInset:(box preferredExtent y - y). |
|
1888 |
||
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1889 |
box open. |
219 | 1890 |
|
1891 |
box accepted ifTrue:[ |
|
1383 | 1892 |
"no action yet ..." |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1893 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1894 |
box destroy |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1895 |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
1896 |
"Modified: 9.9.1996 / 22:43:17 / stefan" |
1351 | 1897 |
"Modified: 18.10.1997 / 03:39:41 / cg" |
219 | 1898 |
! |
1899 |
||
1900 |
languageSetting |
|
921 | 1901 |
"open a dialog on language related settings" |
1902 |
||
1115
8fc8a7688aec
show flags in language setting ;-)
Claus Gittinger <cg@exept.de>
parents:
1108
diff
changeset
|
1903 |
|listOfLanguages translatedLanguages switch box languageList flags| |
219 | 1904 |
|
1905 |
" |
|
410 | 1906 |
get list of supported languages from the launchers resources ... |
219 | 1907 |
" |
410 | 1908 |
listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default'). |
1116 | 1909 |
listOfLanguages := listOfLanguages asOrderedCollection. |
1115
8fc8a7688aec
show flags in language setting ;-)
Claus Gittinger <cg@exept.de>
parents:
1108
diff
changeset
|
1910 |
translatedLanguages := listOfLanguages collect:[:lang | |item| |
1465 | 1911 |
item := resources at:lang. |
1912 |
item isString ifTrue:[ |
|
1913 |
item |
|
1914 |
] ifFalse:[ |
|
1915 |
item at:1 |
|
1916 |
] |
|
1917 |
]. |
|
1115
8fc8a7688aec
show flags in language setting ;-)
Claus Gittinger <cg@exept.de>
parents:
1108
diff
changeset
|
1918 |
flags := listOfLanguages collect:[:lang | |item| |
1465 | 1919 |
item := resources at:lang. |
1920 |
item isArray ifTrue:[ |
|
1921 |
item at:2 |
|
1922 |
] ifFalse:[ |
|
1923 |
nil |
|
1924 |
] |
|
1925 |
]. |
|
1115
8fc8a7688aec
show flags in language setting ;-)
Claus Gittinger <cg@exept.de>
parents:
1108
diff
changeset
|
1926 |
flags := flags collect:[:nm | nm notNil ifTrue:[Image fromFile:nm] ifFalse:[nil]]. |
8fc8a7688aec
show flags in language setting ;-)
Claus Gittinger <cg@exept.de>
parents:
1108
diff
changeset
|
1927 |
|
8fc8a7688aec
show flags in language setting ;-)
Claus Gittinger <cg@exept.de>
parents:
1108
diff
changeset
|
1928 |
languageList := translatedLanguages with:flags collect:[:lang :flag | |
1465 | 1929 |
LabelAndIcon icon:flag string:lang. |
1930 |
]. |
|
219 | 1931 |
|
1932 |
box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs. |
|
1933 |
box label:(resources string:'Language selection'). |
|
1115
8fc8a7688aec
show flags in language setting ;-)
Claus Gittinger <cg@exept.de>
parents:
1108
diff
changeset
|
1934 |
box list:languageList. |
219 | 1935 |
box initialText:(Language). |
1936 |
box action:[:newLanguage | |
|
1465 | 1937 |
self withWaitCursorDo:[ |
1938 |
|fontPref idx language oldLanguage enc answer matchingFonts| |
|
1939 |
||
1940 |
idx := translatedLanguages indexOf:newLanguage withoutSeparators. |
|
1941 |
idx ~~ 0 ifTrue:[ |
|
1942 |
language := listOfLanguages at:idx |
|
1943 |
] ifFalse:[ |
|
1944 |
language := newLanguage |
|
1945 |
]. |
|
1946 |
||
1947 |
"/ check if the new language needs a differently encoded font; |
|
1948 |
"/ ask user to switch font and allow cancellation. |
|
1949 |
"/ Otherwise, you are left with unreadable menu & button items ... |
|
1950 |
||
1951 |
oldLanguage := Smalltalk language. |
|
1952 |
Smalltalk language:language asSymbol. |
|
1953 |
ResourcePack flushCachedResourcePacks. |
|
1954 |
fontPref := self class classResources at:'PREFERRED_FONT_ENCODING' default:'iso8859*'. |
|
1955 |
Smalltalk language:oldLanguage. |
|
1956 |
||
1957 |
switch := true. |
|
1958 |
enc := MenuView defaultFont encoding. |
|
1959 |
(fontPref match:enc) ifFalse:[ |
|
1960 |
"/ look if there is one at all. |
|
1961 |
matchingFonts := Screen current listOfAvailableFonts select:[:f | fontPref match:f encoding]. |
|
1962 |
matchingFonts size == 0 ifTrue:[ |
|
1963 |
(Dialog |
|
1964 |
confirm:(resources |
|
1965 |
string:'your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)' |
|
1966 |
with:fontPref) withCRs) |
|
1967 |
ifFalse:[ |
|
1968 |
switch := false |
|
1969 |
] |
|
1970 |
] ifFalse:[ |
|
1971 |
answer := Dialog |
|
1972 |
confirmWithCancel:(resources |
|
1973 |
string:'menu font is not %1-encoded.\\Change it ?' |
|
1974 |
with:fontPref) withCRs |
|
1975 |
labels:(resources |
|
1976 |
array:#('cancel' 'no' 'yes')) |
|
1977 |
default:3. |
|
1978 |
answer isNil ifTrue:[ |
|
1979 |
switch := false |
|
1980 |
] ifFalse:[ |
|
1981 |
answer ifTrue:[ |
|
1982 |
switch := (self fontBoxForEncoding:fontPref) |
|
1983 |
] |
|
1984 |
]. |
|
1985 |
]. |
|
1986 |
]. |
|
1987 |
||
1988 |
switch ifTrue:[ |
|
1989 |
transcript showCR:'change language to ' , newLanguage , ' ...'. |
|
1990 |
Smalltalk language:language asSymbol. |
|
1991 |
ResourcePack flushCachedResourcePacks |
|
1992 |
]. |
|
1993 |
]. |
|
1994 |
switch ifTrue:[ |
|
1995 |
self reopenLauncher. |
|
1996 |
DebugView newDebugger. |
|
1997 |
] |
|
219 | 1998 |
]. |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1999 |
box |
1465 | 2000 |
addHelpButtonFor:'Launcher/languageSetting.html'. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
2001 |
box open. |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
2002 |
box destroy |
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
2003 |
|
1465 | 2004 |
"Modified: / 9.9.1996 / 22:43:27 / stefan" |
2005 |
"Modified: / 6.2.1998 / 00:00:38 / cg" |
|
219 | 2006 |
! |
2007 |
||
341 | 2008 |
memorySettings |
921 | 2009 |
"open a dialog on objectMemory related settings" |
2010 |
||
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
2011 |
|box igcLimit igcFreeLimit igcFreeAmount newSpaceSize |
440 | 2012 |
compressLimit |
1045
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2013 |
oldIncr component fields codeLimit codeTrigger stackLimit| |
341 | 2014 |
|
2015 |
"/ |
|
2016 |
"/ extract relevant system settings ... |
|
2017 |
"/ |
|
2018 |
igcLimit := ObjectMemory incrementalGCLimit asValue. |
|
2019 |
igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue. |
|
2020 |
igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue. |
|
2021 |
newSpaceSize := ObjectMemory newSpaceSize asValue. |
|
2022 |
oldIncr := ObjectMemory oldSpaceIncrement asValue. |
|
440 | 2023 |
compressLimit := ObjectMemory oldSpaceCompressLimit asValue. |
774 | 2024 |
codeLimit := ObjectMemory dynamicCodeLimit asValue. |
2025 |
codeTrigger := ObjectMemory dynamicCodeGCTrigger asValue. |
|
1045
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2026 |
stackLimit := Process defaultMaximumStackSize asValue. |
341 | 2027 |
|
2028 |
"/ |
|
2029 |
"/ create a box on those values ... |
|
2030 |
"/ |
|
2031 |
fields := OrderedCollection new. |
|
2032 |
||
2033 |
box := DialogBox new. |
|
2034 |
box label:(resources string:'Memory manager settings'). |
|
2035 |
||
1045
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2036 |
(box addTextLabel:'Warning - invalid settings may result in failures or poor performance |
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2037 |
|
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2038 |
You have been warned.') adjust:#left. |
341 | 2039 |
box addHorizontalLine. |
2040 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2041 |
component := box |
1383 | 2042 |
addLabelledInputField:(resources string:'size of newSpace:') |
2043 |
adjust:#right |
|
2044 |
on:nil "/ newSpaceSize |
|
2045 |
tabable:true |
|
2046 |
separateAtX:0.7. |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2047 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2048 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2049 |
component model:newSpaceSize. |
341 | 2050 |
fields add:component. |
2051 |
||
2052 |
box addHorizontalLine. |
|
2053 |
||
2054 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2055 |
component := box |
1383 | 2056 |
addLabelledInputField:(resources string:'incremental GC allocation trigger:') |
2057 |
adjust:#right |
|
2058 |
on:nil "/ igcLimit |
|
2059 |
tabable:true |
|
2060 |
separateAtX:0.7. |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2061 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2062 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2063 |
component model:igcLimit. |
341 | 2064 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2065 |
|
345 | 2066 |
box addTextLabel:'(start IGC whenever this amount has been allocated)'. |
341 | 2067 |
box addHorizontalLine. |
2068 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2069 |
component := box |
1383 | 2070 |
addLabelledInputField:(resources string:'incremental GC freespace trigger:') |
2071 |
adjust:#right |
|
2072 |
on:nil "/ igcFreeLimit |
|
2073 |
tabable:true |
|
2074 |
separateAtX:0.7. |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2075 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2076 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2077 |
component model:igcFreeLimit. |
341 | 2078 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2079 |
|
341 | 2080 |
box addTextLabel:'(start IGC whenever freespace drops below this)'. |
2081 |
box addHorizontalLine. |
|
2082 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2083 |
component := box |
1383 | 2084 |
addLabelledInputField:(resources string:'incremental GC amount:') |
2085 |
adjust:#right |
|
2086 |
on:nil "/ igcFreeAmount |
|
2087 |
tabable:true |
|
2088 |
separateAtX:0.7. |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2089 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2090 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2091 |
component model:igcFreeAmount. |
341 | 2092 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2093 |
|
345 | 2094 |
box addTextLabel:'(try to keep this amount for peak requests)'. |
341 | 2095 |
box addHorizontalLine. |
2096 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2097 |
component := box |
1383 | 2098 |
addLabelledInputField:(resources string:'oldspace increment:') |
2099 |
adjust:#right |
|
2100 |
on:nil "/ oldIncr |
|
2101 |
tabable:true |
|
2102 |
separateAtX:0.7. |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2103 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2104 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2105 |
component model:oldIncr. |
341 | 2106 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2107 |
|
345 | 2108 |
box addTextLabel:'(increase oldSpace in chunks of this size)'. |
341 | 2109 |
box addHorizontalLine. |
2110 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2111 |
component := box |
1383 | 2112 |
addLabelledInputField:(resources string:'oldspace compress limit:') |
2113 |
adjust:#right |
|
2114 |
on:nil "/ compressLimit |
|
2115 |
tabable:true |
|
2116 |
separateAtX:0.7. |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2117 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2118 |
component converter:(PrintConverter new initForNumber). |
743
dc5a8537b78a
printConverter bug - must set the model after it.
Claus Gittinger <cg@exept.de>
parents:
742
diff
changeset
|
2119 |
component model:compressLimit. |
440 | 2120 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
2121 |
|
440 | 2122 |
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
|
2123 |
box addHorizontalLine. |
440 | 2124 |
|
1045
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2125 |
component := box |
1383 | 2126 |
addLabelledInputField:(resources string:'stack limit:') |
2127 |
adjust:#right |
|
2128 |
on:nil |
|
2129 |
tabable:true |
|
2130 |
separateAtX:0.7. |
|
1045
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2131 |
component acceptOnLeave:false. |
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2132 |
component converter:(PrintConverter new initForNumber). |
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2133 |
component model:stackLimit. |
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2134 |
fields add:component. |
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2135 |
|
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2136 |
box addTextLabel:'(trigger recursionInterrupt if more stack is used by a process)'. |
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2137 |
box addHorizontalLine. |
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2138 |
|
774 | 2139 |
ObjectMemory supportsJustInTimeCompilation ifTrue:[ |
1383 | 2140 |
component := box |
2141 |
addLabelledInputField:(resources string:'dynamic code limit:') |
|
2142 |
adjust:#right |
|
2143 |
on:nil |
|
2144 |
tabable:true |
|
2145 |
separateAtX:0.7. |
|
2146 |
component acceptOnLeave:false. |
|
2147 |
component converter:(PrintConverter new initForNumberOrNil). |
|
2148 |
component model:codeLimit. |
|
2149 |
fields add:component. |
|
2150 |
||
2151 |
box addTextLabel:'(flush dynamic compiled code to stay within this limit)'. |
|
2152 |
box addHorizontalLine. |
|
2153 |
||
2154 |
component := box |
|
2155 |
addLabelledInputField:(resources string:'dynamic code GC trigger:') |
|
2156 |
adjust:#right |
|
2157 |
on:nil |
|
2158 |
tabable:true |
|
2159 |
separateAtX:0.7. |
|
2160 |
component acceptOnLeave:false. |
|
2161 |
component converter:(PrintConverter new initForNumberOrNil). |
|
2162 |
component model:codeTrigger. |
|
2163 |
fields add:component. |
|
2164 |
||
2165 |
box addTextLabel:'(start incremental GC whenever this amount of code has been allocated)'. |
|
2166 |
box addHorizontalLine. |
|
774 | 2167 |
]. |
773
98efb7f5e8fa
prepared dynamic-compiler controls
Claus Gittinger <cg@exept.de>
parents:
772
diff
changeset
|
2168 |
|
341 | 2169 |
box addAbortButton; addOkButton. |
1045
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2170 |
box |
1383 | 2171 |
addHelpButtonFor:'Launcher/memorySettings.html'. |
341 | 2172 |
|
2173 |
"/ |
|
2174 |
"/ show the box ... |
|
2175 |
"/ |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
2176 |
box open. |
341 | 2177 |
|
2178 |
"/ |
|
2179 |
"/ update system settings |
|
2180 |
"/ |
|
2181 |
box accepted ifTrue:[ |
|
1383 | 2182 |
fields do:[:comp | comp accept]. |
2183 |
||
2184 |
igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[ |
|
2185 |
ObjectMemory freeSpaceGCAmount:igcFreeAmount value. |
|
2186 |
]. |
|
2187 |
igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[ |
|
2188 |
ObjectMemory freeSpaceGCLimit:igcFreeLimit value. |
|
2189 |
]. |
|
2190 |
igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[ |
|
2191 |
ObjectMemory incrementalGCLimit:igcLimit value. |
|
2192 |
]. |
|
2193 |
newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[ |
|
2194 |
ObjectMemory newSpaceSize:newSpaceSize value. |
|
2195 |
]. |
|
2196 |
oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[ |
|
2197 |
ObjectMemory oldSpaceIncrement:oldIncr value. |
|
2198 |
]. |
|
2199 |
stackLimit value ~~ Process defaultMaximumStackSize ifTrue:[ |
|
2200 |
Process defaultMaximumStackSize:stackLimit value. |
|
2201 |
]. |
|
2202 |
ObjectMemory oldSpaceCompressLimit:compressLimit value. |
|
2203 |
ObjectMemory dynamicCodeLimit:codeLimit value. |
|
2204 |
ObjectMemory dynamicCodeGCTrigger:codeTrigger value. |
|
341 | 2205 |
]. |
2206 |
box destroy |
|
2207 |
||
1045
9515beec99b3
added stackLimit & help to memorySettings dialog
Claus Gittinger <cg@exept.de>
parents:
1044
diff
changeset
|
2208 |
"Modified: 27.2.1997 / 16:50:12 / cg" |
341 | 2209 |
! |
2210 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2211 |
messageSettings |
921 | 2212 |
"open a dialog on infoMessage related settings" |
2213 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2214 |
|box vmInfo vmErrors displayErrors classInfos| |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2215 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2216 |
vmInfo := ObjectMemory infoPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2217 |
vmErrors := ObjectMemory debugPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2218 |
classInfos := Object infoPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2219 |
displayErrors := DeviceWorkstation errorPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2220 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2221 |
box := DialogBox new. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2222 |
box label:(resources string:'Messages'). |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2223 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2224 |
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
|
2225 |
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
|
2226 |
box addHorizontalLine. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2227 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2228 |
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
|
2229 |
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
|
2230 |
|
1002
1fff704cea57
help text for message settings
Claus Gittinger <cg@exept.de>
parents:
997
diff
changeset
|
2231 |
box addHelpButtonFor:'Launcher/messageSettings.html'. |
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2232 |
box addAbortButton; addOkButton. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
2233 |
box open. |
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2234 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2235 |
box accepted ifTrue:[ |
1383 | 2236 |
ObjectMemory infoPrinting:vmInfo value. |
2237 |
ObjectMemory debugPrinting:vmErrors value. |
|
2238 |
Object infoPrinting:classInfos value. |
|
2239 |
DeviceWorkstation errorPrinting:displayErrors value. |
|
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2240 |
]. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2241 |
box destroy |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
2242 |
|
1002
1fff704cea57
help text for message settings
Claus Gittinger <cg@exept.de>
parents:
997
diff
changeset
|
2243 |
"Modified: 27.1.1997 / 17:46:01 / cg" |
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2244 |
! |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2245 |
|
219 | 2246 |
miscSettings |
921 | 2247 |
"open a dialog on misc other settings" |
2248 |
||
1351 | 2249 |
|box shadows takeFocus returnFocus |
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2250 |
hostNameInLabel showAccelerators |
1397
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2251 |
preemptive hostNameInLabelHolder st80EditingMode| |
843 | 2252 |
|
2253 |
"/ |
|
249 | 2254 |
"/ extract relevant system settings ... |
2255 |
"/ |
|
219 | 2256 |
shadows := PopUpView shadows asValue. |
1297 | 2257 |
hostNameInLabel := StandardSystemView includeHostNameInLabel. |
2258 |
hostNameInLabelHolder := hostNameInLabel asValue. |
|
973
bb876b0213e5
added setting for takeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
2259 |
returnFocus := StandardSystemView returnFocusWhenClosingModalBoxes asValue. |
bb876b0213e5
added setting for takeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
2260 |
takeFocus := StandardSystemView takeFocusWhenMapped asValue. |
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2261 |
|
420
2c169931d1ab
allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents:
410
diff
changeset
|
2262 |
showAccelerators := MenuView showAcceleratorKeys asValue. |
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2263 |
preemptive := Processor isTimeSlicing asValue. |
219 | 2264 |
|
1397
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2265 |
st80EditingMode := EditTextView st80Mode asValue. |
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2266 |
|
249 | 2267 |
"/ |
2268 |
"/ create a box on those values ... |
|
2269 |
"/ |
|
219 | 2270 |
box := DialogBox new. |
2271 |
box label:(resources string:'Other settings'). |
|
2272 |
||
2273 |
box addCheckBox:(resources string:'shadows under popup views') on:shadows. |
|
327 | 2274 |
box addCheckBox:(resources string:'boxes return focus to previously active view') on:returnFocus. |
973
bb876b0213e5
added setting for takeFocusWhenMapped
Claus Gittinger <cg@exept.de>
parents:
970
diff
changeset
|
2275 |
box addCheckBox:(resources string:'views catch focus when mapped') on:takeFocus. |
1297 | 2276 |
box addCheckBox:(resources string:'hostname in window labels') on:hostNameInLabelHolder. |
443 | 2277 |
box addCheckBox:(resources string:'show accelerator keys in menus') on:showAccelerators. |
938
7e9411dba623
added VerboseBacktraceDefault setting
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2278 |
|
7e9411dba623
added VerboseBacktraceDefault setting
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2279 |
box addHorizontalLine. |
7e9411dba623
added VerboseBacktraceDefault setting
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
2280 |
|
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2281 |
box addCheckBox:(resources string:'preemptive scheduling') on:preemptive. |
219 | 2282 |
|
1397
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2283 |
box addHorizontalLine. |
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2284 |
|
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2285 |
box addCheckBox:(resources string:'st80 cursor behavior in editTextView') on:st80EditingMode. |
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2286 |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
2287 |
box |
1383 | 2288 |
addHelpButtonFor:'Launcher/miscSettings.html'; |
2289 |
addAbortButton; |
|
2290 |
addOkButton. |
|
249 | 2291 |
|
2292 |
"/ |
|
2293 |
"/ show the box ... |
|
2294 |
"/ |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
2295 |
box open. |
219 | 2296 |
|
249 | 2297 |
"/ |
2298 |
"/ update system settings |
|
2299 |
"/ |
|
219 | 2300 |
box accepted ifTrue:[ |
1383 | 2301 |
PopUpView shadows:shadows value. |
2302 |
hostNameInLabelHolder value ~~ hostNameInLabel ifTrue:[ |
|
2303 |
StandardSystemView includeHostNameInLabel:hostNameInLabelHolder value. |
|
2304 |
||
2305 |
Screen allScreens do:[:aDisplay | |
|
2306 |
aDisplay allViewsDo:[:aView | |
|
2307 |
|l| |
|
2308 |
||
2309 |
aView isTopView ifTrue:[ |
|
2310 |
l := aView label. |
|
2311 |
aView label:(l , ' '); label:l. "/ force a change |
|
2312 |
] |
|
2313 |
] |
|
2314 |
] |
|
2315 |
]. |
|
2316 |
StandardSystemView returnFocusWhenClosingModalBoxes:returnFocus value. |
|
2317 |
StandardSystemView takeFocusWhenMapped:takeFocus value. |
|
2318 |
MenuView showAcceleratorKeys:showAccelerators value. |
|
2319 |
Processor isTimeSlicing ~~ preemptive value ifTrue:[ |
|
2320 |
preemptive value ifTrue:[ |
|
2321 |
Processor startTimeSlicing |
|
2322 |
] ifFalse:[ |
|
2323 |
Processor stopTimeSlicing |
|
2324 |
] |
|
1397
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2325 |
]. |
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2326 |
EditTextView st80Mode:(st80EditingMode value) |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
2327 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
2328 |
box destroy |
219 | 2329 |
|
1397
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2330 |
"Modified: / 9.9.1996 / 22:43:36 / stefan" |
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2331 |
"Modified: / 16.1.1998 / 22:56:57 / cg" |
219 | 2332 |
! |
2333 |
||
347 | 2334 |
printerSettings |
921 | 2335 |
"open a dialog on printer related settings" |
2336 |
||
347 | 2337 |
|box |
595 | 2338 |
possiblePrinters possibleTypes printerType printCommand |
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
2339 |
pageFormat landscape updater |
601 | 2340 |
formatLabel formatComponent landscapeLabel landscapeComponent |
709 | 2341 |
topMargin leftMargin rightMargin bottomMargin unitList unit |
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
2342 |
topMarginComponent leftMarginComponent |
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
2343 |
rightMarginComponent |
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
2344 |
bottomMarginComponent supportsColor supportsColorComponent |
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
2345 |
y y1 commandListPop component commandList row| |
347 | 2346 |
|
2347 |
possiblePrinters := PrinterStream withAllSubclasses asArray. |
|
2348 |
possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName]. |
|
2349 |
||
2350 |
printerType := SelectionInList new list:(resources array:possibleTypes). |
|
2351 |
printerType selectionIndex:(possiblePrinters identityIndexOf:Printer). |
|
2352 |
printCommand := Printer printCommand asValue. |
|
2353 |
||
604 | 2354 |
pageFormat := SelectionInList new list:(Printer defaultPageFormats). |
2355 |
pageFormat selection:(Printer pageFormat). |
|
2356 |
landscape := Printer landscape asValue. |
|
2357 |
||
707 | 2358 |
topMargin := Printer topMargin asValue. |
2359 |
leftMargin := Printer leftMargin asValue. |
|
709 | 2360 |
rightMargin := Printer rightMargin asValue. |
707 | 2361 |
bottomMargin := Printer bottomMargin asValue. |
702 | 2362 |
supportsColor := Printer supportsColor asValue. |
601 | 2363 |
|
347 | 2364 |
box := DialogBox new. |
2365 |
box label:(resources string:'Printer settings'). |
|
2366 |
||
726 | 2367 |
"/ either use a popUpList ... |
2368 |
"/ box addPopUpList:(resources string:'printer type:') on:printerType. |
|
2369 |
||
2370 |
"/ or a comboList; |
|
2371 |
"/ which one looks better ? |
|
2372 |
y := box yPosition. |
|
2373 |
component := box addTextLabel:(resources string:'printer type:'). |
|
1044 | 2374 |
component width:0.25; adjust:#right; borderWidth:0. |
726 | 2375 |
box yPosition:y. |
2376 |
component := box addComboListOn:printerType tabable:true. |
|
1047 | 2377 |
component aspect:#selectionIndex; changeMessage:#selectionIndex:; useIndex:true. |
1044 | 2378 |
component width:0.75; left:0.25. |
726 | 2379 |
"/ end of question |
347 | 2380 |
|
2381 |
y := box yPosition. |
|
2382 |
component := box addTextLabel:(resources string:'print command:'). |
|
1044 | 2383 |
component width:0.25; adjust:#right; borderWidth:0. |
347 | 2384 |
box yPosition:y. |
598 | 2385 |
commandListPop := box addComboBoxOn:printCommand tabable:true. |
2386 |
"/ commandListPop := box addInputFieldOn:printCommand tabable:true. |
|
1044 | 2387 |
commandListPop width:0.75; left:0.25; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
2388 |
"/ some common print commands ... |
499
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2389 |
|
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2390 |
commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil. |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2391 |
commandList isNil ifTrue:[ |
1383 | 2392 |
commandList := PrinterStream defaultCommands. |
2393 |
commandList isNil ifTrue:[ |
|
2394 |
commandList := #('lpr' |
|
2395 |
'lp' |
|
2396 |
). |
|
2397 |
] |
|
499
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2398 |
]. |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
2399 |
|
598 | 2400 |
commandListPop list:commandList. |
1492 | 2401 |
|
2402 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
595 | 2403 |
|
2404 |
row := OrderedCollection new. |
|
601 | 2405 |
row add:(formatLabel := Label label:(resources string:'page format:')). |
676 | 2406 |
formatLabel borderWidth:0. |
601 | 2407 |
row add:(formatComponent := PopUpList on:pageFormat). |
2408 |
formatComponent label:'unknown'. |
|
2409 |
||
2410 |
row add:(landscapeLabel := Label label:(resources string:'landscape:')). |
|
676 | 2411 |
landscapeLabel borderWidth:0. |
601 | 2412 |
row add:(landscapeComponent := CheckToggle on:landscape). |
595 | 2413 |
|
2414 |
y := box yPosition. |
|
2415 |
box |
|
1383 | 2416 |
addRow:(1 to:2) |
2417 |
fromX:0 |
|
2418 |
toX:0.5 |
|
2419 |
collect:[:idx | row at:idx] |
|
2420 |
tabable:false |
|
2421 |
horizontalLayout:#leftSpace |
|
2422 |
verticalLayout:#center. |
|
595 | 2423 |
y1 := box yPosition. |
2424 |
box yPosition:y. |
|
2425 |
||
2426 |
box |
|
1383 | 2427 |
addRow:(3 to:4) |
2428 |
fromX:0.5 |
|
2429 |
toX:1.0 |
|
2430 |
collect:[:idx | row at:idx] |
|
2431 |
tabable:false |
|
2432 |
horizontalLayout:#leftSpace |
|
2433 |
verticalLayout:#center. |
|
595 | 2434 |
|
2435 |
box yPosition:(box yPosition max:y1). |
|
2436 |
||
601 | 2437 |
box makeTabable:(formatComponent). |
2438 |
box makeTabable:(landscapeComponent). |
|
2439 |
||
1492 | 2440 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
601 | 2441 |
|
2442 |
y := box yPosition. |
|
2443 |
||
707 | 2444 |
topMarginComponent := box |
1383 | 2445 |
addLabelledInputField:(resources string:'top margin:') |
2446 |
adjust:#right |
|
2447 |
on:nil "/ topMargin |
|
2448 |
tabable:true |
|
2449 |
from:0.0 to:0.5 |
|
2450 |
separateAtX:0.6. |
|
707 | 2451 |
topMarginComponent converter:(PrintConverter new initForNumber). |
2452 |
topMarginComponent model:topMargin. |
|
601 | 2453 |
y1 := box yPosition. |
2454 |
||
2455 |
box yPosition:y. |
|
2456 |
unitList := SelectionInList with:#('inch' 'mm'). |
|
2457 |
unitList selectionIndex:1. |
|
2458 |
||
605 | 2459 |
component := box addComponent:(PopUpList on:unitList). |
2460 |
component |
|
1383 | 2461 |
left:0.6; |
2462 |
width:0.3. |
|
601 | 2463 |
|
2464 |
box yPosition:y1. |
|
2465 |
||
707 | 2466 |
leftMarginComponent := box |
1383 | 2467 |
addLabelledInputField:(resources string:'left margin:') |
2468 |
adjust:#right |
|
2469 |
on:nil "/ leftMargin |
|
2470 |
tabable:true |
|
2471 |
from:0.0 to:0.5 |
|
2472 |
separateAtX:0.6. |
|
707 | 2473 |
leftMarginComponent converter:(PrintConverter new initForNumber). |
2474 |
leftMarginComponent model:leftMargin. |
|
2475 |
||
709 | 2476 |
rightMarginComponent := box |
1383 | 2477 |
addLabelledInputField:(resources string:'right margin:') |
2478 |
adjust:#right |
|
2479 |
on:nil "/ rightMargin |
|
2480 |
tabable:true |
|
2481 |
from:0.0 to:0.5 |
|
2482 |
separateAtX:0.6. |
|
709 | 2483 |
rightMarginComponent converter:(PrintConverter new initForNumber). |
2484 |
rightMarginComponent model:rightMargin. |
|
2485 |
||
707 | 2486 |
bottomMarginComponent := box |
1383 | 2487 |
addLabelledInputField:(resources string:'bottom margin:') |
2488 |
adjust:#right |
|
2489 |
on:nil "/ bottomMargin |
|
2490 |
tabable:true |
|
2491 |
from:0.0 to:0.5 |
|
2492 |
separateAtX:0.6. |
|
707 | 2493 |
bottomMarginComponent converter:(PrintConverter new initForNumber). |
2494 |
bottomMarginComponent model:bottomMargin. |
|
601 | 2495 |
|
702 | 2496 |
box addHorizontalLine. |
2497 |
supportsColorComponent := box addCheckBox:(resources string:'Color printer') on:supportsColor. |
|
2498 |
box addVerticalSpace. |
|
2499 |
||
601 | 2500 |
updater := [ |p fg hasPageSize hasMargins| |
598 | 2501 |
|
1383 | 2502 |
printerType selectionIndex ~~ 0 ifTrue:[ |
2503 |
p := possiblePrinters at:(printerType selectionIndex). |
|
2504 |
hasPageSize := p supportsPageSizes. |
|
2505 |
hasMargins := p supportsMargins. |
|
2506 |
] ifFalse:[ |
|
2507 |
hasPageSize := false. |
|
2508 |
hasMargins := false. |
|
2509 |
]. |
|
2510 |
hasPageSize ifTrue:[ |
|
2511 |
fg := Button new foregroundColor. |
|
2512 |
formatComponent enable. |
|
2513 |
landscapeComponent enable. |
|
2514 |
||
2515 |
formatComponent label:p pageFormat. |
|
2516 |
pageFormat value:(p pageFormat). |
|
2517 |
landscape value:(p landscape). |
|
2518 |
] ifFalse:[ |
|
2519 |
fg := Button new disabledForegroundColor. |
|
2520 |
formatComponent disable. |
|
2521 |
landscapeComponent disable. |
|
2522 |
||
2523 |
formatComponent label:'unknown'. |
|
2524 |
landscape value:nil. |
|
2525 |
]. |
|
2526 |
hasMargins ifTrue:[ |
|
2527 |
unitList selectionIndex == 2 ifTrue:[ |
|
2528 |
unit := #mm |
|
2529 |
] ifFalse:[ |
|
2530 |
unit := #inch |
|
2531 |
]. |
|
2532 |
||
2533 |
topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit). |
|
2534 |
leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit). |
|
2535 |
rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit). |
|
2536 |
bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit). |
|
2537 |
||
2538 |
topMarginComponent enable. |
|
2539 |
leftMarginComponent enable. |
|
2540 |
rightMarginComponent enable. |
|
2541 |
bottomMarginComponent enable. |
|
2542 |
] ifFalse:[ |
|
2543 |
topMarginComponent disable. |
|
2544 |
leftMarginComponent disable. |
|
2545 |
rightMarginComponent disable. |
|
2546 |
bottomMarginComponent disable. |
|
2547 |
]. |
|
2548 |
formatLabel foregroundColor:fg. |
|
2549 |
landscapeLabel foregroundColor:fg. |
|
601 | 2550 |
|
1383 | 2551 |
p notNil ifTrue:[ |
2552 |
commandList := p defaultCommands. |
|
2553 |
commandList notNil ifTrue:[ |
|
2554 |
commandListPop list:commandList |
|
2555 |
]. |
|
2556 |
||
2557 |
printCommand value:(p printCommand). |
|
2558 |
]. |
|
2559 |
p supportsPostscript ifFalse:[ |
|
2560 |
supportsColorComponent disable. |
|
2561 |
supportsColor value:false |
|
2562 |
] ifTrue:[ |
|
2563 |
supportsColorComponent enable. |
|
2564 |
supportsColor value:(Printer supportsColor). |
|
2565 |
] |
|
2566 |
]. |
|
601 | 2567 |
unitList onChangeSend:#value to:updater. |
598 | 2568 |
printerType onChangeSend:#value to:updater. |
2569 |
updater value. |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
2570 |
|
608 | 2571 |
box addVerticalSpace; |
1383 | 2572 |
addHelpButtonFor:'Launcher/printerSettings.html'; |
2573 |
addAbortButton; addOkButton. |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
2574 |
box open. |
347 | 2575 |
|
2576 |
box accepted ifTrue:[ |
|
1383 | 2577 |
Printer := possiblePrinters at:(printerType selectionIndex). |
2578 |
Printer printCommand:printCommand value. |
|
2579 |
||
2580 |
Printer supportsPageSizes ifTrue:[ |
|
2581 |
Printer pageFormat:(pageFormat selection). |
|
2582 |
Printer landscape:(landscape value). |
|
2583 |
]. |
|
2584 |
Printer supportsMargins ifTrue:[ |
|
2585 |
unitList selectionIndex == 2 ifTrue:[ |
|
2586 |
unit := #mm |
|
2587 |
] ifFalse:[ |
|
2588 |
unit := #inch |
|
2589 |
]. |
|
2590 |
Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch). |
|
2591 |
Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch). |
|
2592 |
Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch). |
|
2593 |
Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch). |
|
2594 |
]. |
|
2595 |
Printer supportsPostscript ifTrue:[ |
|
2596 |
Printer supportsColor:supportsColor value. |
|
2597 |
]. |
|
347 | 2598 |
]. |
2599 |
box destroy |
|
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
2600 |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
2601 |
"Modified: 9.9.1996 / 22:43:51 / stefan" |
1047 | 2602 |
"Modified: 28.2.1997 / 14:00:13 / cg" |
347 | 2603 |
! |
2604 |
||
853 | 2605 |
restoreSettings |
921 | 2606 |
"restore settings from a settings-file." |
2607 |
||
853 | 2608 |
"a temporary kludge - we need a central systemSettings object for this, |
2609 |
which can be saved/restored with a single store/read." |
|
2610 |
||
2611 |
|fileName| |
|
2612 |
||
2613 |
fileName := Dialog |
|
1383 | 2614 |
requestFileName:(resources string:'restore settings from:') |
2615 |
default:'settings.stx' |
|
2616 |
ok:(resources string:'restore') |
|
2617 |
abort:(resources string:'cancel') |
|
2618 |
pattern:'*.stx' |
|
2619 |
fromDirectory:nil. |
|
853 | 2620 |
|
2621 |
(fileName isNil or:[fileName isEmpty]) ifTrue:[ |
|
1383 | 2622 |
"/ canceled |
2623 |
^ self |
|
853 | 2624 |
]. |
2625 |
||
2626 |
self withWaitCursorDo:[ |
|
1383 | 2627 |
Smalltalk fileIn:fileName. |
2628 |
||
2629 |
self reopenLauncher. |
|
853 | 2630 |
]. |
2631 |
||
921 | 2632 |
"Modified: 8.1.1997 / 14:53:52 / cg" |
853 | 2633 |
! |
2634 |
||
2635 |
saveSettings |
|
921 | 2636 |
"save settings to a settings-file." |
2637 |
||
853 | 2638 |
"a temporary kludge - we need a central systemSettings object for this, |
2639 |
which can be saved/restored with a single store/read." |
|
2640 |
||
2641 |
|s screen fileName| |
|
2642 |
||
2643 |
fileName := Dialog |
|
1514 | 2644 |
requestFileName:(resources string:'save settings in:') |
2645 |
default:'settings.stx' |
|
2646 |
ok:(resources string:'save') |
|
2647 |
abort:(resources string:'cancel') |
|
2648 |
pattern:'*.stx' |
|
2649 |
fromDirectory:nil. |
|
853 | 2650 |
|
2651 |
(fileName isNil or:[fileName isEmpty]) ifTrue:[ |
|
1514 | 2652 |
"/ canceled |
2653 |
^ self |
|
853 | 2654 |
]. |
2655 |
||
2656 |
s := fileName asFilename writeStream. |
|
2657 |
s isNil ifTrue:[ |
|
1514 | 2658 |
self warn:'cannot write the ''' , fileName , ''' file'. |
2659 |
^ self |
|
853 | 2660 |
]. |
2661 |
||
2662 |
s nextPutLine:'"/ ST/X saved settings'; |
|
2663 |
nextPutLine:'"/ DO NOT MODIFY MANUALLY'; |
|
1184 | 2664 |
nextPutLine:'"/ (modifications would be lost with next save-settings)'; |
853 | 2665 |
nextPutLine:'"/'; |
2666 |
nextPutLine:'"/ this file was automatically generated by the'; |
|
2667 |
nextPutLine:'"/ ''save settings'' function of the Launcher'; |
|
2668 |
nextPutLine:'"/'. |
|
2669 |
s cr. |
|
2670 |
||
2671 |
s nextPutLine:'"/'. |
|
2672 |
s nextPutLine:'"/ saved by ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ' at ' , AbsoluteTime now printString. |
|
2673 |
s nextPutLine:'"/'. |
|
2674 |
s cr. |
|
2675 |
||
2676 |
s nextPutLine:'"/'. |
|
2677 |
s nextPutLine:'"/ Display settings:'. |
|
2678 |
s nextPutLine:'"/'. |
|
2679 |
s nextPutLine:'"/ only restore the display settings, if on the same Display ...'. |
|
2680 |
s nextPutLine:'Display displayName = ' , (Display displayName storeString) , ' ifTrue:['. |
|
2681 |
screen := Screen current. |
|
2682 |
screen fixColors notNil ifTrue:[ |
|
1514 | 2683 |
s nextPutLine:' Image flushDeviceImages.'. |
2684 |
s nextPutLine:' Color colorAllocationFailSignal catch:['. |
|
2685 |
s nextPutLine:' Color getColorsRed:6 green:6 blue:4 on:Display'. |
|
2686 |
s nextPutLine:' ].'. |
|
853 | 2687 |
] ifFalse:[ |
1514 | 2688 |
s nextPutLine:' Display releaseFixColors.'. |
853 | 2689 |
]. |
2690 |
s nextPutLine:' Display hasColors: ' , (screen hasColors storeString) , '.'. |
|
2691 |
s nextPutLine:' Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'. |
|
2692 |
s nextPutLine:' Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'. |
|
2693 |
s nextPutLine:' Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'. |
|
2694 |
s nextPutLine:' Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'. |
|
1514 | 2695 |
s nextPutLine:' View defaultStyle:' , View defaultStyle storeString , '.'. |
853 | 2696 |
s nextPutLine:'].'. |
2697 |
s cr. |
|
2698 |
||
2699 |
s nextPutLine:'"/'. |
|
2700 |
s nextPutLine:'"/ Compiler settings:'. |
|
2701 |
s nextPutLine:'"/'. |
|
2702 |
s nextPutLine:'Compiler warnSTXSpecials: ' , (Compiler warnSTXSpecials storeString) , '.'; |
|
2703 |
nextPutLine:'Compiler warnUnderscoreInIdentifier: ' , (Compiler warnUnderscoreInIdentifier storeString) , '.'; |
|
2704 |
nextPutLine:'Compiler warnOldStyleAssignment: ' , (Compiler warnOldStyleAssignment storeString) , '.'; |
|
2705 |
nextPutLine:'Compiler warnCommonMistakes: ' , (Compiler warnCommonMistakes storeString) , '.'; |
|
1184 | 2706 |
nextPutLine:'Compiler warnPossibleIncompatibilities: ' , (Compiler warnPossibleIncompatibilities storeString) , '.'; |
853 | 2707 |
nextPutLine:'Compiler allowUnderscoreInIdentifier: ' , (Compiler allowUnderscoreInIdentifier storeString) , '.'; |
2708 |
nextPutLine:'Compiler arraysAreImmutable: ' , (Compiler arraysAreImmutable storeString) , '.'; |
|
2709 |
nextPutLine:'Compiler lineNumberInfo: ' , (Compiler lineNumberInfo storeString) , '.'; |
|
2710 |
||
2711 |
nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.'; |
|
2712 |
||
2713 |
nextPutLine:'Compiler stcCompilationIncludes: ' , (Compiler stcCompilationIncludes storeString) , '.'; |
|
2714 |
nextPutLine:'Compiler stcCompilationDefines: ' , (Compiler stcCompilationDefines storeString) , '.'; |
|
2715 |
nextPutLine:'Compiler stcCompilationOptions: ' , (Compiler stcCompilationOptions storeString) , '.'; |
|
2716 |
nextPutLine:'Compiler ccCompilationOptions: ' , (Compiler ccCompilationOptions storeString) , '.'; |
|
2717 |
nextPutLine:'Compiler ccPath: ' , (Compiler ccPath storeString) , '.'; |
|
2718 |
||
2719 |
nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.'; |
|
2720 |
nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'. |
|
2721 |
||
1354 | 2722 |
HistoryManager notNil ifTrue:[ |
1514 | 2723 |
HistoryManager isActive ifTrue:[ |
2724 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager activate].'. |
|
2725 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager fullHistoryUpdate:' , HistoryManager fullHistoryUpdate storeString , '].'. |
|
2726 |
] ifFalse:[ |
|
2727 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager deactivate].'. |
|
2728 |
]. |
|
853 | 2729 |
]. |
2730 |
||
2731 |
ObjectFileLoader notNil ifTrue:[ |
|
1514 | 2732 |
s nextPutLine:'ObjectFileLoader searchedLibraries: ' , (ObjectFileLoader searchedLibraries storeString) , '.'. |
2733 |
s nextPutLine:'ObjectFileLoader libPath: ' , (ObjectFileLoader libPath storeString) , '.'. |
|
853 | 2734 |
]. |
2735 |
||
2736 |
s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'. |
|
2737 |
s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'. |
|
2738 |
||
2739 |
s cr. |
|
2740 |
s nextPutLine:'"/'. |
|
2741 |
s nextPutLine:'"/ Info & Debug Messages:'. |
|
2742 |
s nextPutLine:'"/'. |
|
2743 |
s nextPutLine:'ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '.'; |
|
2744 |
nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.'; |
|
2745 |
nextPutLine:'Object infoPrinting: ' , (Object infoPrinting storeString) , '.'; |
|
2746 |
nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'. |
|
2747 |
||
2748 |
||
2749 |
s cr. |
|
2750 |
s nextPutLine:'"/'. |
|
2751 |
s nextPutLine:'"/ Misc settings:'. |
|
2752 |
s nextPutLine:'"/'. |
|
2753 |
s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.'; |
|
2754 |
nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.'; |
|
2755 |
nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.'; |
|
2756 |
nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.'; |
|
2757 |
nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.'; |
|
2758 |
||
2759 |
"/ claus - I dont think its a good idea to save those ... |
|
2760 |
nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.'; |
|
2761 |
nextPutLine:'"/ ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.'; |
|
2762 |
||
974 | 2763 |
nextPutLine:'StandardSystemView returnFocusWhenClosingModalBoxes: ' , (StandardSystemView returnFocusWhenClosingModalBoxes storeString) , '.'; |
2764 |
nextPutLine:'StandardSystemView takeFocusWhenMapped: ' , (StandardSystemView takeFocusWhenMapped storeString) , '.'; |
|
853 | 2765 |
nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.'; |
1397
a5d84d1398d3
added checkBox for st80EditMode in settings-misc
Claus Gittinger <cg@exept.de>
parents:
1392
diff
changeset
|
2766 |
nextPutLine:'EditTextView st80Mode: ' , (EditTextView st80Mode storeString) , '.'; |
1520 | 2767 |
nextPutLine:'UserPreferences current syntaxColoring: ' , (UserPreferences current syntaxColoring storeString) , '.'; |
853 | 2768 |
nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'. |
915 | 2769 |
(Exception emergencyHandler == Launcher notifyingEmergencyHandler) ifTrue:[ |
1514 | 2770 |
s nextPutLine:'Exception emergencyHandler:(Launcher notifyingEmergencyHandler).'. |
915 | 2771 |
]. |
853 | 2772 |
|
2773 |
s cr. |
|
2774 |
s nextPutLine:'"/'. |
|
2775 |
s nextPutLine:'"/ Printer settings:'. |
|
2776 |
s nextPutLine:'"/'. |
|
2777 |
s nextPutLine:'Printer := ' , (Printer name) , '.'; |
|
2778 |
nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'. |
|
2779 |
||
2780 |
Printer supportsPageSizes ifTrue:[ |
|
1514 | 2781 |
s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'. |
2782 |
s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'. |
|
853 | 2783 |
]. |
2784 |
Printer supportsMargins ifTrue:[ |
|
1514 | 2785 |
s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'. |
2786 |
s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'. |
|
2787 |
s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'. |
|
2788 |
s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'. |
|
853 | 2789 |
]. |
2790 |
Printer supportsPostscript ifTrue:[ |
|
1514 | 2791 |
s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'. |
853 | 2792 |
]. |
2793 |
||
2794 |
s cr. |
|
2795 |
s nextPutLine:'"/'. |
|
2796 |
s nextPutLine:'"/ Font settings:'. |
|
2797 |
s nextPutLine:'"/'. |
|
2798 |
s nextPutLine:'View defaultFont: ' , (View defaultFont storeString) , '.'. |
|
2799 |
s nextPutLine:'Label defaultFont: ' , (Label defaultFont storeString) , '.'. |
|
2800 |
s nextPutLine:'Button defaultFont: ' , (Button defaultFont storeString) , '.'. |
|
2801 |
s nextPutLine:'Toggle defaultFont: ' , (Toggle defaultFont storeString) , '.'. |
|
2802 |
s nextPutLine:'SelectionInListView defaultFont: ' , (SelectionInListView defaultFont storeString) , '.'. |
|
2803 |
s nextPutLine:'MenuView defaultFont: ' , (MenuView defaultFont storeString) , '.'. |
|
2804 |
s nextPutLine:'PullDownMenu defaultFont: ' , (PullDownMenu defaultFont storeString) , '.'. |
|
2805 |
s nextPutLine:'TextView defaultFont: ' , (TextView defaultFont storeString) , '.'. |
|
2806 |
s nextPutLine:'EditTextView defaultFont: ' , (EditTextView defaultFont storeString) , '.'. |
|
2807 |
s nextPutLine:'CodeView defaultFont: ' , (CodeView defaultFont storeString) , '.'. |
|
2808 |
||
2809 |
s cr. |
|
2810 |
s nextPutLine:'"/'. |
|
2811 |
s nextPutLine:'"/ Language setting:'. |
|
2812 |
s nextPutLine:'"/'. |
|
2813 |
s nextPutLine:'Smalltalk language: ' , (Smalltalk language storeString) , '.'. |
|
2814 |
s nextPutLine:'Smalltalk languageTerritory: ' , (Smalltalk languageTerritory storeString) , '.'. |
|
2815 |
s close. |
|
2816 |
||
2817 |
" |
|
2818 |
Transcript topView application saveSettings |
|
2819 |
" |
|
2820 |
||
1520 | 2821 |
"Modified: / 1.4.1998 / 12:18:15 / cg" |
853 | 2822 |
! |
2823 |
||
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2824 |
sourceAndDebuggerSettings |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2825 |
"open a dialog on misc other settings" |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2826 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2827 |
|box check logDoits updChanges changeFileName |
1250
a0c335cfb6a9
moved lazyLoading and binaryLoading to compiler sections
Claus Gittinger <cg@exept.de>
parents:
1242
diff
changeset
|
2828 |
useManager hasManager |
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2829 |
repository repositoryHolder localSourceFirst |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2830 |
sourceCacheDir cacheEntry |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2831 |
component localCheck oldIndent nm fn manager |
1517 | 2832 |
keepMethodHistory showErrorNotifier showVerboseStack |
2833 |
syntaxColoring| |
|
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2834 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2835 |
"/ |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2836 |
"/ extract relevant system settings ... |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2837 |
"/ |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2838 |
keepMethodHistory := Class methodHistory notNil asValue. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2839 |
logDoits := Smalltalk logDoits asValue. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2840 |
updChanges := Class updatingChanges asValue. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2841 |
changeFileName := ObjectMemory nameForChanges asValue. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2842 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2843 |
hasManager := AbstractSourceCodeManager notNil |
1517 | 2844 |
and:[AbstractSourceCodeManager isLoaded]. |
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2845 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2846 |
hasManager ifTrue:[ |
1517 | 2847 |
useManager := (manager := Smalltalk at:#SourceCodeManager) notNil asValue. |
2848 |
localSourceFirst := Class tryLocalSourceFirst asValue. |
|
2849 |
manager notNil ifTrue:[ |
|
2850 |
repository := manager repositoryName. |
|
2851 |
repository notNil ifTrue:[ |
|
2852 |
repositoryHolder := repository asValue |
|
2853 |
] ifFalse:[ |
|
2854 |
repositoryHolder := '' asValue |
|
2855 |
]. |
|
2856 |
]. |
|
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2857 |
] ifFalse:[ |
1517 | 2858 |
useManager := false. |
2859 |
localSourceFirst := false |
|
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2860 |
]. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2861 |
showErrorNotifier := (Exception emergencyHandler == Launcher notifyingEmergencyHandler) asValue. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2862 |
showVerboseStack := (DebugView defaultVerboseBacktrace ? false) asValue. |
1517 | 2863 |
syntaxColoring := UserPreferences current syntaxColoring asValue. |
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2864 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2865 |
sourceCacheDir := nil asValue. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2866 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2867 |
"/ |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2868 |
"/ create a box on those values ... |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2869 |
"/ |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2870 |
box := DialogBox new. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2871 |
box label:(resources string:'Source & Debugger settings'). |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2872 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2873 |
box addCheckBox:(resources string:'remember changed methods (for previous method in browser)') on:keepMethodHistory. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2874 |
box addCheckBox:(resources string:'log compiles in changes file') on:updChanges. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2875 |
box addCheckBox:(resources string:'log doIts in changes file') on:logDoits. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2876 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2877 |
component := box |
1517 | 2878 |
addLabelledInputField:(resources string:'change file name:') |
2879 |
adjust:#right |
|
2880 |
on:changeFileName |
|
2881 |
tabable:true |
|
2882 |
separateAtX:0.4. |
|
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2883 |
component immediateAccept:true; acceptOnLeave:false. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2884 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2885 |
"/ y := box yPosition. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2886 |
"/ component := box addTextLabel:(resources string:'change file name:'). |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2887 |
"/ component width:0.5; adjust:#right; borderWidth:0. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2888 |
"/ box yPosition:y. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2889 |
"/ component := box addInputFieldOn:changeFileName tabable:true. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2890 |
"/ component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2891 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2892 |
box addHorizontalLine. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2893 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2894 |
hasManager ifTrue:[ |
1517 | 2895 |
check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager. |
2896 |
oldIndent := box leftIndent. |
|
2897 |
box leftIndent:30. |
|
2898 |
||
2899 |
repositoryHolder notNil ifTrue:[ |
|
2900 |
component := box |
|
2901 |
addLabelledInputField:(resources string:'repository:') |
|
2902 |
adjust:#right |
|
2903 |
on:repositoryHolder |
|
2904 |
tabable:true |
|
2905 |
separateAtX:0.4. |
|
2906 |
component immediateAccept:true; acceptOnLeave:false. |
|
2907 |
component enableChannel:useManager. |
|
2908 |
]. |
|
2909 |
||
2910 |
cacheEntry := box |
|
2911 |
addLabelledInputField:(resources string:'source cache dir:') |
|
2912 |
adjust:#right |
|
2913 |
on:sourceCacheDir |
|
2914 |
tabable:true |
|
2915 |
separateAtX:0.4. |
|
2916 |
cacheEntry immediateAccept:true; acceptOnLeave:false. |
|
2917 |
cacheEntry enableChannel:useManager. |
|
2918 |
||
2919 |
localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst. |
|
2920 |
localCheck enableChannel:useManager. |
|
2921 |
||
2922 |
box leftIndent:oldIndent. |
|
2923 |
||
2924 |
(AbstractSourceCodeManager isNil |
|
2925 |
or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[ |
|
2926 |
useManager value:false. |
|
2927 |
cacheEntry disable. |
|
2928 |
check disable. |
|
2929 |
localCheck enable. |
|
2930 |
] ifFalse:[ |
|
2931 |
sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName). |
|
2932 |
]. |
|
2933 |
box addHorizontalLine. |
|
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2934 |
]. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2935 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2936 |
box addCheckBox:(resources string:'show error notifier before opening debugger') on:showErrorNotifier. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2937 |
box addCheckBox:(resources string:'verbose backtrace by default in debugger') on:showVerboseStack. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2938 |
|
1517 | 2939 |
box addHorizontalLine. |
2940 |
box addCheckBox:(resources string:'syntax coloring') on:syntaxColoring. |
|
2941 |
||
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2942 |
box |
1517 | 2943 |
addHelpButtonFor:'Launcher/sourceSettings.html'; |
2944 |
addAbortButton; |
|
2945 |
addOkButton. |
|
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2946 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2947 |
"/ |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2948 |
"/ show the box ... |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2949 |
"/ |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2950 |
box open. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2951 |
|
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2952 |
"/ |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2953 |
"/ update system settings |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2954 |
"/ |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
2955 |
box accepted ifTrue:[ |
1517 | 2956 |
Class keepMethodHistory:keepMethodHistory value. |
2957 |
Smalltalk logDoits:logDoits value. |
|
2958 |
Class updateChanges:updChanges value. |
|
2959 |
ObjectMemory nameForChanges:changeFileName value. |
|
2960 |
||
2961 |
(hasManager and:[useManager value]) ifTrue:[ |
|
2962 |
manager isNil ifTrue:[ |
|
2963 |
Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager). |
|
2964 |
manager := Smalltalk at:#SourceCodeManager. |
|
2965 |
]. |
|
2966 |
Class tryLocalSourceFirst:(localSourceFirst value). |
|
1530 | 2967 |
|
2968 |
manager notNil ifTrue:[ |
|
2969 |
localSourceFirst value ifFalse:[ |
|
2970 |
nm := sourceCacheDir value. |
|
2971 |
nm size > 0 ifTrue:[ |
|
2972 |
(fn := nm asFilename) exists ifFalse:[ |
|
2973 |
(self confirm:('cache directory ''' , nm , ''' does not exists\create ?' withCRs)) ifTrue:[ |
|
2974 |
fn makeDirectory; |
|
2975 |
makeReadableForAll; |
|
2976 |
makeWritableForAll; |
|
2977 |
makeExecutableForAll. |
|
2978 |
] |
|
2979 |
]. |
|
2980 |
(fn exists |
|
2981 |
and:[fn isDirectory |
|
2982 |
and:[fn isReadable |
|
2983 |
and:[fn isWritable]]]) ifTrue:[ |
|
2984 |
AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value). |
|
2985 |
] |
|
1517 | 2986 |
] |
2987 |
] |
|
2988 |
]. |
|
2989 |
||
2990 |
repositoryHolder notNil ifTrue:[ |
|
2991 |
repositoryHolder value size > 0 ifTrue:[ |
|
2992 |
manager initializeForRepository:repositoryHolder value. |
|
2993 |
]. |
|
2994 |
]. |
|
2995 |
] ifFalse:[ |
|
2996 |
Smalltalk at:#SourceCodeManager put:nil |
|
1548 | 2997 |
]. |
2998 |
||
2999 |
showErrorNotifier value ifFalse:[ |
|
3000 |
Exception emergencyHandler:nil |
|
3001 |
] ifTrue:[ |
|
3002 |
Exception emergencyHandler:(Launcher notifyingEmergencyHandler) |
|
3003 |
]. |
|
3004 |
DebugView defaultVerboseBacktrace:(showVerboseStack value). |
|
3005 |
UserPreferences current syntaxColoring:syntaxColoring value. |
|
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
3006 |
]. |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
3007 |
box destroy |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
3008 |
|
1517 | 3009 |
"Modified: / 9.9.1996 / 22:43:36 / stefan" |
3010 |
"Created: / 17.1.1997 / 17:39:33 / cg" |
|
1530 | 3011 |
"Modified: / 3.4.1998 / 12:28:10 / cg" |
1548 | 3012 |
"Modified: / 16.4.1998 / 17:18:47 / ca" |
968
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
3013 |
! |
1c8c87307720
splitted misc-settings into source-related and
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
3014 |
|
219 | 3015 |
viewStyleSetting |
921 | 3016 |
"open a dialog on viewStyle related settings" |
3017 |
||
219 | 3018 |
|listOfStyles resourceDir dir box |
1350 | 3019 |
list listView scrView infoLabel infoForwarder newStyle |
1352 | 3020 |
someRsrcFile b didApply| |
219 | 3021 |
|
3022 |
" |
|
3023 |
search resources directory for a list of .style files ... |
|
3024 |
" |
|
1350 | 3025 |
someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style'). |
3026 |
someRsrcFile notNil ifTrue:[ |
|
1383 | 3027 |
resourceDir := someRsrcFile asFilename directoryName |
1350 | 3028 |
] ifFalse:[ |
1383 | 3029 |
resourceDir := Smalltalk getSystemFileName:'resources'. |
1350 | 3030 |
]. |
3031 |
||
219 | 3032 |
resourceDir isNil ifTrue:[ |
1383 | 3033 |
self warn:'no styles found (missing ''resources'' directory)'. |
3034 |
^ self |
|
219 | 3035 |
]. |
1319 | 3036 |
dir := resourceDir asFilename directoryContents. |
219 | 3037 |
|
1318 | 3038 |
listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style']. |
3039 |
listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name]. |
|
1319 | 3040 |
Filename isCaseSensitive ifFalse:[ |
1383 | 3041 |
listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase]. |
1319 | 3042 |
]. |
219 | 3043 |
listOfStyles sort. |
3044 |
||
3045 |
"/ old code: used a standard ListSelectionBox |
|
3046 |
"/ changed to intercept selection and add info-output. |
|
3047 |
||
3048 |
"/ box := ListSelectionBox title:(resources string:'STYLE_MSG') withCRs. |
|
3049 |
"/ box label:(resources string:'Style selection'). |
|
3050 |
"/ box list:listOfStyles. |
|
3051 |
"/ box initialText:View defaultStyle. |
|
3052 |
"/ box selectAction:[:newStyle | |
|
3053 |
"/ ]. |
|
3054 |
"/ box action:[:newStyle | |
|
3055 |
"/ 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
|
3056 |
"/ transcript showCR:'change style to ' , newStyle , ' ...'. |
219 | 3057 |
"/ View defaultStyle:newStyle asSymbol. |
3058 |
"/ ] |
|
3059 |
"/ ]. |
|
3060 |
"/ box showAtPointer |
|
3061 |
||
3062 |
"/ new code: build box 'by 'hand' |
|
3063 |
"/ |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
3064 |
infoForwarder := [ |
1383 | 3065 |
|nm sheet comment| |
3066 |
nm := list selection. |
|
3067 |
sheet := ViewStyle fromFile:(nm , '.style'). |
|
3068 |
comment := sheet at:#comment ifAbsent:''. |
|
3069 |
infoLabel label:comment withCRs asStringCollection |
|
3070 |
]. |
|
219 | 3071 |
|
3072 |
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
|
3073 |
list onChangeSend:#value to:infoForwarder. |
219 | 3074 |
|
3075 |
box := Dialog new. |
|
3076 |
box label:(resources string:'Style selection'). |
|
3077 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
3078 |
(box addTextLabel:(resources string:'STYLE_MSG') withCRs) adjust:#left. |
219 | 3079 |
listView := SelectionInListView on:list. |
3080 |
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
|
3081 |
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
|
3082 |
|
219 | 3083 |
box addVerticalSpace. |
3084 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
3085 |
(infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft. |
219 | 3086 |
|
1351 | 3087 |
box addAbortButton. |
3088 |
b := box addButton:(Button label:(resources string:'apply')). |
|
1352 | 3089 |
b action:[didApply := true. self changeViewStyleTo:(list selection)]. |
1351 | 3090 |
box addOkButton. |
568 | 3091 |
list selection:(View defaultStyle). |
219 | 3092 |
|
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
3093 |
box stickAtBottomWithVariableHeight:scrView. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
3094 |
box stickAtBottomWithFixHeight:infoLabel. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
3095 |
box open. |
219 | 3096 |
|
3097 |
box accepted ifTrue:[ |
|
1383 | 3098 |
((newStyle := list selection) ~= View defaultStyle |
3099 |
or:[didApply ~~ true]) ifTrue:[ |
|
3100 |
self changeViewStyleTo:newStyle. |
|
3101 |
]. |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
3102 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
3103 |
box destroy |
549 | 3104 |
|
1351 | 3105 |
"Modified: 20.10.1997 / 15:30:27 / cg" |
219 | 3106 |
! ! |
3107 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3108 |
!Launcher methodsFor:'actions - tools'! |
219 | 3109 |
|
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3110 |
compressingGarbageCollect |
921 | 3111 |
"perform a compressing garbageCollect" |
3112 |
||
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3113 |
ObjectMemory verboseGarbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3114 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3115 |
"Created: 12.5.1996 / 15:30:15 / cg" |
921 | 3116 |
"Modified: 8.1.1997 / 14:54:21 / cg" |
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3117 |
! |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3118 |
|
1051
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3119 |
deIconifyAllWindows |
1056 | 3120 |
|setOfViews| |
3121 |
||
3122 |
setOfViews := Project current views asIdentitySet. |
|
3123 |
setOfViews addAll:(Project defaultProject views). |
|
3124 |
||
3125 |
setOfViews do:[:aTopView | |
|
1383 | 3126 |
aTopView device == Screen current ifTrue:[ |
3127 |
aTopView expand |
|
3128 |
]. |
|
1055
41df6ada2df7
dont deiconify debuggers (i.e. only walk over current project
Claus Gittinger <cg@exept.de>
parents:
1051
diff
changeset
|
3129 |
]. |
41df6ada2df7
dont deiconify debuggers (i.e. only walk over current project
Claus Gittinger <cg@exept.de>
parents:
1051
diff
changeset
|
3130 |
|
1051
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3131 |
" |
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3132 |
Transcript topView application deIconifyAllWindows |
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3133 |
" |
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3134 |
|
1056 | 3135 |
"Modified: 3.3.1997 / 14:13:24 / cg" |
1051
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3136 |
! |
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3137 |
|
815 | 3138 |
findAndDestroyWindow |
921 | 3139 |
"find a window (by name) and destroy it" |
3140 |
||
815 | 3141 |
|v| |
3142 |
||
1347 | 3143 |
v := self findWindow:'select view to close:'. |
815 | 3144 |
v notNil ifTrue:[ |
1383 | 3145 |
v destroy. |
815 | 3146 |
]. |
3147 |
||
3148 |
"Created: 28.10.1996 / 14:39:23 / cg" |
|
1347 | 3149 |
"Modified: 14.10.1997 / 11:25:37 / cg" |
815 | 3150 |
! |
3151 |
||
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3152 |
findAndRaiseWindow |
921 | 3153 |
"find a window (by name) and raise it" |
3154 |
||
815 | 3155 |
|v| |
3156 |
||
1347 | 3157 |
v := self findWindow:'select view to raise deiconified:'. |
815 | 3158 |
v notNil ifTrue:[ |
1383 | 3159 |
v raiseDeiconified. |
815 | 3160 |
]. |
3161 |
||
1347 | 3162 |
"Modified: 14.10.1997 / 11:25:42 / cg" |
765
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3163 |
! |
9dafe5b26f77
moved view operations onto separate submenu;
Claus Gittinger <cg@exept.de>
parents:
760
diff
changeset
|
3164 |
|
219 | 3165 |
fullScreenHardcopy |
3166 |
"after a second (to allow redraw of views under menu ...), |
|
3167 |
save the contents of the whole screen." |
|
3168 |
||
738 | 3169 |
Processor |
1383 | 3170 |
addTimedBlock:[ |
3171 |
self |
|
3172 |
saveScreenImage:(Image fromScreen) |
|
3173 |
defaultName:'screen' |
|
3174 |
] |
|
3175 |
afterSeconds:1 |
|
738 | 3176 |
|
3177 |
"Modified: 23.9.1996 / 14:36:14 / cg" |
|
219 | 3178 |
! |
99 | 3179 |
|
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3180 |
garbageCollect |
921 | 3181 |
"perform a non-compressing garbageCollect" |
3182 |
||
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3183 |
ObjectMemory reclaimSymbols |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3184 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3185 |
"Created: 12.5.1996 / 15:28:03 / cg" |
921 | 3186 |
"Modified: 8.1.1997 / 14:54:29 / cg" |
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3187 |
! |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3188 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3189 |
globalGarbageCollect |
921 | 3190 |
"perform a non-compressing garbageCollect" |
3191 |
||
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3192 |
ObjectMemory reclaimSymbols |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3193 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3194 |
"Created: 12.5.1996 / 15:28:13 / cg" |
921 | 3195 |
"Modified: 8.1.1997 / 14:54:36 / cg" |
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3196 |
! |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3197 |
|
1051
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3198 |
iconifyAllWindows |
1056 | 3199 |
|setOfViews| |
3200 |
||
3201 |
setOfViews := Project current views asIdentitySet. |
|
3202 |
setOfViews addAll:(Project defaultProject views). |
|
3203 |
||
3204 |
setOfViews do:[:aTopView | |
|
1383 | 3205 |
aTopView device == Screen current ifTrue:[ |
3206 |
aTopView collapse |
|
3207 |
] |
|
1051
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3208 |
] |
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3209 |
|
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3210 |
"Created: 1.3.1997 / 20:10:58 / cg" |
1056 | 3211 |
"Modified: 3.3.1997 / 14:13:11 / cg" |
1051
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3212 |
! |
5d05a5307a7a
added collapse & expand tools-menu items
Claus Gittinger <cg@exept.de>
parents:
1048
diff
changeset
|
3213 |
|
219 | 3214 |
screenHardcopy |
3215 |
"after a second (to allow redraw of views under menu ...), |
|
3216 |
let user specify a rectangular area on the screen |
|
3217 |
and save its contents." |
|
3218 |
||
3219 |
|area| |
|
3220 |
||
738 | 3221 |
Processor |
1383 | 3222 |
addTimedBlock:[ |
3223 |
[Screen current leftButtonPressed] whileTrue:[Processor yield]. |
|
3224 |
||
3225 |
area := Rectangle fromUser. |
|
3226 |
(area width > 0 and:[area height > 0]) ifTrue:[ |
|
3227 |
self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy' |
|
3228 |
] |
|
3229 |
] |
|
3230 |
afterSeconds:1 |
|
738 | 3231 |
|
1032
75221671d7db
when doing an area-hardcopy: wait till no button is pressed.
Claus Gittinger <cg@exept.de>
parents:
1024
diff
changeset
|
3232 |
"Modified: 13.2.1997 / 16:02:35 / cg" |
219 | 3233 |
! |
3234 |
||
1385
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3235 |
startApplication:aSymbol |
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3236 |
"start an application, |
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3237 |
popup warnbox if application is not present or autoload failed" |
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3238 |
|
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3239 |
|app| |
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3240 |
|
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3241 |
app := Smalltalk classNamed:aSymbol. |
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3242 |
app isBehavior ifTrue:[ |
1392 | 3243 |
app isLoaded ifFalse:[ |
3244 |
Autoload autoloadFailedSignal handle:[:ex| |
|
3245 |
^ self warn:(resources string:'Sorry - cannot load %1' with:app name). |
|
3246 |
] do:[ |
|
3247 |
app autoload. |
|
3248 |
]. |
|
3249 |
]. |
|
3250 |
app open. |
|
1385
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3251 |
] ifFalse:[ |
1392 | 3252 |
self warn:(resources string:'Sorry - %1 is only available |
1385
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3253 |
in the full commercial release' with:aSymbol asString). |
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3254 |
] |
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3255 |
|
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3256 |
"Created: / 19.12.1997 / 13:00:29 / stefan" |
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
3257 |
"Modified: / 19.12.1997 / 14:09:46 / stefan" |
219 | 3258 |
! |
3259 |
||
3260 |
startFullWindowTreeView |
|
921 | 3261 |
"open a windowTree view (on all views)" |
3262 |
||
219 | 3263 |
WindowTreeView open |
921 | 3264 |
|
3265 |
"Modified: 8.1.1997 / 14:56:04 / cg" |
|
219 | 3266 |
! |
3267 |
||
1251
fd81e357fa9e
added GUI builder to tools-menu
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
3268 |
startGUIBuilder |
fd81e357fa9e
added GUI builder to tools-menu
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
3269 |
"open a GUIBuilder view" |
fd81e357fa9e
added GUI builder to tools-menu
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
3270 |
|
fd81e357fa9e
added GUI builder to tools-menu
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
3271 |
UIPainter open |
fd81e357fa9e
added GUI builder to tools-menu
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
3272 |
|
fd81e357fa9e
added GUI builder to tools-menu
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
3273 |
"Modified: 8.1.1997 / 14:56:14 / cg" |
fd81e357fa9e
added GUI builder to tools-menu
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
3274 |
"Created: 25.7.1997 / 10:56:30 / cg" |
fd81e357fa9e
added GUI builder to tools-menu
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
3275 |
! |
fd81e357fa9e
added GUI builder to tools-menu
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
3276 |
|
1458
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
3277 |
startNewLauncher |
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
3278 |
"open a real new launcher" |
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
3279 |
|
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
3280 |
NewLauncher openAt:(self window origin) |
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
3281 |
|
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
3282 |
"Modified: / 5.2.1998 / 19:31:41 / cg" |
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
3283 |
! |
ae0900d4dce6
start newLauncher at same position as oldLauncher
Claus Gittinger <cg@exept.de>
parents:
1433
diff
changeset
|
3284 |
|
434 | 3285 |
startStopEventTrace |
921 | 3286 |
"start/stop event tracing for a particular view" |
3287 |
||
503 | 3288 |
|v wg| |
434 | 3289 |
|
3290 |
v := Screen current viewFromUser. |
|
3291 |
v notNil ifTrue:[ |
|
1383 | 3292 |
v := v topView. |
3293 |
wg := v windowGroup. |
|
3294 |
wg notNil ifTrue:[ |
|
3295 |
"/ |
|
3296 |
"/ toggle eventTrace in its windowGroup |
|
3297 |
"/ |
|
3298 |
wg traceEvents:(wg preEventHook isNil) |
|
3299 |
] |
|
434 | 3300 |
] |
3301 |
||
3302 |
"Created: 7.3.1996 / 14:44:22 / cg" |
|
921 | 3303 |
"Modified: 8.1.1997 / 14:56:44 / cg" |
434 | 3304 |
! |
3305 |
||
219 | 3306 |
startWindowTreeView |
921 | 3307 |
"open a windowTree view (on a topView)" |
3308 |
||
219 | 3309 |
|v| |
3310 |
||
3311 |
v := self pickAView. |
|
3312 |
v notNil ifTrue:[ |
|
1383 | 3313 |
WindowTreeView openOn:v topView |
219 | 3314 |
] |
921 | 3315 |
|
3316 |
"Modified: 8.1.1997 / 14:55:59 / cg" |
|
219 | 3317 |
! |
3318 |
||
3319 |
viewDestroy |
|
3320 |
"let user pick a view and destroy it. |
|
3321 |
Even allow destroying non-smalltalk views |
|
3322 |
(also for views which I forgot due to some error)" |
|
3323 |
||
1351 | 3324 |
|device p v id i c| |
219 | 3325 |
|
3326 |
(Delay forSeconds:1) wait. |
|
3327 |
||
3328 |
device := Screen current. |
|
1351 | 3329 |
i := Image fromFile:'bitmaps/xpmBitmaps/cursors/cross2.xpm'. |
3330 |
i isNil ifTrue:[ |
|
1383 | 3331 |
c := Cursor crossHair |
1351 | 3332 |
] ifFalse:[ |
1383 | 3333 |
c := Cursor fromImage:i |
1351 | 3334 |
]. |
3335 |
p := device pointFromUserShowing:c. |
|
219 | 3336 |
id := device viewIdFromPoint:p. |
3337 |
v := device viewFromId:id. |
|
3338 |
v notNil ifTrue:[ |
|
1383 | 3339 |
v topView destroy. |
3340 |
^ self |
|
219 | 3341 |
]. |
3342 |
id = device rootView id ifTrue:[ |
|
1383 | 3343 |
^ self |
219 | 3344 |
]. |
298 | 3345 |
(Dialog confirm:'mhmh, this may not a be smalltalk view\(Or I somehow forgot about it).\Destroy anyway ?' withCRs) |
219 | 3346 |
ifTrue:[ |
1383 | 3347 |
device destroyView:nil withId:id |
219 | 3348 |
]. |
3349 |
||
3350 |
"Modified: 18.9.1995 / 23:13:32 / claus" |
|
1351 | 3351 |
"Modified: 19.10.1997 / 03:09:20 / cg" |
219 | 3352 |
! |
3353 |
||
3354 |
viewHardcopy |
|
3355 |
"after a second (to allow redraw of views under menu ...), |
|
3356 |
let user specify a view and save its contents." |
|
3357 |
||
738 | 3358 |
Processor |
1383 | 3359 |
addTimedBlock:[ |
3360 |
|v| |
|
3361 |
||
3362 |
v := Screen current viewFromUser. |
|
3363 |
v notNil ifTrue:[ |
|
3364 |
self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy' |
|
3365 |
] |
|
3366 |
] |
|
3367 |
afterSeconds:1 |
|
738 | 3368 |
|
1351 | 3369 |
"Modified: 19.10.1997 / 03:09:34 / cg" |
219 | 3370 |
! |
3371 |
||
3372 |
viewInspect |
|
3373 |
"let user pick a view and inspect it. Only smalltalk views are allowed" |
|
3374 |
||
3375 |
|v| |
|
3376 |
||
3377 |
v := self pickAView. |
|
3378 |
v notNil ifTrue:[ |
|
226 | 3379 |
"/ v topView inspect |
1383 | 3380 |
v inspect |
219 | 3381 |
] |
3382 |
||
3383 |
! ! |
|
3384 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3385 |
!Launcher methodsFor:'change & update'! |
219 | 3386 |
|
3387 |
update:something with:aParameter from:changedObject |
|
921 | 3388 |
"care for project changes & update my infoView" |
3389 |
||
219 | 3390 |
((something == #currentProject) |
3391 |
or:[changedObject == Project]) ifTrue:[ |
|
1383 | 3392 |
self updateInfo. |
3393 |
^ self |
|
219 | 3394 |
]. |
921 | 3395 |
|
1257
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3396 |
"Modified: 28.7.1997 / 18:39:39 / cg" |
219 | 3397 |
! ! |
3398 |
||
1121
b9e7897077bd
support drop of fileObjects (open a browser)
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
3399 |
!Launcher methodsFor:'drag & drop'! |
b9e7897077bd
support drop of fileObjects (open a browser)
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
3400 |
|
1131 | 3401 |
canDrop:aCollectionOfDropObjects in:aComponent |
1121
b9e7897077bd
support drop of fileObjects (open a browser)
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
3402 |
"I accept fileObjects in the fileBrowser button |
b9e7897077bd
support drop of fileObjects (open a browser)
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
3403 |
and open a fileBrowser ..." |
b9e7897077bd
support drop of fileObjects (open a browser)
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
3404 |
|
1131 | 3405 |
aCollectionOfDropObjects size ~~ 1 ifTrue:[^ false]. |
3406 |
^ aCollectionOfDropObjects first isFileObject |
|
3407 |
||
3408 |
"Modified: 11.4.1997 / 12:42:59 / cg" |
|
1121
b9e7897077bd
support drop of fileObjects (open a browser)
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
3409 |
! |
b9e7897077bd
support drop of fileObjects (open a browser)
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
3410 |
|
1131 | 3411 |
drop:aCollectionOfDropObjects in:aComponent at:aPoint |
1123
59476839f305
only single drop asupported.
Claus Gittinger <cg@exept.de>
parents:
1121
diff
changeset
|
3412 |
"I accept fileObjects and will open a fileBrowser ..." |
59476839f305
only single drop asupported.
Claus Gittinger <cg@exept.de>
parents:
1121
diff
changeset
|
3413 |
|
59476839f305
only single drop asupported.
Claus Gittinger <cg@exept.de>
parents:
1121
diff
changeset
|
3414 |
|singleDropObject| |
59476839f305
only single drop asupported.
Claus Gittinger <cg@exept.de>
parents:
1121
diff
changeset
|
3415 |
|
1131 | 3416 |
aCollectionOfDropObjects size == 1 ifFalse:[ |
1383 | 3417 |
transcript showCR:'can only drop single objects'. |
3418 |
^ self |
|
1121
b9e7897077bd
support drop of fileObjects (open a browser)
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
3419 |
]. |
1131 | 3420 |
singleDropObject := aCollectionOfDropObjects first. |
1121
b9e7897077bd
support drop of fileObjects (open a browser)
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
3421 |
|
1123
59476839f305
only single drop asupported.
Claus Gittinger <cg@exept.de>
parents:
1121
diff
changeset
|
3422 |
singleDropObject isFileObject ifTrue:[ |
1383 | 3423 |
FileBrowser openOnFileNamed:(singleDropObject theObject pathName) |
1123
59476839f305
only single drop asupported.
Claus Gittinger <cg@exept.de>
parents:
1121
diff
changeset
|
3424 |
]. |
59476839f305
only single drop asupported.
Claus Gittinger <cg@exept.de>
parents:
1121
diff
changeset
|
3425 |
|
1131 | 3426 |
"Modified: 11.4.1997 / 12:44:29 / cg" |
1121
b9e7897077bd
support drop of fileObjects (open a browser)
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
3427 |
! ! |
b9e7897077bd
support drop of fileObjects (open a browser)
Claus Gittinger <cg@exept.de>
parents:
1116
diff
changeset
|
3428 |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3429 |
!Launcher methodsFor:'dynamic menus'! |
658 | 3430 |
|
3431 |
addMenu:name withItems:items actions:actions |
|
3432 |
"dynamically add a new (user-)menu to the menu panel. |
|
3433 |
This allows applications to install items for themself |
|
3434 |
dynamically in the launcher." |
|
3435 |
||
3436 |
|subMenu| |
|
3437 |
||
3438 |
myMenu add:name selector:(name asSymbol) before:#help. |
|
3439 |
subMenu := MenuView forMenu:myMenu. |
|
3440 |
subMenu labels:items. |
|
3441 |
subMenu actions:actions. |
|
3442 |
myMenu at:name putMenu:subMenu |
|
3443 |
||
3444 |
" |
|
3445 |
|launcher actionBlocks| |
|
3446 |
||
3447 |
actionBlocks := Array new:3. |
|
3448 |
actionBlocks at:1 put:[Transcript showCR:'foo']. |
|
3449 |
actionBlocks at:2 put:[Transcript showCR:'bar']. |
|
3450 |
||
3451 |
launcher := Transcript topView application. |
|
3452 |
launcher |
|
1383 | 3453 |
addMenu:'misc' |
3454 |
withItems:#('foo' 'bar') |
|
3455 |
actions:actionBlocks |
|
658 | 3456 |
" |
3457 |
||
3458 |
" |
|
3459 |
|launcher actionBlocks| |
|
3460 |
||
3461 |
actionBlocks := Array new:3. |
|
3462 |
actionBlocks at:1 put:[RDoItServer startServer]. |
|
3463 |
actionBlocks at:2 put:[RDoItServer killServer]. |
|
3464 |
||
3465 |
launcher := Transcript topView application. |
|
3466 |
launcher |
|
1383 | 3467 |
addMenu:'misc' |
3468 |
withItems:#('start rdoit server' 'stop rdoit server') |
|
3469 |
actions:actionBlocks |
|
658 | 3470 |
" |
3471 |
||
3472 |
"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
|
3473 |
! |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3474 |
|
668 | 3475 |
menuAt:nameSymbol |
3476 |
"return a menu by name" |
|
3477 |
||
3478 |
^ myMenu subMenuAt:nameSymbol |
|
3479 |
||
3480 |
" |
|
3481 |
|launcher demoMenu| |
|
3482 |
||
3483 |
launcher := Transcript topView application. |
|
3484 |
demoMenu := launcher menuAt:#demos. |
|
3485 |
demoMenu |
|
1383 | 3486 |
addLabels:#('-' 'fooBar') |
3487 |
selectors:#(nil fooBar). |
|
668 | 3488 |
demoMenu actionAt:#fooBar put:[Transcript showCR:'fooBar'] |
3489 |
" |
|
3490 |
||
3491 |
"Created: 11.7.1996 / 15:35:13 / cg" |
|
3492 |
"Modified: 11.7.1996 / 15:42:25 / cg" |
|
3493 |
! |
|
3494 |
||
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3495 |
removeMenu:name |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3496 |
"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
|
3497 |
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
|
3498 |
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
|
3499 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3500 |
myMenu remove:name |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3501 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3502 |
" |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3503 |
|launcher actionBlocks| |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3504 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3505 |
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
|
3506 |
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
|
3507 |
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
|
3508 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3509 |
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
|
3510 |
launcher |
1383 | 3511 |
addMenu:'misc' |
3512 |
withItems:#('foo' 'bar') |
|
3513 |
actions:actionBlocks. |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3514 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3515 |
Delay waitForSeconds:10. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3516 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3517 |
launcher removeMenu:'misc' |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3518 |
" |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3519 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3520 |
"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
|
3521 |
"Modified: 5.7.1996 / 11:54:36 / cg" |
658 | 3522 |
! ! |
3523 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3524 |
!Launcher methodsFor:'help'! |
219 | 3525 |
|
3526 |
helpTextFor:aComponent |
|
921 | 3527 |
"activeHelp interface: return some help text for a component" |
3528 |
||
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
3529 |
|sel s buttons| |
219 | 3530 |
|
3531 |
aComponent == transcript ifTrue:[ |
|
1383 | 3532 |
s := 'TRANSCRIPT_HELP' |
219 | 3533 |
]. |
3534 |
||
3535 |
aComponent == infoView ifTrue:[ |
|
1383 | 3536 |
s := 'INFOVIEW_HELP' |
219 | 3537 |
]. |
3538 |
||
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
3539 |
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
|
3540 |
(buttons notNil and:[buttons includes:aComponent]) ifTrue:[ |
1383 | 3541 |
"kludge: look for its change selector" |
3542 |
sel := aComponent changeMessage. |
|
3543 |
sel == #startSystemBrowser ifTrue:[ |
|
3544 |
s := 'SBROWSER_BUTTON_HELP' |
|
3545 |
]. |
|
3546 |
sel == #startFileBrowser ifTrue:[ |
|
3547 |
s := 'FBROWSER_BUTTON_HELP' |
|
3548 |
]. |
|
3549 |
sel == #startChangesBrowser ifTrue:[ |
|
3550 |
s := 'CBROWSER_BUTTON_HELP' |
|
3551 |
]. |
|
219 | 3552 |
]. |
3553 |
s notNil ifTrue:[ |
|
1383 | 3554 |
^ resources string:s |
219 | 3555 |
]. |
3556 |
^ nil |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
3557 |
|
921 | 3558 |
"Modified: 8.1.1997 / 14:57:34 / cg" |
219 | 3559 |
! ! |
3560 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
3561 |
!Launcher methodsFor:'infoview update'! |
219 | 3562 |
|
1257
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3563 |
showActivity:someMessage |
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3564 |
"some activityNotification to be forwarded to the user; |
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3565 |
show it in the transcript here." |
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3566 |
|
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3567 |
transcript showCR:someMessage; endEntry |
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3568 |
|
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3569 |
"Created: 23.12.1995 / 12:38:29 / cg" |
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3570 |
"Modified: 5.7.1996 / 13:13:15 / cg" |
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3571 |
! |
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3572 |
|
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3573 |
updateInfo |
921 | 3574 |
"update the infoView from the current project" |
3575 |
||
893 | 3576 |
|project projectName projectDir packageName defNameSpace msg args| |
219 | 3577 |
|
3578 |
(Project isNil or:[(project := Project current) isNil]) ifTrue:[ |
|
1383 | 3579 |
projectName := '* none *'. |
3580 |
projectDir := '.'. |
|
3581 |
packageName := '* none *'. |
|
219 | 3582 |
] ifFalse:[ |
1383 | 3583 |
projectName := project name. |
3584 |
projectDir := project directory. |
|
3585 |
packageName := project packageName. |
|
3586 |
defNameSpace := project defaultNameSpace. |
|
891 | 3587 |
]. |
3588 |
defNameSpace isNil ifTrue:[ |
|
1383 | 3589 |
defNameSpace := Smalltalk. |
219 | 3590 |
]. |
3591 |
||
893 | 3592 |
defNameSpace == Smalltalk ifTrue:[ |
1383 | 3593 |
msg := 'project: ''%1'' fileOut to: ''%3'' package: ''%2'''. |
3594 |
args := Array |
|
3595 |
with:projectName |
|
3596 |
with:packageName |
|
3597 |
with:(projectDir contractTo:30). |
|
893 | 3598 |
] ifFalse:[ |
1383 | 3599 |
msg := 'project: ''%1'' fileOut to: ''%3'' package: ''%2'' nameSpace: %4'. |
3600 |
args := Array |
|
3601 |
with:projectName |
|
3602 |
with:packageName |
|
3603 |
with:(projectDir contractTo:30) |
|
3604 |
with:defNameSpace name. |
|
893 | 3605 |
]. |
3606 |
||
1257
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3607 |
projectInfoHolder value:(resources string:msg withArgs:args) |
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3608 |
|
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3609 |
"Created: 28.7.1997 / 18:39:15 / cg" |
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
3610 |
"Modified: 28.7.1997 / 18:42:40 / cg" |
99 | 3611 |
! ! |
3612 |
||
921 | 3613 |
!Launcher methodsFor:'initialize - menus'! |
3614 |
||
3615 |
disableDangerousMenuItemsInRemoteLauncher |
|
3616 |
"if I am a remote launcher (multidisplay operation), |
|
3617 |
disable menus which are dangerous or affect common state. |
|
3618 |
These operations have to |
|
3619 |
be performed on the main screen." |
|
3620 |
||
3621 |
isMainLauncher ifFalse:[ |
|
1383 | 3622 |
(myMenu menuAt:#file) disableAll:#(snapshot snapshotAndExit objectModuleDialog exit). |
3623 |
(myMenu menuAt:#projects) disableAll. |
|
3624 |
(myMenu menuAt:#settings) disableAll:#(languageSetting viewStyleSetting fontSettings printerSettings messageSettings compilerSettings sourceAndDebuggerSettings memorySettings miscSettings saveSettings restoreSettings). |
|
921 | 3625 |
]. |
3626 |
||
3627 |
"Created: 5.7.1996 / 17:00:50 / cg" |
|
1130 | 3628 |
"Modified: 11.4.1997 / 09:19:51 / cg" |
921 | 3629 |
! |
3630 |
||
3631 |
setupAboutMenu |
|
1361 | 3632 |
<resource: #programMenu > |
3633 |
||
921 | 3634 |
"setup the about- pulldown menu" |
3635 |
||
3636 |
myMenu at:#about |
|
1383 | 3637 |
putLabels:(resources array:#( |
3638 |
'about Smalltalk/X ...' |
|
3639 |
'-' |
|
3640 |
'licence conditions' |
|
3641 |
)) |
|
3642 |
selectors:#( |
|
3643 |
#about |
|
3644 |
nil |
|
3645 |
#showLicenceConditions |
|
3646 |
) |
|
3647 |
receiver:self. |
|
921 | 3648 |
|
1361 | 3649 |
"Created: / 8.1.1997 / 14:03:20 / cg" |
3650 |
"Modified: / 29.10.1997 / 03:40:36 / cg" |
|
921 | 3651 |
! |
3652 |
||
3653 |
setupClassesMenu |
|
1361 | 3654 |
<resource: #programMenu > |
3655 |
||
1366 | 3656 |
|m| |
3657 |
||
921 | 3658 |
"setup the classes- pulldown menu" |
3659 |
||
3660 |
myMenu at:#classes |
|
1383 | 3661 |
putLabels:(resources array:#( |
3662 |
'system browser' |
|
3663 |
'class browser ...' |
|
3664 |
'full class browser ...' |
|
3665 |
'class hierarchy browser ...' |
|
3666 |
'class tree' |
|
3667 |
'-' |
|
3668 |
'implementors ...' |
|
3669 |
'senders ...' |
|
3670 |
'special' |
|
3671 |
'-' |
|
3672 |
'change browser' |
|
3673 |
)) |
|
3674 |
selectors:#( |
|
3675 |
#startSystemBrowser |
|
3676 |
#startClassBrowser |
|
3677 |
#startFullClassBrowser |
|
3678 |
#startClassHierarchyBrowser |
|
3679 |
#startClassTreeView |
|
3680 |
nil |
|
3681 |
#browseImplementors |
|
3682 |
#browseSenders |
|
3683 |
#special |
|
3684 |
nil |
|
3685 |
#startChangesBrowser |
|
3686 |
) |
|
3687 |
receiver:self. |
|
921 | 3688 |
|
1366 | 3689 |
m := myMenu menuAt:#classes. |
3690 |
m subMenuAt:#special |
|
3691 |
put:(PopUpMenu |
|
1383 | 3692 |
labels:(resources array:#( |
3693 |
'references to undeclared' |
|
3694 |
'resource methods ...' |
|
3695 |
'show break/trace points' |
|
3696 |
'-' |
|
3697 |
'remove all break/trace points' |
|
3698 |
)) |
|
3699 |
selectors:#( |
|
3700 |
#browseUndeclared |
|
3701 |
#browseResources |
|
3702 |
#browseAllBreakAndTracePoints |
|
3703 |
nil |
|
3704 |
#removeAllBreakAndTracePoints |
|
3705 |
) |
|
3706 |
). |
|
1366 | 3707 |
|
1392 | 3708 |
(JavaBrowser notNil |
3709 |
and:[JavaBrowser isLoaded]) ifTrue:[ |
|
1383 | 3710 |
(myMenu subMenuAt:#classes) |
3711 |
addLabels:(resources array:#('-' 'java browser')) |
|
3712 |
selectors:#(nil startJavaBrowser) |
|
3713 |
after:#startClassTreeView |
|
921 | 3714 |
]. |
3715 |
||
1361 | 3716 |
"Created: / 8.1.1997 / 14:05:44 / cg" |
1392 | 3717 |
"Modified: / 13.1.1998 / 09:57:46 / cg" |
921 | 3718 |
! |
3719 |
||
3720 |
setupDemoMenu |
|
3721 |
"setup the demo- pulldown menu" |
|
3722 |
||
1234
8cbd3a1ab97d
added help to resource-search dialog.
Claus Gittinger <cg@exept.de>
parents:
1220
diff
changeset
|
3723 |
<resource: #programMenu> |
1041 | 3724 |
|
921 | 3725 |
|m| |
3726 |
||
3727 |
myMenu at:#demos |
|
1383 | 3728 |
putLabels:(resources array:#( |
3729 |
'goodies' |
|
3730 |
'games' |
|
3731 |
'geometric designs' |
|
3732 |
'simple animations' |
|
3733 |
'3D graphics' |
|
3734 |
'graphic editors' |
|
3735 |
)) |
|
3736 |
selectors:#( |
|
3737 |
goodies |
|
3738 |
games |
|
3739 |
geometricDesigns |
|
3740 |
simpleAnimations |
|
3741 |
#'3Dgraphics' |
|
3742 |
#graphicEditors |
|
3743 |
) |
|
3744 |
receiver:self. |
|
921 | 3745 |
|
3746 |
" |
|
3747 |
only to show two different ways of defining a popUpMenu, |
|
3748 |
we use labels:selectors:receiver: here: |
|
3749 |
" |
|
3750 |
m := myMenu menuAt:#demos. |
|
3751 |
m subMenuAt:#games |
|
3752 |
put:(PopUpMenu |
|
1383 | 3753 |
labels:(resources array:#( |
3754 |
'Tetris' |
|
3755 |
'Tic Tac Toe' |
|
3756 |
'Tic Tac Toe (2 players)' |
|
3757 |
)) |
|
3758 |
selectors:#( |
|
3759 |
startTetris |
|
3760 |
startTicTacToe |
|
3761 |
startTicTacToe2 |
|
3762 |
) |
|
3763 |
receiver:self). |
|
921 | 3764 |
|
3765 |
" |
|
3766 |
and labels:selector:args:receiver: here: |
|
3767 |
" |
|
3768 |
m subMenuAt:#geometricDesigns |
|
3769 |
put:(PopUpMenu |
|
1383 | 3770 |
labels:(resources array:#( |
3771 |
'Pen demo' |
|
3772 |
'Commander demo' |
|
3773 |
'-' |
|
3774 |
'Fractal plants demo' |
|
3775 |
'Fractal patterns demo' |
|
3776 |
'more fractal patterns demo' |
|
3777 |
)) |
|
3778 |
selector:#openDemo: |
|
3779 |
args:#( |
|
3780 |
PenDemo |
|
3781 |
CommanderDemo |
|
3782 |
nil |
|
3783 |
FractalPlantsDemo |
|
3784 |
FractalPatternsDemo |
|
3785 |
ArmchairUniverseDemo |
|
3786 |
) |
|
3787 |
receiver:self). |
|
921 | 3788 |
|
3789 |
m subMenuAt:#simpleAnimations |
|
3790 |
put:(PopUpMenu |
|
1383 | 3791 |
labels:(resources array:#( |
3792 |
'Animation' |
|
3793 |
'Globe demo' |
|
3794 |
)) |
|
3795 |
selector:#openDemo: |
|
3796 |
args:#( |
|
3797 |
Animation |
|
3798 |
GlobeDemo |
|
3799 |
) |
|
3800 |
receiver:self). |
|
921 | 3801 |
|
3802 |
m subMenuAt:#'3Dgraphics' |
|
3803 |
put:(PopUpMenu |
|
1383 | 3804 |
labels:(resources |
3805 |
array:#( |
|
3806 |
'plane' |
|
3807 |
'tetra' |
|
3808 |
'cube (wireframe)' |
|
3809 |
'cube (solid)' |
|
3810 |
'sphere (wireframe)' |
|
3811 |
'doughnut (wireframe)' |
|
3812 |
'planet' |
|
3813 |
'teapot' |
|
3814 |
'logo' |
|
3815 |
'rubics cube' |
|
3816 |
'x/y graph' |
|
3817 |
'-' |
|
3818 |
'cube (light)' |
|
3819 |
'cube (light & texture)' |
|
3820 |
'sphere (light)' |
|
3821 |
'colored octahedron' |
|
3822 |
)) |
|
3823 |
selector:#openDemo: |
|
3824 |
args:#( |
|
3825 |
GLPlaneDemoView2 |
|
3826 |
GLTetraDemoView |
|
3827 |
GLWireCubeDemoView |
|
3828 |
GLCubeDemoView |
|
3829 |
GLWireSphereDemoView |
|
3830 |
GLDoughnutDemoView |
|
3831 |
GLPlanetDemoView |
|
3832 |
GLTeapotDemo |
|
3833 |
Logo3DView1 |
|
3834 |
RubicsCubeView |
|
3835 |
GLXYGraph |
|
3836 |
nil |
|
3837 |
GLCubeDemoView2 |
|
3838 |
GLBrickCubeDemoView |
|
3839 |
GLSphereDemoView2 |
|
3840 |
GLOctaHedronDemoView |
|
3841 |
) |
|
3842 |
receiver:self). |
|
921 | 3843 |
|
3844 |
m subMenuAt:#graphicEditors |
|
3845 |
put:(PopUpMenu |
|
1383 | 3846 |
labels:(resources array:#( |
3847 |
'DrawTool' |
|
3848 |
'LogicTool' |
|
3849 |
'Paint Demo' |
|
3850 |
)) |
|
3851 |
selector:#openDemo: |
|
3852 |
args:#( |
|
3853 |
DrawTool |
|
3854 |
LogicTool |
|
3855 |
ColorDrawDemo3 |
|
3856 |
) |
|
3857 |
receiver:self). |
|
921 | 3858 |
|
3859 |
m subMenuAt:#goodies |
|
3860 |
put:(PopUpMenu |
|
1383 | 3861 |
labels:(resources array:#( |
3862 |
'clock' |
|
3863 |
'digital clock' |
|
3864 |
'calendar' |
|
3865 |
'calculator' |
|
3866 |
'-' |
|
3867 |
'mail tool' |
|
3868 |
'news tool' |
|
3869 |
'ftp tool' |
|
3870 |
)) |
|
3871 |
selector:#openDemo: |
|
3872 |
args:#( |
|
3873 |
Clock |
|
3874 |
DigitalClockView |
|
3875 |
Calendar |
|
3876 |
CalculatorView |
|
3877 |
nil |
|
3878 |
MailView |
|
3879 |
NewsView |
|
3880 |
FTPTool |
|
3881 |
) |
|
3882 |
receiver:self). |
|
921 | 3883 |
|
1234
8cbd3a1ab97d
added help to resource-search dialog.
Claus Gittinger <cg@exept.de>
parents:
1220
diff
changeset
|
3884 |
"Modified: 3.7.1997 / 13:54:20 / cg" |
921 | 3885 |
! |
3886 |
||
3887 |
setupFileMenu |
|
1361 | 3888 |
<resource: #programMenu > |
3889 |
||
921 | 3890 |
"setup the file- pulldown menu" |
3891 |
||
3892 |
|l s| |
|
3893 |
||
3894 |
l := #( |
|
1383 | 3895 |
'file browser' |
3896 |
'-' |
|
3897 |
'modules ...' |
|
3898 |
'-' |
|
3899 |
'snapshot ...' |
|
3900 |
'snapshot & exit ...' |
|
3901 |
'exit smalltalk ...' |
|
3902 |
). |
|
921 | 3903 |
s := #( |
1383 | 3904 |
#startFileBrowser |
3905 |
nil |
|
3906 |
#objectModuleDialog |
|
3907 |
nil |
|
3908 |
#snapshot |
|
3909 |
#snapshotAndExit |
|
3910 |
#exit |
|
3911 |
). |
|
921 | 3912 |
|
3913 |
myMenu at:#file |
|
1383 | 3914 |
putLabels:(resources array:l) |
3915 |
selectors:s |
|
3916 |
receiver:self. |
|
921 | 3917 |
|
1361 | 3918 |
"Created: / 8.1.1997 / 14:04:15 / cg" |
3919 |
"Modified: / 29.10.1997 / 03:40:49 / cg" |
|
921 | 3920 |
! |
3921 |
||
3922 |
setupHelpMenu |
|
1361 | 3923 |
<resource: #programMenu > |
3924 |
||
921 | 3925 |
"setup the help- pulldown menu" |
3926 |
||
3927 |
|l s| |
|
3928 |
||
3929 |
ActiveHelp notNil ifTrue:[ |
|
1383 | 3930 |
l := #( |
3931 |
'what''s new' |
|
3932 |
'index' |
|
3933 |
'-' |
|
3934 |
'ST/X online documentation' |
|
3935 |
'class documentation' |
|
3936 |
'-' |
|
3937 |
'print documentation ...' |
|
3938 |
'-' |
|
3939 |
'active help \c' |
|
3940 |
). |
|
3941 |
s := #( |
|
3942 |
#startWhatsNewDocumentation |
|
3943 |
#startDocumentationIndex |
|
3944 |
nil |
|
3945 |
#startDocumentationTool |
|
3946 |
#startClassDocumentation |
|
3947 |
nil |
|
3948 |
#showBookPrintDocument |
|
3949 |
nil |
|
3950 |
#toggleActiveHelp: |
|
3951 |
) |
|
921 | 3952 |
] ifFalse:[ |
1383 | 3953 |
l := #( |
3954 |
'what''s new' |
|
3955 |
'index' |
|
3956 |
'-' |
|
3957 |
'ST/X online documentation' |
|
3958 |
'class documentation' |
|
3959 |
'-' |
|
3960 |
'print documentation ...' |
|
3961 |
). |
|
3962 |
s := #( |
|
3963 |
#startWhatsNewDocumentation |
|
3964 |
#startDocumentationIndex |
|
3965 |
nil |
|
3966 |
#startDocumentationTool |
|
3967 |
#startClassDocumentation |
|
3968 |
nil |
|
3969 |
#showBookPrintDocument |
|
3970 |
) |
|
921 | 3971 |
]. |
3972 |
||
3973 |
myMenu at:#help |
|
1383 | 3974 |
putLabels:(resources array:l) |
3975 |
selectors:s |
|
3976 |
receiver:self. |
|
921 | 3977 |
|
3978 |
(ActiveHelp notNil |
|
3979 |
and:[ActiveHelp isActive]) ifTrue:[ |
|
1383 | 3980 |
(myMenu menuAt:#help) checkToggleAt:#toggleActiveHelp: put:true |
921 | 3981 |
]. |
3982 |
||
1361 | 3983 |
"Created: / 8.1.1997 / 14:08:09 / cg" |
3984 |
"Modified: / 29.10.1997 / 03:40:53 / cg" |
|
921 | 3985 |
! |
3986 |
||
3987 |
setupMainMenu |
|
3988 |
"setup the pulldown menus main items. |
|
3989 |
Extracted into a separate method, to allow subclasses to |
|
3990 |
add their own entries" |
|
3991 |
||
1361 | 3992 |
<resource: #programMenu > |
3993 |
||
1351 | 3994 |
|icon| |
921 | 3995 |
|
3996 |
myMenu labels:(resources array:#( |
|
1383 | 3997 |
about |
3998 |
file |
|
3999 |
classes |
|
4000 |
tools |
|
4001 |
projects |
|
4002 |
settings |
|
4003 |
demos |
|
4004 |
help)). |
|
921 | 4005 |
" |
4006 |
if there is a bitmap, change 'about' to the ST/X icon |
|
4007 |
" |
|
4008 |
icon := self class smallAboutIcon. |
|
4009 |
icon notNil ifTrue:[ |
|
951 | 4010 |
"/ icon := icon on:device. |
1383 | 4011 |
myMenu labels at:1 put:icon. |
4012 |
myMenu height:(myMenu height max:(icon height + (View viewSpacing * 2))) |
|
921 | 4013 |
]. |
4014 |
||
4015 |
myMenu selectors:#( |
|
1383 | 4016 |
#about |
4017 |
#file |
|
4018 |
#classes |
|
4019 |
#tools |
|
4020 |
#projects |
|
4021 |
#settings |
|
4022 |
#demos |
|
4023 |
#help). |
|
921 | 4024 |
|
1361 | 4025 |
"Created: / 8.1.1997 / 13:58:50 / cg" |
4026 |
"Modified: / 29.10.1997 / 03:41:00 / cg" |
|
921 | 4027 |
! |
4028 |
||
4029 |
setupMenu |
|
4030 |
"setup the pulldown menu" |
|
4031 |
||
4032 |
|mainItems| |
|
4033 |
||
4034 |
self setupMainMenu. |
|
4035 |
||
4036 |
mainItems := myMenu selectors. |
|
4037 |
||
4038 |
(mainItems includes:#about) ifTrue:[ |
|
1383 | 4039 |
"/ if not redefined without an about-menu ... |
4040 |
self setupAboutMenu |
|
921 | 4041 |
]. |
4042 |
(mainItems includes:#file) ifTrue:[ |
|
1383 | 4043 |
"/ if not redefined without a file-menu ... |
4044 |
self setupFileMenu |
|
921 | 4045 |
]. |
4046 |
(mainItems includes:#classes) ifTrue:[ |
|
1383 | 4047 |
"/ if not redefined without a classes-menu ... |
4048 |
self setupClassesMenu |
|
921 | 4049 |
]. |
4050 |
(mainItems includes:#projects) ifTrue:[ |
|
1383 | 4051 |
"/ if not redefined without a projects-menu ... |
4052 |
self setupProjectsMenu |
|
921 | 4053 |
]. |
4054 |
(mainItems includes:#settings) ifTrue:[ |
|
1383 | 4055 |
"/ if not redefined without a settings-menu ... |
4056 |
self setupSettingsMenu |
|
921 | 4057 |
]. |
4058 |
(mainItems includes:#tools) ifTrue:[ |
|
1383 | 4059 |
"/ if not redefined without a tools-menu ... |
4060 |
self setupToolsMenu |
|
921 | 4061 |
]. |
4062 |
(mainItems includes:#demos) ifTrue:[ |
|
1383 | 4063 |
"/ if not redefined without a demos-menu ... |
4064 |
self setupDemoMenu |
|
921 | 4065 |
]. |
4066 |
(mainItems includes:#help) ifTrue:[ |
|
1383 | 4067 |
"/ if not redefined without a help-menu ... |
4068 |
self setupHelpMenu |
|
921 | 4069 |
]. |
4070 |
||
4071 |
self disableDangerousMenuItemsInRemoteLauncher |
|
4072 |
||
4073 |
"Modified: 8.1.1997 / 14:09:47 / cg" |
|
4074 |
! |
|
4075 |
||
4076 |
setupProjectsMenu |
|
4077 |
"setup the projects- pulldown menu" |
|
4078 |
||
1361 | 4079 |
<resource: #programMenu > |
4080 |
||
921 | 4081 |
myMenu at:#projects |
1383 | 4082 |
putLabels:(resources array:#( |
4083 |
'new project' |
|
4084 |
'-' |
|
4085 |
'select project ...' |
|
4086 |
)) |
|
4087 |
selectors:#( |
|
4088 |
#newProject |
|
4089 |
nil |
|
4090 |
#selectProject |
|
4091 |
) |
|
4092 |
receiver:self. |
|
921 | 4093 |
|
1361 | 4094 |
"Created: / 8.1.1997 / 14:06:18 / cg" |
4095 |
"Modified: / 29.10.1997 / 03:41:09 / cg" |
|
921 | 4096 |
! |
4097 |
||
4098 |
setupSettingsMenu |
|
4099 |
"setup the settings- pulldown menu" |
|
4100 |
||
1361 | 4101 |
<resource: #programMenu > |
4102 |
||
921 | 4103 |
myMenu at:#settings |
1383 | 4104 |
putLabels:(resources array:#( |
4105 |
'language ...' |
|
4106 |
'show keyboard mappings ...' |
|
4107 |
'view style ...' |
|
4108 |
'fonts ...' |
|
4109 |
'printer ...' |
|
4110 |
'messages ...' |
|
4111 |
'compilation ...' |
|
4112 |
'source & debugger ...' |
|
4113 |
'object memory ...' |
|
4114 |
'screen ...' |
|
4115 |
'misc ...' |
|
4116 |
'=' |
|
4117 |
'save settings ...' |
|
4118 |
'restore settings ...' |
|
4119 |
)) |
|
4120 |
selectors:#( |
|
4121 |
#languageSetting |
|
4122 |
#keyboardSetting |
|
4123 |
#viewStyleSetting |
|
4124 |
#fontSettings |
|
4125 |
#printerSettings |
|
4126 |
#messageSettings |
|
4127 |
#compilerSettings |
|
4128 |
#sourceAndDebuggerSettings |
|
4129 |
#memorySettings |
|
4130 |
#displaySettings |
|
4131 |
#miscSettings |
|
4132 |
nil |
|
4133 |
#saveSettings |
|
4134 |
#restoreSettings |
|
4135 |
) |
|
4136 |
receiver:self. |
|
921 | 4137 |
|
1361 | 4138 |
"Created: / 8.1.1997 / 14:07:00 / cg" |
4139 |
"Modified: / 29.10.1997 / 03:41:17 / cg" |
|
921 | 4140 |
! |
4141 |
||
4142 |
setupToolsMenu |
|
4143 |
"setup the tools- pulldown menu" |
|
4144 |
||
1234
8cbd3a1ab97d
added help to resource-search dialog.
Claus Gittinger <cg@exept.de>
parents:
1220
diff
changeset
|
4145 |
<resource: #programMenu> |
1041 | 4146 |
|
1251
fd81e357fa9e
added GUI builder to tools-menu
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
4147 |
|m | |
921 | 4148 |
|
4149 |
myMenu at:#tools |
|
1412
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4150 |
putLabels:(resources array:#( |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4151 |
'workspace' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4152 |
'-' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4153 |
'GUI builder' |
1421 | 4154 |
'-' |
1415 | 4155 |
'new launcher' |
1412
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4156 |
'-' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4157 |
'monitors' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4158 |
'-' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4159 |
'views' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4160 |
'-' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4161 |
'hardcopy' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4162 |
'-' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4163 |
'misc' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4164 |
)) |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4165 |
selectors:#( |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4166 |
#startWorkspace |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4167 |
nil |
1421 | 4168 |
#startGUIBuilder |
4169 |
nil |
|
1415 | 4170 |
#startNewLauncher |
1412
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4171 |
nil |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4172 |
#monitors |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4173 |
nil |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4174 |
#views |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4175 |
nil |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4176 |
#hardcopy |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4177 |
nil |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4178 |
#misc |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4179 |
) |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4180 |
receiver:self. |
921 | 4181 |
|
4182 |
||
4183 |
m := myMenu menuAt:#tools. |
|
4184 |
m subMenuAt:#monitors |
|
4185 |
put:(PopUpMenu |
|
1412
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4186 |
labels:(resources array:#( |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4187 |
'process' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4188 |
'semaphores' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4189 |
'memory' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4190 |
'irq latency' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4191 |
'event view' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4192 |
'event trace' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4193 |
'-' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4194 |
'memory usage' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4195 |
)) |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4196 |
selectors:#( |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4197 |
#startApplication: |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4198 |
#startApplication: |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4199 |
#startApplication: |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4200 |
#startApplication: |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4201 |
#startApplication: |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4202 |
#startStopEventTrace |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4203 |
nil |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4204 |
#startApplication: |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4205 |
) |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4206 |
args:#( |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4207 |
#ProcessMonitor |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4208 |
#SemaphoreMonitor |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4209 |
#MemoryMonitor |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4210 |
#InterruptLatencyMonitor |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4211 |
#EventMonitor |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4212 |
#StopEventTrace |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4213 |
nil |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4214 |
#MemoryUsageView |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4215 |
) |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4216 |
receiver:self). |
921 | 4217 |
|
4218 |
m subMenuAt:#views |
|
4219 |
put:(PopUpMenu |
|
1412
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4220 |
labels:(resources array:#( |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4221 |
'iconify all' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4222 |
'de-iconify all' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4223 |
'-' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4224 |
'find & raise ...' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4225 |
'-' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4226 |
'view tree (all views)' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4227 |
'view tree' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4228 |
'-' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4229 |
'select & inspect view' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4230 |
'-' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4231 |
'select & destroy view' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4232 |
'find & destroy ...' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4233 |
)) |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4234 |
selectors:#( |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4235 |
#iconifyAllWindows |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4236 |
#deIconifyAllWindows |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4237 |
nil |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4238 |
#findAndRaiseWindow |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4239 |
nil |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4240 |
#startFullWindowTreeView |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4241 |
#startWindowTreeView |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4242 |
nil |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4243 |
#viewInspect |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4244 |
nil |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4245 |
#viewDestroy |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4246 |
#findAndDestroyWindow |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4247 |
) |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4248 |
receiver:self). |
921 | 4249 |
|
4250 |
m subMenuAt:#misc |
|
4251 |
put:(PopUpMenu |
|
1412
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4252 |
labels:(resources array:#( |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4253 |
'garbage collect' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4254 |
'garbage collect & compress' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4255 |
)) |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4256 |
selectors:#( |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4257 |
#garbageCollect |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4258 |
#compressingGarbageCollect |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4259 |
) |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4260 |
receiver:self). |
921 | 4261 |
|
4262 |
m subMenuAt:#hardcopy |
|
4263 |
put:(PopUpMenu |
|
1412
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4264 |
labels:(resources array:#( |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4265 |
'screen' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4266 |
'area' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4267 |
'view' |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4268 |
)) |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4269 |
selectors:#( |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4270 |
#fullScreenHardcopy |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4271 |
#screenHardcopy |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4272 |
#viewHardcopy |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4273 |
) |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4274 |
receiver:self). |
921 | 4275 |
|
1366 | 4276 |
"Modified: / 31.10.1997 / 16:01:53 / cg" |
1385
4bca25dd2143
Use #startApplication: to start monitors.
Stefan Vogel <sv@exept.de>
parents:
1383
diff
changeset
|
4277 |
"Modified: / 19.12.1997 / 13:15:27 / stefan" |
921 | 4278 |
! ! |
4279 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
4280 |
!Launcher methodsFor:'initialize / release'! |
86 | 4281 |
|
219 | 4282 |
addTopViewsToCurrentProject |
4283 |
"ignored here - the launcher is always global (i.e. not project private)." |
|
4284 |
||
4285 |
^ self |
|
4286 |
! |
|
4287 |
||
4288 |
buttonPanelSpec |
|
4289 |
"return a spec for the buttons in the panel; |
|
4290 |
entries consists of selector and bitmap-filename. |
|
4291 |
nil selectors are taken as separators (see setupButtonPanel)" |
|
98 | 4292 |
|
219 | 4293 |
^ #( |
1383 | 4294 |
#(startSystemBrowser 'SBrowser32x32.xbm') |
4295 |
#(startFileBrowser 'FBrowser32x32.xbm') |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
4296 |
"/ #(startWorkspace 'Workspace32x32.xbm') |
1383 | 4297 |
#(nil nil) |
4298 |
#(startChangesBrowser 'CBrowser32x32.xbm') |
|
219 | 4299 |
"/ #(nil nil) |
4300 |
"/ #(nil nil) |
|
4301 |
"/ #(startDocumentationTool 'book11.ico') |
|
4302 |
) |
|
230 | 4303 |
|
4304 |
"Created: 4.12.1995 / 20:16:18 / cg" |
|
490 | 4305 |
"Modified: 19.4.1996 / 16:37:46 / cg" |
219 | 4306 |
! |
4307 |
||
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4308 |
closeDownViews |
1024 | 4309 |
OpenLaunchers removeIdentical:self ifAbsent:nil. |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4310 |
super closeDownViews. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4311 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4312 |
"Created: 5.7.1996 / 13:33:36 / cg" |
1024 | 4313 |
"Modified: 1.2.1997 / 12:07:53 / cg" |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4314 |
! |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4315 |
|
219 | 4316 |
closeRequest |
4317 |
(self confirm:(resources string:'really close %1 ?' with:self class name)) ifTrue:[ |
|
1383 | 4318 |
super closeRequest |
219 | 4319 |
] |
4320 |
! |
|
4321 |
||
4322 |
focusSequence |
|
4323 |
^ (Array with:myMenu) |
|
4324 |
, |
|
4325 |
(buttonPanel subViews select:[:element | element isKindOf:Button]) |
|
4326 |
"/ , (Array with:Transcript) |
|
98 | 4327 |
! |
4328 |
||
93 | 4329 |
openInterface |
98 | 4330 |
"sent by my superclass to open up my interface" |
93 | 4331 |
|
1459
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4332 |
^ self openInterfaceAt:nil |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4333 |
|
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4334 |
"Modified: / 5.2.1998 / 19:57:39 / cg" |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4335 |
! |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4336 |
|
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4337 |
openInterfaceAt:aPoint |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4338 |
"sent by my superclass to open up my interface" |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4339 |
|
951 | 4340 |
|top icn w sz| |
86 | 4341 |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4342 |
"/ 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
|
4343 |
"/ 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
|
4344 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4345 |
Transcript notNil ifTrue:[ |
1459
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4346 |
Transcript ~~ Stderr ifTrue:[ |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4347 |
isMainLauncher := (Transcript graphicsDevice == device). |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4348 |
] ifFalse:[ |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4349 |
isMainLauncher := true |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4350 |
] |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4351 |
] ifFalse:[ |
1459
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4352 |
isMainLauncher := true |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4353 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4354 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4355 |
top := StandardSystemView onDevice:device. |
205 | 4356 |
top label:'Smalltalk/X'; iconLabel:'ST/X Launcher'. |
86 | 4357 |
top extent:(400@300 ). |
1459
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4358 |
aPoint notNil ifTrue:[ |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4359 |
top origin:aPoint |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4360 |
]. |
86 | 4361 |
|
615 | 4362 |
icn := self class aboutIcon. |
686 | 4363 |
icn notNil ifTrue:[ |
1459
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4364 |
icn := icn magnifiedTo:(sz := device preferredIconSize). |
686 | 4365 |
]. |
616 | 4366 |
|
1305 | 4367 |
icn notNil ifTrue:[ |
1459
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4368 |
(device supportsDeepIcons not |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4369 |
and:[device supportsIconViews |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4370 |
and:[device depth > 1]]) ifTrue:[ |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4371 |
w := View extent:sz. |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4372 |
w viewBackground:icn. |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4373 |
top iconView:w |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4374 |
] ifFalse:[ |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4375 |
top icon:icn. |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4376 |
] |
616 | 4377 |
]. |
615 | 4378 |
|
951 | 4379 |
"/ device supportsDeepIcons ifTrue:[ |
615 | 4380 |
"/ icn := self class aboutIcon. |
4381 |
"/ icn notNil ifTrue:[ |
|
951 | 4382 |
"/ icn := icn magnifiedTo:(sz := device preferredIconSize). |
615 | 4383 |
"/ icn := Depth8Image fromImage:icn. |
4384 |
"/ top icon:icn |
|
4385 |
"/ ]. |
|
4386 |
||
4387 |
"/ ] ifFalse:[ |
|
951 | 4388 |
"/ device supportsIconViews ifTrue:[ |
615 | 4389 |
"/ icn := self class aboutIcon. |
4390 |
"/ icn notNil ifTrue:[ |
|
951 | 4391 |
"/ icn := icn magnifiedTo:(sz := device preferredIconSize). |
615 | 4392 |
"/ w := View extent:sz. |
4393 |
"/ w viewBackground:icn. |
|
4394 |
"/ top iconView:w |
|
4395 |
"/ ]. |
|
4396 |
"/ ] |
|
4397 |
"/ ]. |
|
92 | 4398 |
|
93 | 4399 |
self setupViewsIn:top. |
98 | 4400 |
|
4401 |
top application:self. |
|
86 | 4402 |
|
4403 |
" |
|
92 | 4404 |
open with higher prio to allow interaction even while things |
4405 |
are running ... |
|
86 | 4406 |
" |
92 | 4407 |
top openWithPriority:(Processor userSchedulingPriority + 1). |
490 | 4408 |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4409 |
OpenLaunchers isNil ifTrue:[ |
1459
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4410 |
OpenLaunchers := OrderedCollection new. |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4411 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4412 |
OpenLaunchers add:self. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4413 |
|
1459
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4414 |
^ builder |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4415 |
|
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4416 |
"Created: / 5.2.1998 / 19:43:44 / cg" |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4417 |
"Modified: / 5.2.1998 / 20:08:58 / cg" |
93 | 4418 |
! |
86 | 4419 |
|
219 | 4420 |
release |
1024 | 4421 |
OpenLaunchers removeIdentical:self ifAbsent:nil. |
219 | 4422 |
super release |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4423 |
|
1257
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
4424 |
"Modified: 28.7.1997 / 18:40:55 / cg" |
86 | 4425 |
! |
4426 |
||
219 | 4427 |
restarted |
4428 |
"image restart - since WindowGroup recreates the process with |
|
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
4429 |
the default priority, we have to raise the prio again. |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
4430 |
Mhmh - this looks like a bug to me ... |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
4431 |
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
|
4432 |
be reset to normal." |
86 | 4433 |
|
219 | 4434 |
Processor activeProcess priority:(Processor userSchedulingPriority + 1). |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
4435 |
|
219 | 4436 |
super restarted |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
4437 |
|
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
4438 |
"Modified: 1.6.1996 / 16:58:25 / cg" |
86 | 4439 |
! |
4440 |
||
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4441 |
saveAndTerminateRequest |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4442 |
"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
|
4443 |
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
|
4444 |
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
|
4445 |
we are already prepared for this ;-)" |
86 | 4446 |
|
219 | 4447 |
self snapshot. |
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4448 |
super saveAndTerminateRequest |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4449 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4450 |
"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
|
4451 |
"Modified: 5.7.1996 / 13:08:55 / cg" |
103 | 4452 |
! |
4453 |
||
86 | 4454 |
setupButtonPanelIn:aTopView |
4455 |
"create the buttonPanel" |
|
4456 |
||
368 | 4457 |
|spc mh buttonSize| |
86 | 4458 |
|
4459 |
spc := View viewSpacing // 2. |
|
4460 |
buttonPanel := HorizontalPanelView in:aTopView. |
|
4461 |
buttonPanel level:-1; borderWidth:0. |
|
4462 |
buttonPanel horizontalLayout:#leftSpace. |
|
1106
650465f9b173
read offered screen resolution list from resource file.
Claus Gittinger <cg@exept.de>
parents:
1105
diff
changeset
|
4463 |
"/ buttonPanel verticalLayout:#centerSpace. |
86 | 4464 |
|
368 | 4465 |
buttonSize := self class buttonImageSize. |
4466 |
||
490 | 4467 |
"/ |
4468 |
"/ the buttonSpec is a collection of: |
|
4469 |
"/ #( selector iconFileName ) |
|
4470 |
"/ or: |
|
4471 |
"/ #( selector (className iconQuerySelector) ) |
|
4472 |
"/ or" |
|
4473 |
"/ #( nil ) |
|
4474 |
"/ |
|
90 | 4475 |
self buttonPanelSpec do:[:entry | |
1383 | 4476 |
|sel b sep img iconSpec v| |
4477 |
||
4478 |
sel := entry at:1. |
|
4479 |
sel isNil ifTrue:[ |
|
4480 |
sep := View in:buttonPanel. |
|
4481 |
sep extent:32@1; borderWidth:0. |
|
4482 |
] ifFalse:[ |
|
4483 |
iconSpec := entry at:2. |
|
4484 |
iconSpec isArray ifTrue:[ |
|
4485 |
img := (Smalltalk classNamed:(iconSpec at:1)) perform:(iconSpec at:2). |
|
4486 |
] ifFalse:[ |
|
4487 |
img := Image fromFile:iconSpec. |
|
4488 |
]. |
|
4489 |
(img notNil and:[buttonSize notNil]) ifTrue:[ |
|
4490 |
img extent ~= buttonSize ifTrue:[ |
|
4491 |
img := img magnifiedTo:buttonSize |
|
4492 |
] |
|
4493 |
]. |
|
4494 |
||
4495 |
b := Button new. |
|
4496 |
b form:img. |
|
4497 |
b model:self; changeMessage:sel. |
|
4498 |
||
4499 |
b styleSheet name = 'win95' ifTrue:[ |
|
4500 |
||
4501 |
false ifTrue:[ |
|
4502 |
"/ make buttons flat, popping up when entered ... |
|
4503 |
||
4504 |
b enterLevel: 1. |
|
4505 |
b leaveLevel: 0. |
|
4506 |
buttonPanel addSubView:b. |
|
4507 |
||
4508 |
] ifFalse:[ |
|
4509 |
"/ make buttons flat, but given them a 3D frame ... |
|
4510 |
||
4511 |
v := View in:buttonPanel. |
|
4512 |
v addSubView:b. |
|
4513 |
v level:-1. |
|
4514 |
b passiveLevel:1; activeLevel:-1. |
|
4515 |
v extent:(b preferredExtent |
|
4516 |
+ b borderWidth + b borderWidth |
|
4517 |
+ b margin + b margin |
|
4518 |
+ v margin + v margin). |
|
4519 |
v preferredExtent:v extent. |
|
4520 |
b origin:(v margin asPoint). |
|
4521 |
]. |
|
4522 |
b enteredBackgroundColor:(Color grey:80). |
|
4523 |
] ifFalse:[ |
|
4524 |
buttonPanel addSubView:b. |
|
4525 |
]. |
|
4526 |
] |
|
86 | 4527 |
]. |
4528 |
||
100 | 4529 |
mh := myMenu height. |
4530 |
buttonPanel origin:0.0 @ (mh + spc) |
|
1383 | 4531 |
corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)). |
86 | 4532 |
|
4533 |
buttonPanel leftInset:spc; rightInset:spc. |
|
490 | 4534 |
|
1167 | 4535 |
"Modified: 26.4.1997 / 21:02:39 / cg" |
86 | 4536 |
! |
4537 |
||
219 | 4538 |
setupInfoViewIn:topView |
921 | 4539 |
"create the infoView" |
4540 |
||
219 | 4541 |
|spc halfSpc| |
4542 |
||
4543 |
spc := View viewSpacing. |
|
4544 |
infoView := Label label:'' in:topView. |
|
4545 |
infoView adjust:#left; borderWidth:0. |
|
4546 |
infoView level:-1. |
|
4547 |
transcript superView bottomInset:(infoView height + spc). |
|
90 | 4548 |
|
219 | 4549 |
infoView is3D ifTrue:[ |
1383 | 4550 |
halfSpc := spc // 2. |
219 | 4551 |
] ifFalse:[ |
1383 | 4552 |
halfSpc := 0 |
219 | 4553 |
]. |
4554 |
infoView topInset:(infoView height negated - spc + transcript borderWidth); |
|
1383 | 4555 |
bottomInset:halfSpc; |
4556 |
leftInset:halfSpc; |
|
4557 |
rightInset:halfSpc. |
|
219 | 4558 |
infoView origin:0.0 @ 1.0 corner:1.0 @ 1.0. |
1257
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
4559 |
projectInfoHolder := '' asValue. |
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
4560 |
infoView labelChannel:projectInfoHolder. |
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
4561 |
self updateInfo. |
219 | 4562 |
|
4563 |
Project notNil ifTrue:[ |
|
1383 | 4564 |
Project addDependent:self. |
219 | 4565 |
] |
4566 |
||
4567 |
" |
|
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
4568 |
Launcher open |
219 | 4569 |
" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
4570 |
|
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
4571 |
"Modified: 9.9.1996 / 22:44:15 / stefan" |
1257
672d8110c8a3
use a valueHolder for the projectInfo
Claus Gittinger <cg@exept.de>
parents:
1252
diff
changeset
|
4572 |
"Modified: 28.7.1997 / 18:42:30 / cg" |
93 | 4573 |
! |
4574 |
||
219 | 4575 |
setupOtherViewsIn:aTopView |
4576 |
"a hook - allows redefinition in your personal subclass. |
|
4577 |
For example, add a clock:" |
|
4578 |
||
4579 |
" |
|
4580 |
|sz clock space halfSpace| |
|
4581 |
||
4582 |
sz := buttonPanel innerHeight - (buttonPanel level abs*2). |
|
4583 |
space := View viewSpacing. |
|
4584 |
halfSpace := space // 2. |
|
93 | 4585 |
|
219 | 4586 |
buttonPanel rightInset:sz+(space * 2). |
93 | 4587 |
|
219 | 4588 |
clock := ClockView in:buttonPanel topView. |
4589 |
clock borderWidth:1. |
|
4590 |
clock showSeconds:false. |
|
4591 |
clock extent:(sz @ sz). |
|
4592 |
clock origin:(1.0 @ (buttonPanel origin y + halfSpace)). |
|
4593 |
clock leftInset:sz negated - 2 - halfSpace. |
|
4594 |
clock rightInset:halfSpace. |
|
4595 |
clock level:1. |
|
4596 |
" |
|
93 | 4597 |
! |
4598 |
||
219 | 4599 |
setupTranscriptIn:aView |
921 | 4600 |
"create the transcript view" |
4601 |
||
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4602 |
|v launcher| |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4603 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4604 |
"/ 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
|
4605 |
"/ if so, do not close the real launcher. |
107 | 4606 |
|
219 | 4607 |
(Transcript notNil and:[Transcript ~~ Stderr]) ifTrue:[ |
1412
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4608 |
isMainLauncher ifTrue:[ |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4609 |
launcher := Transcript topView application |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4610 |
] ifFalse:[ |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4611 |
launcher := self class current. |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4612 |
(launcher isNil and: [NewLauncher notNil]) ifTrue: [launcher := NewLauncher current]. |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4613 |
]. |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4614 |
|
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4615 |
launcher notNil ifTrue:[ |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4616 |
launcher window graphicsDevice == device ifTrue:[ |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4617 |
OpenLaunchers removeIdentical:launcher ifAbsent:nil. |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4618 |
launcher class = NewLauncher |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4619 |
ifTrue: [launcher close] |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4620 |
ifFalse: [launcher window destroy] |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4621 |
] |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4622 |
] |
110 | 4623 |
]. |
4624 |
||
219 | 4625 |
v := HVScrollableView |
1412
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4626 |
for:TextCollector |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4627 |
miniScrollerH:true |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4628 |
miniScrollerV:false |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4629 |
in:aView. |
93 | 4630 |
|
219 | 4631 |
v origin:(0.0 @ (buttonPanel corner y + View viewSpacing)) |
4632 |
corner:(1.0 @ 1.0). |
|
4633 |
transcript := v scrolledView. |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4634 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4635 |
isMainLauncher ifTrue:[ |
1412
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4636 |
transcript beTranscript. |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4637 |
] ifFalse:[ |
1412
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4638 |
transcript showCR:'**************** Notice ***********************'. |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4639 |
transcript showCR:'** this is NOT the Transcript **'. |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4640 |
transcript showCR:'** The real Transcript is on the main screen **'. |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4641 |
transcript showCR:'** **'. |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4642 |
transcript showCR:'** Menus affecting common state are disabled **'. |
11c2404545c3
complete (hopefully) support to toggle between old and new launcher
tz
parents:
1402
diff
changeset
|
4643 |
transcript showCR:'***********************************************'. |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4644 |
] |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
4645 |
|
1024 | 4646 |
"Modified: 1.2.1997 / 12:08:01 / cg" |
94 | 4647 |
! |
4648 |
||
219 | 4649 |
setupViewsIn:topView |
4650 |
"create the pulldown menu, buttonPanel and transcript view" |
|
86 | 4651 |
|
219 | 4652 |
|tFont| |
131 | 4653 |
|
219 | 4654 |
topView model:self. |
86 | 4655 |
|
219 | 4656 |
myMenu := PullDownMenu in:topView. |
4657 |
myMenu origin:0.0 @ 0.0 corner:(1.0 @ myMenu height). |
|
86 | 4658 |
|
219 | 4659 |
self setupMenu. |
4660 |
self setupButtonPanelIn:topView. |
|
4661 |
self setupTranscriptIn:topView. |
|
4662 |
self setupInfoViewIn:topView. |
|
4663 |
self setupOtherViewsIn:topView. |
|
118 | 4664 |
|
219 | 4665 |
tFont := transcript font. |
4666 |
topView extent:(((tFont widthOf:'3')*60) max:myMenu preferredExtent x) |
|
1383 | 4667 |
@ |
4668 |
((tFont height) * 20). |
|
118 | 4669 |
|
219 | 4670 |
" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
4671 |
Launcher open |
219 | 4672 |
" |
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
4673 |
|
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
4674 |
"Modified: 9.9.1996 / 22:44:31 / stefan" |
86 | 4675 |
! ! |
4676 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
4677 |
!Launcher methodsFor:'private'! |
86 | 4678 |
|
1351 | 4679 |
changeViewStyleTo:newStyle |
4680 |
newStyle notNil ifTrue:[ |
|
1383 | 4681 |
self withWaitCursorDo:[ |
4682 |
transcript showCR:'change style to ' , newStyle , ' ...'. |
|
4683 |
View defaultStyle:newStyle asSymbol. |
|
4684 |
]. |
|
4685 |
self reopenLauncher. |
|
4686 |
DebugView newDebugger. |
|
1351 | 4687 |
] |
4688 |
||
4689 |
"Created: 20.10.1997 / 15:28:10 / cg" |
|
4690 |
! |
|
4691 |
||
1347 | 4692 |
findWindow:title |
921 | 4693 |
"a helper for find & destroy and find & raise operations; |
4694 |
let user choose a view and return it; return nil on cancel" |
|
4695 |
||
4696 |
|knownTopViews nameList box| |
|
4697 |
||
4698 |
knownTopViews := IdentitySet new. |
|
4699 |
Screen allScreens do:[:aScreen | |
|
1383 | 4700 |
aScreen knownViews do:[:aView | |
4701 |
|top showIt wg| |
|
4702 |
||
4703 |
aView notNil ifTrue:[ |
|
4704 |
top := aView topView. |
|
4705 |
(top isKindOf:DebugView) ifTrue:[ |
|
4706 |
"/ although modal, show it. |
|
4707 |
showIt := top realized |
|
4708 |
] ifFalse:[ |
|
4709 |
wg := top windowGroup. |
|
4710 |
showIt := (wg notNil and:[wg isModal not]). |
|
4711 |
]. |
|
4712 |
showIt ifTrue:[ |
|
4713 |
knownTopViews add:top |
|
4714 |
] |
|
4715 |
] |
|
4716 |
] |
|
921 | 4717 |
]. |
4718 |
||
4719 |
knownTopViews := knownTopViews asOrderedCollection. |
|
1108
75a3e4f9a21a
care for non-labeled views in #findWindow
Claus Gittinger <cg@exept.de>
parents:
1106
diff
changeset
|
4720 |
knownTopViews sort:[:v1 :v2 | |l1 l2| |
1383 | 4721 |
l1 := v1 label ? 'aView'. |
4722 |
l2 := v2 label ? 'aView'. |
|
4723 |
l1 < l2 |
|
4724 |
]. |
|
921 | 4725 |
nameList := knownTopViews collect:[:v | |
1383 | 4726 |
|isDead wg p l| |
4727 |
||
4728 |
l := v label ? 'aView'. |
|
4729 |
((wg := v windowGroup) notNil |
|
4730 |
and:[(p := wg process) notNil |
|
4731 |
and:[p state ~~ #dead]]) ifTrue:[ |
|
4732 |
l |
|
4733 |
] ifFalse:[ |
|
4734 |
l , ' (dead ?)' |
|
4735 |
] |
|
4736 |
]. |
|
921 | 4737 |
|
4738 |
box := ListSelectionBox new. |
|
4739 |
box noEnterField. |
|
4740 |
box list:nameList. |
|
4741 |
box label:(resources string:'view selection'). |
|
1347 | 4742 |
box title:(resources string:title) withCRs. |
921 | 4743 |
box action:[:selection | |
1383 | 4744 |
|v idx| |
4745 |
||
4746 |
(idx := box selectionIndex) notNil ifTrue:[ |
|
4747 |
v := knownTopViews at:idx. |
|
4748 |
]. |
|
4749 |
box destroy. |
|
4750 |
^ v |
|
921 | 4751 |
]. |
4752 |
box extent:400@300. |
|
4753 |
box showAtPointer. |
|
4754 |
^ nil |
|
4755 |
||
1357 | 4756 |
"Created: / 14.10.1997 / 11:24:42 / cg" |
4757 |
"Modified: / 27.10.1997 / 04:41:08 / cg" |
|
921 | 4758 |
! |
4759 |
||
406 | 4760 |
fontBoxForEncoding:encodingMatch |
921 | 4761 |
"open a fontBox, showing fonts which match some encoding |
4762 |
(used when changing to japanese ...)" |
|
4763 |
||
742
2ef5e22d8983
code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents:
740
diff
changeset
|
4764 |
|box y b |
406 | 4765 |
labelDef buttonDef listDef menuDef textDef |
4766 |
models labels allOfThem filter| |
|
4767 |
||
4768 |
encodingMatch notNil ifTrue:[ |
|
1383 | 4769 |
filter := [:f | f encoding notNil |
4770 |
and:[encodingMatch match:f encoding]]. |
|
406 | 4771 |
]. |
4772 |
||
4773 |
models := OrderedCollection new. |
|
4774 |
labels := OrderedCollection new. |
|
4775 |
||
4776 |
models add:(allOfThem := nil asValue). |
|
4777 |
models add:(labelDef := Label defaultFont asValue). |
|
4778 |
models add:(buttonDef := Button defaultFont asValue). |
|
4779 |
models add:(listDef := SelectionInListView defaultFont asValue). |
|
4780 |
models add:(menuDef := MenuView defaultFont asValue). |
|
4781 |
models add:(textDef := TextView defaultFont asValue). |
|
4782 |
||
4783 |
box := Dialog new. |
|
4784 |
box label:(resources string:'Font settings'). |
|
4785 |
||
4786 |
models |
|
4787 |
with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text')) |
|
4788 |
do:[:model :title | |
|
1383 | 4789 |
|y2 lbl f i| |
4790 |
||
4791 |
f := model value. |
|
4792 |
||
4793 |
(box addTextLabel:title) adjust:#left. |
|
4794 |
||
4795 |
y := box yPosition. |
|
4796 |
b := box addComponent:(Button label:(resources string:'change ...')) tabable:true. |
|
4797 |
b relativeExtent:nil; extent:(b preferredExtent). |
|
4798 |
y2 := box yPosition. |
|
4799 |
box yPosition:y. |
|
4800 |
i := box leftIndent. |
|
4801 |
box leftIndent:(b widthIncludingBorder + View viewSpacing). |
|
4802 |
(lbl := box addTextLabel:'') |
|
4803 |
adjust:#left; |
|
4804 |
font:(model value); |
|
4805 |
labelChannel:(BlockValue |
|
4806 |
with:[:v | |f| |
|
4807 |
f := v value. |
|
4808 |
f isNil ifTrue:[ |
|
4809 |
'' |
|
4810 |
] ifFalse:[ |
|
4811 |
f userFriendlyName |
|
4812 |
] |
|
4813 |
] |
|
4814 |
argument:model). |
|
4815 |
labels add:lbl. |
|
4816 |
||
4817 |
box leftIndent:i. |
|
4818 |
box yPosition:(box yPosition max:y2). |
|
1492 | 4819 |
|
4820 |
box addVerticalSpace; addHorizontalLine; addVerticalSpace. |
|
1383 | 4821 |
|
4822 |
b action:[ |
|
4823 |
|f| |
|
4824 |
||
4825 |
f := FontPanel |
|
4826 |
fontFromUserInitial:(model value) |
|
4827 |
title:(resources string:'font for %1' with:title) |
|
4828 |
filter:filter. |
|
4829 |
f notNil ifTrue:[ |
|
4830 |
model == allOfThem ifTrue:[ |
|
4831 |
models do:[:m | m value:f]. |
|
4832 |
labels do:[:l | l font:f] |
|
4833 |
] ifFalse:[ |
|
4834 |
model value:f. |
|
4835 |
lbl font:f. |
|
4836 |
]. |
|
4837 |
] |
|
4838 |
]. |
|
4839 |
model == allOfThem ifTrue:[ |
|
4840 |
box addVerticalSpace |
|
4841 |
] |
|
406 | 4842 |
]. |
4843 |
||
4844 |
box addAbortButton; addOkButton. |
|
4845 |
(box addButton:(Button label:(resources string:'defaults')) before:nil) |
|
1383 | 4846 |
action:[ |
4847 |
"/ fetch defaults |
|
4848 |
View updateAllStyleCaches. |
|
4849 |
labelDef value: Label defaultFont. |
|
4850 |
buttonDef value: Button defaultFont. |
|
4851 |
listDef value: SelectionInListView defaultFont. |
|
4852 |
menuDef value: MenuView defaultFont. |
|
4853 |
textDef value: TextView defaultFont. |
|
4854 |
]. |
|
406 | 4855 |
|
4856 |
box open. |
|
4857 |
box accepted ifTrue:[ |
|
1383 | 4858 |
Label defaultFont:labelDef value. |
4859 |
Button defaultFont:buttonDef value. |
|
4860 |
Toggle defaultFont:buttonDef value. |
|
4861 |
SelectionInListView defaultFont:listDef value. |
|
4862 |
MenuView defaultFont:menuDef value. |
|
4863 |
PullDownMenu defaultFont:menuDef value. |
|
4864 |
TextView defaultFont:textDef value. |
|
4865 |
EditTextView defaultFont:textDef value. |
|
4866 |
CodeView defaultFont:textDef value. |
|
406 | 4867 |
]. |
592
5a03a69bc5a3
oops - menuAction is now called with arg if there is one
Claus Gittinger <cg@exept.de>
parents:
591
diff
changeset
|
4868 |
box destroy. |
406 | 4869 |
^ box accepted |
4870 |
||
4871 |
"Created: 27.2.1996 / 01:44:16 / cg" |
|
631
76013574eb04
Settings.Fonts menu: Add ... to Change button labels.
Stefan Vogel <sv@exept.de>
parents:
630
diff
changeset
|
4872 |
"Modified: 17.6.1996 / 13:38:48 / stefan" |
921 | 4873 |
"Modified: 8.1.1997 / 14:59:11 / cg" |
406 | 4874 |
! |
4875 |
||
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4876 |
openApplication:className nameSpace:aNameSpace |
921 | 4877 |
"open some application, given the classes name. |
4878 |
Look for it in Smalltalk and the given nameSpace" |
|
4879 |
||
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4880 |
self openApplication:className nameSpace:aNameSpace with:#open |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4881 |
|
921 | 4882 |
"Modified: 8.1.1997 / 14:59:42 / cg" |
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4883 |
! |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4884 |
|
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4885 |
openApplication:className nameSpace:aNameSpace with:aSelector |
921 | 4886 |
"open some application, given the classes name. |
4887 |
Look for it in Smalltalk and the given nameSpace" |
|
4888 |
||
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4889 |
|cls| |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4890 |
|
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4891 |
cls := Smalltalk at:className asSymbol. |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4892 |
cls isNil ifTrue:[ |
1383 | 4893 |
"/ look if its in the nameSpace |
4894 |
aNameSpace notNil ifTrue:[ |
|
4895 |
cls := aNameSpace at:className asSymbol |
|
4896 |
] |
|
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4897 |
]. |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4898 |
|
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4899 |
cls isNil ifTrue:[ |
1383 | 4900 |
self warn:(resources string:'Sorry, the %1 class is not available.' with:className). |
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4901 |
] ifFalse:[ |
1383 | 4902 |
Autoload autoloadFailedSignal handle:[:ex | |
4903 |
self warn:(resources string:'Sorry, the %1 class seems to be not available.' with:className) |
|
4904 |
] do:[ |
|
4905 |
cls perform:aSelector |
|
4906 |
] |
|
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4907 |
] |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4908 |
|
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4909 |
"Created: 8.1.1997 / 12:52:13 / cg" |
921 | 4910 |
"Modified: 8.1.1997 / 14:59:47 / cg" |
920
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4911 |
! |
2b66e8759af5
look in some other namespace for demos & goodies
Claus Gittinger <cg@exept.de>
parents:
919
diff
changeset
|
4912 |
|
219 | 4913 |
pickAView |
921 | 4914 |
"let user pick a view and return it" |
4915 |
||
219 | 4916 |
|v| |
4917 |
||
4918 |
(Delay forSeconds:1) wait. |
|
4919 |
v := Screen current viewFromUser. |
|
4920 |
v isNil ifTrue:[ |
|
1383 | 4921 |
self warn:'Sorry, this is not a smalltalk view'. |
4922 |
^ nil |
|
219 | 4923 |
]. |
4924 |
^ v |
|
921 | 4925 |
|
1351 | 4926 |
"Created: 19.10.1997 / 03:04:53 / cg" |
4927 |
"Modified: 19.10.1997 / 03:42:00 / cg" |
|
219 | 4928 |
! |
4929 |
||
106 | 4930 |
reopenLauncher |
921 | 4931 |
"reopen a new launcher. |
4932 |
for now (since style & language settings currently do |
|
106 | 4933 |
not affect living views ...)" |
4934 |
||
1459
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4935 |
|contents fontPref enc builder newLauncher| |
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
4936 |
|
777
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
4937 |
"/ moved the stuff below to the language-setting |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
4938 |
"/ dialog (ask before changing the language, to have |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
4939 |
"/ proper texts in the dialogs). |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
4940 |
"/ |
1465 | 4941 |
"/ fontPref := self class classResources at:'PREFERRED_FONT_ENCODING' default:'iso8859*'. |
777
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
4942 |
"/ enc := MenuView defaultFont encoding. |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
4943 |
"/ (fontPref match:enc) ifFalse:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
4944 |
"/ (self confirm:'menu font is not ' , fontPref , '-encoded.\\Change it ?' withCRs) |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
4945 |
"/ ifTrue:[ |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
4946 |
"/ self fontBoxForEncoding:fontPref |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
4947 |
"/ ] |
f00fc8691802
check for required font encoding BEFORE changing the
Claus Gittinger <cg@exept.de>
parents:
776
diff
changeset
|
4948 |
"/ ]. |
106 | 4949 |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4950 |
contents := transcript endEntry; list. |
1459
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4951 |
builder := self class openAt:(self window origin). |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4952 |
builder window waitUntilVisible. |
b15dfcd25441
start newLauncher at same position as oldLauncher;
Claus Gittinger <cg@exept.de>
parents:
1458
diff
changeset
|
4953 |
newLauncher := builder application. |
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4954 |
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
|
4955 |
|
1465 | 4956 |
"Modified: / 6.2.1998 / 00:00:45 / cg" |
106 | 4957 |
! |
4958 |
||
100 | 4959 |
saveAllViews |
86 | 4960 |
"tell each topview that we are going to terminate and give it chance |
4961 |
to save its contents." |
|
4962 |
||
4963 |
ObjectMemory changed:#aboutToExit |
|
4964 |
! |
|
4965 |
||
93 | 4966 |
saveScreenImage:anImage defaultName:defaultName |
4967 |
"save an image into a file |
|
4968 |
- ask user for filename using a fileSelectionBox." |
|
4969 |
||
4970 |
|fileName| |
|
4971 |
||
4972 |
fileName := Dialog |
|
1383 | 4973 |
requestFileName:(resources string:'save image in:') |
4974 |
default:(defaultName , '.tiff') |
|
4975 |
ok:(resources string:'save') |
|
4976 |
abort:(resources string:'cancel') |
|
4977 |
pattern:'*.tiff'. |
|
93 | 4978 |
|
4979 |
fileName notNil ifTrue:[ |
|
1383 | 4980 |
anImage saveOn:fileName |
93 | 4981 |
]. |
382 | 4982 |
|
4983 |
"Modified: 21.2.1996 / 13:09:28 / cg" |
|
86 | 4984 |
! ! |
4985 |
||
715
476b5b4d0dd0
Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents:
711
diff
changeset
|
4986 |
!Launcher methodsFor:'queries'! |
90 | 4987 |
|
219 | 4988 |
processName |
4989 |
"for monitors only - my name" |
|
142 | 4990 |
|
219 | 4991 |
^ '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
|
4992 |
! |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4993 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4994 |
transcript |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4995 |
"my transcript" |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4996 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4997 |
^ transcript |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4998 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
4999 |
"Created: 5.7.1996 / 13:04:36 / cg" |
90 | 5000 |
! ! |
5001 |
||
760 | 5002 |
!Launcher class methodsFor:'documentation'! |
86 | 5003 |
|
219 | 5004 |
version |
1578 | 5005 |
^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.323 1998-04-23 09:43:05 cg Exp $' |
86 | 5006 |
! ! |