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