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