4226
|
1 |
"{ Package: 'stx:libtool' }"
|
|
2 |
|
|
3 |
ApplicationModel subclass:#AbstractSettingsApplication
|
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'Interface-Smalltalk'
|
|
8 |
!
|
|
9 |
|
4286
|
10 |
AbstractSettingsApplication subclass:#CommunicationSettingsAppl
|
|
11 |
instanceVariableNames:'modifiedChannel'
|
|
12 |
classVariableNames:''
|
|
13 |
poolDictionaries:''
|
|
14 |
privateIn:AbstractSettingsApplication
|
|
15 |
!
|
|
16 |
|
|
17 |
AbstractSettingsApplication subclass:#CompilerSettingsAppl
|
|
18 |
instanceVariableNames:'modifiedChannel stcCompilationSelection catchMethodRedefs
|
|
19 |
allowQualifiedNames warnDollar warnOldStyle stcCompilation
|
|
20 |
fullDebugSupport warnCommonMistakes warnUnderscore keepSource
|
|
21 |
constantFolding fullHistoryUpdate warnCompatibility
|
|
22 |
constantFoldingOptions historyLines warnings warnSTX allowDollar
|
|
23 |
allowReservedWordsAsSelectors immutableArrays
|
|
24 |
allowOldStyleAssignment compileLazy allowUnderscore
|
|
25 |
allowDolphinExtensions warnUnusedVars keepSourceSelection
|
|
26 |
allowSqueakExtensions loadBinaries justInTimeCompilation
|
|
27 |
canLoadBinaries constantFoldingSelection stcCompilationList
|
|
28 |
catchClassRedefs stcCompilerSettings enableUnderscore
|
|
29 |
enableDollar'
|
|
30 |
classVariableNames:''
|
|
31 |
poolDictionaries:''
|
|
32 |
privateIn:AbstractSettingsApplication
|
|
33 |
!
|
|
34 |
|
|
35 |
AbstractSettingsApplication subclass:#DisplaySettingsAppl
|
|
36 |
instanceVariableNames:'modifiedChannel isColorMonitor useFixGrayPaletteLabel
|
|
37 |
useFixPalette sizeY clipEncodingListSelection sizeX monitorList
|
|
38 |
ditherList clipEncodingList ditherListSelection deepIcons
|
|
39 |
monitorSelection useFixPaletteLabel visualIsPseudoColor
|
|
40 |
ditherSymsNotNil useFixGrayPalette sizeInfos screen ditherStyles
|
|
41 |
ditherSyms screenDepthVisualLabelHolder'
|
|
42 |
classVariableNames:''
|
|
43 |
poolDictionaries:''
|
|
44 |
privateIn:AbstractSettingsApplication
|
|
45 |
!
|
|
46 |
|
|
47 |
AbstractSettingsApplication subclass:#EditSettingsAppl
|
|
48 |
instanceVariableNames:'modifiedChannel st80EditingMode tabsIs4 st80DoubleClickSelectMode
|
|
49 |
searchDialogIsModal startTextDragWithControl'
|
|
50 |
classVariableNames:''
|
|
51 |
poolDictionaries:''
|
|
52 |
privateIn:AbstractSettingsApplication
|
|
53 |
!
|
|
54 |
|
|
55 |
AbstractSettingsApplication subclass:#FontSettingsAppl
|
|
56 |
instanceVariableNames:'modifiedChannel filter allOfThem labelDef buttonDef listDef
|
|
57 |
menuDef textDef allFontLabelHolder buttonsFontLabelHolder
|
|
58 |
textFontLabelHolder labelsFontLabelHolder listsFontLabelHolder
|
|
59 |
menusFontLabelHolder allLabel buttonsLabel textLabel labelLabel
|
|
60 |
listsLabel menuLabel'
|
|
61 |
classVariableNames:''
|
|
62 |
poolDictionaries:''
|
|
63 |
privateIn:AbstractSettingsApplication
|
|
64 |
!
|
|
65 |
|
|
66 |
AbstractSettingsApplication subclass:#KbdMappingSettingsAppl
|
|
67 |
instanceVariableNames:'modifiedChannel selectedRawKey macroTextHolder
|
|
68 |
selectedFunctionKey labelTextHolder functionKeyList rawKeyList
|
|
69 |
mappings'
|
|
70 |
classVariableNames:''
|
|
71 |
poolDictionaries:''
|
|
72 |
privateIn:AbstractSettingsApplication
|
|
73 |
!
|
|
74 |
|
|
75 |
AbstractSettingsApplication subclass:#LanguageSettingsAppl
|
|
76 |
instanceVariableNames:'modifiedChannel languageHolder languageList listOfLanguages
|
|
77 |
translatedLanguages noticeLabelHolder currentLanguageChannel
|
|
78 |
currentLanguageLabel'
|
|
79 |
classVariableNames:''
|
|
80 |
poolDictionaries:''
|
|
81 |
privateIn:AbstractSettingsApplication
|
|
82 |
!
|
|
83 |
|
|
84 |
AbstractSettingsApplication subclass:#MemorySettingsAppl
|
|
85 |
instanceVariableNames:'modifiedChannel newSpaceSize maxOldSpace fastMoreLimit
|
|
86 |
warningLabelHolder codeTrigger codeLimit oldIncr compressLimit
|
|
87 |
igcFreeLimit igcLimit igcFreeAmount stackLimit
|
|
88 |
supportsJustInTimeCompilation'
|
|
89 |
classVariableNames:''
|
|
90 |
poolDictionaries:''
|
|
91 |
privateIn:AbstractSettingsApplication
|
|
92 |
!
|
|
93 |
|
|
94 |
AbstractSettingsApplication subclass:#MiscSettingsAppl
|
|
95 |
instanceVariableNames:'modifiedChannel returnFocus focusFollowsMouse beepEnabled
|
|
96 |
takeFocus preemptive activateOnClick shadows dynamicPrios
|
|
97 |
opaqueVariablePanelResize formatHostNameinWindowLabels
|
|
98 |
opaqueTableColumnResize hostNameInLabelHolder showAccelerators
|
|
99 |
currentUserPrefs newWindowLabelFormat'
|
|
100 |
classVariableNames:''
|
|
101 |
poolDictionaries:''
|
|
102 |
privateIn:AbstractSettingsApplication
|
|
103 |
!
|
|
104 |
|
|
105 |
AbstractSettingsApplication subclass:#PlainSettingsAppl
|
|
106 |
instanceVariableNames:'modifiedChannel'
|
|
107 |
classVariableNames:''
|
|
108 |
poolDictionaries:''
|
|
109 |
privateIn:AbstractSettingsApplication
|
|
110 |
!
|
|
111 |
|
|
112 |
AbstractSettingsApplication subclass:#PrinterSettingsAppl
|
|
113 |
instanceVariableNames:'modifiedChannel selectedUnit supportsColor topMargin rightMargin
|
|
114 |
bottomMargin landscape pageFormatList pageFormat unitList
|
|
115 |
leftMargin possiblePrinters printerType printerTypeSelection
|
|
116 |
printCommandSelection printCommandList commandList printCommand
|
|
117 |
enableFormat enablelandscape enableMargins enableColorBox'
|
|
118 |
classVariableNames:''
|
|
119 |
poolDictionaries:''
|
|
120 |
privateIn:AbstractSettingsApplication
|
|
121 |
!
|
|
122 |
|
|
123 |
AbstractSettingsApplication subclass:#SourceAndDebuggerSettingsAppl
|
|
124 |
instanceVariableNames:'modifiedChannel syntaxColoring showVerboseStack sourceCacheDir
|
|
125 |
useManager updChanges condenseSourceCache
|
|
126 |
syntaxColorConfiguration showErrorNotifier setupSourceCodeManager
|
|
127 |
fullSelectorCheck logDoits checkClassesWhenCheckingIn
|
|
128 |
changeFileName formattingConfiguration flushSourceCache
|
|
129 |
localSourceFirst autoFormat cvsIsSetup repositoryHolder manager
|
|
130 |
repository currentUserPrefs'
|
|
131 |
classVariableNames:''
|
|
132 |
poolDictionaries:''
|
|
133 |
privateIn:AbstractSettingsApplication
|
|
134 |
!
|
|
135 |
|
|
136 |
AbstractSettingsApplication subclass:#StyleSettingsAppl
|
|
137 |
instanceVariableNames:'modifiedChannel showStandardStylesOnly styleList selectedStyle
|
|
138 |
styleDirectoryContents infoLabelHolder noticeLabelHolder'
|
|
139 |
classVariableNames:''
|
|
140 |
poolDictionaries:''
|
|
141 |
privateIn:AbstractSettingsApplication
|
|
142 |
!
|
|
143 |
|
|
144 |
AbstractSettingsApplication subclass:#SystemMessageSettingsAppl
|
|
145 |
instanceVariableNames:'modifiedChannel classInfos vmInfo vmErrors displayErrors'
|
|
146 |
classVariableNames:''
|
|
147 |
poolDictionaries:''
|
|
148 |
privateIn:AbstractSettingsApplication
|
|
149 |
!
|
|
150 |
|
|
151 |
AbstractSettingsApplication subclass:#ToolsSettingsAppl
|
|
152 |
instanceVariableNames:'useNewVersionDiffBrowser transcriptBufferSize useNewInspector
|
|
153 |
showClockInLauncher useNewChangesBrowser useNewFileBrowser
|
|
154 |
useNewSystemBrowser currentUserPrefs modifiedChannel'
|
|
155 |
classVariableNames:''
|
|
156 |
poolDictionaries:''
|
|
157 |
privateIn:AbstractSettingsApplication
|
|
158 |
!
|
|
159 |
|
4226
|
160 |
|
4292
|
161 |
!AbstractSettingsApplication class methodsFor:'defaults'!
|
|
162 |
|
|
163 |
classResources
|
|
164 |
|
|
165 |
^ AbstractLauncherApplication classResources
|
|
166 |
! !
|
|
167 |
|
4226
|
168 |
!AbstractSettingsApplication methodsFor:'actions'!
|
|
169 |
|
4240
|
170 |
loadRequest
|
|
171 |
|
|
172 |
self subclassResponsibility
|
|
173 |
!
|
|
174 |
|
4226
|
175 |
saveRequest
|
|
176 |
|
|
177 |
self subclassResponsibility
|
|
178 |
! !
|
|
179 |
|
|
180 |
!AbstractSettingsApplication methodsFor:'queries'!
|
|
181 |
|
4240
|
182 |
isNotPartOfSettinsDialog
|
|
183 |
|
|
184 |
^ self isPartOfSettinsDialog not
|
|
185 |
!
|
|
186 |
|
4226
|
187 |
isPartOfSettinsDialog
|
|
188 |
|
|
189 |
| masterApplication |
|
|
190 |
masterApplication := self masterApplication.
|
4228
|
191 |
^ masterApplication notNil and:[ masterApplication class == AbstractLauncherApplication::SettingsDialog].
|
4226
|
192 |
! !
|
|
193 |
|
4286
|
194 |
!AbstractSettingsApplication::CommunicationSettingsAppl class methodsFor:'interface specs'!
|
|
195 |
|
|
196 |
windowSpec
|
|
197 |
"This resource specification was automatically generated
|
|
198 |
by the UIPainter of ST/X."
|
|
199 |
|
|
200 |
"Do not manually edit this!! If it is corrupted,
|
|
201 |
the UIPainter may not be able to read the specification."
|
|
202 |
|
|
203 |
"
|
4292
|
204 |
UIPainter new openOnClass:AbstractSettingsApplication::CommunicationSettingsAppl andSelector:#windowSpec
|
|
205 |
AbstractSettingsApplication::CommunicationSettingsAppl new openInterface:#windowSpec
|
|
206 |
AbstractSettingsApplication::CommunicationSettingsAppl open
|
4286
|
207 |
"
|
|
208 |
|
|
209 |
<resource: #canvas>
|
|
210 |
|
|
211 |
^
|
|
212 |
#(#FullSpec
|
|
213 |
#name: #windowSpec
|
|
214 |
#window:
|
|
215 |
#(#WindowSpec
|
4292
|
216 |
#label: 'HTTP Settings'
|
|
217 |
#name: 'HTTP Settings'
|
4286
|
218 |
#min: #(#Point 10 10)
|
|
219 |
#max: #(#Point 1024 768)
|
|
220 |
#bounds: #(#Rectangle 16 42 616 592)
|
|
221 |
)
|
|
222 |
#component:
|
|
223 |
#(#SpecCollection
|
4292
|
224 |
#collection: #()
|
4286
|
225 |
)
|
|
226 |
)
|
|
227 |
! !
|
|
228 |
|
|
229 |
!AbstractSettingsApplication::CommunicationSettingsAppl methodsFor:'actions'!
|
|
230 |
|
|
231 |
doCancel
|
|
232 |
|
|
233 |
self isPartOfSettinsDialog ifTrue:[
|
|
234 |
self loadRequest.
|
|
235 |
].
|
|
236 |
self closeRequest.
|
|
237 |
!
|
|
238 |
|
|
239 |
evaluateModified
|
|
240 |
|
|
241 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
242 |
!
|
|
243 |
|
|
244 |
help
|
|
245 |
|
|
246 |
self warn:'no help available here'.
|
|
247 |
"/ self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/keyboardSetting.html'].
|
|
248 |
!
|
|
249 |
|
|
250 |
loadRequest
|
|
251 |
|
|
252 |
self modifiedChannel value:false.
|
|
253 |
!
|
|
254 |
|
|
255 |
saveRequest
|
|
256 |
| result |
|
|
257 |
|
|
258 |
(self hasUnsavedChanges) ifTrue:[
|
|
259 |
result := self confirmWithCancel:(resources string:'Save changed Font Settings ?').
|
|
260 |
result isNil ifTrue:[ ^ false].
|
|
261 |
result ifTrue:[
|
|
262 |
self saveSettings.
|
|
263 |
] ifFalse:[
|
|
264 |
self loadRequest.
|
|
265 |
]
|
|
266 |
].
|
|
267 |
^ true
|
|
268 |
!
|
|
269 |
|
|
270 |
saveSettings
|
|
271 |
|
|
272 |
self hasUnsavedChanges ifTrue:[
|
|
273 |
self modifiedChannel value:false.
|
|
274 |
].
|
|
275 |
! !
|
|
276 |
|
|
277 |
!AbstractSettingsApplication::CommunicationSettingsAppl methodsFor:'aspects'!
|
|
278 |
|
|
279 |
modifiedChannel
|
|
280 |
|
|
281 |
modifiedChannel isNil ifTrue:[
|
|
282 |
modifiedChannel := false asValue.
|
|
283 |
].
|
|
284 |
^ modifiedChannel
|
|
285 |
! !
|
|
286 |
|
|
287 |
!AbstractSettingsApplication::CommunicationSettingsAppl methodsFor:'change & update'!
|
|
288 |
|
|
289 |
update:something with:aParameter from:changedObject
|
|
290 |
"Invoked when an object that I depend upon sends a change notification."
|
|
291 |
|
|
292 |
"stub code automatically generated - please change as required"
|
|
293 |
|
|
294 |
"/ changedObject == self allOfThem ifTrue:[
|
|
295 |
"/ ^ self.
|
|
296 |
"/ ].
|
|
297 |
|
|
298 |
super update:something with:aParameter from:changedObject
|
|
299 |
! !
|
|
300 |
|
|
301 |
!AbstractSettingsApplication::CommunicationSettingsAppl methodsFor:'initialization & release'!
|
|
302 |
|
|
303 |
closeRequest
|
|
304 |
|
|
305 |
self saveRequest ifFalse:[
|
|
306 |
^ self
|
|
307 |
].
|
|
308 |
|
|
309 |
^ super closeRequest.
|
|
310 |
!
|
|
311 |
|
|
312 |
initialize
|
|
313 |
|
|
314 |
resources := self class owningClass classResources.
|
|
315 |
super initialize
|
|
316 |
!
|
|
317 |
|
|
318 |
postOpen
|
|
319 |
!
|
|
320 |
|
|
321 |
postOpenAsSubcanvasWith:aBuilder
|
|
322 |
|
|
323 |
self postOpen.
|
|
324 |
^ super postOpenAsSubcanvasWith:aBuilder
|
|
325 |
!
|
|
326 |
|
|
327 |
postOpenWith:aBuilder
|
|
328 |
|
|
329 |
self postOpen.
|
|
330 |
^ super postOpenWith:aBuilder
|
|
331 |
! !
|
|
332 |
|
|
333 |
!AbstractSettingsApplication::CommunicationSettingsAppl methodsFor:'queries'!
|
|
334 |
|
|
335 |
hasUnsavedChanges
|
|
336 |
|
|
337 |
^ true
|
|
338 |
! !
|
|
339 |
|
|
340 |
!AbstractSettingsApplication::CompilerSettingsAppl class methodsFor:'defaults'!
|
|
341 |
|
|
342 |
constantFoldingOptions
|
|
343 |
|
|
344 |
^ #( nil #level1 #level2 #full )
|
|
345 |
!
|
|
346 |
|
|
347 |
constantFoldingStrings
|
|
348 |
|
|
349 |
^ #('disabled' 'level1 (always safe)' 'level2 (usually safe)' 'full')
|
|
350 |
!
|
|
351 |
|
|
352 |
keepSourceOptions
|
|
353 |
|
|
354 |
^ #( keep reference absReference sourceReference discard )
|
|
355 |
!
|
|
356 |
|
|
357 |
keepSourceStrings
|
|
358 |
|
|
359 |
^ #('Keep as String' 'Reference to Filename' 'Reference to Full Path' 'Append and Ref in `st.src''' 'Discard' )
|
|
360 |
!
|
|
361 |
|
|
362 |
stcCompilationDemoStrings
|
|
363 |
|
|
364 |
^ #('never')
|
|
365 |
!
|
|
366 |
|
|
367 |
stcCompilationFullVersionStrings
|
|
368 |
|
|
369 |
^ #('always' 'primitive code only' 'never')
|
|
370 |
!
|
|
371 |
|
|
372 |
stcCompilationOptions
|
|
373 |
|
|
374 |
^ #( always default never)
|
|
375 |
! !
|
|
376 |
|
|
377 |
!AbstractSettingsApplication::CompilerSettingsAppl class methodsFor:'interface specs'!
|
|
378 |
|
|
379 |
windowSpec
|
|
380 |
"This resource specification was automatically generated
|
|
381 |
by the UIPainter of ST/X."
|
|
382 |
|
|
383 |
"Do not manually edit this!! If it is corrupted,
|
|
384 |
the UIPainter may not be able to read the specification."
|
|
385 |
|
|
386 |
"
|
|
387 |
UIPainter new openOnClass:AbstractLauncherApplication::CompilerSettingsAppl andSelector:#windowSpec
|
|
388 |
AbstractLauncherApplication::CompilerSettingsAppl new openInterface:#windowSpec
|
|
389 |
AbstractLauncherApplication::CompilerSettingsAppl open
|
|
390 |
"
|
|
391 |
|
|
392 |
<resource: #canvas>
|
|
393 |
|
|
394 |
^
|
|
395 |
#(#FullSpec
|
|
396 |
#name: #windowSpec
|
|
397 |
#window:
|
|
398 |
#(#WindowSpec
|
|
399 |
#label: 'Compiler Settings'
|
|
400 |
#name: 'Compiler Settings'
|
|
401 |
#min: #(#Point 10 10)
|
|
402 |
#max: #(#Point 1024 768)
|
|
403 |
#bounds: #(#Rectangle 16 42 616 602)
|
|
404 |
)
|
|
405 |
#component:
|
|
406 |
#(#SpecCollection
|
|
407 |
#collection: #(
|
|
408 |
#(#CheckBoxSpec
|
|
409 |
#label: 'Catch Method Redefinitions'
|
|
410 |
#name: 'CatchMethodRedefinitions'
|
|
411 |
#layout: #(#LayoutFrame 5 0 5 0 250 0 30 0)
|
|
412 |
#model: #catchMethodRedefs
|
|
413 |
#translateLabel: true
|
|
414 |
)
|
|
415 |
#(#CheckBoxSpec
|
|
416 |
#label: 'Catch Class Redefinitions'
|
|
417 |
#name: 'CatchClassRedefinitions'
|
|
418 |
#layout: #(#LayoutFrame 257 0 5 0 7 1 30 0)
|
|
419 |
#model: #catchClassRedefs
|
|
420 |
#translateLabel: true
|
|
421 |
)
|
|
422 |
#(#CheckBoxSpec
|
|
423 |
#label: 'Keep History Line in Methods'
|
|
424 |
#name: 'KeepHistoryLineinMethods'
|
|
425 |
#layout: #(#LayoutFrame 5 0 30 0 250 0 55 0)
|
|
426 |
#model: #historyLines
|
|
427 |
#translateLabel: true
|
|
428 |
)
|
|
429 |
#(#CheckBoxSpec
|
|
430 |
#label: 'Keep Full Class History'
|
|
431 |
#name: 'KeepFullClassHistory'
|
|
432 |
#layout: #(#LayoutFrame 257 0 30 0 7 1 55 0)
|
|
433 |
#enableChannel: #hasHistoryManager
|
|
434 |
#model: #fullHistoryUpdate
|
|
435 |
#translateLabel: true
|
|
436 |
)
|
|
437 |
#(#LabelSpec
|
|
438 |
#label: 'FileIn Source Mode:'
|
|
439 |
#name: 'FileInSourceModeLabel'
|
|
440 |
#layout: #(#LayoutFrame 239 0 60 0 425 0 82 0)
|
|
441 |
#translateLabel: true
|
|
442 |
#adjust: #right
|
|
443 |
)
|
|
444 |
#(#PopUpListSpec
|
|
445 |
#label: 'PopUp List'
|
|
446 |
#name: 'KeepSourceSelection'
|
|
447 |
#layout: #(#LayoutFrame 425 0 60 0 -5 1 82 0)
|
|
448 |
#tabable: true
|
|
449 |
#model: #keepSourceSelection
|
|
450 |
#menu: #keepSource
|
|
451 |
#useIndex: true
|
|
452 |
)
|
|
453 |
#(#DividerSpec
|
|
454 |
#name: 'Separator1'
|
|
455 |
#layout: #(#LayoutFrame 0 0.0 90 0 0 1 93 0)
|
|
456 |
)
|
|
457 |
#(#CheckBoxSpec
|
|
458 |
#label: 'Lazy Compilation when Autoloading'
|
|
459 |
#name: 'LazyCompilationWhenAutoloading'
|
|
460 |
#layout: #(#LayoutFrame 5 0 100 0 250 0 125 0)
|
|
461 |
#model: #compileLazy
|
|
462 |
#translateLabel: true
|
|
463 |
)
|
|
464 |
#(#CheckBoxSpec
|
|
465 |
#label: 'If Present, Load Binary Objects when Autoloading'
|
|
466 |
#name: 'LoadBinaryObjectsWhenAutoloading'
|
|
467 |
#layout: #(#LayoutFrame 5 0 125 0 331 0 150 0)
|
|
468 |
#enableChannel: #canLoadBinaries
|
|
469 |
#model: #loadBinaries
|
|
470 |
#translateLabel: true
|
|
471 |
)
|
|
472 |
#(#CheckBoxSpec
|
|
473 |
#label: 'Just in Time Compilation to Machine Code'
|
|
474 |
#name: 'JustInTimeCompilation'
|
|
475 |
#layout: #(#LayoutFrame 5 0 150 0 289 0 175 0)
|
|
476 |
#model: #justInTimeCompilation
|
|
477 |
#translateLabel: true
|
|
478 |
)
|
|
479 |
#(#DividerSpec
|
|
480 |
#name: 'Separator2'
|
|
481 |
#layout: #(#LayoutFrame 0 0.0 180 0 0 1.0 183 0)
|
|
482 |
)
|
|
483 |
#(#ActionButtonSpec
|
|
484 |
#label: 'Stc Compilation Parameters...'
|
|
485 |
#name: 'StcCompilationParametersButton'
|
|
486 |
#layout: #(#LayoutFrame 5 0 195 0 217 0 217 0)
|
|
487 |
#translateLabel: true
|
|
488 |
#model: #stcCompilerSettings
|
|
489 |
)
|
|
490 |
#(#LabelSpec
|
|
491 |
#label: 'Stc Compilation to Machine Code'
|
|
492 |
#name: 'StcCompilationToMachineCodeLabel'
|
|
493 |
#layout: #(#LayoutFrame 220 0 195 0 425 0 217 0)
|
|
494 |
#translateLabel: true
|
|
495 |
#adjust: #right
|
|
496 |
)
|
|
497 |
#(#PopUpListSpec
|
|
498 |
#label: 'PopUp List'
|
|
499 |
#name: 'StcCompilation'
|
|
500 |
#layout: #(#LayoutFrame 425 0 195 0 -5 1 217 0)
|
|
501 |
#tabable: true
|
|
502 |
#model: #stcCompilationSelection
|
|
503 |
#enableChannel: #canLoadBinaries
|
|
504 |
#menu: #stcCompilationList
|
|
505 |
#useIndex: true
|
|
506 |
)
|
|
507 |
#(#DividerSpec
|
|
508 |
#name: 'Separator3'
|
|
509 |
#layout: #(#LayoutFrame 0 0.0 225 0 0 1.0 228 0)
|
|
510 |
)
|
|
511 |
#(#CheckBoxSpec
|
|
512 |
#label: 'Allow Underscore in Identifiers'
|
|
513 |
#name: 'AllowUnderscoreInIdentifiers'
|
|
514 |
#layout: #(#LayoutFrame 5 0 240 0 249 0 262 0)
|
|
515 |
#model: #allowUnderscore
|
|
516 |
#translateLabel: true
|
|
517 |
)
|
|
518 |
#(#CheckBoxSpec
|
|
519 |
#label: 'Allow Dollar in Identifiers'
|
|
520 |
#name: 'AllowDollarInIdentifiers'
|
|
521 |
#layout: #(#LayoutFrame 5 0 265 0 249 0 287 0)
|
|
522 |
#model: #allowDollar
|
|
523 |
#translateLabel: true
|
|
524 |
)
|
|
525 |
#(#CheckBoxSpec
|
|
526 |
#label: 'Allow VW3 QualifiedNames'
|
|
527 |
#name: 'AllowVW3QualifiedNames'
|
|
528 |
#layout: #(#LayoutFrame 5 0 290 0 249 0 312 0)
|
|
529 |
#model: #allowQualifiedNames
|
|
530 |
#translateLabel: true
|
|
531 |
)
|
|
532 |
#(#CheckBoxSpec
|
|
533 |
#label: 'Allow Squeak Extensions'
|
|
534 |
#name: 'AllowSqueakExtensions'
|
|
535 |
#layout: #(#LayoutFrame 5 0 315 0 249 0 337 0)
|
|
536 |
#model: #allowSqueakExtensions
|
|
537 |
#translateLabel: true
|
|
538 |
)
|
|
539 |
#(#CheckBoxSpec
|
|
540 |
#label: 'Allow Dolphin Extensions'
|
|
541 |
#name: 'AllowDolphinExtensions'
|
|
542 |
#layout: #(#LayoutFrame 5 0 340 0 249 0 362 0)
|
|
543 |
#model: #allowDolphinExtensions
|
|
544 |
#translateLabel: true
|
|
545 |
)
|
|
546 |
#(#PopUpListSpec
|
|
547 |
#label: 'PopUp List'
|
|
548 |
#name: 'ConstantFolding'
|
|
549 |
#layout: #(#LayoutFrame 425 0 238 0 -5 1 260 0)
|
|
550 |
#tabable: true
|
|
551 |
#model: #constantFoldingSelection
|
|
552 |
#menu: #constantFolding
|
|
553 |
#useIndex: true
|
|
554 |
)
|
|
555 |
#(#LabelSpec
|
|
556 |
#label: 'Constant Folding:'
|
|
557 |
#name: 'ConstantFoldingLabel'
|
|
558 |
#layout: #(#LayoutFrame 250 0 240 0 425 0 262 0)
|
|
559 |
#translateLabel: true
|
|
560 |
#adjust: #right
|
|
561 |
)
|
|
562 |
#(#CheckBoxSpec
|
|
563 |
#label: 'Allow OldStyle Assignment (_)'
|
|
564 |
#name: 'AllowOldStyleAssignment'
|
|
565 |
#layout: #(#LayoutFrame 257 0 265 0 501 0 287 0)
|
|
566 |
#model: #allowOldStyleAssignment
|
|
567 |
#translateLabel: true
|
|
568 |
)
|
|
569 |
#(#CheckBoxSpec
|
|
570 |
#label: 'Allow Reserved Words as Selector (self)'
|
|
571 |
#name: 'AllowReservedWordsAsSelector'
|
|
572 |
#layout: #(#LayoutFrame 257 0 290 0 -5 1 312 0)
|
|
573 |
#model: #allowReservedWordsAsSelectors
|
|
574 |
#translateLabel: true
|
|
575 |
)
|
|
576 |
#(#CheckBoxSpec
|
|
577 |
#label: 'Full Debug Info'
|
|
578 |
#name: 'FullDebugInfo'
|
|
579 |
#layout: #(#LayoutFrame 257 0 315 0 501 0 337 0)
|
|
580 |
#model: #fullDebugSupport
|
|
581 |
#translateLabel: true
|
|
582 |
)
|
|
583 |
#(#CheckBoxSpec
|
|
584 |
#label: 'Literal Arrays are Immutable'
|
|
585 |
#name: 'LiteralArraysAreImmutable'
|
|
586 |
#layout: #(#LayoutFrame 257 0 340 0 501 0 362 0)
|
|
587 |
#model: #immutableArrays
|
|
588 |
#translateLabel: true
|
|
589 |
)
|
|
590 |
#(#DividerSpec
|
|
591 |
#name: 'Separator4'
|
|
592 |
#layout: #(#LayoutFrame 0 0.0 365 0 0 1.0 368 0)
|
|
593 |
)
|
|
594 |
#(#CheckBoxSpec
|
|
595 |
#label: 'Warnings'
|
|
596 |
#name: 'Warnings'
|
|
597 |
#layout: #(#LayoutFrame 5 0 375 0 249 0 397 0)
|
|
598 |
#model: #warnings
|
|
599 |
#translateLabel: true
|
|
600 |
)
|
|
601 |
#(#CheckBoxSpec
|
|
602 |
#label: 'ST/X Extensions'
|
|
603 |
#name: 'STXExtensions'
|
|
604 |
#layout: #(#LayoutFrame 25 0 400 0 245 0 422 0)
|
|
605 |
#enableChannel: #warnings
|
|
606 |
#model: #warnSTX
|
|
607 |
#translateLabel: true
|
|
608 |
)
|
|
609 |
#(#CheckBoxSpec
|
|
610 |
#label: 'Underscores in Identifiers'
|
|
611 |
#name: 'UnderscoresInIdentifiers'
|
|
612 |
#layout: #(#LayoutFrame 25 0 425 0 245 0 447 0)
|
|
613 |
#enableChannel: #enableUnderscore
|
|
614 |
#model: #warnUnderscore
|
|
615 |
#translateLabel: true
|
|
616 |
)
|
|
617 |
#(#CheckBoxSpec
|
|
618 |
#label: 'Dollars in Identifiers'
|
|
619 |
#name: 'DollarsInIdentifiers'
|
|
620 |
#layout: #(#LayoutFrame 25 0 450 0 245 0 472 0)
|
|
621 |
#enableChannel: #enableDollar
|
|
622 |
#model: #warnDollar
|
|
623 |
#translateLabel: true
|
|
624 |
)
|
|
625 |
#(#CheckBoxSpec
|
|
626 |
#label: 'Unused Method Variables'
|
|
627 |
#name: 'UnusedMethodVariables'
|
|
628 |
#layout: #(#LayoutFrame 25 0 475 0 245 0 497 0)
|
|
629 |
#enableChannel: #warnings
|
|
630 |
#model: #warnUnusedVars
|
|
631 |
#translateLabel: true
|
|
632 |
)
|
|
633 |
#(#CheckBoxSpec
|
|
634 |
#label: 'OldStyle Assignment'
|
|
635 |
#name: 'OldStyleAssignment'
|
|
636 |
#layout: #(#LayoutFrame 257 0 400 0 475 0 422 0)
|
|
637 |
#enableChannel: #warnings
|
|
638 |
#model: #warnOldStyle
|
|
639 |
#translateLabel: true
|
|
640 |
)
|
|
641 |
#(#CheckBoxSpec
|
|
642 |
#label: 'Common Mistakes'
|
|
643 |
#name: 'CommonMistakes'
|
|
644 |
#layout: #(#LayoutFrame 257 0 425 0 475 0 447 0)
|
|
645 |
#enableChannel: #warnings
|
|
646 |
#model: #warnCommonMistakes
|
|
647 |
#translateLabel: true
|
|
648 |
)
|
|
649 |
#(#CheckBoxSpec
|
|
650 |
#label: 'Possible Incompatibilities'
|
|
651 |
#name: 'PossibleIncompatibilities'
|
|
652 |
#layout: #(#LayoutFrame 257 0 450 0 474 0 472 0)
|
|
653 |
#enableChannel: #warnings
|
|
654 |
#model: #warnCompatibility
|
|
655 |
#translateLabel: true
|
|
656 |
)
|
|
657 |
#(#DividerSpec
|
|
658 |
#name: 'Separator5'
|
|
659 |
#layout: #(#LayoutFrame 0 0.0 500 0 0 1.0 503 0)
|
|
660 |
)
|
|
661 |
#(#HorizontalPanelViewSpec
|
|
662 |
#name: 'HorizontalPanel1'
|
|
663 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
664 |
#horizontalLayout: #center
|
|
665 |
#verticalLayout: #center
|
|
666 |
#horizontalSpace: 3
|
|
667 |
#verticalSpace: 3
|
|
668 |
#component:
|
|
669 |
#(#SpecCollection
|
|
670 |
#collection: #(
|
|
671 |
#(#ActionButtonSpec
|
|
672 |
#label: 'OK'
|
|
673 |
#name: 'OK'
|
|
674 |
#translateLabel: true
|
|
675 |
#model: #saveSettings
|
|
676 |
#enableChannel: #modifiedChannel
|
|
677 |
#extent: #(#Point 125 22)
|
|
678 |
)
|
|
679 |
#(#ActionButtonSpec
|
|
680 |
#label: 'Cancel'
|
|
681 |
#name: 'Cancel'
|
|
682 |
#translateLabel: true
|
|
683 |
#model: #doCancel
|
|
684 |
#extent: #(#Point 125 22)
|
|
685 |
)
|
|
686 |
#(#ActionButtonSpec
|
|
687 |
#label: 'Help'
|
|
688 |
#name: 'Help'
|
|
689 |
#translateLabel: true
|
|
690 |
#model: #help
|
|
691 |
#extent: #(#Point 125 22)
|
|
692 |
)
|
|
693 |
)
|
|
694 |
|
|
695 |
)
|
|
696 |
)
|
|
697 |
)
|
|
698 |
|
|
699 |
)
|
|
700 |
)
|
|
701 |
! !
|
|
702 |
|
|
703 |
!AbstractSettingsApplication::CompilerSettingsAppl methodsFor:'actions'!
|
|
704 |
|
|
705 |
doCancel
|
|
706 |
|
|
707 |
self isPartOfSettinsDialog ifTrue:[
|
|
708 |
self loadRequest.
|
|
709 |
].
|
|
710 |
self closeRequest.
|
|
711 |
!
|
|
712 |
|
|
713 |
evaluateModified
|
|
714 |
|
|
715 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
716 |
!
|
|
717 |
|
|
718 |
help
|
|
719 |
|
|
720 |
self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/compilerSettings.html'].
|
|
721 |
!
|
|
722 |
|
|
723 |
loadRequest
|
|
724 |
|
|
725 |
self allowDollar value:(Compiler allowDollarInIdentifier ? false).
|
|
726 |
self allowDolphinExtensions value:(Compiler allowDolphinExtensions ? false).
|
|
727 |
self allowOldStyleAssignment value:(Compiler allowOldStyleAssignment ? false).
|
|
728 |
self allowQualifiedNames value:(Compiler allowQualifiedNames ? false).
|
|
729 |
self allowReservedWordsAsSelectors value:(Compiler allowReservedWordsAsSelectors ? false).
|
|
730 |
self allowSqueakExtensions value:(Compiler allowSqueakExtensions ? false).
|
|
731 |
self allowUnderscore value:(Compiler allowUnderscoreInIdentifier ? false).
|
|
732 |
self catchClassRedefs value:(Class catchClassRedefinitions ? false).
|
|
733 |
self catchMethodRedefs value:(Class catchMethodRedefinitions ? false).
|
|
734 |
self compileLazy value:(Autoload compileLazy ? false).
|
|
735 |
self constantFoldingSelection value:(self class constantFoldingOptions indexOf:Compiler foldConstants ifAbsent:3).
|
|
736 |
self supportsJustInTimeCompilation ifTrue:[
|
|
737 |
self fullDebugSupport value:(ObjectMemory fullSingleStepSupport ? false).
|
|
738 |
] ifFalse:[
|
|
739 |
self fullDebugSupport value:(Compiler lineNumberInfo == #full).
|
|
740 |
].
|
|
741 |
self hasHistoryManager ifTrue:[
|
|
742 |
self fullHistoryUpdate value:(HistoryManager fullHistoryUpdate ? false).
|
|
743 |
] ifFalse:[
|
|
744 |
self fullHistoryUpdate value:false.
|
|
745 |
].
|
|
746 |
self historyLines value:self hasHistoryManager.
|
|
747 |
self immutableArrays value:(Compiler arraysAreImmutable ? false).
|
|
748 |
self supportsJustInTimeCompilation ifTrue:[
|
|
749 |
self justInTimeCompilation value:(ObjectMemory justInTimeCompilation ? false).
|
|
750 |
] ifFalse:[
|
|
751 |
self justInTimeCompilation value:false.
|
|
752 |
].
|
|
753 |
self keepSourceSelection value:(self class keepSourceOptions indexOf:ClassCategoryReader sourceMode ifAbsent:1).
|
|
754 |
self canLoadBinaries ifTrue:[
|
|
755 |
self loadBinaries value:Smalltalk loadBinaries.
|
|
756 |
] ifFalse:[
|
|
757 |
self loadBinaries value:false
|
|
758 |
].
|
|
759 |
self thisIsADemoVersion ifTrue:[
|
|
760 |
self stcCompilationSelection value:(self class stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).
|
|
761 |
] ifFalse:[
|
|
762 |
self stcCompilationSelection value:2.
|
|
763 |
].
|
|
764 |
self warnCommonMistakes value:(Compiler warnCommonMistakes ? false).
|
|
765 |
self warnCompatibility value:(Compiler warnPossibleIncompatibilities ? false).
|
|
766 |
self warnDollar value:(Compiler warnDollarInIdentifier ? false).
|
|
767 |
self warnOldStyle value:(Compiler warnOldStyleAssignment ? false).
|
|
768 |
self warnSTX value:(Compiler warnSTXSpecials ? false).
|
|
769 |
self warnUnderscore value:(Compiler warnUnderscoreInIdentifier ? false).
|
|
770 |
self warnUnusedVars value:(Compiler warnUnusedVars ? false).
|
|
771 |
self warnings value:(Compiler warnings ? false).
|
|
772 |
self modifiedChannel value:false.
|
|
773 |
!
|
|
774 |
|
|
775 |
saveRequest
|
|
776 |
| result |
|
|
777 |
|
|
778 |
(self hasUnsavedChanges) ifTrue:[
|
|
779 |
result := self confirmWithCancel:(resources string:'Save changed Compiler Settings ?').
|
|
780 |
result isNil ifTrue:[ ^ false].
|
|
781 |
result ifTrue:[
|
|
782 |
self saveSettings.
|
|
783 |
] ifFalse:[
|
|
784 |
self loadRequest.
|
|
785 |
]
|
|
786 |
].
|
|
787 |
^ true
|
|
788 |
!
|
|
789 |
|
|
790 |
saveSettings
|
|
791 |
|
|
792 |
HistoryManager notNil ifTrue:[
|
|
793 |
HistoryManager fullHistoryUpdate:self fullHistoryUpdate value.
|
|
794 |
self historyLines value ifTrue:[
|
|
795 |
HistoryManager activate
|
|
796 |
] ifFalse:[
|
|
797 |
HistoryManager deactivate
|
|
798 |
].
|
|
799 |
].
|
|
800 |
Class catchMethodRedefinitions:self catchMethodRedefs value.
|
|
801 |
Class catchClassRedefinitions:self catchClassRedefs value.
|
|
802 |
ClassCategoryReader sourceMode:(self class keepSourceOptions at:self keepSourceSelection value).
|
|
803 |
Compiler warnings:self warnings value.
|
|
804 |
Compiler warnSTXSpecials:self warnSTX value.
|
|
805 |
Compiler warnOldStyleAssignment:self warnOldStyle value.
|
|
806 |
Compiler warnUnderscoreInIdentifier:self warnUnderscore value.
|
|
807 |
Compiler warnDollarInIdentifier:self warnDollar value.
|
|
808 |
Compiler warnCommonMistakes:self warnCommonMistakes value.
|
|
809 |
Compiler warnPossibleIncompatibilities:self warnCompatibility value.
|
|
810 |
Compiler warnUnusedVars:self warnUnusedVars value.
|
|
811 |
Compiler allowUnderscoreInIdentifier:self allowUnderscore value.
|
|
812 |
Compiler allowDollarInIdentifier:self allowDollar value.
|
|
813 |
Compiler allowSqueakExtensions:self allowSqueakExtensions value.
|
|
814 |
Compiler allowDolphinExtensions:self allowDolphinExtensions value.
|
|
815 |
Compiler allowQualifiedNames:self allowQualifiedNames value.
|
|
816 |
Compiler allowOldStyleAssignment:self allowOldStyleAssignment value.
|
|
817 |
Compiler allowReservedWordsAsSelectors:self allowReservedWordsAsSelectors value.
|
|
818 |
|
|
819 |
Compiler arraysAreImmutable:self immutableArrays value.
|
|
820 |
self fullDebugSupport value ifTrue:[
|
|
821 |
Compiler lineNumberInfo:#full.
|
|
822 |
] ifFalse:[
|
|
823 |
Compiler lineNumberInfo:true
|
|
824 |
].
|
|
825 |
|
|
826 |
Compiler stcCompilation:(self class stcCompilationOptions at:self stcCompilationSelection value).
|
|
827 |
Compiler foldConstants:(self class constantFoldingOptions at:self constantFoldingSelection value).
|
|
828 |
|
|
829 |
self supportsJustInTimeCompilation ifTrue:[
|
|
830 |
| justInTime |
|
|
831 |
justInTime := self justInTimeCompilation value.
|
|
832 |
justInTime ifTrue:[
|
|
833 |
Method allInstancesDo:[:m | m checked:false].
|
|
834 |
].
|
|
835 |
ObjectMemory justInTimeCompilation:justInTime.
|
|
836 |
ObjectMemory fullSingleStepSupport:self fullDebugSupport value.
|
|
837 |
].
|
|
838 |
Autoload compileLazy:self compileLazy value.
|
|
839 |
Smalltalk loadBinaries:self loadBinaries value.
|
|
840 |
self modifiedChannel value:false.
|
|
841 |
!
|
|
842 |
|
|
843 |
stcCompilerSettings
|
|
844 |
|
|
845 |
AbstractLauncherApplication::LauncherDialogs stcCompilerSettings
|
|
846 |
! !
|
|
847 |
|
|
848 |
!AbstractSettingsApplication::CompilerSettingsAppl methodsFor:'aspects'!
|
|
849 |
|
|
850 |
allowDollar
|
|
851 |
|
|
852 |
allowDollar isNil ifTrue:[
|
|
853 |
allowDollar := (Compiler allowDollarInIdentifier ? false) asValue.
|
|
854 |
allowDollar onChangeSend:#evaluateModified to:self.
|
|
855 |
allowDollar addDependent:self.
|
|
856 |
].
|
|
857 |
^ allowDollar.
|
|
858 |
!
|
|
859 |
|
|
860 |
allowDolphinExtensions
|
|
861 |
|
|
862 |
allowDolphinExtensions isNil ifTrue:[
|
|
863 |
allowDolphinExtensions := (Compiler allowDolphinExtensions ? false) asValue.
|
|
864 |
allowDolphinExtensions onChangeSend:#evaluateModified to:self.
|
|
865 |
].
|
|
866 |
^ allowDolphinExtensions.
|
|
867 |
!
|
|
868 |
|
|
869 |
allowOldStyleAssignment
|
|
870 |
|
|
871 |
allowOldStyleAssignment isNil ifTrue:[
|
|
872 |
allowOldStyleAssignment := (Compiler allowOldStyleAssignment ? false) asValue.
|
|
873 |
allowOldStyleAssignment onChangeSend:#evaluateModified to:self.
|
|
874 |
].
|
|
875 |
^ allowOldStyleAssignment.
|
|
876 |
!
|
|
877 |
|
|
878 |
allowQualifiedNames
|
|
879 |
|
|
880 |
allowQualifiedNames isNil ifTrue:[
|
|
881 |
allowQualifiedNames := (Compiler allowQualifiedNames ? false) asValue.
|
|
882 |
allowQualifiedNames onChangeSend:#evaluateModified to:self.
|
|
883 |
].
|
|
884 |
^ allowQualifiedNames.
|
|
885 |
!
|
|
886 |
|
|
887 |
allowReservedWordsAsSelectors
|
|
888 |
|
|
889 |
allowReservedWordsAsSelectors isNil ifTrue:[
|
|
890 |
allowReservedWordsAsSelectors := (Compiler allowReservedWordsAsSelectors ? false) asValue.
|
|
891 |
allowReservedWordsAsSelectors onChangeSend:#evaluateModified to:self.
|
|
892 |
].
|
|
893 |
^ allowReservedWordsAsSelectors.
|
|
894 |
!
|
|
895 |
|
|
896 |
allowSqueakExtensions
|
|
897 |
|
|
898 |
allowSqueakExtensions isNil ifTrue:[
|
|
899 |
allowSqueakExtensions := (Compiler allowSqueakExtensions ? false) asValue.
|
|
900 |
allowSqueakExtensions onChangeSend:#evaluateModified to:self.
|
|
901 |
].
|
|
902 |
^ allowSqueakExtensions.
|
|
903 |
!
|
|
904 |
|
|
905 |
allowUnderscore
|
|
906 |
|
|
907 |
allowUnderscore isNil ifTrue:[
|
|
908 |
allowUnderscore := (Compiler allowUnderscoreInIdentifier ? false) asValue.
|
|
909 |
allowUnderscore onChangeSend:#evaluateModified to:self.
|
|
910 |
allowUnderscore addDependent:self.
|
|
911 |
].
|
|
912 |
^ allowUnderscore.
|
|
913 |
!
|
|
914 |
|
|
915 |
canLoadBinaries
|
|
916 |
|
|
917 |
canLoadBinaries isNil ifTrue:[
|
|
918 |
canLoadBinaries := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles].
|
|
919 |
].
|
|
920 |
^ canLoadBinaries.
|
|
921 |
!
|
|
922 |
|
|
923 |
catchClassRedefs
|
|
924 |
|
|
925 |
catchClassRedefs isNil ifTrue:[
|
|
926 |
catchClassRedefs := (Class catchClassRedefinitions ? false) asValue.
|
|
927 |
catchClassRedefs onChangeSend:#evaluateModified to:self.
|
|
928 |
].
|
|
929 |
^ catchClassRedefs.
|
|
930 |
!
|
|
931 |
|
|
932 |
catchMethodRedefs
|
|
933 |
|
|
934 |
catchMethodRedefs isNil ifTrue:[
|
|
935 |
catchMethodRedefs := (Class catchMethodRedefinitions ? false) asValue.
|
|
936 |
catchMethodRedefs onChangeSend:#evaluateModified to:self.
|
|
937 |
].
|
|
938 |
^ catchMethodRedefs.
|
|
939 |
!
|
|
940 |
|
|
941 |
compileLazy
|
|
942 |
|
|
943 |
compileLazy isNil ifTrue:[
|
|
944 |
compileLazy := (Autoload compileLazy ? false) asValue.
|
|
945 |
compileLazy onChangeSend:#evaluateModified to:self.
|
|
946 |
].
|
|
947 |
^ compileLazy.
|
|
948 |
!
|
|
949 |
|
|
950 |
constantFolding
|
|
951 |
|
|
952 |
constantFolding isNil ifTrue:[
|
|
953 |
constantFolding := (resources array:(self class constantFoldingStrings)) asList.
|
|
954 |
].
|
|
955 |
^ constantFolding.
|
|
956 |
!
|
|
957 |
|
|
958 |
constantFoldingOptions
|
|
959 |
|
|
960 |
constantFoldingOptions isNil ifTrue:[
|
|
961 |
constantFoldingOptions := self class constantFoldingOptions.
|
|
962 |
].
|
|
963 |
^ constantFoldingOptions.
|
|
964 |
!
|
|
965 |
|
|
966 |
constantFoldingSelection
|
|
967 |
|
|
968 |
constantFoldingSelection isNil ifTrue:[
|
|
969 |
| index |
|
|
970 |
index := self class constantFoldingOptions indexOf:Compiler foldConstants ifAbsent:3.
|
|
971 |
constantFoldingSelection := index asValue.
|
|
972 |
constantFoldingSelection onChangeSend:#evaluateModified to:self.
|
|
973 |
].
|
|
974 |
^ constantFoldingSelection.
|
|
975 |
!
|
|
976 |
|
|
977 |
enableDollar
|
|
978 |
|
|
979 |
enableDollar isNil ifTrue:[
|
|
980 |
enableDollar := true asValue.
|
|
981 |
enableDollar addDependent:self.
|
|
982 |
].
|
|
983 |
^ enableDollar.
|
|
984 |
!
|
|
985 |
|
|
986 |
enableUnderscore
|
|
987 |
"automatically generated by UIPainter ..."
|
|
988 |
|
|
989 |
"*** the code below creates a default model when invoked."
|
|
990 |
"*** (which may not be the one you wanted)"
|
|
991 |
"*** Please change as required and accept it in the browser."
|
|
992 |
"*** (and replace this comment by something more useful ;-)"
|
|
993 |
|
|
994 |
enableUnderscore isNil ifTrue:[
|
|
995 |
enableUnderscore := true asValue.
|
|
996 |
"/ if your app needs to be notified of changes, uncomment one of the lines below:
|
|
997 |
"/ enableUnderscore addDependent:self.
|
|
998 |
"/ enableUnderscore onChangeSend:#enableUnderscoreChanged to:self.
|
|
999 |
].
|
|
1000 |
^ enableUnderscore.
|
|
1001 |
!
|
|
1002 |
|
|
1003 |
fullDebugSupport
|
|
1004 |
|
|
1005 |
fullDebugSupport isNil ifTrue:[
|
|
1006 |
self supportsJustInTimeCompilation ifTrue:[
|
|
1007 |
fullDebugSupport := (ObjectMemory fullSingleStepSupport ? false) asValue.
|
|
1008 |
] ifFalse:[
|
|
1009 |
fullDebugSupport := (Compiler lineNumberInfo == #full) asValue.
|
|
1010 |
].
|
|
1011 |
fullDebugSupport onChangeSend:#evaluateModified to:self.
|
|
1012 |
].
|
|
1013 |
^ fullDebugSupport.
|
|
1014 |
!
|
|
1015 |
|
|
1016 |
fullHistoryUpdate
|
|
1017 |
|
|
1018 |
fullHistoryUpdate isNil ifTrue:[
|
|
1019 |
self hasHistoryManager ifTrue:[
|
|
1020 |
fullHistoryUpdate := (HistoryManager fullHistoryUpdate ? false) asValue.
|
|
1021 |
] ifFalse:[
|
|
1022 |
fullHistoryUpdate := false asValue.
|
|
1023 |
].
|
|
1024 |
fullHistoryUpdate onChangeSend:#evaluateModified to:self.
|
|
1025 |
].
|
|
1026 |
^ fullHistoryUpdate.
|
|
1027 |
!
|
|
1028 |
|
|
1029 |
historyLines
|
|
1030 |
|
|
1031 |
historyLines isNil ifTrue:[
|
|
1032 |
historyLines := self hasHistoryManager asValue.
|
|
1033 |
historyLines onChangeSend:#evaluateModified to:self.
|
|
1034 |
].
|
|
1035 |
^ historyLines.
|
|
1036 |
!
|
|
1037 |
|
|
1038 |
immutableArrays
|
|
1039 |
|
|
1040 |
immutableArrays isNil ifTrue:[
|
|
1041 |
immutableArrays := (Compiler arraysAreImmutable ? false) asValue.
|
|
1042 |
immutableArrays onChangeSend:#evaluateModified to:self.
|
|
1043 |
].
|
|
1044 |
^ immutableArrays.
|
|
1045 |
!
|
|
1046 |
|
|
1047 |
justInTimeCompilation
|
|
1048 |
|
|
1049 |
justInTimeCompilation isNil ifTrue:[
|
|
1050 |
self supportsJustInTimeCompilation ifTrue:[
|
|
1051 |
justInTimeCompilation := (ObjectMemory justInTimeCompilation ? false) asValue.
|
|
1052 |
] ifFalse:[
|
|
1053 |
justInTimeCompilation := false asValue.
|
|
1054 |
].
|
|
1055 |
justInTimeCompilation onChangeSend:#evaluateModified to:self.
|
|
1056 |
].
|
|
1057 |
^ justInTimeCompilation.
|
|
1058 |
!
|
|
1059 |
|
|
1060 |
keepSource
|
|
1061 |
|
|
1062 |
keepSource isNil ifTrue:[
|
|
1063 |
keepSource := (resources array:(self class keepSourceStrings)) asList.
|
|
1064 |
].
|
|
1065 |
^ keepSource.
|
|
1066 |
!
|
|
1067 |
|
|
1068 |
keepSourceSelection
|
|
1069 |
|
|
1070 |
keepSourceSelection isNil ifTrue:[
|
|
1071 |
keepSourceSelection := (self class keepSourceOptions indexOf:ClassCategoryReader sourceMode ifAbsent:1) asValue.
|
|
1072 |
keepSourceSelection onChangeSend:#evaluateModified to:self.
|
|
1073 |
].
|
|
1074 |
^ keepSourceSelection.
|
|
1075 |
!
|
|
1076 |
|
|
1077 |
loadBinaries
|
|
1078 |
|
|
1079 |
loadBinaries isNil ifTrue:[
|
|
1080 |
self canLoadBinaries ifTrue:[
|
|
1081 |
loadBinaries:= Smalltalk loadBinaries asValue
|
|
1082 |
] ifFalse:[
|
|
1083 |
loadBinaries:= false asValue
|
|
1084 |
].
|
|
1085 |
loadBinaries onChangeSend:#evaluateModified to:self.
|
|
1086 |
].
|
|
1087 |
^ loadBinaries.
|
|
1088 |
!
|
|
1089 |
|
|
1090 |
modifiedChannel
|
|
1091 |
|
|
1092 |
modifiedChannel isNil ifTrue:[
|
|
1093 |
modifiedChannel := false asValue.
|
|
1094 |
].
|
|
1095 |
^ modifiedChannel
|
|
1096 |
!
|
|
1097 |
|
|
1098 |
stcCompilationList
|
|
1099 |
|
|
1100 |
stcCompilationList isNil ifTrue:[
|
|
1101 |
self thisIsADemoVersion ifTrue:[
|
|
1102 |
stcCompilationList := (resources array:(self class stcCompilationDemoStrings)) asList.
|
|
1103 |
] ifFalse:[
|
|
1104 |
stcCompilationList := (resources array:(self class stcCompilationFullVersionStrings)) asList.
|
|
1105 |
]
|
|
1106 |
].
|
|
1107 |
^ stcCompilationList.
|
|
1108 |
!
|
|
1109 |
|
|
1110 |
stcCompilationSelection
|
|
1111 |
|
|
1112 |
stcCompilationSelection isNil ifTrue:[
|
|
1113 |
self thisIsADemoVersion ifTrue:[
|
|
1114 |
stcCompilationSelection := (self class stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2) asValue.
|
|
1115 |
] ifFalse:[
|
|
1116 |
stcCompilationSelection := 2 asValue.
|
|
1117 |
].
|
|
1118 |
stcCompilationSelection onChangeSend:#evaluateModified to:self.
|
|
1119 |
].
|
|
1120 |
^ stcCompilationSelection.
|
|
1121 |
!
|
|
1122 |
|
|
1123 |
warnCommonMistakes
|
|
1124 |
|
|
1125 |
warnCommonMistakes isNil ifTrue:[
|
|
1126 |
warnCommonMistakes := (Compiler warnCommonMistakes ? false) asValue.
|
|
1127 |
warnCommonMistakes onChangeSend:#evaluateModified to:self.
|
|
1128 |
].
|
|
1129 |
^ warnCommonMistakes.
|
|
1130 |
!
|
|
1131 |
|
|
1132 |
warnCompatibility
|
|
1133 |
|
|
1134 |
warnCompatibility isNil ifTrue:[
|
|
1135 |
warnCompatibility := (Compiler warnPossibleIncompatibilities ? false) asValue.
|
|
1136 |
warnCompatibility onChangeSend:#evaluateModified to:self.
|
|
1137 |
].
|
|
1138 |
^ warnCompatibility.
|
|
1139 |
!
|
|
1140 |
|
|
1141 |
warnDollar
|
|
1142 |
|
|
1143 |
warnDollar isNil ifTrue:[
|
|
1144 |
warnDollar := (Compiler warnDollarInIdentifier ? false) asValue.
|
|
1145 |
warnDollar onChangeSend:#evaluateModified to:self.
|
|
1146 |
].
|
|
1147 |
^ warnDollar.
|
|
1148 |
!
|
|
1149 |
|
|
1150 |
warnOldStyle
|
|
1151 |
|
|
1152 |
warnOldStyle isNil ifTrue:[
|
|
1153 |
warnOldStyle := (Compiler warnOldStyleAssignment ? false) asValue.
|
|
1154 |
warnOldStyle onChangeSend:#evaluateModified to:self.
|
|
1155 |
].
|
|
1156 |
^ warnOldStyle.
|
|
1157 |
!
|
|
1158 |
|
|
1159 |
warnSTX
|
|
1160 |
|
|
1161 |
warnSTX isNil ifTrue:[
|
|
1162 |
warnSTX := (Compiler warnSTXSpecials ? false) asValue.
|
|
1163 |
warnSTX onChangeSend:#evaluateModified to:self.
|
|
1164 |
].
|
|
1165 |
^ warnSTX.
|
|
1166 |
!
|
|
1167 |
|
|
1168 |
warnUnderscore
|
|
1169 |
|
|
1170 |
warnUnderscore isNil ifTrue:[
|
|
1171 |
warnUnderscore := (Compiler warnUnderscoreInIdentifier ? false) asValue.
|
|
1172 |
warnUnderscore onChangeSend:#evaluateModified to:self.
|
|
1173 |
].
|
|
1174 |
^ warnUnderscore.
|
|
1175 |
!
|
|
1176 |
|
|
1177 |
warnUnusedVars
|
|
1178 |
|
|
1179 |
warnUnusedVars isNil ifTrue:[
|
|
1180 |
warnUnusedVars := (Compiler warnUnusedVars ? false) asValue.
|
|
1181 |
warnUnusedVars onChangeSend:#evaluateModified to:self.
|
|
1182 |
].
|
|
1183 |
^ warnUnusedVars.
|
|
1184 |
!
|
|
1185 |
|
|
1186 |
warnings
|
|
1187 |
|
|
1188 |
warnings isNil ifTrue:[
|
|
1189 |
warnings := (Compiler warnings ? false) asValue.
|
|
1190 |
warnings addDependent:self.
|
|
1191 |
warnings changed.
|
|
1192 |
warnings onChangeSend:#evaluateModified to:self.
|
|
1193 |
].
|
|
1194 |
^ warnings.
|
|
1195 |
! !
|
|
1196 |
|
|
1197 |
!AbstractSettingsApplication::CompilerSettingsAppl methodsFor:'change & update'!
|
|
1198 |
|
|
1199 |
update:something with:aParameter from:changedObject
|
|
1200 |
"Invoked when an object that I depend upon sends a change notification."
|
|
1201 |
|
|
1202 |
"stub code automatically generated - please change as required"
|
|
1203 |
|
|
1204 |
changedObject == self warnings ifTrue:[
|
|
1205 |
self warnings value ifTrue:[
|
|
1206 |
self enableUnderscore value:self allowUnderscore value.
|
|
1207 |
self enableDollar value:self allowDollar value.
|
|
1208 |
] ifFalse:[
|
|
1209 |
self enableUnderscore value:false.
|
|
1210 |
self enableDollar value:false.
|
|
1211 |
].
|
|
1212 |
^ self
|
|
1213 |
].
|
|
1214 |
(changedObject == self allowDollar or:[changedObject == self allowUnderscore]) ifTrue:[
|
|
1215 |
self warnings changed.
|
|
1216 |
^ self
|
|
1217 |
].
|
|
1218 |
|
|
1219 |
super update:something with:aParameter from:changedObject
|
|
1220 |
! !
|
|
1221 |
|
|
1222 |
!AbstractSettingsApplication::CompilerSettingsAppl methodsFor:'initialization & release'!
|
|
1223 |
|
|
1224 |
closeRequest
|
|
1225 |
|
|
1226 |
self saveRequest ifFalse:[
|
|
1227 |
^ self
|
|
1228 |
].
|
|
1229 |
|
|
1230 |
^ super closeRequest.
|
|
1231 |
!
|
|
1232 |
|
|
1233 |
initialize
|
|
1234 |
|
|
1235 |
resources := self class owningClass classResources.
|
|
1236 |
super initialize
|
|
1237 |
! !
|
|
1238 |
|
|
1239 |
!AbstractSettingsApplication::CompilerSettingsAppl methodsFor:'queries'!
|
|
1240 |
|
|
1241 |
hasHistoryManager
|
|
1242 |
|
|
1243 |
^ HistoryManager notNil and:[HistoryManager isLoaded and:[HistoryManager isActive]]
|
|
1244 |
!
|
|
1245 |
|
|
1246 |
hasUnsavedChanges
|
|
1247 |
|
|
1248 |
^
|
|
1249 |
(
|
|
1250 |
((HistoryManager fullHistoryUpdate ? false) ~= self fullHistoryUpdate value) or:[
|
|
1251 |
((Class catchMethodRedefinitions ? false) ~= self catchMethodRedefs value) or:[
|
|
1252 |
((Class catchClassRedefinitions ? false) ~= self catchClassRedefs value) or:[
|
|
1253 |
((ClassCategoryReader sourceMode) ~= (self class keepSourceOptions at:self keepSourceSelection value)) or:[
|
|
1254 |
((Compiler warnings ? false) ~= self warnings value) or:[
|
|
1255 |
((Compiler warnSTXSpecials ? false) ~= self warnSTX value) or:[
|
|
1256 |
((Compiler warnOldStyleAssignment ? false) ~= self warnOldStyle value) or:[
|
|
1257 |
((Compiler warnUnderscoreInIdentifier ? false) ~= self warnUnderscore value) or:[
|
|
1258 |
((Compiler warnDollarInIdentifier ? false) ~= self warnDollar value) or:[
|
|
1259 |
((Compiler warnCommonMistakes ? false) ~= self warnCommonMistakes value) or:[
|
|
1260 |
((Compiler warnPossibleIncompatibilities ? false) ~= self warnCompatibility value) or:[
|
|
1261 |
((Compiler warnUnusedVars ? false) ~= self warnUnusedVars value) or:[
|
|
1262 |
((Compiler allowUnderscoreInIdentifier ? false) ~= self allowUnderscore value) or:[
|
|
1263 |
((Compiler allowDollarInIdentifier ? false) ~= self allowDollar value) or:[
|
|
1264 |
((Compiler allowSqueakExtensions ? false) ~= self allowSqueakExtensions value) or:[
|
|
1265 |
((Compiler allowDolphinExtensions ? false) ~= self allowDolphinExtensions value) or:[
|
|
1266 |
((Compiler allowQualifiedNames ? false) ~= self allowQualifiedNames value) or:[
|
|
1267 |
((Compiler allowOldStyleAssignment ? false) ~= self allowOldStyleAssignment value) or:[
|
|
1268 |
((Compiler allowReservedWordsAsSelectors ? false) ~= self allowReservedWordsAsSelectors value) or:[
|
|
1269 |
((Compiler arraysAreImmutable ? false) ~= self immutableArrays value) or:[
|
|
1270 |
((self supportsJustInTimeCompilation value ifTrue:[ObjectMemory fullSingleStepSupport ? false] ifFalse:[Compiler lineNumberInfo == #full]) ~= self fullDebugSupport value) or:[
|
|
1271 |
((Compiler stcCompilation) ~= (self class stcCompilationOptions at:self stcCompilationSelection value)) or:[
|
|
1272 |
((Compiler foldConstants) ~= (self class constantFoldingOptions at:self constantFoldingSelection value)) or:[
|
|
1273 |
((ObjectMemory justInTimeCompilation ? false) ~= self justInTimeCompilation value) or:[
|
|
1274 |
((Autoload compileLazy ? false) ~= self compileLazy value) or:[
|
|
1275 |
((Smalltalk loadBinaries ? false) ~= self loadBinaries value) or:[
|
|
1276 |
((self hasHistoryManager) ~= self historyLines value) ]]]]]]]]]]]]]]]]]]]]]]]]]])
|
|
1277 |
!
|
|
1278 |
|
|
1279 |
supportsJustInTimeCompilation
|
|
1280 |
|
|
1281 |
^ ObjectMemory supportsJustInTimeCompilation
|
|
1282 |
!
|
|
1283 |
|
|
1284 |
thisIsADemoVersion
|
|
1285 |
|
|
1286 |
^ Smalltalk releaseIdentification = 'ST/X_free_demo_vsn'
|
|
1287 |
! !
|
|
1288 |
|
|
1289 |
!AbstractSettingsApplication::DisplaySettingsAppl class methodsFor:'defaults'!
|
|
1290 |
|
|
1291 |
clipEncodingStrings
|
|
1292 |
|
|
1293 |
^ #('untranslated' 'iso8859' 'jis' 'jis7' 'shift-JIS' 'EUC' 'big5')
|
|
1294 |
!
|
|
1295 |
|
|
1296 |
clipEncodingSyms
|
|
1297 |
|
|
1298 |
^ #(nil #iso8859 #jis #jis7 #sjis #euc #big5)
|
|
1299 |
!
|
|
1300 |
|
|
1301 |
staticGrayOrGrayScaleDitherStrings
|
|
1302 |
|
|
1303 |
^ #('threshold' 'ordered dither' 'error diffusion')
|
|
1304 |
!
|
|
1305 |
|
|
1306 |
staticGrayOrGrayScaleDitherSyms
|
|
1307 |
|
|
1308 |
^ #(threshold ordered floydSteinberg)
|
|
1309 |
!
|
|
1310 |
|
|
1311 |
trueColorDitherStrings
|
|
1312 |
|
|
1313 |
^ #('nearest color' 'error diffusion')
|
|
1314 |
!
|
|
1315 |
|
|
1316 |
trueColorDitherSyms
|
|
1317 |
|
|
1318 |
^ #(ordered floydSteinberg)
|
|
1319 |
! !
|
|
1320 |
|
|
1321 |
!AbstractSettingsApplication::DisplaySettingsAppl class methodsFor:'interface specs'!
|
|
1322 |
|
|
1323 |
windowSpec
|
|
1324 |
"This resource specification was automatically generated
|
|
1325 |
by the UIPainter of ST/X."
|
|
1326 |
|
|
1327 |
"Do not manually edit this!! If it is corrupted,
|
|
1328 |
the UIPainter may not be able to read the specification."
|
|
1329 |
|
|
1330 |
"
|
|
1331 |
UIPainter new openOnClass:AbstractLauncherApplication::DisplaySettingsAppl andSelector:#windowSpec
|
|
1332 |
AbstractLauncherApplication::DisplaySettingsAppl new openInterface:#windowSpec
|
|
1333 |
AbstractLauncherApplication::DisplaySettingsAppl open
|
|
1334 |
"
|
|
1335 |
|
|
1336 |
<resource: #canvas>
|
|
1337 |
|
|
1338 |
^
|
|
1339 |
#(#FullSpec
|
|
1340 |
#name: #windowSpec
|
|
1341 |
#window:
|
|
1342 |
#(#WindowSpec
|
|
1343 |
#label: 'Display Screen Settings'
|
|
1344 |
#name: 'Display Screen Settings'
|
|
1345 |
#min: #(#Point 10 10)
|
|
1346 |
#max: #(#Point 1024 768)
|
|
1347 |
#bounds: #(#Rectangle 16 42 616 592)
|
|
1348 |
)
|
|
1349 |
#component:
|
|
1350 |
#(#SpecCollection
|
|
1351 |
#collection: #(
|
|
1352 |
#(#LabelSpec
|
|
1353 |
#label: 'Actual Visible Screen Area:'
|
|
1354 |
#name: 'ActualVisibleScreenAreaLabel'
|
|
1355 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 22 0)
|
|
1356 |
#translateLabel: true
|
|
1357 |
#adjust: #left
|
|
1358 |
)
|
|
1359 |
#(#LabelSpec
|
|
1360 |
#label: 'Common Sizes:'
|
|
1361 |
#name: 'CommonSizesLabel'
|
|
1362 |
#layout: #(#LayoutFrame 0 0 39 0 205 0 61 0)
|
|
1363 |
#translateLabel: true
|
|
1364 |
#adjust: #right
|
|
1365 |
)
|
|
1366 |
#(#PopUpListSpec
|
|
1367 |
#label: 'monitor size'
|
|
1368 |
#name: 'MonitorSelectionPopUpList'
|
|
1369 |
#layout: #(#LayoutFrame 205 0 39 0 -5 1 61 0)
|
|
1370 |
#tabable: true
|
|
1371 |
#model: #monitorSelection
|
|
1372 |
#menu: #monitorList
|
|
1373 |
#useIndex: true
|
|
1374 |
)
|
|
1375 |
#(#LabelSpec
|
|
1376 |
#label: 'Screen Size:'
|
|
1377 |
#name: 'ScreenSizeLabel'
|
|
1378 |
#layout: #(#LayoutFrame 0 0 72 0 205 0 94 0)
|
|
1379 |
#translateLabel: true
|
|
1380 |
#adjust: #right
|
|
1381 |
)
|
|
1382 |
#(#InputFieldSpec
|
|
1383 |
#name: 'SizeXEntryField'
|
|
1384 |
#layout: #(#LayoutFrame 205 0 72 0 300 0 94 0)
|
|
1385 |
#model: #sizeX
|
|
1386 |
#type: #number
|
|
1387 |
#immediateAccept: true
|
|
1388 |
#acceptOnReturn: true
|
|
1389 |
#acceptOnTab: true
|
|
1390 |
#acceptOnLostFocus: true
|
|
1391 |
#acceptOnPointerLeave: false
|
|
1392 |
)
|
|
1393 |
#(#LabelSpec
|
|
1394 |
#label: ' x '
|
|
1395 |
#name: 'xLabel'
|
|
1396 |
#layout: #(#LayoutFrame 314 0 72 0 360 0 94 0)
|
|
1397 |
#translateLabel: true
|
|
1398 |
#adjust: #right
|
|
1399 |
)
|
|
1400 |
#(#InputFieldSpec
|
|
1401 |
#name: 'SizeYEntryField'
|
|
1402 |
#layout: #(#LayoutFrame 379 0 72 0 474 0 94 0)
|
|
1403 |
#model: #sizeY
|
|
1404 |
#type: #number
|
|
1405 |
#immediateAccept: true
|
|
1406 |
#acceptOnReturn: true
|
|
1407 |
#acceptOnTab: true
|
|
1408 |
#acceptOnLostFocus: true
|
|
1409 |
#acceptOnPointerLeave: false
|
|
1410 |
)
|
|
1411 |
#(#LabelSpec
|
|
1412 |
#label: '(mm)'
|
|
1413 |
#name: 'mmLabel'
|
|
1414 |
#layout: #(#LayoutFrame 491 0 72 0 537 0 94 0)
|
|
1415 |
#translateLabel: true
|
|
1416 |
#adjust: #right
|
|
1417 |
)
|
|
1418 |
#(#DividerSpec
|
|
1419 |
#name: 'Separator1'
|
|
1420 |
#layout: #(#LayoutFrame 0 0.0 105 0 0 1.0 109 0)
|
|
1421 |
)
|
|
1422 |
#(#LabelSpec
|
|
1423 |
#name: 'ScreenDepthVisualLabel'
|
|
1424 |
#layout: #(#LayoutFrame 0 0.0 113 0.0 0 1.0 135 0)
|
|
1425 |
#translateLabel: true
|
|
1426 |
#labelChannel: #screenDepthVisualLabelHolder
|
|
1427 |
#adjust: #left
|
|
1428 |
)
|
|
1429 |
#(#DividerSpec
|
|
1430 |
#name: 'Separator2'
|
|
1431 |
#layout: #(#LayoutFrame 0 0.0 139 0 0 1.0 143 0)
|
|
1432 |
)
|
|
1433 |
#(#CheckBoxSpec
|
|
1434 |
#label: 'Color Monitor'
|
|
1435 |
#name: 'ColorMonitorCheckBox'
|
|
1436 |
#layout: #(#LayoutFrame 5 0 150 0 250 0 172 0)
|
|
1437 |
#model: #isColorMonitor
|
|
1438 |
#translateLabel: true
|
|
1439 |
)
|
|
1440 |
#(#CheckBoxSpec
|
|
1441 |
#label: 'Use Fix Color Palette'
|
|
1442 |
#name: 'FixColorPaletteCheckBox'
|
|
1443 |
#layout: #(#LayoutFrame 5 0 175 0 301 0 197 0)
|
|
1444 |
#enableChannel: #visualIsPseudoColor
|
|
1445 |
#model: #useFixPalette
|
|
1446 |
#translateLabel: true
|
|
1447 |
#labelChannel: #useFixPaletteLabel
|
|
1448 |
)
|
|
1449 |
#(#CheckBoxSpec
|
|
1450 |
#label: 'Use Fix Gray Color Palette'
|
|
1451 |
#name: 'UseFixGrayPaletteCheckBox'
|
|
1452 |
#layout: #(#LayoutFrame 5 0 201 0 301 0 223 0)
|
|
1453 |
#enableChannel: #visualIsPseudoColor
|
|
1454 |
#model: #useFixGrayPalette
|
|
1455 |
#translateLabel: true
|
|
1456 |
#labelChannel: #useFixGrayPaletteLabel
|
|
1457 |
)
|
|
1458 |
#(#LabelSpec
|
|
1459 |
#label: 'Image Display:'
|
|
1460 |
#name: 'ImageDisplayLabel'
|
|
1461 |
#layout: #(#LayoutFrame 0 0 230 0 205 0 252 0)
|
|
1462 |
#translateLabel: true
|
|
1463 |
#adjust: #right
|
|
1464 |
)
|
|
1465 |
#(#PopUpListSpec
|
|
1466 |
#label: 'image display'
|
|
1467 |
#name: 'DitherListPopUpList'
|
|
1468 |
#layout: #(#LayoutFrame 205 0 230 0 -5 1 252 0)
|
|
1469 |
#tabable: true
|
|
1470 |
#model: #ditherListSelection
|
|
1471 |
#enableChannel: #ditherSymsNotNil
|
|
1472 |
#menu: #ditherList
|
|
1473 |
#useIndex: true
|
|
1474 |
)
|
|
1475 |
#(#CheckBoxSpec
|
|
1476 |
#label: 'Allow Colored/Grayscale Icons'
|
|
1477 |
#name: 'AllowColoredGrayscaleIconsCheckBox'
|
|
1478 |
#layout: #(#LayoutFrame 5 0 262 0 301 0 284 0)
|
|
1479 |
#model: #deepIcons
|
|
1480 |
#translateLabel: true
|
|
1481 |
)
|
|
1482 |
#(#DividerSpec
|
|
1483 |
#name: 'Separator3'
|
|
1484 |
#layout: #(#LayoutFrame 0 0.0 288 0 0 1.0 292 0)
|
|
1485 |
)
|
|
1486 |
#(#LabelSpec
|
|
1487 |
#label: 'ClipBoard Encoding:'
|
|
1488 |
#name: 'ClipBoardEncodingLabel'
|
|
1489 |
#layout: #(#LayoutFrame 0 0 303 0 205 0 325 0)
|
|
1490 |
#translateLabel: true
|
|
1491 |
#adjust: #right
|
|
1492 |
)
|
|
1493 |
#(#PopUpListSpec
|
|
1494 |
#label: 'image display'
|
|
1495 |
#name: 'ClipEncodingListPopUpList'
|
|
1496 |
#layout: #(#LayoutFrame 205 0 303 0 -5 1 325 0)
|
|
1497 |
#tabable: true
|
|
1498 |
#model: #clipEncodingListSelection
|
|
1499 |
#menu: #clipEncodingList
|
|
1500 |
#useIndex: true
|
|
1501 |
)
|
|
1502 |
#(#DividerSpec
|
|
1503 |
#name: 'Separator4'
|
|
1504 |
#layout: #(#LayoutFrame 0 0.0 333 0 0 1.0 337 0)
|
|
1505 |
)
|
|
1506 |
#(#HorizontalPanelViewSpec
|
|
1507 |
#name: 'HorizontalPanel1'
|
|
1508 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
1509 |
#horizontalLayout: #center
|
|
1510 |
#verticalLayout: #center
|
|
1511 |
#horizontalSpace: 3
|
|
1512 |
#verticalSpace: 3
|
|
1513 |
#component:
|
|
1514 |
#(#SpecCollection
|
|
1515 |
#collection: #(
|
|
1516 |
#(#ActionButtonSpec
|
|
1517 |
#label: 'OK'
|
|
1518 |
#name: 'OK'
|
|
1519 |
#translateLabel: true
|
|
1520 |
#model: #saveSettings
|
|
1521 |
#enableChannel: #modifiedChannel
|
|
1522 |
#extent: #(#Point 125 22)
|
|
1523 |
)
|
|
1524 |
#(#ActionButtonSpec
|
|
1525 |
#label: 'Cancel'
|
|
1526 |
#name: 'Cancel'
|
|
1527 |
#translateLabel: true
|
|
1528 |
#model: #doCancel
|
|
1529 |
#extent: #(#Point 125 22)
|
|
1530 |
)
|
|
1531 |
#(#ActionButtonSpec
|
|
1532 |
#label: 'Help'
|
|
1533 |
#name: 'Help'
|
|
1534 |
#translateLabel: true
|
|
1535 |
#model: #help
|
|
1536 |
#extent: #(#Point 125 22)
|
|
1537 |
)
|
|
1538 |
)
|
|
1539 |
|
|
1540 |
)
|
|
1541 |
)
|
|
1542 |
)
|
|
1543 |
|
|
1544 |
)
|
|
1545 |
)
|
|
1546 |
! !
|
|
1547 |
|
|
1548 |
!AbstractSettingsApplication::DisplaySettingsAppl methodsFor:'actions'!
|
|
1549 |
|
|
1550 |
doCancel
|
|
1551 |
|
|
1552 |
self isPartOfSettinsDialog ifTrue:[
|
|
1553 |
self loadRequest.
|
|
1554 |
].
|
|
1555 |
self closeRequest.
|
|
1556 |
!
|
|
1557 |
|
|
1558 |
evaluateModified
|
|
1559 |
|
|
1560 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
1561 |
!
|
|
1562 |
|
|
1563 |
help
|
|
1564 |
|
|
1565 |
"/ self warn:'no help available here'.
|
|
1566 |
self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/screenSettings.html'].
|
|
1567 |
!
|
|
1568 |
|
|
1569 |
loadRequest
|
|
1570 |
|
|
1571 |
self useFixPalette value:screen fixColors notNil.
|
|
1572 |
self useFixGrayPalette value:screen fixGrayColors notNil.
|
|
1573 |
self isColorMonitor value:screen hasColors.
|
|
1574 |
self sizeX value:screen widthInMillimeter.
|
|
1575 |
self sizeY value:screen heightInMillimeter.
|
|
1576 |
|
|
1577 |
self deepIcons value:screen supportsDeepIcons.
|
|
1578 |
ditherSyms notNil ifTrue:[
|
|
1579 |
self ditherListSelection value:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
|
|
1580 |
].
|
|
1581 |
self clipEncodingListSelection value:(self class clipEncodingSyms indexOf:screen clipBoardEncoding ifAbsent:1).
|
|
1582 |
self modifiedChannel value:false.
|
|
1583 |
!
|
|
1584 |
|
|
1585 |
saveRequest
|
|
1586 |
| result |
|
|
1587 |
|
|
1588 |
(self hasUnsavedChanges) ifTrue:[
|
|
1589 |
result := self confirmWithCancel:(resources string:'Save changed Font Settings ?').
|
|
1590 |
result isNil ifTrue:[ ^ false].
|
|
1591 |
result ifTrue:[
|
|
1592 |
self saveSettings.
|
|
1593 |
] ifFalse:[
|
|
1594 |
self loadRequest.
|
|
1595 |
]
|
|
1596 |
].
|
|
1597 |
^ true
|
|
1598 |
!
|
|
1599 |
|
|
1600 |
saveSettings
|
|
1601 |
|
|
1602 |
self hasUnsavedChanges ifTrue:[
|
|
1603 |
Image flushDeviceImages.
|
|
1604 |
|
|
1605 |
screen visualType == #PseudoColor ifTrue:[
|
|
1606 |
self useFixPalette value ifTrue:[
|
|
1607 |
Color colorAllocationFailSignal handle:[:ex |
|
|
1608 |
self warn:'Could not allocate colors.'.
|
|
1609 |
] do:[
|
|
1610 |
Color getColorsRed:4 green:8 blue:4 on:screen
|
|
1611 |
]
|
|
1612 |
] ifFalse:[
|
|
1613 |
screen releaseFixColors
|
|
1614 |
].
|
|
1615 |
|
|
1616 |
self useFixGrayPalette value ifTrue:[
|
|
1617 |
Color colorAllocationFailSignal handle:[:ex |
|
|
1618 |
self warn:'Could not allocate colors.'.
|
|
1619 |
] do:[
|
|
1620 |
Color getGrayColors:32 on:screen
|
|
1621 |
]
|
|
1622 |
] ifFalse:[
|
|
1623 |
screen releaseFixGrayColors
|
|
1624 |
]
|
|
1625 |
].
|
|
1626 |
screen hasColors:self isColorMonitor value.
|
|
1627 |
screen widthInMillimeter:self sizeX value.
|
|
1628 |
screen heightInMillimeter:self sizeY value.
|
|
1629 |
|
|
1630 |
screen supportsDeepIcons:self deepIcons value.
|
|
1631 |
ditherSyms notNil ifTrue:[
|
|
1632 |
Image ditherAlgorithm:(ditherSyms at:self ditherListSelection value).
|
|
1633 |
].
|
|
1634 |
|
|
1635 |
WindowGroup activeGroup withWaitCursorDo:[
|
|
1636 |
View defaultStyle:(View defaultStyle).
|
|
1637 |
].
|
|
1638 |
|
|
1639 |
screen clipBoardEncoding:(self class clipEncodingSyms at:self clipEncodingListSelection value).
|
|
1640 |
self modifiedChannel value:false.
|
|
1641 |
].
|
|
1642 |
! !
|
|
1643 |
|
|
1644 |
!AbstractSettingsApplication::DisplaySettingsAppl methodsFor:'aspects'!
|
|
1645 |
|
|
1646 |
clipEncodingList
|
|
1647 |
|
|
1648 |
clipEncodingList isNil ifTrue:[
|
|
1649 |
clipEncodingList := (resources array:self class clipEncodingStrings) asValue.
|
|
1650 |
"/ if your app needs to be notified of changes, uncomment one of the lines below:
|
|
1651 |
"/ clipEncodingList addDependent:self.
|
|
1652 |
"/ clipEncodingList onChangeSend:#clipEncodingListChanged to:self.
|
|
1653 |
].
|
|
1654 |
^ clipEncodingList.
|
|
1655 |
!
|
|
1656 |
|
|
1657 |
clipEncodingListSelection
|
|
1658 |
|
|
1659 |
clipEncodingListSelection isNil ifTrue:[
|
|
1660 |
clipEncodingListSelection := (self class clipEncodingSyms indexOf:screen clipBoardEncoding ifAbsent:1) asValue.
|
|
1661 |
clipEncodingListSelection onChangeSend:#evaluateModified to:self.
|
|
1662 |
].
|
|
1663 |
^ clipEncodingListSelection.
|
|
1664 |
!
|
|
1665 |
|
|
1666 |
deepIcons
|
|
1667 |
|
|
1668 |
deepIcons isNil ifTrue:[
|
|
1669 |
deepIcons := screen supportsDeepIcons asValue.
|
|
1670 |
deepIcons onChangeSend:#evaluateModified to:self.
|
|
1671 |
].
|
|
1672 |
^ deepIcons.
|
|
1673 |
!
|
|
1674 |
|
|
1675 |
ditherList
|
|
1676 |
|
|
1677 |
ditherList isNil ifTrue:[
|
|
1678 |
ditherList := ValueHolder new.
|
|
1679 |
].
|
|
1680 |
^ ditherList.
|
|
1681 |
!
|
|
1682 |
|
|
1683 |
ditherListSelection
|
|
1684 |
|
|
1685 |
ditherListSelection isNil ifTrue:[
|
|
1686 |
ditherSyms notNil ifTrue:[
|
|
1687 |
ditherListSelection := (ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold) asValue.
|
|
1688 |
] ifFalse:[
|
|
1689 |
ditherListSelection := ValueHolder new.
|
|
1690 |
].
|
|
1691 |
ditherListSelection onChangeSend:#evaluateModified to:self.
|
|
1692 |
].
|
|
1693 |
^ ditherListSelection.
|
|
1694 |
!
|
|
1695 |
|
|
1696 |
ditherSymsNotNil
|
|
1697 |
|
|
1698 |
ditherSymsNotNil isNil ifTrue:[
|
|
1699 |
ditherSymsNotNil := ditherSyms notNil asValue.
|
|
1700 |
].
|
|
1701 |
^ ditherSymsNotNil.
|
|
1702 |
!
|
|
1703 |
|
|
1704 |
isColorMonitor
|
|
1705 |
|
|
1706 |
isColorMonitor isNil ifTrue:[
|
|
1707 |
isColorMonitor := screen hasColors asValue.
|
|
1708 |
isColorMonitor onChangeSend:#evaluateModified to:self.
|
|
1709 |
].
|
|
1710 |
^ isColorMonitor.
|
|
1711 |
!
|
|
1712 |
|
|
1713 |
modifiedChannel
|
|
1714 |
|
|
1715 |
modifiedChannel isNil ifTrue:[
|
|
1716 |
modifiedChannel := false asValue.
|
|
1717 |
].
|
|
1718 |
^ modifiedChannel
|
|
1719 |
!
|
|
1720 |
|
|
1721 |
monitorList
|
|
1722 |
|
|
1723 |
monitorList isNil ifTrue:[
|
|
1724 |
monitorList := (resources array:(sizeInfos collect:[:entry | entry at:1])) asList.
|
|
1725 |
].
|
|
1726 |
^ monitorList.
|
|
1727 |
!
|
|
1728 |
|
|
1729 |
monitorSelection
|
|
1730 |
|
|
1731 |
monitorSelection isNil ifTrue:[
|
|
1732 |
monitorSelection := ValueHolder new.
|
|
1733 |
monitorSelection addDependent:self.
|
|
1734 |
monitorSelection onChangeSend:#evaluateModified to:self.
|
|
1735 |
monitorSelection changed.
|
|
1736 |
].
|
|
1737 |
^ monitorSelection.
|
|
1738 |
!
|
|
1739 |
|
|
1740 |
screenDepthVisualLabelHolder
|
|
1741 |
|
|
1742 |
screenDepthVisualLabelHolder isNil ifTrue:[
|
|
1743 |
screenDepthVisualLabelHolder := (resources string:'Screen: Depth: %1 Visual: %2 (%3)'
|
|
1744 |
with:screen depth printString
|
|
1745 |
with:screen visualType
|
|
1746 |
with:screen serverVendor) asValue.
|
|
1747 |
].
|
|
1748 |
^ screenDepthVisualLabelHolder.
|
|
1749 |
!
|
|
1750 |
|
|
1751 |
sizeX
|
|
1752 |
|
|
1753 |
sizeX isNil ifTrue:[
|
|
1754 |
sizeX := screen widthInMillimeter asValue.
|
|
1755 |
sizeX addDependent:self.
|
|
1756 |
sizeX changed.
|
|
1757 |
sizeX onChangeSend:#evaluateModified to:self.
|
|
1758 |
].
|
|
1759 |
^ sizeX.
|
|
1760 |
!
|
|
1761 |
|
|
1762 |
sizeY
|
|
1763 |
|
|
1764 |
sizeY isNil ifTrue:[
|
|
1765 |
sizeY := screen heightInMillimeter asValue.
|
|
1766 |
sizeY addDependent:self.
|
|
1767 |
sizeY changed.
|
|
1768 |
sizeY onChangeSend:#evaluateModified to:self.
|
|
1769 |
].
|
|
1770 |
^ sizeY.
|
|
1771 |
!
|
|
1772 |
|
|
1773 |
useFixGrayPalette
|
|
1774 |
|
|
1775 |
useFixGrayPalette isNil ifTrue:[
|
|
1776 |
useFixGrayPalette := screen fixGrayColors notNil asValue.
|
|
1777 |
useFixGrayPalette onChangeSend:#evaluateModified to:self.
|
|
1778 |
].
|
|
1779 |
^ useFixGrayPalette.
|
|
1780 |
!
|
|
1781 |
|
|
1782 |
useFixGrayPaletteLabel
|
|
1783 |
|
|
1784 |
useFixGrayPaletteLabel isNil ifTrue:[
|
|
1785 |
useFixGrayPaletteLabel := (resources string:'Use Fix Gray Color Palette %1' with:'(32)') asValue.
|
|
1786 |
].
|
|
1787 |
^ useFixGrayPaletteLabel.
|
|
1788 |
!
|
|
1789 |
|
|
1790 |
useFixPalette
|
|
1791 |
|
|
1792 |
useFixPalette isNil ifTrue:[
|
|
1793 |
useFixPalette := screen fixColors notNil asValue.
|
|
1794 |
useFixPalette onChangeSend:#evaluateModified to:self.
|
|
1795 |
].
|
|
1796 |
^ useFixPalette.
|
|
1797 |
!
|
|
1798 |
|
|
1799 |
useFixPaletteLabel
|
|
1800 |
|
|
1801 |
useFixPaletteLabel isNil ifTrue:[
|
|
1802 |
useFixPaletteLabel := (resources string:'Use Fix Color Palette %1' with:'(4x8x4)') asValue.
|
|
1803 |
].
|
|
1804 |
^ useFixPaletteLabel.
|
|
1805 |
!
|
|
1806 |
|
|
1807 |
visualIsPseudoColor
|
|
1808 |
|
|
1809 |
visualIsPseudoColor isNil ifTrue:[
|
|
1810 |
visualIsPseudoColor := (screen visualType == #PseudoColor) asValue.
|
|
1811 |
visualIsPseudoColor onChangeSend:#evaluateModified to:self.
|
|
1812 |
].
|
|
1813 |
^ visualIsPseudoColor.
|
|
1814 |
! !
|
|
1815 |
|
|
1816 |
!AbstractSettingsApplication::DisplaySettingsAppl methodsFor:'change & update'!
|
|
1817 |
|
|
1818 |
monitorSelectionChanged
|
|
1819 |
|
|
1820 |
| sel sizeInfoEntry sizes|
|
|
1821 |
|
|
1822 |
sel := self monitorSelection value.
|
|
1823 |
(sel notNil and:[sel ~~ 0]) ifTrue:[
|
|
1824 |
sizeInfoEntry := sizeInfos at:sel.
|
|
1825 |
sizes := sizeInfoEntry at:2.
|
|
1826 |
self sizeX value:(sizes at:1).
|
|
1827 |
self sizeY value:(sizes at:2).
|
|
1828 |
].
|
|
1829 |
!
|
|
1830 |
|
|
1831 |
sizeXorYChanged
|
|
1832 |
| sizes idx|
|
|
1833 |
|
|
1834 |
sizes := sizeInfos collect:[:entry | entry at:2].
|
|
1835 |
idx := sizes findFirst:[:entry |
|
|
1836 |
((entry at:1) = sizeX value)
|
|
1837 |
and:[((entry at:2) = sizeY value)]
|
|
1838 |
].
|
|
1839 |
idx ~~ 0 ifTrue:[
|
|
1840 |
self monitorSelection value:idx
|
|
1841 |
].
|
|
1842 |
!
|
|
1843 |
|
|
1844 |
update:something with:aParameter from:changedObject
|
|
1845 |
"Invoked when an object that I depend upon sends a change notification."
|
|
1846 |
|
|
1847 |
"stub code automatically generated - please change as required"
|
|
1848 |
|
|
1849 |
changedObject == self monitorSelection ifTrue:[
|
|
1850 |
self monitorSelectionChanged.
|
|
1851 |
^ self.
|
|
1852 |
].
|
|
1853 |
(changedObject == self sizeX or:[self sizeY]) ifTrue:[
|
|
1854 |
self sizeXorYChanged.
|
|
1855 |
^ self.
|
|
1856 |
].
|
|
1857 |
|
|
1858 |
super update:something with:aParameter from:changedObject
|
|
1859 |
! !
|
|
1860 |
|
|
1861 |
!AbstractSettingsApplication::DisplaySettingsAppl methodsFor:'initialization & release'!
|
|
1862 |
|
|
1863 |
closeRequest
|
|
1864 |
|
|
1865 |
self saveRequest ifFalse:[
|
|
1866 |
^ self
|
|
1867 |
].
|
|
1868 |
|
|
1869 |
^ super closeRequest.
|
|
1870 |
!
|
|
1871 |
|
|
1872 |
initialize
|
|
1873 |
|
|
1874 |
| listOfSizes visual|
|
|
1875 |
resources := self class owningClass classResources.
|
|
1876 |
screen := Screen current.
|
|
1877 |
listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default.
|
|
1878 |
listOfSizes == #default ifTrue:[
|
|
1879 |
"/ nothing in resource file; offer at least some.
|
|
1880 |
sizeInfos := #(
|
|
1881 |
( '11.3'' (235mm x 175mm) LCD' (235 175) )
|
|
1882 |
( '17'' (325mm x 245mm)' (325 245) )
|
|
1883 |
( '19'' (340mm x 270mm)' (340 270) )
|
|
1884 |
( '20'' (350mm x 280mm)' (350 280) )
|
|
1885 |
( '21'' (365mm x 285mm)' (365 285) )
|
|
1886 |
).
|
|
1887 |
] ifFalse:[
|
|
1888 |
sizeInfos := resources array:listOfSizes.
|
|
1889 |
].
|
|
1890 |
visual := screen visualType.
|
|
1891 |
(visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[
|
|
1892 |
ditherStyles := self class staticGrayOrGrayScaleDitherStrings.
|
|
1893 |
ditherSyms := self class staticGrayOrGrayScaleDitherSyms.
|
|
1894 |
] ifFalse:[
|
|
1895 |
visual ~~ #TrueColor ifTrue:[
|
|
1896 |
ditherStyles := self class trueColorDitherStrings.
|
|
1897 |
ditherSyms := self class trueColorDitherSyms.
|
|
1898 |
]
|
|
1899 |
].
|
|
1900 |
super initialize
|
|
1901 |
!
|
|
1902 |
|
|
1903 |
postOpen
|
|
1904 |
!
|
|
1905 |
|
|
1906 |
postOpenAsSubcanvasWith:aBuilder
|
|
1907 |
|
|
1908 |
self postOpen.
|
|
1909 |
^ super postOpenAsSubcanvasWith:aBuilder
|
|
1910 |
!
|
|
1911 |
|
|
1912 |
postOpenWith:aBuilder
|
|
1913 |
|
|
1914 |
self postOpen.
|
|
1915 |
^ super postOpenWith:aBuilder
|
|
1916 |
! !
|
|
1917 |
|
|
1918 |
!AbstractSettingsApplication::DisplaySettingsAppl methodsFor:'queries'!
|
|
1919 |
|
|
1920 |
hasUnsavedChanges
|
|
1921 |
|
|
1922 |
^ (
|
|
1923 |
self useFixPalette value ~= screen fixColors notNil or:[
|
|
1924 |
self useFixGrayPalette value ~= screen fixGrayColors notNil or:[
|
|
1925 |
self isColorMonitor value ~= screen hasColors or:[
|
|
1926 |
self sizeX value ~= screen widthInMillimeter or:[
|
|
1927 |
self sizeY value ~= screen heightInMillimeter or:[
|
|
1928 |
|
|
1929 |
self deepIcons value ~= screen supportsDeepIcons or:[
|
|
1930 |
(ditherSyms notNil and:[
|
|
1931 |
self ditherListSelection value ~= (ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
|
|
1932 |
]) or:[
|
|
1933 |
self clipEncodingListSelection value ~= (self class clipEncodingSyms indexOf:screen clipBoardEncoding ifAbsent:1)
|
|
1934 |
]]]]]]]
|
|
1935 |
)
|
|
1936 |
! !
|
|
1937 |
|
|
1938 |
!AbstractSettingsApplication::EditSettingsAppl class methodsFor:'interface specs'!
|
|
1939 |
|
|
1940 |
windowSpec
|
|
1941 |
"This resource specification was automatically generated
|
|
1942 |
by the UIPainter of ST/X."
|
|
1943 |
|
|
1944 |
"Do not manually edit this!! If it is corrupted,
|
|
1945 |
the UIPainter may not be able to read the specification."
|
|
1946 |
|
|
1947 |
"
|
|
1948 |
UIPainter new openOnClass:AbstractLauncherApplication::EditSettingsAppl andSelector:#windowSpec
|
|
1949 |
AbstractLauncherApplication::EditSettingsAppl new openInterface:#windowSpec
|
|
1950 |
AbstractLauncherApplication::EditSettingsAppl open
|
|
1951 |
"
|
|
1952 |
|
|
1953 |
<resource: #canvas>
|
|
1954 |
|
|
1955 |
^
|
|
1956 |
#(#FullSpec
|
|
1957 |
#name: #windowSpec
|
|
1958 |
#window:
|
|
1959 |
#(#WindowSpec
|
|
1960 |
#label: 'Settings'
|
|
1961 |
#name: 'Settings'
|
|
1962 |
#min: #(#Point 10 10)
|
|
1963 |
#max: #(#Point 1024 768)
|
|
1964 |
#bounds: #(#Rectangle 16 42 616 592)
|
|
1965 |
)
|
|
1966 |
#component:
|
|
1967 |
#(#SpecCollection
|
|
1968 |
#collection: #(
|
|
1969 |
#(#VerticalPanelViewSpec
|
|
1970 |
#name: 'VerticalPanel2'
|
|
1971 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -40 1.0)
|
|
1972 |
#horizontalLayout: #fit
|
|
1973 |
#verticalLayout: #center
|
|
1974 |
#horizontalSpace: 3
|
|
1975 |
#verticalSpace: 3
|
|
1976 |
#component:
|
|
1977 |
#(#SpecCollection
|
|
1978 |
#collection: #(
|
|
1979 |
#(#VerticalPanelViewSpec
|
|
1980 |
#name: 'VerticalPanel1'
|
|
1981 |
#horizontalLayout: #fit
|
|
1982 |
#verticalLayout: #top
|
|
1983 |
#horizontalSpace: 3
|
|
1984 |
#verticalSpace: 3
|
|
1985 |
#component:
|
|
1986 |
#(#SpecCollection
|
|
1987 |
#collection: #(
|
|
1988 |
#(#CheckBoxSpec
|
|
1989 |
#label: 'CTRL-Key to Start TextDrag'
|
|
1990 |
#name: 'CTRLKeyStTextDragCheckBox'
|
|
1991 |
#model: #startTextDragWithControl
|
|
1992 |
#translateLabel: true
|
|
1993 |
#extent: #(#Point 600 23)
|
|
1994 |
)
|
|
1995 |
#(#CheckBoxSpec
|
|
1996 |
#label: 'SearchBox is Modal'
|
|
1997 |
#name: 'SearchBoxModalCheckBox'
|
|
1998 |
#model: #searchDialogIsModal
|
|
1999 |
#translateLabel: true
|
|
2000 |
#extent: #(#Point 600 23)
|
|
2001 |
)
|
|
2002 |
#(#CheckBoxSpec
|
|
2003 |
#label: 'Tab Stops in Multiples of 4'
|
|
2004 |
#name: 'TabStopsMultiples4CheckBox'
|
|
2005 |
#model: #tabsIs4
|
|
2006 |
#translateLabel: true
|
|
2007 |
#extent: #(#Point 600 23)
|
|
2008 |
)
|
|
2009 |
#(#CheckBoxSpec
|
|
2010 |
#label: 'Double Click Select Behavior as in ST80'
|
|
2011 |
#name: 'DoubleClickSelectBehaviorST80CheckBox'
|
|
2012 |
#model: #st80DoubleClickSelectMode
|
|
2013 |
#translateLabel: true
|
|
2014 |
#extent: #(#Point 600 23)
|
|
2015 |
)
|
|
2016 |
#(#CheckBoxSpec
|
|
2017 |
#label: 'Cursor has ST80 Line-end Behavior'
|
|
2018 |
#name: 'CursorST80LineEndBehaviorCheckBox'
|
|
2019 |
#model: #st80EditingMode
|
|
2020 |
#translateLabel: true
|
|
2021 |
#extent: #(#Point 600 23)
|
|
2022 |
)
|
|
2023 |
)
|
|
2024 |
|
|
2025 |
)
|
|
2026 |
#extent: #(#Point 600 200)
|
|
2027 |
)
|
|
2028 |
)
|
|
2029 |
|
|
2030 |
)
|
|
2031 |
)
|
|
2032 |
#(#HorizontalPanelViewSpec
|
|
2033 |
#name: 'HorizontalPanel1'
|
|
2034 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
2035 |
#horizontalLayout: #center
|
|
2036 |
#verticalLayout: #center
|
|
2037 |
#horizontalSpace: 3
|
|
2038 |
#verticalSpace: 3
|
|
2039 |
#component:
|
|
2040 |
#(#SpecCollection
|
|
2041 |
#collection: #(
|
|
2042 |
#(#ActionButtonSpec
|
|
2043 |
#label: 'OK'
|
|
2044 |
#name: 'OK'
|
|
2045 |
#translateLabel: true
|
|
2046 |
#model: #saveSettings
|
|
2047 |
#enableChannel: #modifiedChannel
|
|
2048 |
#extent: #(#Point 125 22)
|
|
2049 |
)
|
|
2050 |
#(#ActionButtonSpec
|
|
2051 |
#label: 'Cancel'
|
|
2052 |
#name: 'Cancel'
|
|
2053 |
#translateLabel: true
|
|
2054 |
#model: #doCancel
|
|
2055 |
#extent: #(#Point 125 22)
|
|
2056 |
)
|
|
2057 |
#(#ActionButtonSpec
|
|
2058 |
#label: 'Help'
|
|
2059 |
#name: 'Help'
|
|
2060 |
#translateLabel: true
|
|
2061 |
#model: #help
|
|
2062 |
#extent: #(#Point 125 22)
|
|
2063 |
)
|
|
2064 |
)
|
|
2065 |
|
|
2066 |
)
|
|
2067 |
)
|
|
2068 |
)
|
|
2069 |
|
|
2070 |
)
|
|
2071 |
)
|
|
2072 |
! !
|
|
2073 |
|
|
2074 |
!AbstractSettingsApplication::EditSettingsAppl methodsFor:'actions'!
|
|
2075 |
|
|
2076 |
doCancel
|
|
2077 |
|
|
2078 |
self isPartOfSettinsDialog ifTrue:[
|
|
2079 |
self loadRequest.
|
|
2080 |
].
|
|
2081 |
self closeRequest.
|
|
2082 |
!
|
|
2083 |
|
|
2084 |
evaluateModified
|
|
2085 |
|
|
2086 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
2087 |
!
|
|
2088 |
|
|
2089 |
help
|
|
2090 |
|
|
2091 |
"/ self warn:'no help available here'.
|
|
2092 |
self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/editSettings.html'].
|
|
2093 |
!
|
|
2094 |
|
|
2095 |
loadRequest
|
|
2096 |
|
|
2097 |
self st80EditingMode value: UserPreferences current st80EditMode.
|
|
2098 |
self st80DoubleClickSelectMode value: TextView st80SelectMode.
|
|
2099 |
self tabsIs4 value: (ListView userDefaultTabPositions = ListView tab4Positions).
|
|
2100 |
self searchDialogIsModal value: UserPreferences current searchDialogIsModal.
|
|
2101 |
self startTextDragWithControl value: UserPreferences current startTextDragWithControl.
|
|
2102 |
self modifiedChannel value:false.
|
|
2103 |
!
|
|
2104 |
|
|
2105 |
saveRequest
|
|
2106 |
| result |
|
|
2107 |
|
|
2108 |
(self hasUnsavedChanges) ifTrue:[
|
|
2109 |
result := self confirmWithCancel:(resources string:'Save changed Font Settings ?').
|
|
2110 |
result isNil ifTrue:[ ^ false].
|
|
2111 |
result ifTrue:[
|
|
2112 |
self saveSettings.
|
|
2113 |
] ifFalse:[
|
|
2114 |
self loadRequest.
|
|
2115 |
]
|
|
2116 |
].
|
|
2117 |
^ true
|
|
2118 |
!
|
|
2119 |
|
|
2120 |
saveSettings
|
|
2121 |
|
|
2122 |
self hasUnsavedChanges ifTrue:[
|
|
2123 |
UserPreferences current st80EditMode:(self st80EditingMode value).
|
|
2124 |
TextView st80SelectMode:(self st80DoubleClickSelectMode value).
|
|
2125 |
tabsIs4 value ~~ (ListView userDefaultTabPositions = ListView tab4Positions) ifTrue:[
|
|
2126 |
ListView userDefaultTabPositions:(self tabsIs4 value ifTrue:[ListView tab4Positions] ifFalse:[ListView tab8Positions]).
|
|
2127 |
ListView allSubInstancesDo:[:eachKindOfListView |
|
|
2128 |
self tabsIs4 value ifTrue:[eachKindOfListView setTab4] ifFalse:[eachKindOfListView setTab8]
|
|
2129 |
].
|
|
2130 |
].
|
|
2131 |
UserPreferences current searchDialogIsModal:self searchDialogIsModal value.
|
|
2132 |
UserPreferences current startTextDragWithControl:self startTextDragWithControl value.
|
|
2133 |
self modifiedChannel value:false.
|
|
2134 |
].
|
|
2135 |
! !
|
|
2136 |
|
|
2137 |
!AbstractSettingsApplication::EditSettingsAppl methodsFor:'aspects'!
|
|
2138 |
|
|
2139 |
modifiedChannel
|
|
2140 |
|
|
2141 |
modifiedChannel isNil ifTrue:[
|
|
2142 |
modifiedChannel := false asValue.
|
|
2143 |
].
|
|
2144 |
^ modifiedChannel
|
|
2145 |
!
|
|
2146 |
|
|
2147 |
searchDialogIsModal
|
|
2148 |
|
|
2149 |
searchDialogIsModal isNil ifTrue:[
|
|
2150 |
searchDialogIsModal := true asValue.
|
|
2151 |
searchDialogIsModal onChangeSend:#evaluateModified to:self.
|
|
2152 |
].
|
|
2153 |
^ searchDialogIsModal.
|
|
2154 |
!
|
|
2155 |
|
|
2156 |
st80DoubleClickSelectMode
|
|
2157 |
|
|
2158 |
st80DoubleClickSelectMode isNil ifTrue:[
|
|
2159 |
st80DoubleClickSelectMode := true asValue.
|
|
2160 |
st80DoubleClickSelectMode onChangeSend:#evaluateModified to:self.
|
|
2161 |
].
|
|
2162 |
^ st80DoubleClickSelectMode.
|
|
2163 |
!
|
|
2164 |
|
|
2165 |
st80EditingMode
|
|
2166 |
|
|
2167 |
st80EditingMode isNil ifTrue:[
|
|
2168 |
st80EditingMode := true asValue.
|
|
2169 |
st80EditingMode onChangeSend:#evaluateModified to:self.
|
|
2170 |
].
|
|
2171 |
^ st80EditingMode.
|
|
2172 |
!
|
|
2173 |
|
|
2174 |
startTextDragWithControl
|
|
2175 |
|
|
2176 |
startTextDragWithControl isNil ifTrue:[
|
|
2177 |
startTextDragWithControl := true asValue.
|
|
2178 |
startTextDragWithControl onChangeSend:#evaluateModified to:self.
|
|
2179 |
].
|
|
2180 |
^ startTextDragWithControl.
|
|
2181 |
!
|
|
2182 |
|
|
2183 |
tabsIs4
|
|
2184 |
|
|
2185 |
tabsIs4 isNil ifTrue:[
|
|
2186 |
tabsIs4 := true asValue.
|
|
2187 |
tabsIs4 onChangeSend:#evaluateModified to:self.
|
|
2188 |
].
|
|
2189 |
^ tabsIs4.
|
|
2190 |
! !
|
|
2191 |
|
|
2192 |
!AbstractSettingsApplication::EditSettingsAppl methodsFor:'change & update'!
|
|
2193 |
|
|
2194 |
update:something with:aParameter from:changedObject
|
|
2195 |
"Invoked when an object that I depend upon sends a change notification."
|
|
2196 |
|
|
2197 |
"stub code automatically generated - please change as required"
|
|
2198 |
|
|
2199 |
"/ changedObject == self allOfThem ifTrue:[
|
|
2200 |
"/ ^ self.
|
|
2201 |
"/ ].
|
|
2202 |
|
|
2203 |
super update:something with:aParameter from:changedObject
|
|
2204 |
! !
|
|
2205 |
|
|
2206 |
!AbstractSettingsApplication::EditSettingsAppl methodsFor:'initialization & release'!
|
|
2207 |
|
|
2208 |
closeRequest
|
|
2209 |
|
|
2210 |
self saveRequest ifFalse:[
|
|
2211 |
^ self
|
|
2212 |
].
|
|
2213 |
|
|
2214 |
^ super closeRequest.
|
|
2215 |
!
|
|
2216 |
|
|
2217 |
initialize
|
|
2218 |
|
|
2219 |
resources := self class owningClass classResources.
|
|
2220 |
self loadRequest.
|
|
2221 |
super initialize
|
|
2222 |
!
|
|
2223 |
|
|
2224 |
postOpen
|
|
2225 |
!
|
|
2226 |
|
|
2227 |
postOpenAsSubcanvasWith:aBuilder
|
|
2228 |
|
|
2229 |
self postOpen.
|
|
2230 |
^ super postOpenAsSubcanvasWith:aBuilder
|
|
2231 |
!
|
|
2232 |
|
|
2233 |
postOpenWith:aBuilder
|
|
2234 |
|
|
2235 |
self postOpen.
|
|
2236 |
^ super postOpenWith:aBuilder
|
|
2237 |
! !
|
|
2238 |
|
|
2239 |
!AbstractSettingsApplication::EditSettingsAppl methodsFor:'queries'!
|
|
2240 |
|
|
2241 |
hasUnsavedChanges
|
|
2242 |
|
|
2243 |
^ (
|
|
2244 |
UserPreferences current st80EditMode ~= (self st80EditingMode value) or:[
|
|
2245 |
TextView st80SelectMode ~= (self st80DoubleClickSelectMode value) or:[
|
|
2246 |
(tabsIs4 value ~~ (ListView userDefaultTabPositions = ListView tab4Positions) and:[
|
|
2247 |
ListView userDefaultTabPositions ~= (self tabsIs4 value ifTrue:[ListView tab4Positions] ifFalse:[ListView tab8Positions]) or:[
|
|
2248 |
]]) or:[
|
|
2249 |
UserPreferences current searchDialogIsModal ~= self searchDialogIsModal value or:[
|
|
2250 |
UserPreferences current startTextDragWithControl ~= self startTextDragWithControl value ]]]]
|
|
2251 |
)
|
|
2252 |
! !
|
|
2253 |
|
|
2254 |
!AbstractSettingsApplication::FontSettingsAppl class methodsFor:'defaults'!
|
|
2255 |
|
|
2256 |
widgetList
|
|
2257 |
|
|
2258 |
^ #(
|
|
2259 |
'All'
|
|
2260 |
'Labels'
|
|
2261 |
'Buttons'
|
|
2262 |
'Lists'
|
|
2263 |
'Menus'
|
|
2264 |
'Edited Text'
|
|
2265 |
)
|
|
2266 |
! !
|
|
2267 |
|
|
2268 |
!AbstractSettingsApplication::FontSettingsAppl class methodsFor:'instance creation'!
|
|
2269 |
|
|
2270 |
fontForEncoding:encodingMatch
|
|
2271 |
|
|
2272 |
| inst |
|
|
2273 |
|
|
2274 |
inst := self new.
|
|
2275 |
inst encodingMatch:encodingMatch.
|
|
2276 |
self initialize.
|
|
2277 |
self open.
|
|
2278 |
! !
|
|
2279 |
|
|
2280 |
!AbstractSettingsApplication::FontSettingsAppl class methodsFor:'interface specs'!
|
|
2281 |
|
|
2282 |
windowSpec
|
|
2283 |
"This resource specification was automatically generated
|
|
2284 |
by the UIPainter of ST/X."
|
|
2285 |
|
|
2286 |
"Do not manually edit this!! If it is corrupted,
|
|
2287 |
the UIPainter may not be able to read the specification."
|
|
2288 |
|
|
2289 |
"
|
|
2290 |
UIPainter new openOnClass:AbstractLauncherApplication::FontSettingsAppl andSelector:#windowSpec
|
|
2291 |
AbstractLauncherApplication::FontSettingsAppl new openInterface:#windowSpec
|
|
2292 |
AbstractLauncherApplication::FontSettingsAppl open
|
|
2293 |
"
|
|
2294 |
|
|
2295 |
<resource: #canvas>
|
|
2296 |
|
|
2297 |
^
|
|
2298 |
#(#FullSpec
|
|
2299 |
#name: #windowSpec
|
|
2300 |
#window:
|
|
2301 |
#(#WindowSpec
|
|
2302 |
#label: 'Font Settings'
|
|
2303 |
#name: 'Font Settings'
|
|
2304 |
#min: #(#Point 10 10)
|
|
2305 |
#max: #(#Point 1024 768)
|
|
2306 |
#bounds: #(#Rectangle 16 42 490 353)
|
|
2307 |
)
|
|
2308 |
#component:
|
|
2309 |
#(#SpecCollection
|
|
2310 |
#collection: #(
|
|
2311 |
#(#ViewSpec
|
|
2312 |
#name: 'AllBox'
|
|
2313 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 50 0)
|
|
2314 |
#component:
|
|
2315 |
#(#SpecCollection
|
|
2316 |
#collection: #(
|
|
2317 |
#(#LabelSpec
|
|
2318 |
#label: 'All'
|
|
2319 |
#name: 'All'
|
|
2320 |
#layout: #(#LayoutFrame 0 0.0 0 0 100 0 20 0)
|
|
2321 |
#style: #(#FontDescription #helvetica #bold #roman 12)
|
|
2322 |
#translateLabel: true
|
|
2323 |
#adjust: #left
|
|
2324 |
)
|
|
2325 |
#(#LabelSpec
|
|
2326 |
#label: 'Label'
|
|
2327 |
#name: 'AllFont'
|
|
2328 |
#layout: #(#LayoutFrame 105 0 22 0 -5 1 44 0)
|
|
2329 |
#translateLabel: true
|
|
2330 |
#labelChannel: #allFontLabelHolder
|
|
2331 |
#adjust: #left
|
|
2332 |
#postBuildCallback: #postBuildAllFontLabel:
|
|
2333 |
)
|
|
2334 |
#(#ActionButtonSpec
|
|
2335 |
#label: 'Change ...'
|
|
2336 |
#name: 'ChangeAll'
|
|
2337 |
#layout: #(#LayoutFrame 0 0.0 22 0 105 0 44 0)
|
|
2338 |
#translateLabel: true
|
|
2339 |
#model: #changeAllFont
|
|
2340 |
)
|
|
2341 |
)
|
|
2342 |
|
|
2343 |
)
|
|
2344 |
)
|
|
2345 |
#(#DividerSpec
|
|
2346 |
#name: 'Separator1'
|
|
2347 |
#layout: #(#LayoutFrame 0 0.0 50 0 0 1.0 54 0)
|
|
2348 |
)
|
|
2349 |
#(#ViewSpec
|
|
2350 |
#name: 'LabelsBox'
|
|
2351 |
#layout: #(#LayoutFrame 0 0.0 55 0 0 1.0 105 0)
|
|
2352 |
#component:
|
|
2353 |
#(#SpecCollection
|
|
2354 |
#collection: #(
|
|
2355 |
#(#LabelSpec
|
|
2356 |
#label: 'Labels'
|
|
2357 |
#name: 'Labels'
|
|
2358 |
#layout: #(#LayoutFrame 0 0.0 0 0 100 0 20 0)
|
|
2359 |
#style: #(#FontDescription #helvetica #bold #roman 12)
|
|
2360 |
#translateLabel: true
|
|
2361 |
#adjust: #left
|
|
2362 |
)
|
|
2363 |
#(#LabelSpec
|
|
2364 |
#label: 'Labels'
|
|
2365 |
#name: 'LabelsFont'
|
|
2366 |
#layout: #(#LayoutFrame 105 0 22 0 -5 1 44 0)
|
|
2367 |
#translateLabel: true
|
|
2368 |
#labelChannel: #labelsFontLabelHolder
|
|
2369 |
#adjust: #left
|
|
2370 |
#postBuildCallback: #postBuildLabelsFontLabel:
|
|
2371 |
)
|
|
2372 |
#(#ActionButtonSpec
|
|
2373 |
#label: 'Change ...'
|
|
2374 |
#name: 'ChangeLabels'
|
|
2375 |
#layout: #(#LayoutFrame 0 0.0 22 0 105 0 44 0)
|
|
2376 |
#translateLabel: true
|
|
2377 |
#model: #changeLabelsFont
|
|
2378 |
)
|
|
2379 |
)
|
|
2380 |
|
|
2381 |
)
|
|
2382 |
)
|
|
2383 |
#(#DividerSpec
|
|
2384 |
#name: 'Separator2'
|
|
2385 |
#layout: #(#LayoutFrame 0 0.0 105 0 0 1.0 109 0)
|
|
2386 |
)
|
|
2387 |
#(#ViewSpec
|
|
2388 |
#name: 'ButtonsBox'
|
|
2389 |
#layout: #(#LayoutFrame 0 0.0 110 0 0 1.0 160 0)
|
|
2390 |
#component:
|
|
2391 |
#(#SpecCollection
|
|
2392 |
#collection: #(
|
|
2393 |
#(#LabelSpec
|
|
2394 |
#label: 'Buttons'
|
|
2395 |
#name: 'Buttons'
|
|
2396 |
#layout: #(#LayoutFrame 0 0.0 0 0 100 0 20 0)
|
|
2397 |
#style: #(#FontDescription #helvetica #bold #roman 12)
|
|
2398 |
#translateLabel: true
|
|
2399 |
#adjust: #left
|
|
2400 |
)
|
|
2401 |
#(#LabelSpec
|
|
2402 |
#label: 'Buttons Font'
|
|
2403 |
#name: 'ButtonsFont'
|
|
2404 |
#layout: #(#LayoutFrame 105 0 22 0 -5 1 44 0)
|
|
2405 |
#translateLabel: true
|
|
2406 |
#labelChannel: #buttonsFontLabelHolder
|
|
2407 |
#adjust: #left
|
|
2408 |
#postBuildCallback: #postBuildButtonsFontLabel:
|
|
2409 |
)
|
|
2410 |
#(#ActionButtonSpec
|
|
2411 |
#label: 'Change ...'
|
|
2412 |
#name: 'Change Buttons'
|
|
2413 |
#layout: #(#LayoutFrame 0 0.0 22 0 105 0 44 0)
|
|
2414 |
#translateLabel: true
|
|
2415 |
#model: #changeButtonsFont
|
|
2416 |
)
|
|
2417 |
)
|
|
2418 |
|
|
2419 |
)
|
|
2420 |
)
|
|
2421 |
#(#DividerSpec
|
|
2422 |
#name: 'Separator3'
|
|
2423 |
#layout: #(#LayoutFrame 0 0.0 160 0 0 1.0 164 0)
|
|
2424 |
)
|
|
2425 |
#(#ViewSpec
|
|
2426 |
#name: 'ListsBox'
|
|
2427 |
#layout: #(#LayoutFrame 0 0.0 165 0 0 1.0 215 0)
|
|
2428 |
#component:
|
|
2429 |
#(#SpecCollection
|
|
2430 |
#collection: #(
|
|
2431 |
#(#LabelSpec
|
|
2432 |
#label: 'Lists'
|
|
2433 |
#name: 'Lists'
|
|
2434 |
#layout: #(#LayoutFrame 0 0.0 0 0 100 0 20 0)
|
|
2435 |
#style: #(#FontDescription #helvetica #bold #roman 12)
|
|
2436 |
#translateLabel: true
|
|
2437 |
#adjust: #left
|
|
2438 |
)
|
|
2439 |
#(#LabelSpec
|
|
2440 |
#label: 'Lists Font'
|
|
2441 |
#name: 'ListsFont'
|
|
2442 |
#layout: #(#LayoutFrame 105 0 22 0 -5 1 44 0)
|
|
2443 |
#translateLabel: true
|
|
2444 |
#labelChannel: #listsFontLabelHolder
|
|
2445 |
#adjust: #left
|
|
2446 |
#postBuildCallback: #postBuildListsFontLabel:
|
|
2447 |
)
|
|
2448 |
#(#ActionButtonSpec
|
|
2449 |
#label: 'Change ...'
|
|
2450 |
#name: 'ChangeLists'
|
|
2451 |
#layout: #(#LayoutFrame 0 0.0 22 0 105 0 44 0)
|
|
2452 |
#translateLabel: true
|
|
2453 |
#model: #changeListsFont
|
|
2454 |
)
|
|
2455 |
)
|
|
2456 |
|
|
2457 |
)
|
|
2458 |
)
|
|
2459 |
#(#DividerSpec
|
|
2460 |
#name: 'Separator4'
|
|
2461 |
#layout: #(#LayoutFrame 0 0.0 215 0 0 1.0 219 0)
|
|
2462 |
)
|
|
2463 |
#(#ViewSpec
|
|
2464 |
#name: 'MenusBox'
|
|
2465 |
#layout: #(#LayoutFrame 0 0.0 220 0 0 1.0 270 0)
|
|
2466 |
#component:
|
|
2467 |
#(#SpecCollection
|
|
2468 |
#collection: #(
|
|
2469 |
#(#LabelSpec
|
|
2470 |
#label: 'Menus'
|
|
2471 |
#name: 'Menus'
|
|
2472 |
#layout: #(#LayoutFrame 0 0.0 0 0 100 0 20 0)
|
|
2473 |
#style: #(#FontDescription #helvetica #bold #roman 12)
|
|
2474 |
#translateLabel: true
|
|
2475 |
#adjust: #left
|
|
2476 |
)
|
|
2477 |
#(#LabelSpec
|
|
2478 |
#label: 'Menus Font'
|
|
2479 |
#name: 'MenusFont'
|
|
2480 |
#layout: #(#LayoutFrame 105 0 22 0 -5 1 44 0)
|
|
2481 |
#translateLabel: true
|
|
2482 |
#labelChannel: #menusFontLabelHolder
|
|
2483 |
#adjust: #left
|
|
2484 |
#postBuildCallback: #postBuildMenuesFontLabel:
|
|
2485 |
)
|
|
2486 |
#(#ActionButtonSpec
|
|
2487 |
#label: 'Change ...'
|
|
2488 |
#name: 'ChangeMenus'
|
|
2489 |
#layout: #(#LayoutFrame 0 0.0 22 0 105 0 44 0)
|
|
2490 |
#translateLabel: true
|
|
2491 |
#model: #changeMenusFont
|
|
2492 |
)
|
|
2493 |
)
|
|
2494 |
|
|
2495 |
)
|
|
2496 |
)
|
|
2497 |
#(#DividerSpec
|
|
2498 |
#name: 'Separator5'
|
|
2499 |
#layout: #(#LayoutFrame 0 0.0 270 0 0 1.0 274 0)
|
|
2500 |
)
|
|
2501 |
#(#ViewSpec
|
|
2502 |
#name: 'TextBox'
|
|
2503 |
#layout: #(#LayoutFrame 0 0.0 280 0 0 1.0 340 0)
|
|
2504 |
#component:
|
|
2505 |
#(#SpecCollection
|
|
2506 |
#collection: #(
|
|
2507 |
#(#LabelSpec
|
|
2508 |
#label: 'Text'
|
|
2509 |
#name: 'Text'
|
|
2510 |
#layout: #(#LayoutFrame 0 0.0 0 0 100 0 20 0)
|
|
2511 |
#style: #(#FontDescription #helvetica #bold #roman 12)
|
|
2512 |
#translateLabel: true
|
|
2513 |
#adjust: #left
|
|
2514 |
)
|
|
2515 |
#(#LabelSpec
|
|
2516 |
#label: 'Text Font'
|
|
2517 |
#name: 'TextFont'
|
|
2518 |
#layout: #(#LayoutFrame 105 0 22 0 -5 1 44 0)
|
|
2519 |
#translateLabel: true
|
|
2520 |
#labelChannel: #textFontLabelHolder
|
|
2521 |
#adjust: #left
|
|
2522 |
#postBuildCallback: #postBuildTextFontLabel:
|
|
2523 |
)
|
|
2524 |
#(#ActionButtonSpec
|
|
2525 |
#label: 'Change ...'
|
|
2526 |
#name: 'ChangeText'
|
|
2527 |
#layout: #(#LayoutFrame 0 0.0 22 0 105 0 44 0)
|
|
2528 |
#translateLabel: true
|
|
2529 |
#model: #changeTextFont
|
|
2530 |
)
|
|
2531 |
)
|
|
2532 |
|
|
2533 |
)
|
|
2534 |
)
|
|
2535 |
#(#DividerSpec
|
|
2536 |
#name: 'Separator6'
|
|
2537 |
#layout: #(#LayoutFrame 0 0.0 340 0 0 1.0 344 0)
|
|
2538 |
)
|
|
2539 |
#(#HorizontalPanelViewSpec
|
|
2540 |
#name: 'HorizontalPanel1'
|
|
2541 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
2542 |
#horizontalLayout: #center
|
|
2543 |
#verticalLayout: #center
|
|
2544 |
#horizontalSpace: 0
|
|
2545 |
#verticalSpace: 3
|
|
2546 |
#component:
|
|
2547 |
#(#SpecCollection
|
|
2548 |
#collection: #(
|
|
2549 |
#(#ActionButtonSpec
|
|
2550 |
#label: 'OK'
|
|
2551 |
#name: 'OK'
|
|
2552 |
#translateLabel: true
|
|
2553 |
#model: #saveSettings
|
|
2554 |
#enableChannel: #modifiedChannel
|
|
2555 |
#extent: #(#Point 100 22)
|
|
2556 |
)
|
|
2557 |
#(#ActionButtonSpec
|
|
2558 |
#label: 'Cancel'
|
|
2559 |
#name: 'Cancel'
|
|
2560 |
#translateLabel: true
|
|
2561 |
#model: #doCancel
|
|
2562 |
#extent: #(#Point 100 22)
|
|
2563 |
)
|
|
2564 |
#(#ActionButtonSpec
|
|
2565 |
#label: 'Defaults'
|
|
2566 |
#name: 'Button1'
|
|
2567 |
#translateLabel: true
|
|
2568 |
#model: #loadRequest
|
|
2569 |
#extent: #(#Point 100 22)
|
|
2570 |
)
|
|
2571 |
#(#ActionButtonSpec
|
|
2572 |
#label: 'Help'
|
|
2573 |
#name: 'Help'
|
|
2574 |
#translateLabel: true
|
|
2575 |
#model: #help
|
|
2576 |
#extent: #(#Point 100 22)
|
|
2577 |
)
|
|
2578 |
)
|
|
2579 |
|
|
2580 |
)
|
|
2581 |
)
|
|
2582 |
)
|
|
2583 |
|
|
2584 |
)
|
|
2585 |
)
|
|
2586 |
!
|
|
2587 |
|
|
2588 |
windowSpec2
|
|
2589 |
"This resource specification was automatically generated
|
|
2590 |
by the UIPainter of ST/X."
|
|
2591 |
|
|
2592 |
"Do not manually edit this!! If it is corrupted,
|
|
2593 |
the UIPainter may not be able to read the specification."
|
|
2594 |
|
|
2595 |
"
|
|
2596 |
UIPainter new openOnClass:AbstractLauncherApplication::FontSettingsAppl andSelector:#windowSpec
|
|
2597 |
AbstractLauncherApplication::FontSettingsAppl new openInterface:#windowSpec
|
|
2598 |
AbstractLauncherApplication::FontSettingsAppl open
|
|
2599 |
"
|
|
2600 |
|
|
2601 |
<resource: #canvas>
|
|
2602 |
|
|
2603 |
^
|
|
2604 |
#(#FullSpec
|
|
2605 |
#name: #windowSpec
|
|
2606 |
#window:
|
|
2607 |
#(#WindowSpec
|
|
2608 |
#label: 'Font Settings'
|
|
2609 |
#name: 'Font Settings'
|
|
2610 |
#min: #(#Point 10 10)
|
|
2611 |
#max: #(#Point 1024 768)
|
|
2612 |
#bounds: #(#Rectangle 16 42 491 533)
|
|
2613 |
)
|
|
2614 |
#component:
|
|
2615 |
#(#SpecCollection
|
|
2616 |
#collection: #(
|
|
2617 |
#(#HorizontalPanelViewSpec
|
|
2618 |
#name: 'HorizontalPanel1'
|
|
2619 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
2620 |
#horizontalLayout: #center
|
|
2621 |
#verticalLayout: #center
|
|
2622 |
#horizontalSpace: 3
|
|
2623 |
#verticalSpace: 3
|
|
2624 |
#component:
|
|
2625 |
#(#SpecCollection
|
|
2626 |
#collection: #(
|
|
2627 |
#(#ActionButtonSpec
|
|
2628 |
#label: 'OK'
|
|
2629 |
#name: 'OK'
|
|
2630 |
#translateLabel: true
|
|
2631 |
#model: #saveSettings
|
|
2632 |
#enableChannel: #modifiedChannel
|
|
2633 |
#extent: #(#Point 125 22)
|
|
2634 |
)
|
|
2635 |
#(#ActionButtonSpec
|
|
2636 |
#label: 'Cancel'
|
|
2637 |
#name: 'Cancel'
|
|
2638 |
#translateLabel: true
|
|
2639 |
#model: #doCancel
|
|
2640 |
#extent: #(#Point 125 22)
|
|
2641 |
)
|
|
2642 |
#(#ActionButtonSpec
|
|
2643 |
#label: 'Help'
|
|
2644 |
#name: 'Help'
|
|
2645 |
#translateLabel: true
|
|
2646 |
#model: #help
|
|
2647 |
#extent: #(#Point 125 22)
|
|
2648 |
)
|
|
2649 |
)
|
|
2650 |
|
|
2651 |
)
|
|
2652 |
)
|
|
2653 |
#(#SequenceViewSpec
|
|
2654 |
#name: 'WidgetList'
|
|
2655 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 105 0)
|
|
2656 |
#model: #selectedWidget
|
|
2657 |
#style: #(#FontDescription #helvetica #bold #roman 12)
|
|
2658 |
#hasHorizontalScrollBar: true
|
|
2659 |
#hasVerticalScrollBar: true
|
|
2660 |
#useIndex: false
|
|
2661 |
#sequenceList: #widgetList
|
|
2662 |
)
|
|
2663 |
#(#ViewSpec
|
|
2664 |
#name: 'Box1'
|
|
2665 |
#layout: #(#LayoutFrame 0 0.0 105 0 0 1.0 -34 1)
|
|
2666 |
#component:
|
|
2667 |
#(#SpecCollection
|
|
2668 |
#collection: #(
|
|
2669 |
#(#NonScrollableArbitraryComponentSpec
|
|
2670 |
#name: 'FontPanel'
|
|
2671 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
2672 |
#component: #FontPanel
|
|
2673 |
)
|
|
2674 |
)
|
|
2675 |
|
|
2676 |
)
|
|
2677 |
)
|
|
2678 |
)
|
|
2679 |
|
|
2680 |
)
|
|
2681 |
)
|
|
2682 |
!
|
|
2683 |
|
|
2684 |
windowSpecFirst
|
|
2685 |
"This resource specification was automatically generated
|
|
2686 |
by the UIPainter of ST/X."
|
|
2687 |
|
|
2688 |
"Do not manually edit this!! If it is corrupted,
|
|
2689 |
the UIPainter may not be able to read the specification."
|
|
2690 |
|
|
2691 |
"
|
|
2692 |
UIPainter new openOnClass:AbstractLauncherApplication::FontSettingsAppl andSelector:#windowSpecFirst
|
|
2693 |
AbstractLauncherApplication::FontSettingsAppl new openInterface:#windowSpecFirst
|
|
2694 |
"
|
|
2695 |
|
|
2696 |
<resource: #canvas>
|
|
2697 |
|
|
2698 |
^
|
|
2699 |
#(#FullSpec
|
|
2700 |
#name: #windowSpecFirst
|
|
2701 |
#window:
|
|
2702 |
#(#WindowSpec
|
|
2703 |
#label: 'Font Settings'
|
|
2704 |
#name: 'Font Settings'
|
|
2705 |
#min: #(#Point 10 10)
|
|
2706 |
#max: #(#Point 1024 768)
|
|
2707 |
#bounds: #(#Rectangle 16 42 491 456)
|
|
2708 |
)
|
|
2709 |
#component:
|
|
2710 |
#(#SpecCollection
|
|
2711 |
#collection: #(
|
|
2712 |
#(#HorizontalPanelViewSpec
|
|
2713 |
#name: 'HorizontalPanel1'
|
|
2714 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
2715 |
#horizontalLayout: #center
|
|
2716 |
#verticalLayout: #center
|
|
2717 |
#horizontalSpace: 3
|
|
2718 |
#verticalSpace: 3
|
|
2719 |
#component:
|
|
2720 |
#(#SpecCollection
|
|
2721 |
#collection: #(
|
|
2722 |
#(#ActionButtonSpec
|
|
2723 |
#label: 'OK'
|
|
2724 |
#name: 'OK'
|
|
2725 |
#translateLabel: true
|
|
2726 |
#model: #saveSettings
|
|
2727 |
#enableChannel: #modifiedChannel
|
|
2728 |
#extent: #(#Point 125 22)
|
|
2729 |
)
|
|
2730 |
#(#ActionButtonSpec
|
|
2731 |
#label: 'Cancel'
|
|
2732 |
#name: 'Cancel'
|
|
2733 |
#translateLabel: true
|
|
2734 |
#model: #doCancel
|
|
2735 |
#extent: #(#Point 125 22)
|
|
2736 |
)
|
|
2737 |
#(#ActionButtonSpec
|
|
2738 |
#label: 'Help'
|
|
2739 |
#name: 'Help'
|
|
2740 |
#translateLabel: true
|
|
2741 |
#model: #help
|
|
2742 |
#extent: #(#Point 125 22)
|
|
2743 |
)
|
|
2744 |
)
|
|
2745 |
|
|
2746 |
)
|
|
2747 |
)
|
|
2748 |
)
|
|
2749 |
|
|
2750 |
)
|
|
2751 |
)
|
|
2752 |
!
|
|
2753 |
|
|
2754 |
windowSpecx
|
|
2755 |
"This resource specification was automatically generated
|
|
2756 |
by the UIPainter of ST/X."
|
|
2757 |
|
|
2758 |
"Do not manually edit this!! If it is corrupted,
|
|
2759 |
the UIPainter may not be able to read the specification."
|
|
2760 |
|
|
2761 |
"
|
|
2762 |
UIPainter new openOnClass:AbstractLauncherApplication::FontSettingsAppl andSelector:#windowSpec
|
|
2763 |
AbstractLauncherApplication::FontSettingsAppl new openInterface:#windowSpec
|
|
2764 |
AbstractLauncherApplication::FontSettingsAppl open
|
|
2765 |
"
|
|
2766 |
|
|
2767 |
<resource: #canvas>
|
|
2768 |
|
|
2769 |
^
|
|
2770 |
#(#FullSpec
|
|
2771 |
#name: #windowSpec
|
|
2772 |
#window:
|
|
2773 |
#(#WindowSpec
|
|
2774 |
#label: 'Font Settings'
|
|
2775 |
#name: 'Font Settings'
|
|
2776 |
#min: #(#Point 10 10)
|
|
2777 |
#max: #(#Point 1024 768)
|
|
2778 |
#bounds: #(#Rectangle 16 42 491 533)
|
|
2779 |
)
|
|
2780 |
#component:
|
|
2781 |
#(#SpecCollection
|
|
2782 |
#collection: #(
|
|
2783 |
#(#HorizontalPanelViewSpec
|
|
2784 |
#name: 'HorizontalPanel1'
|
|
2785 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
2786 |
#horizontalLayout: #center
|
|
2787 |
#verticalLayout: #center
|
|
2788 |
#horizontalSpace: 3
|
|
2789 |
#verticalSpace: 3
|
|
2790 |
#component:
|
|
2791 |
#(#SpecCollection
|
|
2792 |
#collection: #(
|
|
2793 |
#(#ActionButtonSpec
|
|
2794 |
#label: 'OK'
|
|
2795 |
#name: 'OK'
|
|
2796 |
#translateLabel: true
|
|
2797 |
#model: #saveSettings
|
|
2798 |
#enableChannel: #modifiedChannel
|
|
2799 |
#extent: #(#Point 125 22)
|
|
2800 |
)
|
|
2801 |
#(#ActionButtonSpec
|
|
2802 |
#label: 'Cancel'
|
|
2803 |
#name: 'Cancel'
|
|
2804 |
#translateLabel: true
|
|
2805 |
#model: #doCancel
|
|
2806 |
#extent: #(#Point 125 22)
|
|
2807 |
)
|
|
2808 |
#(#ActionButtonSpec
|
|
2809 |
#label: 'Help'
|
|
2810 |
#name: 'Help'
|
|
2811 |
#translateLabel: true
|
|
2812 |
#model: #help
|
|
2813 |
#extent: #(#Point 125 22)
|
|
2814 |
)
|
|
2815 |
)
|
|
2816 |
|
|
2817 |
)
|
|
2818 |
)
|
|
2819 |
#(#SequenceViewSpec
|
|
2820 |
#name: 'WidgetList'
|
|
2821 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 105 0)
|
|
2822 |
#model: #selectedWidget
|
|
2823 |
#style: #(#FontDescription #helvetica #bold #roman 12)
|
|
2824 |
#hasHorizontalScrollBar: true
|
|
2825 |
#hasVerticalScrollBar: true
|
|
2826 |
#useIndex: false
|
|
2827 |
#sequenceList: #widgetList
|
|
2828 |
)
|
|
2829 |
#(#ViewSpec
|
|
2830 |
#name: 'Box1'
|
|
2831 |
#layout: #(#LayoutFrame 0 0.0 105 0 0 1.0 -34 1)
|
|
2832 |
#component:
|
|
2833 |
#(#SpecCollection
|
|
2834 |
#collection: #(
|
|
2835 |
#(#TextEditorSpec
|
|
2836 |
#name: 'ExampleText'
|
|
2837 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 145 0)
|
|
2838 |
#model: #exampleText
|
|
2839 |
#hasHorizontalScrollBar: true
|
|
2840 |
#hasVerticalScrollBar: true
|
|
2841 |
)
|
|
2842 |
#(#VariableHorizontalPanelSpec
|
|
2843 |
#name: 'VariableHorizontalPanel1'
|
|
2844 |
#layout: #(#LayoutFrame 0 0.0 145 0 0 1.0 -20 1)
|
|
2845 |
#component:
|
|
2846 |
#(#SpecCollection
|
|
2847 |
#collection: #(
|
|
2848 |
#(#ViewSpec
|
|
2849 |
#name: 'FamilyBox'
|
|
2850 |
#component:
|
|
2851 |
#(#SpecCollection
|
|
2852 |
#collection: #(
|
|
2853 |
#(#SequenceViewSpec
|
|
2854 |
#name: 'FamilyList'
|
|
2855 |
#layout: #(#LayoutFrame 0 0.0 20 0.0 0 1.0 0 1.0)
|
|
2856 |
#model: #selectedFamily
|
|
2857 |
#hasHorizontalScrollBar: true
|
|
2858 |
#hasVerticalScrollBar: true
|
|
2859 |
#useIndex: false
|
|
2860 |
#sequenceList: #familyList
|
|
2861 |
)
|
|
2862 |
#(#LabelSpec
|
|
2863 |
#label: 'Family'
|
|
2864 |
#name: 'FamilyLabel'
|
|
2865 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 20 0)
|
|
2866 |
#translateLabel: true
|
|
2867 |
)
|
|
2868 |
)
|
|
2869 |
|
|
2870 |
)
|
|
2871 |
)
|
|
2872 |
#(#ViewSpec
|
|
2873 |
#name: 'TypeFaceBox'
|
|
2874 |
#component:
|
|
2875 |
#(#SpecCollection
|
|
2876 |
#collection: #(
|
|
2877 |
#(#SequenceViewSpec
|
|
2878 |
#name: 'TypeFaceList'
|
|
2879 |
#layout: #(#LayoutFrame 0 0.0 20 0.0 0 1.0 0 1.0)
|
|
2880 |
#model: #selectedTypeFace
|
|
2881 |
#hasHorizontalScrollBar: true
|
|
2882 |
#hasVerticalScrollBar: true
|
|
2883 |
#useIndex: false
|
|
2884 |
#sequenceList: #typeFaceList
|
|
2885 |
)
|
|
2886 |
#(#LabelSpec
|
|
2887 |
#label: 'TypeFace'
|
|
2888 |
#name: 'TypeFaceLabel'
|
|
2889 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 20 0)
|
|
2890 |
#translateLabel: true
|
|
2891 |
)
|
|
2892 |
)
|
|
2893 |
|
|
2894 |
)
|
|
2895 |
)
|
|
2896 |
#(#ViewSpec
|
|
2897 |
#name: 'SizeListBox'
|
|
2898 |
#component:
|
|
2899 |
#(#SpecCollection
|
|
2900 |
#collection: #(
|
|
2901 |
#(#LabelSpec
|
|
2902 |
#label: 'Size'
|
|
2903 |
#name: 'SizeLabel'
|
|
2904 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 20 0)
|
|
2905 |
#translateLabel: true
|
|
2906 |
)
|
|
2907 |
#(#SequenceViewSpec
|
|
2908 |
#name: 'SizeList'
|
|
2909 |
#layout: #(#LayoutFrame 0 0.0 20 0.0 0 1.0 0 1.0)
|
|
2910 |
#model: #selectedSize
|
|
2911 |
#hasHorizontalScrollBar: true
|
|
2912 |
#hasVerticalScrollBar: true
|
|
2913 |
#useIndex: false
|
|
2914 |
#sequenceList: #sizeList
|
|
2915 |
)
|
|
2916 |
)
|
|
2917 |
|
|
2918 |
)
|
|
2919 |
)
|
|
2920 |
)
|
|
2921 |
|
|
2922 |
)
|
|
2923 |
#handles: #(#Any 0.333333 0.666667 1.0)
|
|
2924 |
)
|
|
2925 |
#(#LabelSpec
|
|
2926 |
#label: 'CurrentFontLabel'
|
|
2927 |
#name: 'CurrentFontLabel'
|
|
2928 |
#layout: #(#LayoutFrame 0 0.0 -20 1 0 1.0 0 1)
|
|
2929 |
#level: -1
|
|
2930 |
#translateLabel: true
|
|
2931 |
#labelChannel: #currentFontLabelHolder
|
|
2932 |
#adjust: #left
|
|
2933 |
)
|
|
2934 |
)
|
|
2935 |
|
|
2936 |
)
|
|
2937 |
)
|
|
2938 |
)
|
|
2939 |
|
|
2940 |
)
|
|
2941 |
)
|
|
2942 |
! !
|
|
2943 |
|
|
2944 |
!AbstractSettingsApplication::FontSettingsAppl methodsFor:'accessing'!
|
|
2945 |
|
|
2946 |
encodingMatch:aEncodingMatch
|
|
2947 |
|
|
2948 |
aEncodingMatch notNil ifTrue:[
|
|
2949 |
filter := [:f | f encoding notNil
|
|
2950 |
and:[aEncodingMatch match:f encoding]].
|
|
2951 |
].
|
|
2952 |
! !
|
|
2953 |
|
|
2954 |
!AbstractSettingsApplication::FontSettingsAppl methodsFor:'actions'!
|
|
2955 |
|
|
2956 |
changeAllFont
|
|
2957 |
|f|
|
|
2958 |
|
|
2959 |
f := FontPanel
|
|
2960 |
fontFromUserInitial:(self allOfThem value)
|
|
2961 |
title:(resources string:'Font for %1' with:'All')
|
|
2962 |
filter:filter.
|
|
2963 |
f notNil ifTrue:[
|
|
2964 |
self allOfThem value:f.
|
|
2965 |
self labelDef value:f.
|
|
2966 |
self buttonDef value:f.
|
|
2967 |
self listDef value:f.
|
|
2968 |
self menuDef value:f.
|
|
2969 |
self textDef value:f.
|
|
2970 |
]
|
|
2971 |
!
|
|
2972 |
|
|
2973 |
changeButtonsFont
|
|
2974 |
|
|
2975 |
|f|
|
|
2976 |
|
|
2977 |
f := FontPanel
|
|
2978 |
fontFromUserInitial:(self allOfThem value)
|
|
2979 |
title:(resources string:'Font for %1' with:'All')
|
|
2980 |
filter:filter.
|
|
2981 |
f notNil ifTrue:[
|
|
2982 |
self allOfThem value:f.
|
|
2983 |
]
|
|
2984 |
!
|
|
2985 |
|
|
2986 |
changeLabelsFont
|
|
2987 |
|f|
|
|
2988 |
|
|
2989 |
f := FontPanel
|
|
2990 |
fontFromUserInitial:(self labelDef value)
|
|
2991 |
title:(resources string:'Font for %1' with:'Labels')
|
|
2992 |
filter:filter.
|
|
2993 |
f notNil ifTrue:[
|
|
2994 |
self labelDef value:f.
|
|
2995 |
]
|
|
2996 |
!
|
|
2997 |
|
|
2998 |
changeListsFont
|
|
2999 |
|f|
|
|
3000 |
|
|
3001 |
f := FontPanel
|
|
3002 |
fontFromUserInitial:(self listDef value)
|
|
3003 |
title:(resources string:'Font for %1' with:'Lists')
|
|
3004 |
filter:filter.
|
|
3005 |
f notNil ifTrue:[
|
|
3006 |
self listDef value:f.
|
|
3007 |
]
|
|
3008 |
!
|
|
3009 |
|
|
3010 |
changeMenusFont
|
|
3011 |
|f|
|
|
3012 |
|
|
3013 |
f := FontPanel
|
|
3014 |
fontFromUserInitial:(self menuDef value)
|
|
3015 |
title:(resources string:'Font for %1' with:'Menus')
|
|
3016 |
filter:filter.
|
|
3017 |
f notNil ifTrue:[
|
|
3018 |
self menuDef value:f.
|
|
3019 |
]
|
|
3020 |
!
|
|
3021 |
|
|
3022 |
changeTextFont
|
|
3023 |
|f|
|
|
3024 |
|
|
3025 |
f := FontPanel
|
|
3026 |
fontFromUserInitial:(self textDef value)
|
|
3027 |
title:(resources string:'Font for %1' with:'Edited Text')
|
|
3028 |
filter:filter.
|
|
3029 |
f notNil ifTrue:[
|
|
3030 |
self textDef value:f.
|
|
3031 |
]
|
|
3032 |
!
|
|
3033 |
|
|
3034 |
doCancel
|
|
3035 |
|
|
3036 |
self isPartOfSettinsDialog ifTrue:[
|
|
3037 |
self loadRequest.
|
|
3038 |
].
|
|
3039 |
self closeRequest.
|
|
3040 |
!
|
|
3041 |
|
|
3042 |
evaluateModified
|
|
3043 |
|
|
3044 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
3045 |
!
|
|
3046 |
|
|
3047 |
help
|
|
3048 |
|
|
3049 |
self warn:'no help available here'.
|
|
3050 |
"/ self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/keyboardSetting.html'].
|
|
3051 |
!
|
|
3052 |
|
|
3053 |
loadRequest
|
|
3054 |
|
|
3055 |
View readStyleSheetAndUpdateAllStyleCaches.
|
|
3056 |
self labelDef value:Label defaultFont.
|
|
3057 |
self buttonDef value:Button defaultFont.
|
|
3058 |
self listDef value:SelectionInListView defaultFont.
|
|
3059 |
self menuDef value:MenuView defaultFont.
|
|
3060 |
self textDef value:TextView defaultFont.
|
|
3061 |
self allOfThem value:nil.
|
|
3062 |
self modifiedChannel value:false.
|
|
3063 |
!
|
|
3064 |
|
|
3065 |
saveRequest
|
|
3066 |
| result |
|
|
3067 |
|
|
3068 |
(self hasUnsavedChanges) ifTrue:[
|
|
3069 |
result := self confirmWithCancel:(resources string:'Save changed Font Settings ?').
|
|
3070 |
result isNil ifTrue:[ ^ false].
|
|
3071 |
result ifTrue:[
|
|
3072 |
self saveSettings.
|
|
3073 |
] ifFalse:[
|
|
3074 |
self loadRequest.
|
|
3075 |
]
|
|
3076 |
].
|
|
3077 |
^ true
|
|
3078 |
!
|
|
3079 |
|
|
3080 |
saveSettings
|
|
3081 |
|
|
3082 |
| master requestor|
|
|
3083 |
|
|
3084 |
master := self masterApplication.
|
|
3085 |
master notNil ifTrue:[
|
|
3086 |
requestor := master requestor.
|
|
3087 |
].
|
|
3088 |
self hasUnsavedChanges ifTrue:[
|
|
3089 |
| launcher |
|
|
3090 |
Label defaultFont:self labelDef value.
|
|
3091 |
Button defaultFont:self buttonDef value.
|
|
3092 |
Toggle defaultFont:self buttonDef value.
|
|
3093 |
TextView withAllSubclasses do:[:cls | cls defaultFont:self textDef value].
|
|
3094 |
SelectionInListView withAllSubclasses do:[:cls | cls defaultFont:self listDef value].
|
|
3095 |
MenuView defaultFont:self menuDef value.
|
|
3096 |
PullDownMenu defaultFont:self menuDef value.
|
|
3097 |
self modifiedChannel value:false.
|
|
3098 |
].
|
|
3099 |
! !
|
|
3100 |
|
|
3101 |
!AbstractSettingsApplication::FontSettingsAppl methodsFor:'aspects'!
|
|
3102 |
|
|
3103 |
allFontLabelHolder
|
|
3104 |
|
|
3105 |
allFontLabelHolder isNil ifTrue:[
|
|
3106 |
allFontLabelHolder := '' asValue.
|
|
3107 |
].
|
|
3108 |
^ allFontLabelHolder.
|
|
3109 |
!
|
|
3110 |
|
|
3111 |
allOfThem
|
|
3112 |
"return/create the 'allOfThem' value holder (automatically generated)"
|
|
3113 |
|
|
3114 |
allOfThem isNil ifTrue:[
|
|
3115 |
allOfThem := ValueHolder new.
|
|
3116 |
allOfThem addDependent:self.
|
|
3117 |
].
|
|
3118 |
^ allOfThem
|
|
3119 |
!
|
|
3120 |
|
|
3121 |
buttonDef
|
|
3122 |
"return/create the 'buttonDef' value holder (automatically generated)"
|
|
3123 |
|
|
3124 |
buttonDef isNil ifTrue:[
|
|
3125 |
buttonDef := ValueHolder new.
|
|
3126 |
buttonDef addDependent:self.
|
|
3127 |
].
|
|
3128 |
^ buttonDef
|
|
3129 |
!
|
|
3130 |
|
|
3131 |
buttonsFontLabelHolder
|
|
3132 |
|
|
3133 |
buttonsFontLabelHolder isNil ifTrue:[
|
|
3134 |
buttonsFontLabelHolder := Button defaultFont asValue.
|
|
3135 |
].
|
|
3136 |
^ buttonsFontLabelHolder.
|
|
3137 |
!
|
|
3138 |
|
|
3139 |
labelDef
|
|
3140 |
"return/create the 'labelDef' value holder (automatically generated)"
|
|
3141 |
|
|
3142 |
labelDef isNil ifTrue:[
|
|
3143 |
labelDef := ValueHolder new.
|
|
3144 |
labelDef addDependent:self.
|
|
3145 |
].
|
|
3146 |
^ labelDef
|
|
3147 |
!
|
|
3148 |
|
|
3149 |
labelsFontLabelHolder
|
|
3150 |
|
|
3151 |
labelsFontLabelHolder isNil ifTrue:[
|
|
3152 |
labelsFontLabelHolder := Label defaultFont asValue.
|
|
3153 |
].
|
|
3154 |
^ labelsFontLabelHolder.
|
|
3155 |
!
|
|
3156 |
|
|
3157 |
listDef
|
|
3158 |
"return/create the 'listDef' value holder (automatically generated)"
|
|
3159 |
|
|
3160 |
listDef isNil ifTrue:[
|
|
3161 |
listDef := ValueHolder new.
|
|
3162 |
listDef addDependent:self.
|
|
3163 |
].
|
|
3164 |
^ listDef
|
|
3165 |
!
|
|
3166 |
|
|
3167 |
listsFontLabelHolder
|
|
3168 |
|
|
3169 |
listsFontLabelHolder isNil ifTrue:[
|
|
3170 |
listsFontLabelHolder := SelectionInListView defaultFont asValue.
|
|
3171 |
].
|
|
3172 |
^ listsFontLabelHolder.
|
|
3173 |
!
|
|
3174 |
|
|
3175 |
menuDef
|
|
3176 |
"return/create the 'menuDef' value holder (automatically generated)"
|
|
3177 |
|
|
3178 |
menuDef isNil ifTrue:[
|
|
3179 |
menuDef := ValueHolder new.
|
|
3180 |
menuDef addDependent:self.
|
|
3181 |
].
|
|
3182 |
^ menuDef
|
|
3183 |
!
|
|
3184 |
|
|
3185 |
menusFontLabelHolder
|
|
3186 |
|
|
3187 |
menusFontLabelHolder isNil ifTrue:[
|
|
3188 |
menusFontLabelHolder := MenuView defaultFont asValue.
|
|
3189 |
].
|
|
3190 |
^ menusFontLabelHolder.
|
|
3191 |
!
|
|
3192 |
|
|
3193 |
modifiedChannel
|
|
3194 |
|
|
3195 |
modifiedChannel isNil ifTrue:[
|
|
3196 |
modifiedChannel := false asValue.
|
|
3197 |
].
|
|
3198 |
^ modifiedChannel
|
|
3199 |
!
|
|
3200 |
|
|
3201 |
textDef
|
|
3202 |
"return/create the 'textDef' value holder (automatically generated)"
|
|
3203 |
|
|
3204 |
textDef isNil ifTrue:[
|
|
3205 |
textDef := ValueHolder new.
|
|
3206 |
textDef addDependent:self.
|
|
3207 |
].
|
|
3208 |
^ textDef
|
|
3209 |
!
|
|
3210 |
|
|
3211 |
textFontLabelHolder
|
|
3212 |
|
|
3213 |
textFontLabelHolder isNil ifTrue:[
|
|
3214 |
textFontLabelHolder := TextView defaultFont asValue.
|
|
3215 |
].
|
|
3216 |
^ textFontLabelHolder.
|
|
3217 |
! !
|
|
3218 |
|
|
3219 |
!AbstractSettingsApplication::FontSettingsAppl methodsFor:'change & update'!
|
|
3220 |
|
|
3221 |
update:something with:aParameter from:changedObject
|
|
3222 |
"Invoked when an object that I depend upon sends a change notification."
|
|
3223 |
|
|
3224 |
"stub code automatically generated - please change as required"
|
|
3225 |
|
|
3226 |
changedObject == self allOfThem ifTrue:[
|
|
3227 |
| f label|
|
|
3228 |
f := self allOfThem value.
|
|
3229 |
allLabel font:f.
|
|
3230 |
label := f isNil ifTrue:[
|
|
3231 |
''
|
|
3232 |
] ifFalse:[
|
|
3233 |
f userFriendlyName
|
|
3234 |
].
|
|
3235 |
self allFontLabelHolder value:f.
|
|
3236 |
self evaluateModified.
|
|
3237 |
^ self.
|
|
3238 |
].
|
|
3239 |
changedObject == self labelDef ifTrue:[
|
|
3240 |
| f label|
|
|
3241 |
f := self labelDef value.
|
|
3242 |
labelLabel font:f.
|
|
3243 |
label := f isNil ifTrue:[
|
|
3244 |
''
|
|
3245 |
] ifFalse:[
|
|
3246 |
f userFriendlyName
|
|
3247 |
].
|
|
3248 |
self labelsFontLabelHolder value:f.
|
|
3249 |
self evaluateModified.
|
|
3250 |
^ self.
|
|
3251 |
].
|
|
3252 |
changedObject == self buttonDef ifTrue:[
|
|
3253 |
| f label|
|
|
3254 |
f := self buttonDef value.
|
|
3255 |
buttonsLabel font:f.
|
|
3256 |
label := f isNil ifTrue:[
|
|
3257 |
''
|
|
3258 |
] ifFalse:[
|
|
3259 |
f userFriendlyName
|
|
3260 |
].
|
|
3261 |
self buttonsFontLabelHolder value:f.
|
|
3262 |
self evaluateModified.
|
|
3263 |
^ self.
|
|
3264 |
].
|
|
3265 |
changedObject == self listDef ifTrue:[
|
|
3266 |
| f label|
|
|
3267 |
f := self listDef value.
|
|
3268 |
listsLabel font:f.
|
|
3269 |
label := f isNil ifTrue:[
|
|
3270 |
''
|
|
3271 |
] ifFalse:[
|
|
3272 |
f userFriendlyName
|
|
3273 |
].
|
|
3274 |
self listsFontLabelHolder value:f.
|
|
3275 |
self evaluateModified.
|
|
3276 |
^ self.
|
|
3277 |
].
|
|
3278 |
changedObject == self menuDef ifTrue:[
|
|
3279 |
| f label|
|
|
3280 |
f := self menuDef value.
|
|
3281 |
menuLabel font:f.
|
|
3282 |
label := f isNil ifTrue:[
|
|
3283 |
''
|
|
3284 |
] ifFalse:[
|
|
3285 |
f userFriendlyName
|
|
3286 |
].
|
|
3287 |
self menusFontLabelHolder value:f.
|
|
3288 |
self evaluateModified.
|
|
3289 |
^ self.
|
|
3290 |
].
|
|
3291 |
changedObject == self textDef ifTrue:[
|
|
3292 |
| f label|
|
|
3293 |
f := self textDef value.
|
|
3294 |
textLabel font:f.
|
|
3295 |
label := f isNil ifTrue:[
|
|
3296 |
''
|
|
3297 |
] ifFalse:[
|
|
3298 |
f userFriendlyName
|
|
3299 |
].
|
|
3300 |
self evaluateModified.
|
|
3301 |
self textFontLabelHolder value:f.
|
|
3302 |
^ self.
|
|
3303 |
].
|
|
3304 |
|
|
3305 |
super update:something with:aParameter from:changedObject
|
|
3306 |
! !
|
|
3307 |
|
|
3308 |
!AbstractSettingsApplication::FontSettingsAppl methodsFor:'initialization & release'!
|
|
3309 |
|
|
3310 |
closeRequest
|
|
3311 |
|
|
3312 |
self saveRequest ifFalse:[
|
|
3313 |
^ self
|
|
3314 |
].
|
|
3315 |
|
|
3316 |
^ super closeRequest.
|
|
3317 |
!
|
|
3318 |
|
|
3319 |
initialize
|
|
3320 |
|
|
3321 |
resources := self class owningClass classResources.
|
|
3322 |
super initialize
|
|
3323 |
!
|
|
3324 |
|
|
3325 |
postBuildAllFontLabel:aWidget
|
|
3326 |
|
|
3327 |
allLabel := aWidget.
|
|
3328 |
!
|
|
3329 |
|
|
3330 |
postBuildButtonsFontLabel:aWidget
|
|
3331 |
|
|
3332 |
buttonsLabel := aWidget.
|
|
3333 |
!
|
|
3334 |
|
|
3335 |
postBuildLabelsFontLabel:aWidget
|
|
3336 |
|
|
3337 |
labelLabel := aWidget.
|
|
3338 |
!
|
|
3339 |
|
|
3340 |
postBuildListsFontLabel:aWidget
|
|
3341 |
|
|
3342 |
listsLabel := aWidget.
|
|
3343 |
!
|
|
3344 |
|
|
3345 |
postBuildMenuesFontLabel:aWidget
|
|
3346 |
|
|
3347 |
menuLabel := aWidget.
|
|
3348 |
!
|
|
3349 |
|
|
3350 |
postBuildTextFontLabel:aWidget
|
|
3351 |
|
|
3352 |
textLabel := aWidget.
|
|
3353 |
!
|
|
3354 |
|
|
3355 |
postOpen
|
|
3356 |
|
|
3357 |
self allOfThem value:nil.
|
|
3358 |
self labelDef value:Label defaultFont.
|
|
3359 |
self buttonDef value:Button defaultFont.
|
|
3360 |
self listDef value:SelectionInListView defaultFont.
|
|
3361 |
self menuDef value:MenuView defaultFont.
|
|
3362 |
self textDef value:TextView defaultFont.
|
|
3363 |
!
|
|
3364 |
|
|
3365 |
postOpenAsSubcanvasWith:aBuilder
|
|
3366 |
|
|
3367 |
self postOpen.
|
|
3368 |
^ super postOpenAsSubcanvasWith:aBuilder
|
|
3369 |
!
|
|
3370 |
|
|
3371 |
postOpenWith:aBuilder
|
|
3372 |
|
|
3373 |
self postOpen.
|
|
3374 |
^ super postOpenWith:aBuilder
|
|
3375 |
! !
|
|
3376 |
|
|
3377 |
!AbstractSettingsApplication::FontSettingsAppl methodsFor:'queries'!
|
|
3378 |
|
|
3379 |
hasUnsavedChanges
|
|
3380 |
|
|
3381 |
^ (self labelDef value ~= Label defaultFont) or:[
|
|
3382 |
self buttonDef value ~= Button defaultFont or:[
|
|
3383 |
self listDef value ~= SelectionInListView defaultFont or:[
|
|
3384 |
self menuDef value ~= MenuView defaultFont or:[
|
|
3385 |
self textDef value ~= TextView defaultFont ]]]]
|
|
3386 |
! !
|
|
3387 |
|
|
3388 |
!AbstractSettingsApplication::KbdMappingSettingsAppl class methodsFor:'interface specs'!
|
|
3389 |
|
|
3390 |
windowSpec
|
|
3391 |
"This resource specification was automatically generated
|
|
3392 |
by the UIPainter of ST/X."
|
|
3393 |
|
|
3394 |
"Do not manually edit this!! If it is corrupted,
|
|
3395 |
the UIPainter may not be able to read the specification."
|
|
3396 |
|
|
3397 |
"
|
|
3398 |
UIPainter new openOnClass:AbstractLauncherApplication::KbdMappingSettingsAppl andSelector:#windowSpec
|
|
3399 |
AbstractLauncherApplication::KbdMappingSettingsAppl new openInterface:#windowSpec
|
|
3400 |
AbstractLauncherApplication::KbdMappingSettingsAppl open
|
|
3401 |
"
|
|
3402 |
|
|
3403 |
<resource: #canvas>
|
|
3404 |
|
|
3405 |
^
|
|
3406 |
#(#FullSpec
|
|
3407 |
#name: #windowSpec
|
|
3408 |
#window:
|
|
3409 |
#(#WindowSpec
|
|
3410 |
#label: 'Keyboard Mappings'
|
|
3411 |
#name: 'Keyboard Mappings'
|
|
3412 |
#min: #(#Point 10 10)
|
|
3413 |
#max: #(#Point 1024 768)
|
|
3414 |
#bounds: #(#Rectangle 16 42 491 620)
|
|
3415 |
)
|
|
3416 |
#component:
|
|
3417 |
#(#SpecCollection
|
|
3418 |
#collection: #(
|
|
3419 |
#(#VariableVerticalPanelSpec
|
|
3420 |
#name: 'VariableVerticalPanel1'
|
|
3421 |
#layout: #(#LayoutFrame 0 0.0 60 0 0 1.0 -34 1)
|
|
3422 |
#component:
|
|
3423 |
#(#SpecCollection
|
|
3424 |
#collection: #(
|
|
3425 |
#(#VariableHorizontalPanelSpec
|
|
3426 |
#name: 'VariableHorizontalPanel1'
|
|
3427 |
#component:
|
|
3428 |
#(#SpecCollection
|
|
3429 |
#collection: #(
|
|
3430 |
#(#SequenceViewSpec
|
|
3431 |
#name: 'RawKeyList'
|
|
3432 |
#model: #selectedRawKey
|
|
3433 |
#hasHorizontalScrollBar: true
|
|
3434 |
#hasVerticalScrollBar: true
|
|
3435 |
#useIndex: false
|
|
3436 |
#sequenceList: #rawKeyList
|
|
3437 |
)
|
|
3438 |
#(#SequenceViewSpec
|
|
3439 |
#name: 'FunctionKeyList'
|
|
3440 |
#model: #selectedFunctionKey
|
|
3441 |
#hasHorizontalScrollBar: true
|
|
3442 |
#hasVerticalScrollBar: true
|
|
3443 |
#useIndex: false
|
|
3444 |
#sequenceList: #functionKeyList
|
|
3445 |
)
|
|
3446 |
)
|
|
3447 |
|
|
3448 |
)
|
|
3449 |
#handles: #(#Any 0.5 1.0)
|
|
3450 |
)
|
|
3451 |
#(#ViewSpec
|
|
3452 |
#name: 'Box1'
|
|
3453 |
#component:
|
|
3454 |
#(#SpecCollection
|
|
3455 |
#collection: #(
|
|
3456 |
#(#TextEditorSpec
|
|
3457 |
#name: 'MacroText'
|
|
3458 |
#layout: #(#LayoutFrame 0 0.0 20 0 0 1.0 0 1.0)
|
|
3459 |
#model: #macroTextHolder
|
|
3460 |
#hasHorizontalScrollBar: true
|
|
3461 |
#hasVerticalScrollBar: true
|
|
3462 |
#isReadOnly: true
|
|
3463 |
)
|
|
3464 |
#(#LabelSpec
|
|
3465 |
#label: 'Macro text (if any):'
|
|
3466 |
#name: 'MacroTextLabel'
|
|
3467 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 20 0)
|
|
3468 |
#translateLabel: true
|
|
3469 |
#adjust: #left
|
|
3470 |
)
|
|
3471 |
)
|
|
3472 |
|
|
3473 |
)
|
|
3474 |
)
|
|
3475 |
)
|
|
3476 |
|
|
3477 |
)
|
|
3478 |
#handles: #(#Any 0.5 1.0)
|
|
3479 |
)
|
|
3480 |
#(#HorizontalPanelViewSpec
|
|
3481 |
#name: 'HorizontalPanel1'
|
|
3482 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
3483 |
#horizontalLayout: #center
|
|
3484 |
#verticalLayout: #center
|
|
3485 |
#horizontalSpace: 3
|
|
3486 |
#verticalSpace: 3
|
|
3487 |
#component:
|
|
3488 |
#(#SpecCollection
|
|
3489 |
#collection: #(
|
|
3490 |
#(#ActionButtonSpec
|
|
3491 |
#label: 'Close'
|
|
3492 |
#name: 'Cancel'
|
|
3493 |
#visibilityChannel: #isNotPartOfSettinsDialog
|
|
3494 |
#translateLabel: true
|
|
3495 |
#model: #doCancel
|
|
3496 |
#extent: #(#Point 125 22)
|
|
3497 |
)
|
|
3498 |
#(#ActionButtonSpec
|
|
3499 |
#label: 'Help'
|
|
3500 |
#name: 'Help'
|
|
3501 |
#translateLabel: true
|
|
3502 |
#model: #help
|
|
3503 |
#extent: #(#Point 125 22)
|
|
3504 |
)
|
|
3505 |
)
|
|
3506 |
|
|
3507 |
)
|
|
3508 |
)
|
|
3509 |
#(#LabelSpec
|
|
3510 |
#label: 'NoticeText'
|
|
3511 |
#name: 'Text'
|
|
3512 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 60 0)
|
|
3513 |
#translateLabel: true
|
|
3514 |
#labelChannel: #labelTextHolder
|
|
3515 |
#resizeForLabel: true
|
|
3516 |
#adjust: #left
|
|
3517 |
)
|
|
3518 |
)
|
|
3519 |
|
|
3520 |
)
|
|
3521 |
)
|
|
3522 |
! !
|
|
3523 |
|
|
3524 |
!AbstractSettingsApplication::KbdMappingSettingsAppl methodsFor:'actions'!
|
|
3525 |
|
|
3526 |
doCancel
|
|
3527 |
|
|
3528 |
self isPartOfSettinsDialog ifTrue:[
|
|
3529 |
self loadRequest.
|
|
3530 |
].
|
|
3531 |
self closeRequest.
|
|
3532 |
!
|
|
3533 |
|
|
3534 |
evaluateModified
|
|
3535 |
|
|
3536 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
3537 |
!
|
|
3538 |
|
|
3539 |
help
|
|
3540 |
|
|
3541 |
self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/keyboardSetting.html'].
|
|
3542 |
!
|
|
3543 |
|
|
3544 |
loadRequest
|
|
3545 |
|
|
3546 |
self modifiedChannel value:false.
|
|
3547 |
!
|
|
3548 |
|
|
3549 |
saveRequest
|
|
3550 |
| result |
|
|
3551 |
|
|
3552 |
(self hasUnsavedChanges) ifTrue:[
|
|
3553 |
result := self confirmWithCancel:(resources string:'Save changed Tool Settings ?').
|
|
3554 |
result isNil ifTrue:[ ^ false].
|
|
3555 |
result ifTrue:[
|
|
3556 |
self saveSettings.
|
|
3557 |
] ifFalse:[
|
|
3558 |
self loadRequest.
|
|
3559 |
]
|
|
3560 |
].
|
|
3561 |
^ true
|
|
3562 |
!
|
|
3563 |
|
|
3564 |
saveSettings
|
|
3565 |
! !
|
|
3566 |
|
|
3567 |
!AbstractSettingsApplication::KbdMappingSettingsAppl methodsFor:'aspects'!
|
|
3568 |
|
|
3569 |
functionKeyList
|
|
3570 |
"automatically generated by UIPainter ..."
|
|
3571 |
|
|
3572 |
"*** the code below creates a default model when invoked."
|
|
3573 |
"*** (which may not be the one you wanted)"
|
|
3574 |
"*** Please change as required and accept it in the browser."
|
|
3575 |
"*** (and replace this comment by something more useful ;-)"
|
|
3576 |
|
|
3577 |
functionKeyList isNil ifTrue:[
|
|
3578 |
functionKeyList := ValueHolder new.
|
|
3579 |
"/ if your app needs to be notified of changes, uncomment one of the lines below:
|
|
3580 |
"/ functionKeyList addDependent:self.
|
|
3581 |
"/ functionKeyList onChangeSend:#functionKeyListChanged to:self.
|
|
3582 |
].
|
|
3583 |
^ functionKeyList.
|
|
3584 |
!
|
|
3585 |
|
|
3586 |
labelTextHolder
|
|
3587 |
"automatically generated by UIPainter ..."
|
|
3588 |
|
|
3589 |
"*** the code below creates a default model when invoked."
|
|
3590 |
"*** (which may not be the one you wanted)"
|
|
3591 |
"*** Please change as required and accept it in the browser."
|
|
3592 |
"*** (and replace this comment by something more useful ;-)"
|
|
3593 |
|
|
3594 |
labelTextHolder isNil ifTrue:[
|
|
3595 |
labelTextHolder := ValueHolder new.
|
|
3596 |
"/ if your app needs to be notified of changes, uncomment one of the lines below:
|
|
3597 |
"/ labelTextHolder addDependent:self.
|
|
3598 |
"/ labelTextHolder onChangeSend:#labelTextHolderChanged to:self.
|
|
3599 |
].
|
|
3600 |
^ labelTextHolder.
|
|
3601 |
!
|
|
3602 |
|
|
3603 |
macroTextHolder
|
|
3604 |
"automatically generated by UIPainter ..."
|
|
3605 |
|
|
3606 |
"*** the code below creates a default model when invoked."
|
|
3607 |
"*** (which may not be the one you wanted)"
|
|
3608 |
"*** Please change as required and accept it in the browser."
|
|
3609 |
"*** (and replace this comment by something more useful ;-)"
|
|
3610 |
|
|
3611 |
macroTextHolder isNil ifTrue:[
|
|
3612 |
macroTextHolder := ValueHolder new.
|
|
3613 |
"/ if your app needs to be notified of changes, uncomment one of the lines below:
|
|
3614 |
"/ macroTextHolder addDependent:self.
|
|
3615 |
"/ macroTextHolder onChangeSend:#macroTextHolderChanged to:self.
|
|
3616 |
].
|
|
3617 |
^ macroTextHolder.
|
|
3618 |
!
|
|
3619 |
|
|
3620 |
modifiedChannel
|
|
3621 |
|
|
3622 |
modifiedChannel isNil ifTrue:[
|
|
3623 |
modifiedChannel := false asValue.
|
|
3624 |
].
|
|
3625 |
^ modifiedChannel
|
|
3626 |
!
|
|
3627 |
|
|
3628 |
rawKeyList
|
|
3629 |
|
|
3630 |
rawKeyList isNil ifTrue:[
|
|
3631 |
rawKeyList := List new.
|
|
3632 |
].
|
|
3633 |
^ rawKeyList.
|
|
3634 |
!
|
|
3635 |
|
|
3636 |
selectedFunctionKey
|
|
3637 |
|
|
3638 |
selectedFunctionKey isNil ifTrue:[
|
|
3639 |
selectedFunctionKey := ValueHolder new.
|
|
3640 |
selectedFunctionKey addDependent:self.
|
|
3641 |
].
|
|
3642 |
^ selectedFunctionKey.
|
|
3643 |
!
|
|
3644 |
|
|
3645 |
selectedRawKey
|
|
3646 |
|
|
3647 |
selectedRawKey isNil ifTrue:[
|
|
3648 |
selectedRawKey := ValueHolder new.
|
|
3649 |
selectedRawKey addDependent:self.
|
|
3650 |
].
|
|
3651 |
^ selectedRawKey.
|
|
3652 |
! !
|
|
3653 |
|
|
3654 |
!AbstractSettingsApplication::KbdMappingSettingsAppl methodsFor:'change & update'!
|
|
3655 |
|
|
3656 |
changeFunctionKeySelection
|
|
3657 |
|
|
3658 |
|raw|
|
|
3659 |
raw := self selectedRawKey value.
|
|
3660 |
self selectedFunctionKey value:(mappings at:raw asSymbol) asString.
|
|
3661 |
!
|
|
3662 |
|
|
3663 |
changeMacroText
|
|
3664 |
|
|
3665 |
|f macro indent|
|
|
3666 |
|
|
3667 |
f := self selectedFunctionKey value.
|
|
3668 |
(f startsWith:'Cmd') ifTrue:[
|
|
3669 |
f := f copyFrom:4
|
|
3670 |
].
|
|
3671 |
macro := UserPreferences current functionKeySequences
|
|
3672 |
at:(f asSymbol) ifAbsent:nil.
|
|
3673 |
macro notNil ifTrue:[
|
|
3674 |
macro := macro asStringCollection.
|
|
3675 |
indent := macro
|
|
3676 |
inject:99999 into:[:min :element |
|
|
3677 |
|stripped|
|
|
3678 |
|
|
3679 |
stripped := element withoutLeadingSeparators.
|
|
3680 |
stripped size == 0 ifTrue:[
|
|
3681 |
min
|
|
3682 |
] ifFalse:[
|
|
3683 |
min min:(element size - stripped size)
|
|
3684 |
]
|
|
3685 |
].
|
|
3686 |
indent ~~ 0 ifTrue:[
|
|
3687 |
macro := macro collect:[:line |
|
|
3688 |
line size > indent ifTrue:[
|
|
3689 |
line copyFrom:indent+1
|
|
3690 |
] ifFalse:[
|
|
3691 |
line
|
|
3692 |
].
|
|
3693 |
]
|
|
3694 |
].
|
|
3695 |
].
|
|
3696 |
macroTextHolder value:macro.
|
|
3697 |
!
|
|
3698 |
|
|
3699 |
changeRawKeySelection
|
|
3700 |
|f raw|
|
|
3701 |
|
|
3702 |
f := self selectedFunctionKey value.
|
|
3703 |
raw := mappings keyAtValue:f asString.
|
|
3704 |
raw isNil ifTrue:[
|
|
3705 |
raw := mappings keyAtValue:f first.
|
|
3706 |
raw isNil ifTrue:[
|
|
3707 |
raw := mappings keyAtValue:f asSymbol.
|
|
3708 |
]
|
|
3709 |
].
|
|
3710 |
self selectedRawKey value:raw.
|
|
3711 |
!
|
|
3712 |
|
|
3713 |
update:something with:aParameter from:changedObject
|
|
3714 |
"Invoked when an object that I depend upon sends a change notification."
|
|
3715 |
|
|
3716 |
"stub code automatically generated - please change as required"
|
|
3717 |
|
|
3718 |
changedObject == self selectedFunctionKey ifTrue:[
|
|
3719 |
self changeRawKeySelection.
|
|
3720 |
self changeMacroText.
|
|
3721 |
^ self
|
|
3722 |
].
|
|
3723 |
changedObject == self selectedRawKey ifTrue:[
|
|
3724 |
self changeFunctionKeySelection.
|
|
3725 |
^ self
|
|
3726 |
].
|
|
3727 |
super update:something with:aParameter from:changedObject
|
|
3728 |
! !
|
|
3729 |
|
|
3730 |
!AbstractSettingsApplication::KbdMappingSettingsAppl methodsFor:'initialization & release'!
|
|
3731 |
|
|
3732 |
closeDownViews
|
|
3733 |
"This is a hook method generated by the Browser.
|
|
3734 |
It will be invoked when your app/dialog-window is really closed.
|
|
3735 |
See also #closeDownViews, which is invoked before and may suppress the close
|
|
3736 |
or ask the user for confirmation."
|
|
3737 |
|
|
3738 |
"/ change the code below as required ...
|
|
3739 |
"/ This should cleanup any leftover resources
|
|
3740 |
"/ (for example, temporary files)
|
|
3741 |
"/ super closeRequest will initiate the closeDown
|
|
3742 |
|
|
3743 |
"/ add your code here
|
|
3744 |
|
|
3745 |
"/ do not remove the one below ...
|
|
3746 |
^ super closeDownViews
|
|
3747 |
!
|
|
3748 |
|
|
3749 |
closeRequest
|
|
3750 |
|
|
3751 |
self saveRequest ifFalse:[
|
|
3752 |
^ self
|
|
3753 |
].
|
|
3754 |
|
|
3755 |
^ super closeRequest.
|
|
3756 |
!
|
|
3757 |
|
|
3758 |
initialize
|
|
3759 |
|
|
3760 |
resources := self class owningClass classResources.
|
|
3761 |
|
|
3762 |
mappings := Screen current keyboardMap.
|
|
3763 |
|
|
3764 |
rawKeyList := (mappings keys asArray collect:[:key | key asString]) sort.
|
|
3765 |
functionKeyList := (mappings values asSet asArray collect:[:key | key asString]) sort.
|
|
3766 |
|
|
3767 |
self labelTextHolder value:(resources at:'KEY_MSG2' default:'keyboard mapping:') withCRs.
|
|
3768 |
super initialize
|
|
3769 |
! !
|
|
3770 |
|
|
3771 |
!AbstractSettingsApplication::KbdMappingSettingsAppl methodsFor:'queries'!
|
|
3772 |
|
|
3773 |
hasUnsavedChanges
|
|
3774 |
|
|
3775 |
^ false
|
|
3776 |
! !
|
|
3777 |
|
|
3778 |
!AbstractSettingsApplication::LanguageSettingsAppl class methodsFor:'interface specs'!
|
|
3779 |
|
|
3780 |
windowSpec
|
|
3781 |
"This resource specification was automatically generated
|
|
3782 |
by the UIPainter of ST/X."
|
|
3783 |
|
|
3784 |
"Do not manually edit this!! If it is corrupted,
|
|
3785 |
the UIPainter may not be able to read the specification."
|
|
3786 |
|
|
3787 |
"
|
|
3788 |
UIPainter new openOnClass:AbstractLauncherApplication::LanguageSettingsAppl andSelector:#windowSpec
|
|
3789 |
AbstractLauncherApplication::LanguageSettingsAppl new openInterface:#windowSpec
|
|
3790 |
AbstractLauncherApplication::LanguageSettingsAppl open
|
|
3791 |
"
|
|
3792 |
|
|
3793 |
<resource: #canvas>
|
|
3794 |
|
|
3795 |
^
|
|
3796 |
#(#FullSpec
|
|
3797 |
#name: #windowSpec
|
|
3798 |
#window:
|
|
3799 |
#(#WindowSpec
|
|
3800 |
#label: 'Language Settings'
|
|
3801 |
#name: 'Language Settings'
|
|
3802 |
#min: #(#Point 10 10)
|
|
3803 |
#max: #(#Point 1024 768)
|
|
3804 |
#bounds: #(#Rectangle 16 42 491 713)
|
|
3805 |
)
|
|
3806 |
#component:
|
|
3807 |
#(#SpecCollection
|
|
3808 |
#collection: #(
|
|
3809 |
#(#InputFieldSpec
|
|
3810 |
#name: 'EntryField1'
|
|
3811 |
#layout: #(#LayoutFrame 0 0.0 105 0 0 1.0 125 0)
|
|
3812 |
#model: #languageHolder
|
|
3813 |
#acceptOnReturn: true
|
|
3814 |
#acceptOnTab: true
|
|
3815 |
#acceptOnLostFocus: true
|
|
3816 |
#acceptOnPointerLeave: false
|
|
3817 |
)
|
|
3818 |
#(#SequenceViewSpec
|
|
3819 |
#name: 'List1'
|
|
3820 |
#layout: #(#LayoutFrame 0 0.0 125 0 0 1.0 -34 1)
|
|
3821 |
#model: #languageHolder
|
|
3822 |
#hasHorizontalScrollBar: true
|
|
3823 |
#hasVerticalScrollBar: true
|
|
3824 |
#doubleClickSelector: #doubleClick:
|
|
3825 |
#useIndex: false
|
|
3826 |
#sequenceList: #languageList
|
|
3827 |
)
|
|
3828 |
#(#HorizontalPanelViewSpec
|
|
3829 |
#name: 'HorizontalPanel1'
|
|
3830 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1.0)
|
|
3831 |
#horizontalLayout: #center
|
|
3832 |
#verticalLayout: #center
|
|
3833 |
#horizontalSpace: 3
|
|
3834 |
#verticalSpace: 3
|
|
3835 |
#component:
|
|
3836 |
#(#SpecCollection
|
|
3837 |
#collection: #(
|
|
3838 |
#(#ActionButtonSpec
|
|
3839 |
#label: 'OK'
|
|
3840 |
#name: 'OK'
|
|
3841 |
#translateLabel: true
|
|
3842 |
#model: #saveSettings
|
|
3843 |
#enableChannel: #modifiedChannel
|
|
3844 |
#extent: #(#Point 125 22)
|
|
3845 |
)
|
|
3846 |
#(#ActionButtonSpec
|
|
3847 |
#label: 'Cancel'
|
|
3848 |
#name: 'Cancel'
|
|
3849 |
#translateLabel: true
|
|
3850 |
#model: #doCancel
|
|
3851 |
#extent: #(#Point 125 22)
|
|
3852 |
)
|
|
3853 |
#(#ActionButtonSpec
|
|
3854 |
#label: 'Help'
|
|
3855 |
#name: 'Help'
|
|
3856 |
#translateLabel: true
|
|
3857 |
#model: #help
|
|
3858 |
#extent: #(#Point 125 22)
|
|
3859 |
)
|
|
3860 |
)
|
|
3861 |
|
|
3862 |
)
|
|
3863 |
)
|
|
3864 |
#(#LabelSpec
|
|
3865 |
#label: 'Notice:'
|
|
3866 |
#name: 'Notice'
|
|
3867 |
#layout: #(#LayoutFrame 0 0 0 0 0 1.0 105 0)
|
|
3868 |
#translateLabel: true
|
|
3869 |
#labelChannel: #noticeLabelHolder
|
|
3870 |
#adjust: #left
|
|
3871 |
)
|
|
3872 |
#(#LabelSpec
|
|
3873 |
#label: 'Label'
|
|
3874 |
#name: 'CurrentLang'
|
|
3875 |
#layout: #(#LayoutFrame -150 1 0 0 0 1 20 0)
|
|
3876 |
#style: #(#FontDescription #helvetica #bold #roman 12)
|
|
3877 |
#translateLabel: true
|
|
3878 |
#labelChannel: #currentLanguageChannel
|
|
3879 |
#adjust: #left
|
|
3880 |
)
|
|
3881 |
#(#LabelSpec
|
|
3882 |
#label: 'Current Language:'
|
|
3883 |
#name: 'Label1'
|
|
3884 |
#layout: #(#LayoutFrame 190 0 0 0 -150 1 20 0)
|
|
3885 |
#translateLabel: true
|
|
3886 |
#labelChannel: #currentLanguageLabel
|
|
3887 |
#adjust: #right
|
|
3888 |
)
|
|
3889 |
)
|
|
3890 |
|
|
3891 |
)
|
|
3892 |
)
|
|
3893 |
! !
|
|
3894 |
|
|
3895 |
!AbstractSettingsApplication::LanguageSettingsAppl methodsFor:'accessing'!
|
|
3896 |
|
|
3897 |
languageList
|
|
3898 |
"return the value of the instance variable 'languageList' (automatically generated)"
|
|
3899 |
|
|
3900 |
^ languageList
|
|
3901 |
!
|
|
3902 |
|
|
3903 |
requestor
|
|
3904 |
"return the value of the instance variable 'requestor' (automatically generated)"
|
|
3905 |
|
|
3906 |
| masterApplication |
|
|
3907 |
masterApplication := self masterApplication.
|
|
3908 |
masterApplication notNil ifTrue:[
|
|
3909 |
^ masterApplication requestor.
|
|
3910 |
].
|
|
3911 |
^ nil
|
|
3912 |
! !
|
|
3913 |
|
|
3914 |
!AbstractSettingsApplication::LanguageSettingsAppl methodsFor:'actions'!
|
|
3915 |
|
|
3916 |
doCancel
|
|
3917 |
|
|
3918 |
self isPartOfSettinsDialog ifTrue:[
|
|
3919 |
self loadRequest.
|
|
3920 |
].
|
|
3921 |
self closeRequest.
|
|
3922 |
!
|
|
3923 |
|
|
3924 |
doubleClick:aEntry
|
|
3925 |
|
|
3926 |
self saveSettings.
|
|
3927 |
!
|
|
3928 |
|
|
3929 |
evaluateModified
|
|
3930 |
|
|
3931 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
3932 |
!
|
|
3933 |
|
|
3934 |
help
|
|
3935 |
|
|
3936 |
self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/languageSetting.html'].
|
|
3937 |
!
|
|
3938 |
|
|
3939 |
loadRequest
|
|
3940 |
|
|
3941 |
self languageHolder value:self currentLanguage.
|
|
3942 |
self currentLanguageChannel value:self currentLanguage.
|
|
3943 |
self modifiedChannel value:false.
|
|
3944 |
!
|
|
3945 |
|
|
3946 |
saveRequest
|
|
3947 |
| result |
|
|
3948 |
|
|
3949 |
(self hasUnsavedChanges) ifTrue:[
|
|
3950 |
result := self confirmWithCancel:(resources string:'Save changed Language Settings ?').
|
|
3951 |
result isNil ifTrue:[ ^ false].
|
|
3952 |
result ifTrue:[
|
|
3953 |
self saveSettings.
|
|
3954 |
] ifFalse:[
|
|
3955 |
self loadRequest.
|
|
3956 |
]
|
|
3957 |
].
|
|
3958 |
^ true
|
|
3959 |
!
|
|
3960 |
|
|
3961 |
saveSettings
|
|
3962 |
|
|
3963 |
|fontPref idx language oldLanguage territory enc
|
|
3964 |
answer matchingFonts l screen newLanguage switch|
|
|
3965 |
|
|
3966 |
newLanguage := self languageHolder value.
|
|
3967 |
self withWaitCursorDo:[
|
|
3968 |
idx := translatedLanguages indexOf:newLanguage.
|
|
3969 |
idx ~~ 0 ifTrue:[
|
|
3970 |
language := listOfLanguages at:idx
|
|
3971 |
] ifFalse:[
|
|
3972 |
language := newLanguage
|
|
3973 |
].
|
|
3974 |
(language includes:$-) ifTrue:[
|
|
3975 |
l := language asCollectionOfSubstringsSeparatedBy:$-.
|
|
3976 |
language := l at:1.
|
|
3977 |
territory := l at:2.
|
|
3978 |
].
|
|
3979 |
territory isNil ifTrue:[
|
|
3980 |
territory := language copyTo:2
|
|
3981 |
].
|
|
3982 |
|
|
3983 |
"/ check if the new language needs a differently encoded font;
|
|
3984 |
"/ ask user to switch font and allow cancellation.
|
|
3985 |
"/ Otherwise, you are left with unreadable menu & button items ...
|
|
3986 |
|
|
3987 |
oldLanguage := Smalltalk language.
|
|
3988 |
Smalltalk language:language asSymbol.
|
|
3989 |
ResourcePack flushCachedResourcePacks.
|
|
3990 |
"/ refetch resources ...
|
|
3991 |
resources := AbstractLauncherApplication classResources.
|
|
3992 |
fontPref := resources at:'PREFERRED_FONT_ENCODING' default:'iso8859*'.
|
|
3993 |
fontPref := fontPref asLowercase.
|
|
3994 |
Smalltalk language:oldLanguage.
|
|
3995 |
|
|
3996 |
switch := true.
|
|
3997 |
enc := MenuView defaultFont encoding.
|
|
3998 |
(fontPref match:enc asLowercase) ifFalse:[
|
|
3999 |
"/ look if there is one at all.
|
|
4000 |
screen := Screen current.
|
|
4001 |
matchingFonts := screen listOfAvailableFonts select:[:f | fontPref match:f encoding asLowercase].
|
|
4002 |
matchingFonts size == 0 ifTrue:[
|
|
4003 |
"/ flush and try again - just in case, the font path has changed.
|
|
4004 |
screen flushListOfAvailableFonts.
|
|
4005 |
matchingFonts := screen listOfAvailableFonts select:[:f | fontPref match:f encoding asLowercase].
|
|
4006 |
].
|
|
4007 |
matchingFonts size == 0 ifTrue:[
|
|
4008 |
(Dialog
|
|
4009 |
confirm:(resources
|
|
4010 |
string:'Your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)'
|
|
4011 |
with:fontPref) withCRs)
|
|
4012 |
ifFalse:[
|
|
4013 |
switch := false
|
|
4014 |
]
|
|
4015 |
] ifFalse:[
|
|
4016 |
answer := Dialog
|
|
4017 |
confirmWithCancel:(resources
|
|
4018 |
string:'menu font is not %1-encoded.\\Change it ?'
|
|
4019 |
with:fontPref) withCRs
|
|
4020 |
labels:(resources
|
|
4021 |
array:#('cancel' 'no' 'yes'))
|
|
4022 |
default:3.
|
|
4023 |
answer isNil ifTrue:[
|
|
4024 |
switch := false
|
|
4025 |
] ifFalse:[
|
|
4026 |
answer ifTrue:[
|
|
4027 |
switch := ( self requestor fontBoxForEncoding:fontPref)
|
|
4028 |
]
|
|
4029 |
].
|
|
4030 |
].
|
|
4031 |
].
|
|
4032 |
|
|
4033 |
switch ifTrue:[
|
|
4034 |
Transcript showCR:'change language to ' , newLanguage , ' ...'.
|
|
4035 |
Smalltalk language:language asSymbol.
|
|
4036 |
Smalltalk languageTerritory:territory asSymbol.
|
|
4037 |
"/ ResourcePack flushCachedResourcePacks - already done by language-change
|
|
4038 |
].
|
|
4039 |
].
|
|
4040 |
switch ifTrue:[
|
|
4041 |
self requestor notNil ifTrue:[
|
|
4042 |
self requestor reopenLauncher.
|
|
4043 |
].
|
|
4044 |
DebugView newDebugger.
|
|
4045 |
].
|
|
4046 |
self currentLanguageChannel value:self currentLanguage.
|
|
4047 |
self modifiedChannel value:false.
|
|
4048 |
! !
|
|
4049 |
|
|
4050 |
!AbstractSettingsApplication::LanguageSettingsAppl methodsFor:'aspects'!
|
|
4051 |
|
|
4052 |
currentLanguageChannel
|
|
4053 |
|
|
4054 |
currentLanguageChannel isNil ifTrue:[
|
|
4055 |
currentLanguageChannel := self currentLanguage asValue.
|
|
4056 |
].
|
|
4057 |
^ currentLanguageChannel.
|
|
4058 |
!
|
|
4059 |
|
|
4060 |
currentLanguageLabel
|
|
4061 |
|
|
4062 |
currentLanguageLabel isNil ifTrue:[
|
|
4063 |
currentLanguageLabel := (resources string:'Current Language:') asValue.
|
|
4064 |
].
|
|
4065 |
^ currentLanguageLabel.
|
|
4066 |
!
|
|
4067 |
|
|
4068 |
languageHolder
|
|
4069 |
|
|
4070 |
languageHolder isNil ifTrue:[
|
|
4071 |
languageHolder := self currentLanguage asValue.
|
|
4072 |
languageHolder onChangeSend:#evaluateModified to:self.
|
|
4073 |
].
|
|
4074 |
^ languageHolder.
|
|
4075 |
!
|
|
4076 |
|
|
4077 |
modifiedChannel
|
|
4078 |
|
|
4079 |
modifiedChannel isNil ifTrue:[
|
|
4080 |
modifiedChannel := false asValue.
|
|
4081 |
].
|
|
4082 |
^ modifiedChannel
|
|
4083 |
!
|
|
4084 |
|
|
4085 |
noticeLabelHolder
|
|
4086 |
|
|
4087 |
noticeLabelHolder isNil ifTrue:[
|
|
4088 |
noticeLabelHolder := ((resources at:'LANG_MSG' default:'Select a Language') withCRs) asValue.
|
|
4089 |
].
|
|
4090 |
^ noticeLabelHolder.
|
|
4091 |
! !
|
|
4092 |
|
|
4093 |
!AbstractSettingsApplication::LanguageSettingsAppl methodsFor:'initialization & release'!
|
|
4094 |
|
|
4095 |
closeDownViews
|
|
4096 |
"This is a hook method generated by the Browser.
|
|
4097 |
It will be invoked when your app/dialog-window is really closed.
|
|
4098 |
See also #closeDownViews, which is invoked before and may suppress the close
|
|
4099 |
or ask the user for confirmation."
|
|
4100 |
|
|
4101 |
"/ change the code below as required ...
|
|
4102 |
"/ This should cleanup any leftover resources
|
|
4103 |
"/ (for example, temporary files)
|
|
4104 |
"/ super closeRequest will initiate the closeDown
|
|
4105 |
|
|
4106 |
"/ add your code here
|
|
4107 |
|
|
4108 |
"/ do not remove the one below ...
|
|
4109 |
^ super closeDownViews
|
|
4110 |
!
|
|
4111 |
|
|
4112 |
closeRequest
|
|
4113 |
|
|
4114 |
self saveRequest ifFalse:[
|
|
4115 |
^ self
|
|
4116 |
].
|
|
4117 |
|
|
4118 |
^ super closeRequest.
|
|
4119 |
!
|
|
4120 |
|
|
4121 |
initialize
|
|
4122 |
|
|
4123 |
|flags|
|
|
4124 |
|
|
4125 |
resources := self class owningClass classResources.
|
|
4126 |
listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default').
|
|
4127 |
listOfLanguages := listOfLanguages asOrderedCollection.
|
|
4128 |
translatedLanguages := listOfLanguages collect:[:lang | |item|
|
|
4129 |
item := resources at:lang.
|
|
4130 |
item isString ifTrue:[
|
|
4131 |
item
|
|
4132 |
] ifFalse:[
|
|
4133 |
item at:1
|
|
4134 |
]
|
|
4135 |
].
|
|
4136 |
flags := listOfLanguages collect:[:lang | |item|
|
|
4137 |
item := resources at:lang.
|
|
4138 |
item isArray ifTrue:[
|
|
4139 |
item at:2
|
|
4140 |
] ifFalse:[
|
|
4141 |
nil
|
|
4142 |
]
|
|
4143 |
].
|
|
4144 |
flags := flags collect:[:nm | |img d| nm notNil ifTrue:[
|
|
4145 |
img := Image fromFile:nm.
|
|
4146 |
img isNil ifTrue:[
|
|
4147 |
d := Smalltalk getPackageDirectoryForPackage:'stx:goodies'.
|
|
4148 |
img := Image fromFile:(d construct:nm).
|
|
4149 |
].
|
|
4150 |
] ifFalse:[
|
|
4151 |
nil
|
|
4152 |
]
|
|
4153 |
].
|
|
4154 |
listOfLanguages := listOfLanguages collect:[:nm | nm copyFrom:'LANG_' size + 1].
|
|
4155 |
languageList := translatedLanguages with:flags collect:[:lang :flag | LabelAndIcon icon:flag string:lang.].
|
|
4156 |
super initialize
|
|
4157 |
! !
|
|
4158 |
|
|
4159 |
!AbstractSettingsApplication::LanguageSettingsAppl methodsFor:'queries'!
|
|
4160 |
|
|
4161 |
currentLanguage
|
|
4162 |
|
|
4163 |
| lang |
|
|
4164 |
|
|
4165 |
lang := Language ~= LanguageTerritory ifTrue:[
|
|
4166 |
Language , '-' , LanguageTerritory
|
|
4167 |
] ifFalse:[
|
|
4168 |
Language
|
|
4169 |
].
|
|
4170 |
^ languageList at:(listOfLanguages indexOf:lang)
|
|
4171 |
!
|
|
4172 |
|
|
4173 |
hasUnsavedChanges
|
|
4174 |
|
|
4175 |
^ (self languageHolder value) ~= (self currentLanguage)
|
|
4176 |
! !
|
|
4177 |
|
|
4178 |
!AbstractSettingsApplication::MemorySettingsAppl class methodsFor:'interface specs'!
|
|
4179 |
|
|
4180 |
windowSpec
|
|
4181 |
"This resource specification was automatically generated
|
|
4182 |
by the UIPainter of ST/X."
|
|
4183 |
|
|
4184 |
"Do not manually edit this!! If it is corrupted,
|
|
4185 |
the UIPainter may not be able to read the specification."
|
|
4186 |
|
|
4187 |
"
|
|
4188 |
UIPainter new openOnClass:AbstractLauncherApplication::MemorySettingsAppl andSelector:#windowSpec
|
|
4189 |
AbstractLauncherApplication::MemorySettingsAppl new openInterface:#windowSpec
|
|
4190 |
AbstractLauncherApplication::MemorySettingsAppl open
|
|
4191 |
"
|
|
4192 |
|
|
4193 |
<resource: #canvas>
|
|
4194 |
|
|
4195 |
^
|
|
4196 |
#(#FullSpec
|
|
4197 |
#name: #windowSpec
|
|
4198 |
#window:
|
|
4199 |
#(#WindowSpec
|
|
4200 |
#label: 'Memory Manager Settings'
|
|
4201 |
#name: 'Memory Manager Settings'
|
|
4202 |
#min: #(#Point 10 10)
|
|
4203 |
#max: #(#Point 1024 768)
|
|
4204 |
#bounds: #(#Rectangle 16 42 616 592)
|
|
4205 |
)
|
|
4206 |
#component:
|
|
4207 |
#(#SpecCollection
|
|
4208 |
#collection: #(
|
|
4209 |
#(#LabelSpec
|
|
4210 |
#label: 'Label'
|
|
4211 |
#name: 'Label1'
|
|
4212 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 50 0)
|
|
4213 |
#translateLabel: true
|
|
4214 |
#labelChannel: #warningLabelHolder
|
|
4215 |
#adjust: #left
|
|
4216 |
)
|
|
4217 |
#(#ViewSpec
|
|
4218 |
#name: 'NewSpaceBox'
|
|
4219 |
#layout: #(#LayoutFrame 0 0.0 50 0 0 1.0 100 0)
|
|
4220 |
#component:
|
|
4221 |
#(#SpecCollection
|
|
4222 |
#collection: #(
|
|
4223 |
#(#InputFieldSpec
|
|
4224 |
#name: 'EntryField1'
|
|
4225 |
#layout: #(#LayoutFrame 205 0 3 0 295 0 25 0)
|
|
4226 |
#model: #newSpaceSize
|
|
4227 |
#type: #number
|
|
4228 |
#acceptOnReturn: true
|
|
4229 |
#acceptOnTab: true
|
|
4230 |
#acceptOnLostFocus: true
|
|
4231 |
#acceptOnPointerLeave: false
|
|
4232 |
)
|
|
4233 |
#(#LabelSpec
|
|
4234 |
#label: 'Size of NewSpace:'
|
|
4235 |
#name: 'SizeOfNewSpaceLabel'
|
|
4236 |
#layout: #(#LayoutFrame 0 0 3 0 205 0 25 0)
|
|
4237 |
#translateLabel: true
|
|
4238 |
#adjust: #right
|
|
4239 |
)
|
|
4240 |
#(#LabelSpec
|
|
4241 |
#label: 'Size of newSpace where objects are created'
|
|
4242 |
#name: 'Label3'
|
|
4243 |
#layout: #(#LayoutFrame 0 0.0 25 0 295 0 47 0)
|
|
4244 |
#translateLabel: true
|
|
4245 |
#adjust: #left
|
|
4246 |
)
|
|
4247 |
#(#LabelSpec
|
|
4248 |
#label: 'Maximum Memory Limit:'
|
|
4249 |
#name: 'Label8'
|
|
4250 |
#layout: #(#LayoutFrame 305 0 3 0 -95 1 25 0)
|
|
4251 |
#translateLabel: true
|
|
4252 |
#adjust: #right
|
|
4253 |
)
|
|
4254 |
#(#InputFieldSpec
|
|
4255 |
#name: 'EntryField5'
|
|
4256 |
#layout: #(#LayoutFrame -95 1 3 0 -5 1 25 0)
|
|
4257 |
#model: #maxOldSpace
|
|
4258 |
#type: #number
|
|
4259 |
#acceptOnReturn: true
|
|
4260 |
#acceptOnTab: true
|
|
4261 |
#acceptOnLostFocus: true
|
|
4262 |
#acceptOnPointerLeave: false
|
|
4263 |
)
|
|
4264 |
#(#LabelSpec
|
|
4265 |
#label: 'Never allocate more than this amount of memory'
|
|
4266 |
#name: 'Label9'
|
|
4267 |
#layout: #(#LayoutFrame 305 0 25 0 0 1 47 0)
|
|
4268 |
#translateLabel: true
|
|
4269 |
#adjust: #left
|
|
4270 |
)
|
|
4271 |
#(#DividerSpec
|
|
4272 |
#name: 'Separator5'
|
|
4273 |
#layout: #(#LayoutFrame 300 0 0 0.0 303 0 0 1.0)
|
|
4274 |
#orientation: #vertical
|
|
4275 |
)
|
|
4276 |
#(#DividerSpec
|
|
4277 |
#name: 'Separator1'
|
|
4278 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 3 0)
|
|
4279 |
)
|
|
4280 |
)
|
|
4281 |
|
|
4282 |
)
|
|
4283 |
)
|
|
4284 |
#(#ViewSpec
|
|
4285 |
#name: 'QuickAllocationLimitBox'
|
|
4286 |
#layout: #(#LayoutFrame 0 0.0 100 0 0 1.0 150 0)
|
|
4287 |
#component:
|
|
4288 |
#(#SpecCollection
|
|
4289 |
#collection: #(
|
|
4290 |
#(#InputFieldSpec
|
|
4291 |
#name: 'EntryField14'
|
|
4292 |
#layout: #(#LayoutFrame -95 1 3 0 -5 1 25 0)
|
|
4293 |
#model: #fastMoreLimit
|
|
4294 |
#type: #number
|
|
4295 |
#acceptOnReturn: true
|
|
4296 |
#acceptOnTab: true
|
|
4297 |
#acceptOnLostFocus: true
|
|
4298 |
#acceptOnPointerLeave: false
|
|
4299 |
)
|
|
4300 |
#(#LabelSpec
|
|
4301 |
#label: 'Quick Allocation Limit:'
|
|
4302 |
#name: 'Label26'
|
|
4303 |
#layout: #(#LayoutFrame 0 0 3 0 -95 1 25 0)
|
|
4304 |
#translateLabel: true
|
|
4305 |
#adjust: #right
|
|
4306 |
)
|
|
4307 |
#(#LabelSpec
|
|
4308 |
#label: 'Quickly allocate more memory (suppress GC) up to this limit'
|
|
4309 |
#name: 'Label27'
|
|
4310 |
#layout: #(#LayoutFrame 0 0.0 25 0 0 1.0 47 0)
|
|
4311 |
#translateLabel: true
|
|
4312 |
#adjust: #left
|
|
4313 |
)
|
|
4314 |
#(#DividerSpec
|
|
4315 |
#name: 'Separator15'
|
|
4316 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 3 0)
|
|
4317 |
)
|
|
4318 |
)
|
|
4319 |
|
|
4320 |
)
|
|
4321 |
)
|
|
4322 |
#(#ViewSpec
|
|
4323 |
#name: 'GCTriggerBox'
|
|
4324 |
#layout: #(#LayoutFrame 0 0.0 150 0 0 1.0 200 0)
|
|
4325 |
#component:
|
|
4326 |
#(#SpecCollection
|
|
4327 |
#collection: #(
|
|
4328 |
#(#InputFieldSpec
|
|
4329 |
#name: 'EntryField8'
|
|
4330 |
#layout: #(#LayoutFrame 205 0 3 0 295 0 25 0)
|
|
4331 |
#model: #igcLimit
|
|
4332 |
#type: #number
|
|
4333 |
#acceptOnReturn: true
|
|
4334 |
#acceptOnTab: true
|
|
4335 |
#acceptOnLostFocus: true
|
|
4336 |
#acceptOnPointerLeave: false
|
|
4337 |
)
|
|
4338 |
#(#LabelSpec
|
|
4339 |
#label: 'Incremental GC Allocation Trigger:'
|
|
4340 |
#name: 'Label14'
|
|
4341 |
#layout: #(#LayoutFrame 0 0 3 0 205 0 25 0)
|
|
4342 |
#translateLabel: true
|
|
4343 |
#adjust: #right
|
|
4344 |
)
|
|
4345 |
#(#LabelSpec
|
|
4346 |
#label: 'Start IGC whenever this amount has been allocated'
|
|
4347 |
#name: 'Label15'
|
|
4348 |
#layout: #(#LayoutFrame 0 0.0 25 0 295 0 47 0)
|
|
4349 |
#translateLabel: true
|
|
4350 |
#adjust: #left
|
|
4351 |
)
|
|
4352 |
#(#LabelSpec
|
|
4353 |
#label: 'Incremental GC Freespace Trigger:'
|
|
4354 |
#name: 'Label16'
|
|
4355 |
#layout: #(#LayoutFrame 305 0 3 0 -95 1 25 0)
|
|
4356 |
#translateLabel: true
|
|
4357 |
#adjust: #right
|
|
4358 |
)
|
|
4359 |
#(#InputFieldSpec
|
|
4360 |
#name: 'EntryField9'
|
|
4361 |
#layout: #(#LayoutFrame -95 1 3 0 -5 1 25 0)
|
|
4362 |
#model: #igcFreeLimit
|
|
4363 |
#type: #number
|
|
4364 |
#acceptOnReturn: true
|
|
4365 |
#acceptOnTab: true
|
|
4366 |
#acceptOnLostFocus: true
|
|
4367 |
#acceptOnPointerLeave: false
|
|
4368 |
)
|
|
4369 |
#(#LabelSpec
|
|
4370 |
#label: 'Start IGC whenever freespace drops below this'
|
|
4371 |
#name: 'Label17'
|
|
4372 |
#layout: #(#LayoutFrame 305 0 25 0 0 1 47 0)
|
|
4373 |
#translateLabel: true
|
|
4374 |
#adjust: #left
|
|
4375 |
)
|
|
4376 |
#(#DividerSpec
|
|
4377 |
#name: 'Separator8'
|
|
4378 |
#layout: #(#LayoutFrame 300 0 0 0.0 303 0 0 1.0)
|
|
4379 |
#orientation: #vertical
|
|
4380 |
)
|
|
4381 |
#(#DividerSpec
|
|
4382 |
#name: 'Separator9'
|
|
4383 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 3 0)
|
|
4384 |
)
|
|
4385 |
)
|
|
4386 |
|
|
4387 |
)
|
|
4388 |
)
|
|
4389 |
#(#ViewSpec
|
|
4390 |
#name: 'GCAmountBox'
|
|
4391 |
#layout: #(#LayoutFrame 0 0.0 200 0 0 1.0 250 0)
|
|
4392 |
#component:
|
|
4393 |
#(#SpecCollection
|
|
4394 |
#collection: #(
|
|
4395 |
#(#InputFieldSpec
|
|
4396 |
#name: 'EntryField17'
|
|
4397 |
#layout: #(#LayoutFrame -95 1 3 0 -5 1 25 0)
|
|
4398 |
#model: #igcFreeAmount
|
|
4399 |
#type: #number
|
|
4400 |
#acceptOnReturn: true
|
|
4401 |
#acceptOnTab: true
|
|
4402 |
#acceptOnLostFocus: true
|
|
4403 |
#acceptOnPointerLeave: false
|
|
4404 |
)
|
|
4405 |
#(#LabelSpec
|
|
4406 |
#label: 'Incremental GC Amount:'
|
|
4407 |
#name: 'Label32'
|
|
4408 |
#layout: #(#LayoutFrame 0 0 3 0 -95 1 25 0)
|
|
4409 |
#translateLabel: true
|
|
4410 |
#adjust: #right
|
|
4411 |
)
|
|
4412 |
#(#LabelSpec
|
|
4413 |
#label: 'Try to keep this amount for peak requests'
|
|
4414 |
#name: 'Label33'
|
|
4415 |
#layout: #(#LayoutFrame 0 0.0 25 0 0 1.0 47 0)
|
|
4416 |
#translateLabel: true
|
|
4417 |
#adjust: #left
|
|
4418 |
)
|
|
4419 |
#(#DividerSpec
|
|
4420 |
#name: 'Separator18'
|
|
4421 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 3 0)
|
|
4422 |
)
|
|
4423 |
)
|
|
4424 |
|
|
4425 |
)
|
|
4426 |
)
|
|
4427 |
#(#ViewSpec
|
|
4428 |
#name: 'OldspaceIncrementBox'
|
|
4429 |
#layout: #(#LayoutFrame 0 0.0 250 0 0 1.0 300 0)
|
|
4430 |
#component:
|
|
4431 |
#(#SpecCollection
|
|
4432 |
#collection: #(
|
|
4433 |
#(#InputFieldSpec
|
|
4434 |
#name: 'EntryField18'
|
|
4435 |
#layout: #(#LayoutFrame -95 1 3 0 -5 1.0 25 0)
|
|
4436 |
#model: #oldIncr
|
|
4437 |
#type: #number
|
|
4438 |
#acceptOnReturn: true
|
|
4439 |
#acceptOnTab: true
|
|
4440 |
#acceptOnLostFocus: true
|
|
4441 |
#acceptOnPointerLeave: false
|
|
4442 |
)
|
|
4443 |
#(#LabelSpec
|
|
4444 |
#label: 'Oldspace Increment:'
|
|
4445 |
#name: 'Label34'
|
|
4446 |
#layout: #(#LayoutFrame 0 0 3 0 -95 1 25 0)
|
|
4447 |
#translateLabel: true
|
|
4448 |
#adjust: #right
|
|
4449 |
)
|
|
4450 |
#(#LabelSpec
|
|
4451 |
#label: 'Increase oldSpace in chunks of this size'
|
|
4452 |
#name: 'Label35'
|
|
4453 |
#layout: #(#LayoutFrame 0 0.0 25 0 0 1.0 47 0)
|
|
4454 |
#translateLabel: true
|
|
4455 |
#adjust: #left
|
|
4456 |
)
|
|
4457 |
#(#DividerSpec
|
|
4458 |
#name: 'Separator19'
|
|
4459 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 3 0)
|
|
4460 |
)
|
|
4461 |
)
|
|
4462 |
|
|
4463 |
)
|
|
4464 |
)
|
|
4465 |
#(#ViewSpec
|
|
4466 |
#name: 'OldSpaceCompressLimitBox'
|
|
4467 |
#layout: #(#LayoutFrame 0 0.0 300 0 0 1.0 350 0)
|
|
4468 |
#component:
|
|
4469 |
#(#SpecCollection
|
|
4470 |
#collection: #(
|
|
4471 |
#(#InputFieldSpec
|
|
4472 |
#name: 'EntryField19'
|
|
4473 |
#layout: #(#LayoutFrame -95 1 3 0 -5 1 25 0)
|
|
4474 |
#model: #compressLimit
|
|
4475 |
#type: #number
|
|
4476 |
#acceptOnReturn: true
|
|
4477 |
#acceptOnTab: true
|
|
4478 |
#acceptOnLostFocus: true
|
|
4479 |
#acceptOnPointerLeave: false
|
|
4480 |
)
|
|
4481 |
#(#LabelSpec
|
|
4482 |
#label: 'Oldspace Compress Limit:'
|
|
4483 |
#name: 'Label36'
|
|
4484 |
#layout: #(#LayoutFrame 0 0 3 0 -95 1 25 0)
|
|
4485 |
#translateLabel: true
|
|
4486 |
#adjust: #right
|
|
4487 |
)
|
|
4488 |
#(#LabelSpec
|
|
4489 |
#label: 'Use 2-pass compressing GC if > 0 and more memory is in use'
|
|
4490 |
#name: 'Label37'
|
|
4491 |
#layout: #(#LayoutFrame 0 0.0 25 0 0 1.0 47 0)
|
|
4492 |
#translateLabel: true
|
|
4493 |
#adjust: #left
|
|
4494 |
)
|
|
4495 |
#(#DividerSpec
|
|
4496 |
#name: 'Separator20'
|
|
4497 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 3 0)
|
|
4498 |
)
|
|
4499 |
)
|
|
4500 |
|
|
4501 |
)
|
|
4502 |
)
|
|
4503 |
#(#ViewSpec
|
|
4504 |
#name: 'StackLimitBox'
|
|
4505 |
#layout: #(#LayoutFrame 0 0.0 350 0.0 0 1.0 400 1.0)
|
|
4506 |
#component:
|
|
4507 |
#(#SpecCollection
|
|
4508 |
#collection: #(
|
|
4509 |
#(#InputFieldSpec
|
|
4510 |
#name: 'EntryField20'
|
|
4511 |
#layout: #(#LayoutFrame -95 1 3 0 -5 1 25 0)
|
|
4512 |
#enableChannel: #supportsJustInTimeCompilation
|
|
4513 |
#model: #stackLimit
|
|
4514 |
#type: #number
|
|
4515 |
#acceptOnReturn: true
|
|
4516 |
#acceptOnTab: true
|
|
4517 |
#acceptOnLostFocus: true
|
|
4518 |
#acceptOnPointerLeave: false
|
|
4519 |
)
|
|
4520 |
#(#LabelSpec
|
|
4521 |
#label: 'Stack Limit:'
|
|
4522 |
#name: 'Label38'
|
|
4523 |
#layout: #(#LayoutFrame 0 0 3 0 -95 1 25 0)
|
|
4524 |
#translateLabel: true
|
|
4525 |
#adjust: #right
|
|
4526 |
)
|
|
4527 |
#(#LabelSpec
|
|
4528 |
#label: 'Trigger recursionInterrupt if more stack is used by a process'
|
|
4529 |
#name: 'Label39'
|
|
4530 |
#layout: #(#LayoutFrame 0 0.0 25 0 0 1.0 47 0)
|
|
4531 |
#translateLabel: true
|
|
4532 |
#adjust: #left
|
|
4533 |
)
|
|
4534 |
#(#DividerSpec
|
|
4535 |
#name: 'Separator21'
|
|
4536 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 3 0)
|
|
4537 |
)
|
|
4538 |
)
|
|
4539 |
|
|
4540 |
)
|
|
4541 |
)
|
|
4542 |
#(#ViewSpec
|
|
4543 |
#name: 'CodeLimitBox'
|
|
4544 |
#layout: #(#LayoutFrame 0 0.0 400 0 0 1.0 450 0)
|
|
4545 |
#component:
|
|
4546 |
#(#SpecCollection
|
|
4547 |
#collection: #(
|
|
4548 |
#(#InputFieldSpec
|
|
4549 |
#name: 'EntryField21'
|
|
4550 |
#layout: #(#LayoutFrame -95 1 3 0 -5 1 25 0)
|
|
4551 |
#enableChannel: #supportsJustInTimeCompilation
|
|
4552 |
#model: #codeLimit
|
|
4553 |
#type: #numberOrNil
|
|
4554 |
#acceptOnReturn: true
|
|
4555 |
#acceptOnTab: true
|
|
4556 |
#acceptOnLostFocus: true
|
|
4557 |
#acceptOnPointerLeave: false
|
|
4558 |
)
|
|
4559 |
#(#LabelSpec
|
|
4560 |
#label: 'Dynamic code Limit:'
|
|
4561 |
#name: 'Label40'
|
|
4562 |
#layout: #(#LayoutFrame 0 0 3 0 -95 1 25 0)
|
|
4563 |
#translateLabel: true
|
|
4564 |
#adjust: #right
|
|
4565 |
)
|
|
4566 |
#(#LabelSpec
|
|
4567 |
#label: 'Flush dynamic compiled code to stay within this limit'
|
|
4568 |
#name: 'Label41'
|
|
4569 |
#layout: #(#LayoutFrame 0 0.0 25 0 0 1.0 47 0)
|
|
4570 |
#translateLabel: true
|
|
4571 |
#adjust: #left
|
|
4572 |
)
|
|
4573 |
#(#DividerSpec
|
|
4574 |
#name: 'Separator22'
|
|
4575 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 3 0)
|
|
4576 |
)
|
|
4577 |
)
|
|
4578 |
|
|
4579 |
)
|
|
4580 |
)
|
|
4581 |
#(#ViewSpec
|
|
4582 |
#name: 'CodeTriggerBox'
|
|
4583 |
#layout: #(#LayoutFrame 0 0.0 450 0 0 1.0 500 0)
|
|
4584 |
#component:
|
|
4585 |
#(#SpecCollection
|
|
4586 |
#collection: #(
|
|
4587 |
#(#InputFieldSpec
|
|
4588 |
#name: 'EntryField22'
|
|
4589 |
#layout: #(#LayoutFrame -95 1 3 0 -5 1 25 0)
|
|
4590 |
#model: #codeTrigger
|
|
4591 |
#type: #number
|
|
4592 |
#acceptOnReturn: true
|
|
4593 |
#acceptOnTab: true
|
|
4594 |
#acceptOnLostFocus: true
|
|
4595 |
#acceptOnPointerLeave: false
|
|
4596 |
)
|
|
4597 |
#(#LabelSpec
|
|
4598 |
#label: 'Dynamic code Limit:'
|
|
4599 |
#name: 'Label42'
|
|
4600 |
#layout: #(#LayoutFrame 0 0 3 0 -95 1 25 0)
|
|
4601 |
#translateLabel: true
|
|
4602 |
#adjust: #right
|
|
4603 |
)
|
|
4604 |
#(#LabelSpec
|
|
4605 |
#label: 'Start incremental GC whenever this amount of code has been allocated'
|
|
4606 |
#name: 'Label43'
|
|
4607 |
#layout: #(#LayoutFrame 0 0.0 25 0 0 1.0 47 0)
|
|
4608 |
#translateLabel: true
|
|
4609 |
#adjust: #left
|
|
4610 |
)
|
|
4611 |
#(#DividerSpec
|
|
4612 |
#name: 'Separator23'
|
|
4613 |
#layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 3 0)
|
|
4614 |
)
|
|
4615 |
)
|
|
4616 |
|
|
4617 |
)
|
|
4618 |
)
|
|
4619 |
#(#DividerSpec
|
|
4620 |
#name: 'Separator24'
|
|
4621 |
#layout: #(#LayoutFrame 0 0.0 500 0 0 1.0 503 0)
|
|
4622 |
)
|
|
4623 |
#(#HorizontalPanelViewSpec
|
|
4624 |
#name: 'HorizontalPanel1'
|
|
4625 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
4626 |
#horizontalLayout: #center
|
|
4627 |
#verticalLayout: #center
|
|
4628 |
#horizontalSpace: 3
|
|
4629 |
#verticalSpace: 3
|
|
4630 |
#component:
|
|
4631 |
#(#SpecCollection
|
|
4632 |
#collection: #(
|
|
4633 |
#(#ActionButtonSpec
|
|
4634 |
#label: 'OK'
|
|
4635 |
#name: 'OK'
|
|
4636 |
#translateLabel: true
|
|
4637 |
#model: #saveSettings
|
|
4638 |
#enableChannel: #modifiedChannel
|
|
4639 |
#extent: #(#Point 125 22)
|
|
4640 |
)
|
|
4641 |
#(#ActionButtonSpec
|
|
4642 |
#label: 'Cancel'
|
|
4643 |
#name: 'Cancel'
|
|
4644 |
#translateLabel: true
|
|
4645 |
#model: #doCancel
|
|
4646 |
#extent: #(#Point 125 22)
|
|
4647 |
)
|
|
4648 |
#(#ActionButtonSpec
|
|
4649 |
#label: 'Help'
|
|
4650 |
#name: 'Help'
|
|
4651 |
#translateLabel: true
|
|
4652 |
#model: #help
|
|
4653 |
#extent: #(#Point 125 22)
|
|
4654 |
)
|
|
4655 |
)
|
|
4656 |
|
|
4657 |
)
|
|
4658 |
)
|
|
4659 |
)
|
|
4660 |
|
|
4661 |
)
|
|
4662 |
)
|
|
4663 |
! !
|
|
4664 |
|
|
4665 |
!AbstractSettingsApplication::MemorySettingsAppl methodsFor:'actions'!
|
|
4666 |
|
|
4667 |
doCancel
|
|
4668 |
|
|
4669 |
self isPartOfSettinsDialog ifTrue:[
|
|
4670 |
self loadRequest.
|
|
4671 |
].
|
|
4672 |
self closeRequest.
|
|
4673 |
!
|
|
4674 |
|
|
4675 |
evaluateModified
|
|
4676 |
|
|
4677 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
4678 |
!
|
|
4679 |
|
|
4680 |
help
|
|
4681 |
|
|
4682 |
"/ self warn:'no help available here'.
|
|
4683 |
self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/memorySettings.html'].
|
|
4684 |
!
|
|
4685 |
|
|
4686 |
loadRequest
|
|
4687 |
|
|
4688 |
self igcLimit value:ObjectMemory incrementalGCLimit.
|
|
4689 |
self igcFreeLimit value:ObjectMemory freeSpaceGCLimit.
|
|
4690 |
self igcFreeAmount value:ObjectMemory freeSpaceGCAmount.
|
|
4691 |
self newSpaceSize value:ObjectMemory newSpaceSize.
|
|
4692 |
self oldIncr value:ObjectMemory oldSpaceIncrement.
|
|
4693 |
self compressLimit value:ObjectMemory oldSpaceCompressLimit.
|
|
4694 |
self codeLimit value:ObjectMemory dynamicCodeLimit.
|
|
4695 |
self codeTrigger value:ObjectMemory dynamicCodeGCTrigger.
|
|
4696 |
self stackLimit value:Process defaultMaximumStackSize.
|
|
4697 |
self fastMoreLimit value:(ObjectMemory fastMoreOldSpaceLimit:-1).
|
|
4698 |
self maxOldSpace value:ObjectMemory maxOldSpace.
|
|
4699 |
self modifiedChannel value:false.
|
|
4700 |
!
|
|
4701 |
|
|
4702 |
saveRequest
|
|
4703 |
| result |
|
|
4704 |
|
|
4705 |
(self hasUnsavedChanges) ifTrue:[
|
|
4706 |
result := self confirmWithCancel:(resources string:'Save changed Memory Settings ?').
|
|
4707 |
result isNil ifTrue:[ ^ false].
|
|
4708 |
result ifTrue:[
|
|
4709 |
self saveSettings.
|
|
4710 |
] ifFalse:[
|
|
4711 |
self loadRequest.
|
|
4712 |
]
|
|
4713 |
].
|
|
4714 |
^ true
|
|
4715 |
!
|
|
4716 |
|
|
4717 |
saveSettings
|
|
4718 |
|
|
4719 |
self hasUnsavedChanges ifTrue:[
|
|
4720 |
ObjectMemory freeSpaceGCAmount:self igcFreeAmount value.
|
|
4721 |
ObjectMemory freeSpaceGCLimit:self igcFreeLimit value.
|
|
4722 |
ObjectMemory incrementalGCLimit:self igcLimit value.
|
|
4723 |
ObjectMemory newSpaceSize:self newSpaceSize value.
|
|
4724 |
ObjectMemory oldSpaceIncrement:self oldIncr value.
|
|
4725 |
Process defaultMaximumStackSize:self stackLimit value.
|
|
4726 |
ObjectMemory fastMoreOldSpaceLimit:self fastMoreLimit value.
|
|
4727 |
ObjectMemory maxOldSpace:self maxOldSpace value.
|
|
4728 |
ObjectMemory oldSpaceCompressLimit:self compressLimit value.
|
|
4729 |
ObjectMemory dynamicCodeLimit:self codeLimit value.
|
|
4730 |
ObjectMemory dynamicCodeGCTrigger:self codeTrigger value.
|
|
4731 |
self modifiedChannel value:false.
|
|
4732 |
].
|
|
4733 |
! !
|
|
4734 |
|
|
4735 |
!AbstractSettingsApplication::MemorySettingsAppl methodsFor:'aspects'!
|
|
4736 |
|
|
4737 |
codeLimit
|
|
4738 |
|
|
4739 |
codeLimit isNil ifTrue:[
|
|
4740 |
codeLimit := ObjectMemory dynamicCodeLimit asValue.
|
|
4741 |
codeLimit onChangeSend:#evaluateModified to:self
|
|
4742 |
].
|
|
4743 |
^ codeLimit.
|
|
4744 |
!
|
|
4745 |
|
|
4746 |
codeTrigger
|
|
4747 |
|
|
4748 |
codeTrigger isNil ifTrue:[
|
|
4749 |
codeTrigger := ObjectMemory dynamicCodeGCTrigger asValue.
|
|
4750 |
codeTrigger onChangeSend:#evaluateModified to:self
|
|
4751 |
].
|
|
4752 |
^ codeTrigger.
|
|
4753 |
!
|
|
4754 |
|
|
4755 |
compressLimit
|
|
4756 |
|
|
4757 |
compressLimit isNil ifTrue:[
|
|
4758 |
compressLimit := ObjectMemory oldSpaceCompressLimit asValue.
|
|
4759 |
compressLimit onChangeSend:#evaluateModified to:self
|
|
4760 |
].
|
|
4761 |
^ compressLimit.
|
|
4762 |
!
|
|
4763 |
|
|
4764 |
fastMoreLimit
|
|
4765 |
|
|
4766 |
fastMoreLimit isNil ifTrue:[
|
|
4767 |
fastMoreLimit := (ObjectMemory fastMoreOldSpaceLimit:-1) asValue.
|
|
4768 |
fastMoreLimit onChangeSend:#evaluateModified to:self
|
|
4769 |
].
|
|
4770 |
^ fastMoreLimit.
|
|
4771 |
!
|
|
4772 |
|
|
4773 |
igcFreeAmount
|
|
4774 |
|
|
4775 |
igcFreeAmount isNil ifTrue:[
|
|
4776 |
igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue.
|
|
4777 |
igcFreeAmount onChangeSend:#evaluateModified to:self
|
|
4778 |
].
|
|
4779 |
^ igcFreeAmount.
|
|
4780 |
!
|
|
4781 |
|
|
4782 |
igcFreeLimit
|
|
4783 |
|
|
4784 |
igcFreeLimit isNil ifTrue:[
|
|
4785 |
igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue.
|
|
4786 |
igcFreeLimit onChangeSend:#evaluateModified to:self
|
|
4787 |
].
|
|
4788 |
^ igcFreeLimit.
|
|
4789 |
!
|
|
4790 |
|
|
4791 |
igcLimit
|
|
4792 |
|
|
4793 |
igcLimit isNil ifTrue:[
|
|
4794 |
igcLimit := ObjectMemory incrementalGCLimit asValue.
|
|
4795 |
igcLimit onChangeSend:#evaluateModified to:self
|
|
4796 |
].
|
|
4797 |
^ igcLimit.
|
|
4798 |
!
|
|
4799 |
|
|
4800 |
maxOldSpace
|
|
4801 |
|
|
4802 |
maxOldSpace isNil ifTrue:[
|
|
4803 |
maxOldSpace := ObjectMemory maxOldSpace asValue.
|
|
4804 |
maxOldSpace onChangeSend:#evaluateModified to:self
|
|
4805 |
].
|
|
4806 |
^ maxOldSpace.
|
|
4807 |
!
|
|
4808 |
|
|
4809 |
modifiedChannel
|
|
4810 |
|
|
4811 |
modifiedChannel isNil ifTrue:[
|
|
4812 |
modifiedChannel := false asValue.
|
|
4813 |
].
|
|
4814 |
^ modifiedChannel
|
|
4815 |
!
|
|
4816 |
|
|
4817 |
newSpaceSize
|
|
4818 |
|
|
4819 |
newSpaceSize isNil ifTrue:[
|
|
4820 |
newSpaceSize := ObjectMemory newSpaceSize asValue.
|
|
4821 |
newSpaceSize onChangeSend:#evaluateModified to:self
|
|
4822 |
].
|
|
4823 |
^ newSpaceSize.
|
|
4824 |
!
|
|
4825 |
|
|
4826 |
oldIncr
|
|
4827 |
|
|
4828 |
oldIncr isNil ifTrue:[
|
|
4829 |
oldIncr := ObjectMemory oldSpaceIncrement asValue.
|
|
4830 |
oldIncr onChangeSend:#evaluateModified to:self
|
|
4831 |
].
|
|
4832 |
^ oldIncr.
|
|
4833 |
!
|
|
4834 |
|
|
4835 |
stackLimit
|
|
4836 |
|
|
4837 |
stackLimit isNil ifTrue:[
|
|
4838 |
stackLimit := Process defaultMaximumStackSize asValue.
|
|
4839 |
stackLimit onChangeSend:#evaluateModified to:self
|
|
4840 |
].
|
|
4841 |
^ stackLimit.
|
|
4842 |
!
|
|
4843 |
|
|
4844 |
supportsJustInTimeCompilation
|
|
4845 |
|
|
4846 |
^ ObjectMemory supportsJustInTimeCompilation.
|
|
4847 |
!
|
|
4848 |
|
|
4849 |
warningLabelHolder
|
|
4850 |
|
|
4851 |
warningLabelHolder isNil ifTrue:[
|
|
4852 |
warningLabelHolder := ValueHolder new.
|
|
4853 |
].
|
|
4854 |
^ warningLabelHolder.
|
|
4855 |
! !
|
|
4856 |
|
|
4857 |
!AbstractSettingsApplication::MemorySettingsAppl methodsFor:'change & update'!
|
|
4858 |
|
|
4859 |
update:something with:aParameter from:changedObject
|
|
4860 |
"Invoked when an object that I depend upon sends a change notification."
|
|
4861 |
|
|
4862 |
"stub code automatically generated - please change as required"
|
|
4863 |
|
|
4864 |
"/ changedObject == self allOfThem ifTrue:[
|
|
4865 |
"/ ^ self.
|
|
4866 |
"/ ].
|
|
4867 |
|
|
4868 |
super update:something with:aParameter from:changedObject
|
|
4869 |
! !
|
|
4870 |
|
|
4871 |
!AbstractSettingsApplication::MemorySettingsAppl methodsFor:'initialization & release'!
|
|
4872 |
|
|
4873 |
closeRequest
|
|
4874 |
|
|
4875 |
self saveRequest ifFalse:[
|
|
4876 |
^ self
|
|
4877 |
].
|
|
4878 |
|
|
4879 |
^ super closeRequest.
|
|
4880 |
!
|
|
4881 |
|
|
4882 |
initialize
|
|
4883 |
|
|
4884 |
resources := self class owningClass classResources.
|
|
4885 |
self warningLabelHolder value:'Warning - invalid settings may result in failures or poor performance
|
|
4886 |
' , 'You have been warned' allBold , '.'.
|
|
4887 |
super initialize
|
|
4888 |
!
|
|
4889 |
|
|
4890 |
postOpen
|
|
4891 |
!
|
|
4892 |
|
|
4893 |
postOpenAsSubcanvasWith:aBuilder
|
|
4894 |
|
|
4895 |
self postOpen.
|
|
4896 |
^ super postOpenAsSubcanvasWith:aBuilder
|
|
4897 |
!
|
|
4898 |
|
|
4899 |
postOpenWith:aBuilder
|
|
4900 |
|
|
4901 |
self postOpen.
|
|
4902 |
^ super postOpenWith:aBuilder
|
|
4903 |
! !
|
|
4904 |
|
|
4905 |
!AbstractSettingsApplication::MemorySettingsAppl methodsFor:'queries'!
|
|
4906 |
|
|
4907 |
hasUnsavedChanges
|
|
4908 |
|
|
4909 |
^ (
|
|
4910 |
ObjectMemory freeSpaceGCAmount ~= self igcFreeAmount value or:[
|
|
4911 |
ObjectMemory freeSpaceGCLimit ~= self igcFreeLimit value or:[
|
|
4912 |
ObjectMemory incrementalGCLimit ~= self igcLimit value or:[
|
|
4913 |
ObjectMemory newSpaceSize ~= self newSpaceSize value or:[
|
|
4914 |
ObjectMemory oldSpaceIncrement ~= self oldIncr value or:[
|
|
4915 |
Process defaultMaximumStackSize ~= self stackLimit value or:[
|
|
4916 |
(ObjectMemory fastMoreOldSpaceLimit:-1) ~= self fastMoreLimit value or:[
|
|
4917 |
ObjectMemory maxOldSpace ~= self maxOldSpace value or:[
|
|
4918 |
ObjectMemory oldSpaceCompressLimit ~= self compressLimit value or:[
|
|
4919 |
ObjectMemory dynamicCodeLimit ~= self codeLimit value or:[
|
|
4920 |
ObjectMemory dynamicCodeGCTrigger ~= self codeTrigger value ]]]]]]]]]]
|
|
4921 |
)
|
|
4922 |
! !
|
|
4923 |
|
|
4924 |
!AbstractSettingsApplication::MiscSettingsAppl class methodsFor:'interface specs'!
|
|
4925 |
|
|
4926 |
windowSpec
|
|
4927 |
"This resource specification was automatically generated
|
|
4928 |
by the UIPainter of ST/X."
|
|
4929 |
|
|
4930 |
"Do not manually edit this!! If it is corrupted,
|
|
4931 |
the UIPainter may not be able to read the specification."
|
|
4932 |
|
|
4933 |
"
|
|
4934 |
UIPainter new openOnClass:AbstractLauncherApplication::MiscSettingsAppl andSelector:#windowSpec
|
|
4935 |
AbstractLauncherApplication::MiscSettingsAppl new openInterface:#windowSpec
|
|
4936 |
AbstractLauncherApplication::MiscSettingsAppl open
|
|
4937 |
"
|
|
4938 |
|
|
4939 |
<resource: #canvas>
|
|
4940 |
|
|
4941 |
^
|
|
4942 |
#(#FullSpec
|
|
4943 |
#name: #windowSpec
|
|
4944 |
#window:
|
|
4945 |
#(#WindowSpec
|
|
4946 |
#label: 'Other settings'
|
|
4947 |
#name: 'Other settings'
|
|
4948 |
#min: #(#Point 10 10)
|
|
4949 |
#max: #(#Point 1024 768)
|
|
4950 |
#bounds: #(#Rectangle 16 42 616 592)
|
|
4951 |
)
|
|
4952 |
#component:
|
|
4953 |
#(#SpecCollection
|
|
4954 |
#collection: #(
|
|
4955 |
#(#CheckBoxSpec
|
|
4956 |
#label: 'Shadows under PopUp Views'
|
|
4957 |
#name: 'CheckBox1'
|
|
4958 |
#layout: #(#LayoutFrame 5 0 5 0 -5 1 27 0)
|
|
4959 |
#model: #shadows
|
|
4960 |
#translateLabel: true
|
|
4961 |
)
|
|
4962 |
#(#CheckBoxSpec
|
|
4963 |
#label: 'Beeper enabled'
|
|
4964 |
#name: 'CheckBox2'
|
|
4965 |
#layout: #(#LayoutFrame 5 0 30 0 -5 1 52 0)
|
|
4966 |
#model: #beepEnabled
|
|
4967 |
#translateLabel: true
|
|
4968 |
)
|
|
4969 |
#(#CheckBoxSpec
|
|
4970 |
#label: 'Boxes Return Focus to Previously Active View'
|
|
4971 |
#name: 'CheckBox3'
|
|
4972 |
#layout: #(#LayoutFrame 5 0 55 0 -5 1 77 0)
|
|
4973 |
#model: #returnFocus
|
|
4974 |
#translateLabel: true
|
|
4975 |
)
|
|
4976 |
#(#CheckBoxSpec
|
|
4977 |
#label: 'Views Catch Focus when Mapped'
|
|
4978 |
#name: 'CheckBox4'
|
|
4979 |
#layout: #(#LayoutFrame 5 0 80 0 -5 1 102 0)
|
|
4980 |
#model: #takeFocus
|
|
4981 |
#translateLabel: true
|
|
4982 |
)
|
|
4983 |
#(#CheckBoxSpec
|
|
4984 |
#label: 'Hostname in Window Labels'
|
|
4985 |
#name: 'CheckBox5'
|
|
4986 |
#layout: #(#LayoutFrame 5 0 105 0 300 0 127 0)
|
|
4987 |
#model: #hostNameInLabelHolder
|
|
4988 |
#translateLabel: true
|
|
4989 |
)
|
|
4990 |
#(#ActionButtonSpec
|
|
4991 |
#label: 'Format...'
|
|
4992 |
#name: 'Button1'
|
|
4993 |
#layout: #(#LayoutFrame 300 0 105 0 -5 1 127 0)
|
|
4994 |
#translateLabel: true
|
|
4995 |
#model: #formatHostNameinWindowLabels
|
|
4996 |
)
|
|
4997 |
#(#CheckBoxSpec
|
|
4998 |
#label: 'Show Accelerator Keys in Menus'
|
|
4999 |
#name: 'CheckBox6'
|
|
5000 |
#layout: #(#LayoutFrame 5 0 130 0 -5 1 152 0)
|
|
5001 |
#model: #showAccelerators
|
|
5002 |
#translateLabel: true
|
|
5003 |
)
|
|
5004 |
#(#CheckBoxSpec
|
|
5005 |
#label: 'Raise & Activate Windows on Click'
|
|
5006 |
#name: 'CheckBox7'
|
|
5007 |
#layout: #(#LayoutFrame 5 0 155 0 -5 1 177 0)
|
|
5008 |
#model: #activateOnClick
|
|
5009 |
#translateLabel: true
|
|
5010 |
)
|
|
5011 |
#(#CheckBoxSpec
|
|
5012 |
#label: 'Focus Follows Mouse'
|
|
5013 |
#name: 'CheckBox8'
|
|
5014 |
#layout: #(#LayoutFrame 5 0 180 0 -5 1 202 0)
|
|
5015 |
#model: #focusFollowsMouse
|
|
5016 |
#translateLabel: true
|
|
5017 |
)
|
|
5018 |
#(#CheckBoxSpec
|
|
5019 |
#label: 'Opaque Variable Panel Resizing'
|
|
5020 |
#name: 'CheckBox9'
|
|
5021 |
#layout: #(#LayoutFrame 5 0 205 0 -5 1 227 0)
|
|
5022 |
#model: #opaqueVariablePanelResize
|
|
5023 |
#translateLabel: true
|
|
5024 |
)
|
|
5025 |
#(#CheckBoxSpec
|
|
5026 |
#label: 'Opaque Table Column Resizing'
|
|
5027 |
#name: 'CheckBox10'
|
|
5028 |
#layout: #(#LayoutFrame 5 0 230 0 -5 1 252 0)
|
|
5029 |
#model: #opaqueTableColumnResize
|
|
5030 |
#translateLabel: true
|
|
5031 |
)
|
|
5032 |
#(#DividerSpec
|
|
5033 |
#name: 'Separator1'
|
|
5034 |
#layout: #(#LayoutFrame 0 0.0 259 0 0 1.0 263 0)
|
|
5035 |
)
|
|
5036 |
#(#CheckBoxSpec
|
|
5037 |
#label: 'Preemptive Scheduling'
|
|
5038 |
#name: 'CheckBox11'
|
|
5039 |
#layout: #(#LayoutFrame 5 0 270 0 -5 1 292 0)
|
|
5040 |
#model: #preemptive
|
|
5041 |
#translateLabel: true
|
|
5042 |
)
|
|
5043 |
#(#CheckBoxSpec
|
|
5044 |
#label: 'Dynamic Priorities'
|
|
5045 |
#name: 'CheckBox12'
|
|
5046 |
#layout: #(#LayoutFrame 20 0 295 0 -5 1 317 0)
|
|
5047 |
#enableChannel: #preemptive
|
|
5048 |
#model: #dynamicPrios
|
|
5049 |
#translateLabel: true
|
|
5050 |
)
|
|
5051 |
#(#DividerSpec
|
|
5052 |
#name: 'Separator2'
|
|
5053 |
#layout: #(#LayoutFrame 0 0.0 321 0 0 1.0 325 0)
|
|
5054 |
)
|
|
5055 |
#(#HorizontalPanelViewSpec
|
|
5056 |
#name: 'HorizontalPanel1'
|
|
5057 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
5058 |
#horizontalLayout: #center
|
|
5059 |
#verticalLayout: #center
|
|
5060 |
#horizontalSpace: 3
|
|
5061 |
#verticalSpace: 3
|
|
5062 |
#component:
|
|
5063 |
#(#SpecCollection
|
|
5064 |
#collection: #(
|
|
5065 |
#(#ActionButtonSpec
|
|
5066 |
#label: 'OK'
|
|
5067 |
#name: 'OK'
|
|
5068 |
#translateLabel: true
|
|
5069 |
#model: #saveSettings
|
|
5070 |
#enableChannel: #modifiedChannel
|
|
5071 |
#extent: #(#Point 125 22)
|
|
5072 |
)
|
|
5073 |
#(#ActionButtonSpec
|
|
5074 |
#label: 'Cancel'
|
|
5075 |
#name: 'Cancel'
|
|
5076 |
#translateLabel: true
|
|
5077 |
#model: #doCancel
|
|
5078 |
#extent: #(#Point 125 22)
|
|
5079 |
)
|
|
5080 |
#(#ActionButtonSpec
|
|
5081 |
#label: 'Help'
|
|
5082 |
#name: 'Help'
|
|
5083 |
#translateLabel: true
|
|
5084 |
#model: #help
|
|
5085 |
#extent: #(#Point 125 22)
|
|
5086 |
)
|
|
5087 |
)
|
|
5088 |
|
|
5089 |
)
|
|
5090 |
)
|
|
5091 |
)
|
|
5092 |
|
|
5093 |
)
|
|
5094 |
)
|
|
5095 |
! !
|
|
5096 |
|
|
5097 |
!AbstractSettingsApplication::MiscSettingsAppl methodsFor:'actions'!
|
|
5098 |
|
|
5099 |
doCancel
|
|
5100 |
|
|
5101 |
self isPartOfSettinsDialog ifTrue:[
|
|
5102 |
self loadRequest.
|
|
5103 |
].
|
|
5104 |
self closeRequest.
|
|
5105 |
!
|
|
5106 |
|
|
5107 |
evaluateModified
|
|
5108 |
|
|
5109 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
5110 |
!
|
|
5111 |
|
|
5112 |
formatHostNameinWindowLabels
|
|
5113 |
|newFormat|
|
|
5114 |
|
|
5115 |
newFormat := Dialog request:
|
|
5116 |
'Define the Format of Window Labels:\\ %1 - Label\ %2 - Hostname\ %3 - Username\ %4 - ProcessId\'
|
|
5117 |
withCRs initialAnswer:newWindowLabelFormat.
|
|
5118 |
|
|
5119 |
newFormat size > 0 ifTrue:[
|
|
5120 |
newWindowLabelFormat := newFormat.
|
|
5121 |
self evaluateModified.
|
|
5122 |
].
|
|
5123 |
!
|
|
5124 |
|
|
5125 |
help
|
|
5126 |
|
|
5127 |
"/ self warn:'no help available here'.
|
|
5128 |
self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/miscSettings.html'].
|
|
5129 |
!
|
|
5130 |
|
|
5131 |
loadRequest
|
|
5132 |
|
|
5133 |
self shadows value:PopUpView shadows.
|
|
5134 |
self beepEnabled value:currentUserPrefs beepEnabled.
|
|
5135 |
|
|
5136 |
self hostNameInLabelHolder value:PopUpView shadows.
|
|
5137 |
self returnFocus value:StandardSystemView returnFocusWhenClosingModalBoxes.
|
|
5138 |
self takeFocus value:StandardSystemView takeFocusWhenMapped .
|
|
5139 |
self focusFollowsMouse value:(currentUserPrefs focusFollowsMouse ? true) .
|
|
5140 |
self activateOnClick value:(Display activateOnClick:nil).
|
|
5141 |
self opaqueVariablePanelResize value:currentUserPrefs opaqueVariablePanelResizing.
|
|
5142 |
self opaqueTableColumnResize value:currentUserPrefs opaqueTableColumnResizing.
|
|
5143 |
|
|
5144 |
self showAccelerators value:MenuView showAcceleratorKeys.
|
|
5145 |
self preemptive value:Processor isTimeSlicing.
|
|
5146 |
self dynamicPrios value:Processor supportDynamicPriorities.
|
|
5147 |
self modifiedChannel value:false.
|
|
5148 |
!
|
|
5149 |
|
|
5150 |
saveRequest
|
|
5151 |
| result |
|
|
5152 |
|
|
5153 |
(self hasUnsavedChanges) ifTrue:[
|
|
5154 |
result := self confirmWithCancel:(resources string:'Save changed Misc Settings ?').
|
|
5155 |
result isNil ifTrue:[ ^ false].
|
|
5156 |
result ifTrue:[
|
|
5157 |
self saveSettings.
|
|
5158 |
] ifFalse:[
|
|
5159 |
self loadRequest.
|
|
5160 |
]
|
|
5161 |
].
|
|
5162 |
^ true
|
|
5163 |
!
|
|
5164 |
|
|
5165 |
saveSettings
|
|
5166 |
|
|
5167 |
self hasUnsavedChanges ifTrue:[
|
|
5168 |
PopUpView shadows:shadows value.
|
|
5169 |
(self hostNameInLabelHolder value ~= StandardSystemView includeHostNameInLabel
|
|
5170 |
or:[newWindowLabelFormat ~= StandardSystemView windowLabelFormat]) ifTrue:[
|
|
5171 |
StandardSystemView includeHostNameInLabel:self hostNameInLabelHolder value.
|
|
5172 |
newWindowLabelFormat notNil ifTrue:[
|
|
5173 |
StandardSystemView windowLabelFormat:newWindowLabelFormat
|
|
5174 |
].
|
|
5175 |
|
|
5176 |
Screen allScreens do:[:aDisplay |
|
|
5177 |
aDisplay allViewsDo:[:aView |
|
|
5178 |
|l|
|
|
5179 |
|
|
5180 |
aView isTopView ifTrue:[
|
|
5181 |
l := aView label.
|
|
5182 |
l notNil ifTrue:[
|
|
5183 |
aView label:(l , ' '); label:l. "/ force a change
|
|
5184 |
]
|
|
5185 |
]
|
|
5186 |
]
|
|
5187 |
]
|
|
5188 |
].
|
|
5189 |
|
|
5190 |
currentUserPrefs opaqueVariablePanelResizing:self opaqueVariablePanelResize value.
|
|
5191 |
currentUserPrefs opaqueTableColumnResizing:self opaqueTableColumnResize value.
|
|
5192 |
|
|
5193 |
currentUserPrefs beepEnabled:self beepEnabled value.
|
|
5194 |
|
|
5195 |
StandardSystemView returnFocusWhenClosingModalBoxes:self returnFocus value.
|
|
5196 |
StandardSystemView takeFocusWhenMapped:self takeFocus value.
|
|
5197 |
currentUserPrefs focusFollowsMouse:self focusFollowsMouse value.
|
|
5198 |
Screen current activateOnClick:self activateOnClick value.
|
|
5199 |
|
|
5200 |
MenuView showAcceleratorKeys:self showAccelerators value.
|
|
5201 |
Processor isTimeSlicing ~~ self preemptive value ifTrue:[
|
|
5202 |
self preemptive value ifTrue:[
|
|
5203 |
Processor startTimeSlicing
|
|
5204 |
] ifFalse:[
|
|
5205 |
Processor stopTimeSlicing
|
|
5206 |
]
|
|
5207 |
].
|
|
5208 |
Processor supportDynamicPriorities ~~ self dynamicPrios value ifTrue:[
|
|
5209 |
Processor supportDynamicPriorities:self dynamicPrios value
|
|
5210 |
].
|
|
5211 |
self modifiedChannel value:false.
|
|
5212 |
].
|
|
5213 |
! !
|
|
5214 |
|
|
5215 |
!AbstractSettingsApplication::MiscSettingsAppl methodsFor:'aspects'!
|
|
5216 |
|
|
5217 |
activateOnClick
|
|
5218 |
|
|
5219 |
activateOnClick isNil ifTrue:[
|
|
5220 |
activateOnClick := true asValue.
|
|
5221 |
activateOnClick onChangeSend:#evaluateModified to:self
|
|
5222 |
].
|
|
5223 |
^ activateOnClick.
|
|
5224 |
!
|
|
5225 |
|
|
5226 |
beepEnabled
|
|
5227 |
|
|
5228 |
beepEnabled isNil ifTrue:[
|
|
5229 |
beepEnabled := true asValue.
|
|
5230 |
beepEnabled onChangeSend:#evaluateModified to:self
|
|
5231 |
].
|
|
5232 |
^ beepEnabled.
|
|
5233 |
!
|
|
5234 |
|
|
5235 |
dynamicPrios
|
|
5236 |
|
|
5237 |
dynamicPrios isNil ifTrue:[
|
|
5238 |
dynamicPrios := true asValue.
|
|
5239 |
dynamicPrios onChangeSend:#evaluateModified to:self
|
|
5240 |
].
|
|
5241 |
^ dynamicPrios.
|
|
5242 |
!
|
|
5243 |
|
|
5244 |
focusFollowsMouse
|
|
5245 |
|
|
5246 |
focusFollowsMouse isNil ifTrue:[
|
|
5247 |
focusFollowsMouse := true asValue.
|
|
5248 |
focusFollowsMouse onChangeSend:#evaluateModified to:self
|
|
5249 |
].
|
|
5250 |
^ focusFollowsMouse.
|
|
5251 |
!
|
|
5252 |
|
|
5253 |
hostNameInLabelHolder
|
|
5254 |
|
|
5255 |
hostNameInLabelHolder isNil ifTrue:[
|
|
5256 |
hostNameInLabelHolder := true asValue.
|
|
5257 |
hostNameInLabelHolder onChangeSend:#evaluateModified to:self
|
|
5258 |
].
|
|
5259 |
^ hostNameInLabelHolder.
|
|
5260 |
!
|
|
5261 |
|
|
5262 |
modifiedChannel
|
|
5263 |
|
|
5264 |
modifiedChannel isNil ifTrue:[
|
|
5265 |
modifiedChannel := false asValue.
|
|
5266 |
].
|
|
5267 |
^ modifiedChannel
|
|
5268 |
!
|
|
5269 |
|
|
5270 |
opaqueTableColumnResize
|
|
5271 |
|
|
5272 |
opaqueTableColumnResize isNil ifTrue:[
|
|
5273 |
opaqueTableColumnResize := true asValue.
|
|
5274 |
opaqueTableColumnResize onChangeSend:#evaluateModified to:self
|
|
5275 |
].
|
|
5276 |
^ opaqueTableColumnResize.
|
|
5277 |
!
|
|
5278 |
|
|
5279 |
opaqueVariablePanelResize
|
|
5280 |
|
|
5281 |
opaqueVariablePanelResize isNil ifTrue:[
|
|
5282 |
opaqueVariablePanelResize := true asValue.
|
|
5283 |
opaqueVariablePanelResize onChangeSend:#evaluateModified to:self
|
|
5284 |
].
|
|
5285 |
^ opaqueVariablePanelResize.
|
|
5286 |
!
|
|
5287 |
|
|
5288 |
preemptive
|
|
5289 |
|
|
5290 |
preemptive isNil ifTrue:[
|
|
5291 |
preemptive := true asValue.
|
|
5292 |
preemptive onChangeSend:#evaluateModified to:self
|
|
5293 |
].
|
|
5294 |
^ preemptive.
|
|
5295 |
!
|
|
5296 |
|
|
5297 |
returnFocus
|
|
5298 |
|
|
5299 |
returnFocus isNil ifTrue:[
|
|
5300 |
returnFocus := true asValue.
|
|
5301 |
returnFocus onChangeSend:#evaluateModified to:self
|
|
5302 |
].
|
|
5303 |
^ returnFocus.
|
|
5304 |
!
|
|
5305 |
|
|
5306 |
shadows
|
|
5307 |
|
|
5308 |
shadows isNil ifTrue:[
|
|
5309 |
shadows := true asValue.
|
|
5310 |
shadows onChangeSend:#evaluateModified to:self
|
|
5311 |
].
|
|
5312 |
^ shadows.
|
|
5313 |
!
|
|
5314 |
|
|
5315 |
showAccelerators
|
|
5316 |
|
|
5317 |
showAccelerators isNil ifTrue:[
|
|
5318 |
showAccelerators := true asValue.
|
|
5319 |
showAccelerators onChangeSend:#evaluateModified to:self
|
|
5320 |
].
|
|
5321 |
^ showAccelerators.
|
|
5322 |
!
|
|
5323 |
|
|
5324 |
takeFocus
|
|
5325 |
|
|
5326 |
takeFocus isNil ifTrue:[
|
|
5327 |
takeFocus := true asValue.
|
|
5328 |
takeFocus onChangeSend:#evaluateModified to:self
|
|
5329 |
].
|
|
5330 |
^ takeFocus.
|
|
5331 |
! !
|
|
5332 |
|
|
5333 |
!AbstractSettingsApplication::MiscSettingsAppl methodsFor:'change & update'!
|
|
5334 |
|
|
5335 |
update:something with:aParameter from:changedObject
|
|
5336 |
"Invoked when an object that I depend upon sends a change notification."
|
|
5337 |
|
|
5338 |
"stub code automatically generated - please change as required"
|
|
5339 |
|
|
5340 |
"/ changedObject == self allOfThem ifTrue:[
|
|
5341 |
"/ ^ self.
|
|
5342 |
"/ ].
|
|
5343 |
|
|
5344 |
super update:something with:aParameter from:changedObject
|
|
5345 |
! !
|
|
5346 |
|
|
5347 |
!AbstractSettingsApplication::MiscSettingsAppl methodsFor:'initialization & release'!
|
|
5348 |
|
|
5349 |
closeRequest
|
|
5350 |
|
|
5351 |
self saveRequest ifFalse:[
|
|
5352 |
^ self
|
|
5353 |
].
|
|
5354 |
|
|
5355 |
^ super closeRequest.
|
|
5356 |
!
|
|
5357 |
|
|
5358 |
initialize
|
|
5359 |
|
|
5360 |
resources := self class owningClass classResources.
|
|
5361 |
currentUserPrefs := UserPreferences current.
|
|
5362 |
newWindowLabelFormat := StandardSystemView windowLabelFormat.
|
|
5363 |
self loadRequest.
|
|
5364 |
super initialize
|
|
5365 |
!
|
|
5366 |
|
|
5367 |
postOpen
|
|
5368 |
!
|
|
5369 |
|
|
5370 |
postOpenAsSubcanvasWith:aBuilder
|
|
5371 |
|
|
5372 |
self postOpen.
|
|
5373 |
^ super postOpenAsSubcanvasWith:aBuilder
|
|
5374 |
!
|
|
5375 |
|
|
5376 |
postOpenWith:aBuilder
|
|
5377 |
|
|
5378 |
self postOpen.
|
|
5379 |
^ super postOpenWith:aBuilder
|
|
5380 |
! !
|
|
5381 |
|
|
5382 |
!AbstractSettingsApplication::MiscSettingsAppl methodsFor:'queries'!
|
|
5383 |
|
|
5384 |
hasUnsavedChanges
|
|
5385 |
|
|
5386 |
^ (
|
|
5387 |
newWindowLabelFormat ~= StandardSystemView windowLabelFormat or:[
|
|
5388 |
self shadows value ~= PopUpView shadows or:[
|
|
5389 |
self beepEnabled value ~= currentUserPrefs beepEnabled or:[
|
|
5390 |
self hostNameInLabelHolder value ~= PopUpView shadows or:[
|
|
5391 |
self returnFocus value ~= StandardSystemView returnFocusWhenClosingModalBoxes or:[
|
|
5392 |
self takeFocus value ~= StandardSystemView takeFocusWhenMapped or:[
|
|
5393 |
self focusFollowsMouse value ~= (currentUserPrefs focusFollowsMouse ? true) or:[
|
|
5394 |
self activateOnClick value ~= (Display activateOnClick:nil) or:[
|
|
5395 |
self opaqueVariablePanelResize value ~= currentUserPrefs opaqueVariablePanelResizing or:[
|
|
5396 |
self opaqueTableColumnResize value ~= currentUserPrefs opaqueTableColumnResizing or:[
|
|
5397 |
self showAccelerators value ~= MenuView showAcceleratorKeys or:[
|
|
5398 |
self preemptive value ~= Processor isTimeSlicing or:[
|
|
5399 |
self dynamicPrios value ~= Processor supportDynamicPriorities]]]]]]]]]]]]
|
|
5400 |
)
|
|
5401 |
! !
|
|
5402 |
|
|
5403 |
!AbstractSettingsApplication::PlainSettingsAppl class methodsFor:'interface specs'!
|
|
5404 |
|
|
5405 |
windowSpec
|
|
5406 |
"This resource specification was automatically generated
|
|
5407 |
by the UIPainter of ST/X."
|
|
5408 |
|
|
5409 |
"Do not manually edit this!! If it is corrupted,
|
|
5410 |
the UIPainter may not be able to read the specification."
|
|
5411 |
|
|
5412 |
"
|
|
5413 |
UIPainter new openOnClass:AbstractLauncherApplication::PlainSettingsAppl andSelector:#windowSpec
|
|
5414 |
AbstractLauncherApplication::PlainSettingsAppl new openInterface:#windowSpec
|
|
5415 |
AbstractLauncherApplication::PlainSettingsAppl open
|
|
5416 |
"
|
|
5417 |
|
|
5418 |
<resource: #canvas>
|
|
5419 |
|
|
5420 |
^
|
|
5421 |
#(#FullSpec
|
|
5422 |
#name: #windowSpec
|
|
5423 |
#window:
|
|
5424 |
#(#WindowSpec
|
|
5425 |
#label: 'Settings'
|
|
5426 |
#name: 'Settings'
|
|
5427 |
#min: #(#Point 10 10)
|
|
5428 |
#max: #(#Point 1024 768)
|
|
5429 |
#bounds: #(#Rectangle 16 42 616 592)
|
|
5430 |
)
|
|
5431 |
#component:
|
|
5432 |
#(#SpecCollection
|
|
5433 |
#collection: #(
|
|
5434 |
#(#HorizontalPanelViewSpec
|
|
5435 |
#name: 'HorizontalPanel1'
|
|
5436 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
5437 |
#horizontalLayout: #center
|
|
5438 |
#verticalLayout: #center
|
|
5439 |
#horizontalSpace: 3
|
|
5440 |
#verticalSpace: 3
|
|
5441 |
#component:
|
|
5442 |
#(#SpecCollection
|
|
5443 |
#collection: #(
|
|
5444 |
#(#ActionButtonSpec
|
|
5445 |
#label: 'OK'
|
|
5446 |
#name: 'OK'
|
|
5447 |
#translateLabel: true
|
|
5448 |
#model: #saveSettings
|
|
5449 |
#enableChannel: #modifiedChannel
|
|
5450 |
#extent: #(#Point 125 22)
|
|
5451 |
)
|
|
5452 |
#(#ActionButtonSpec
|
|
5453 |
#label: 'Cancel'
|
|
5454 |
#name: 'Cancel'
|
|
5455 |
#translateLabel: true
|
|
5456 |
#model: #doCancel
|
|
5457 |
#extent: #(#Point 125 22)
|
|
5458 |
)
|
|
5459 |
#(#ActionButtonSpec
|
|
5460 |
#label: 'Help'
|
|
5461 |
#name: 'Help'
|
|
5462 |
#translateLabel: true
|
|
5463 |
#model: #help
|
|
5464 |
#extent: #(#Point 125 22)
|
|
5465 |
)
|
|
5466 |
)
|
|
5467 |
|
|
5468 |
)
|
|
5469 |
)
|
|
5470 |
)
|
|
5471 |
|
|
5472 |
)
|
|
5473 |
)
|
|
5474 |
! !
|
|
5475 |
|
|
5476 |
!AbstractSettingsApplication::PlainSettingsAppl methodsFor:'actions'!
|
|
5477 |
|
|
5478 |
doCancel
|
|
5479 |
|
|
5480 |
self isPartOfSettinsDialog ifTrue:[
|
|
5481 |
self loadRequest.
|
|
5482 |
].
|
|
5483 |
self closeRequest.
|
|
5484 |
!
|
|
5485 |
|
|
5486 |
evaluateModified
|
|
5487 |
|
|
5488 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
5489 |
!
|
|
5490 |
|
|
5491 |
help
|
|
5492 |
|
|
5493 |
self warn:'no help available here'.
|
|
5494 |
"/ self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/keyboardSetting.html'].
|
|
5495 |
!
|
|
5496 |
|
|
5497 |
loadRequest
|
|
5498 |
|
|
5499 |
self modifiedChannel value:false.
|
|
5500 |
!
|
|
5501 |
|
|
5502 |
saveRequest
|
|
5503 |
| result |
|
|
5504 |
|
|
5505 |
(self hasUnsavedChanges) ifTrue:[
|
|
5506 |
result := self confirmWithCancel:(resources string:'Save changed Font Settings ?').
|
|
5507 |
result isNil ifTrue:[ ^ false].
|
|
5508 |
result ifTrue:[
|
|
5509 |
self saveSettings.
|
|
5510 |
] ifFalse:[
|
|
5511 |
self loadRequest.
|
|
5512 |
]
|
|
5513 |
].
|
|
5514 |
^ true
|
|
5515 |
!
|
|
5516 |
|
|
5517 |
saveSettings
|
|
5518 |
|
|
5519 |
self hasUnsavedChanges ifTrue:[
|
|
5520 |
self modifiedChannel value:false.
|
|
5521 |
].
|
|
5522 |
! !
|
|
5523 |
|
|
5524 |
!AbstractSettingsApplication::PlainSettingsAppl methodsFor:'aspects'!
|
|
5525 |
|
|
5526 |
modifiedChannel
|
|
5527 |
|
|
5528 |
modifiedChannel isNil ifTrue:[
|
|
5529 |
modifiedChannel := false asValue.
|
|
5530 |
].
|
|
5531 |
^ modifiedChannel
|
|
5532 |
! !
|
|
5533 |
|
|
5534 |
!AbstractSettingsApplication::PlainSettingsAppl methodsFor:'change & update'!
|
|
5535 |
|
|
5536 |
update:something with:aParameter from:changedObject
|
|
5537 |
"Invoked when an object that I depend upon sends a change notification."
|
|
5538 |
|
|
5539 |
"stub code automatically generated - please change as required"
|
|
5540 |
|
|
5541 |
"/ changedObject == self allOfThem ifTrue:[
|
|
5542 |
"/ ^ self.
|
|
5543 |
"/ ].
|
|
5544 |
|
|
5545 |
super update:something with:aParameter from:changedObject
|
|
5546 |
! !
|
|
5547 |
|
|
5548 |
!AbstractSettingsApplication::PlainSettingsAppl methodsFor:'initialization & release'!
|
|
5549 |
|
|
5550 |
closeRequest
|
|
5551 |
|
|
5552 |
self saveRequest ifFalse:[
|
|
5553 |
^ self
|
|
5554 |
].
|
|
5555 |
|
|
5556 |
^ super closeRequest.
|
|
5557 |
!
|
|
5558 |
|
|
5559 |
initialize
|
|
5560 |
|
|
5561 |
resources := self class owningClass classResources.
|
|
5562 |
super initialize
|
|
5563 |
!
|
|
5564 |
|
|
5565 |
postOpen
|
|
5566 |
!
|
|
5567 |
|
|
5568 |
postOpenAsSubcanvasWith:aBuilder
|
|
5569 |
|
|
5570 |
self postOpen.
|
|
5571 |
^ super postOpenAsSubcanvasWith:aBuilder
|
|
5572 |
!
|
|
5573 |
|
|
5574 |
postOpenWith:aBuilder
|
|
5575 |
|
|
5576 |
self postOpen.
|
|
5577 |
^ super postOpenWith:aBuilder
|
|
5578 |
! !
|
|
5579 |
|
|
5580 |
!AbstractSettingsApplication::PlainSettingsAppl methodsFor:'queries'!
|
|
5581 |
|
|
5582 |
hasUnsavedChanges
|
|
5583 |
|
|
5584 |
^ true
|
|
5585 |
! !
|
|
5586 |
|
|
5587 |
!AbstractSettingsApplication::PrinterSettingsAppl class methodsFor:'interface specs'!
|
|
5588 |
|
|
5589 |
windowSpec
|
|
5590 |
"This resource specification was automatically generated
|
|
5591 |
by the UIPainter of ST/X."
|
|
5592 |
|
|
5593 |
"Do not manually edit this!! If it is corrupted,
|
|
5594 |
the UIPainter may not be able to read the specification."
|
|
5595 |
|
|
5596 |
"
|
|
5597 |
UIPainter new openOnClass:AbstractLauncherApplication::PrinterSettingsAppl andSelector:#windowSpec
|
|
5598 |
AbstractLauncherApplication::PrinterSettingsAppl new openInterface:#windowSpec
|
|
5599 |
AbstractLauncherApplication::PrinterSettingsAppl open
|
|
5600 |
"
|
|
5601 |
|
|
5602 |
<resource: #canvas>
|
|
5603 |
|
|
5604 |
^
|
|
5605 |
#(#FullSpec
|
|
5606 |
#name: #windowSpec
|
|
5607 |
#window:
|
|
5608 |
#(#WindowSpec
|
|
5609 |
#label: 'Printer Settings'
|
|
5610 |
#name: 'Printer Settings'
|
|
5611 |
#min: #(#Point 10 10)
|
|
5612 |
#max: #(#Point 1024 768)
|
|
5613 |
#bounds: #(#Rectangle 12 22 612 572)
|
|
5614 |
)
|
|
5615 |
#component:
|
|
5616 |
#(#SpecCollection
|
|
5617 |
#collection: #(
|
|
5618 |
#(#LabelSpec
|
|
5619 |
#label: 'Printer Type:'
|
|
5620 |
#name: 'PrinterTypeLabel'
|
|
5621 |
#layout: #(#LayoutFrame 0 0 5 0 150 0 27 0)
|
|
5622 |
#translateLabel: true
|
|
5623 |
#adjust: #right
|
|
5624 |
)
|
|
5625 |
#(#ComboListSpec
|
|
5626 |
#name: 'PrinterTypeComboList'
|
|
5627 |
#layout: #(#LayoutFrame 150 0 5 0 -5 1 27 0)
|
|
5628 |
#model: #printerTypeSelection
|
|
5629 |
#comboList: #printerType
|
|
5630 |
#useIndex: true
|
|
5631 |
)
|
|
5632 |
#(#LabelSpec
|
|
5633 |
#label: 'Printer Command:'
|
|
5634 |
#name: 'PrinterCommandLabel'
|
|
5635 |
#layout: #(#LayoutFrame 0 0 40 0 150 0 62 0)
|
|
5636 |
#translateLabel: true
|
|
5637 |
#adjust: #right
|
|
5638 |
)
|
|
5639 |
#(#ComboBoxSpec
|
|
5640 |
#name: 'CommandComboBox'
|
|
5641 |
#layout: #(#LayoutFrame 150 0 40 0 -5 1 62 0)
|
|
5642 |
#model: #printCommand
|
|
5643 |
#acceptOnPointerLeave: false
|
|
5644 |
#comboList: #printCommandList
|
|
5645 |
#useIndex: false
|
|
5646 |
)
|
|
5647 |
#(#DividerSpec
|
|
5648 |
#name: 'Separator1'
|
|
5649 |
#layout: #(#LayoutFrame 0 0.0 72 0 0 1.0 76 0)
|
|
5650 |
)
|
|
5651 |
#(#LabelSpec
|
|
5652 |
#label: 'Page Format:'
|
|
5653 |
#name: 'PageFormatLabel'
|
|
5654 |
#layout: #(#LayoutFrame 5 0 85 0 150 0 107 0)
|
|
5655 |
#translateLabel: true
|
|
5656 |
#adjust: #right
|
|
5657 |
)
|
|
5658 |
#(#PopUpListSpec
|
|
5659 |
#label: 'PopUp List'
|
|
5660 |
#name: 'PageFormatPopUpList'
|
|
5661 |
#layout: #(#LayoutFrame 150 0 85 0 288 0 107 0)
|
|
5662 |
#tabable: true
|
|
5663 |
#model: #pageFormat
|
|
5664 |
#enableChannel: #enableFormat
|
|
5665 |
#menu: #pageFormatList
|
|
5666 |
#useIndex: true
|
|
5667 |
)
|
|
5668 |
#(#CheckBoxSpec
|
|
5669 |
#label: 'Landscape'
|
|
5670 |
#name: 'LandscapeCheckBox'
|
|
5671 |
#layout: #(#LayoutFrame 330 0 85 0 -5 1 107 0)
|
|
5672 |
#enableChannel: #enablelandscape
|
|
5673 |
#model: #landscape
|
|
5674 |
#translateLabel: true
|
|
5675 |
)
|
|
5676 |
#(#DividerSpec
|
|
5677 |
#name: 'Separator2'
|
|
5678 |
#layout: #(#LayoutFrame 0 0.0 114 0 0 1.0 118 0)
|
|
5679 |
)
|
|
5680 |
#(#LabelSpec
|
|
5681 |
#label: 'Top Margin:'
|
|
5682 |
#name: 'TopMarginLabel'
|
|
5683 |
#layout: #(#LayoutFrame 5 0 130 0 150 0 152 0)
|
|
5684 |
#translateLabel: true
|
|
5685 |
#adjust: #right
|
|
5686 |
)
|
|
5687 |
#(#InputFieldSpec
|
|
5688 |
#name: 'TopMarginEntryField'
|
|
5689 |
#layout: #(#LayoutFrame 150 0 130 0 250 0 152 0)
|
|
5690 |
#enableChannel: #enableMargins
|
|
5691 |
#model: #topMargin
|
|
5692 |
#acceptOnReturn: true
|
|
5693 |
#acceptOnTab: true
|
|
5694 |
#acceptOnLostFocus: true
|
|
5695 |
#converter: #PrintConverter
|
|
5696 |
#acceptOnPointerLeave: false
|
|
5697 |
)
|
|
5698 |
#(#LabelSpec
|
|
5699 |
#label: 'Left Margin:'
|
|
5700 |
#name: 'LeftMarginLabel'
|
|
5701 |
#layout: #(#LayoutFrame 5 0 160 0 150 0 182 0)
|
|
5702 |
#translateLabel: true
|
|
5703 |
#adjust: #right
|
|
5704 |
)
|
|
5705 |
#(#InputFieldSpec
|
|
5706 |
#name: 'LeftMarginEntryField'
|
|
5707 |
#layout: #(#LayoutFrame 150 0 160 0 250 0 182 0)
|
|
5708 |
#enableChannel: #enableMargins
|
|
5709 |
#model: #leftMargin
|
|
5710 |
#acceptOnReturn: true
|
|
5711 |
#acceptOnTab: true
|
|
5712 |
#acceptOnLostFocus: true
|
|
5713 |
#converter: #PrintConverter
|
|
5714 |
#acceptOnPointerLeave: false
|
|
5715 |
)
|
|
5716 |
#(#LabelSpec
|
|
5717 |
#label: 'Right Margin:'
|
|
5718 |
#name: 'RightMarginLabel'
|
|
5719 |
#layout: #(#LayoutFrame 5 0 190 0 150 0 212 0)
|
|
5720 |
#translateLabel: true
|
|
5721 |
#adjust: #right
|
|
5722 |
)
|
|
5723 |
#(#InputFieldSpec
|
|
5724 |
#name: 'RightMarginEntryField'
|
|
5725 |
#layout: #(#LayoutFrame 150 0 190 0 250 0 212 0)
|
|
5726 |
#enableChannel: #enableMargins
|
|
5727 |
#model: #rightMargin
|
|
5728 |
#acceptOnReturn: true
|
|
5729 |
#acceptOnTab: true
|
|
5730 |
#acceptOnLostFocus: true
|
|
5731 |
#converter: #PrintConverter
|
|
5732 |
#acceptOnPointerLeave: false
|
|
5733 |
)
|
|
5734 |
#(#LabelSpec
|
|
5735 |
#label: 'Bottom Margin:'
|
|
5736 |
#name: 'BottomMarginLabel'
|
|
5737 |
#layout: #(#LayoutFrame 5 0 220 0 150 0 242 0)
|
|
5738 |
#translateLabel: true
|
|
5739 |
#adjust: #right
|
|
5740 |
)
|
|
5741 |
#(#InputFieldSpec
|
|
5742 |
#name: 'BottomMarginEntryField'
|
|
5743 |
#layout: #(#LayoutFrame 150 0 220 0 250 0 242 0)
|
|
5744 |
#enableChannel: #enableMargins
|
|
5745 |
#model: #bottomMargin
|
|
5746 |
#acceptOnReturn: true
|
|
5747 |
#acceptOnTab: true
|
|
5748 |
#acceptOnLostFocus: true
|
|
5749 |
#converter: #PrintConverter
|
|
5750 |
#acceptOnPointerLeave: false
|
|
5751 |
)
|
|
5752 |
#(#PopUpListSpec
|
|
5753 |
#label: 'PopUp List'
|
|
5754 |
#name: 'PopUpList2'
|
|
5755 |
#layout: #(#LayoutFrame 457 0 129 0 -5 1 151 0)
|
|
5756 |
#tabable: true
|
|
5757 |
#model: #selectedUnit
|
|
5758 |
#menu: #unitList
|
|
5759 |
#useIndex: true
|
|
5760 |
)
|
|
5761 |
#(#DividerSpec
|
|
5762 |
#name: 'Separator3'
|
|
5763 |
#layout: #(#LayoutFrame 0 0.0 256 0 0 1.0 260 0)
|
|
5764 |
)
|
|
5765 |
#(#CheckBoxSpec
|
|
5766 |
#label: 'Color Printer'
|
|
5767 |
#name: 'ColorPrinterCheckBox'
|
|
5768 |
#layout: #(#LayoutFrame 5 0 269 0 -5 1 291 0)
|
|
5769 |
#enableChannel: #enableColorBox
|
|
5770 |
#model: #supportsColor
|
|
5771 |
#translateLabel: true
|
|
5772 |
)
|
|
5773 |
#(#DividerSpec
|
|
5774 |
#name: 'Separator4'
|
|
5775 |
#layout: #(#LayoutFrame 0 0.0 296 0 0 1.0 300 0)
|
|
5776 |
)
|
|
5777 |
#(#HorizontalPanelViewSpec
|
|
5778 |
#name: 'HorizontalPanel1'
|
|
5779 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
5780 |
#horizontalLayout: #center
|
|
5781 |
#verticalLayout: #center
|
|
5782 |
#horizontalSpace: 3
|
|
5783 |
#verticalSpace: 3
|
|
5784 |
#component:
|
|
5785 |
#(#SpecCollection
|
|
5786 |
#collection: #(
|
|
5787 |
#(#ActionButtonSpec
|
|
5788 |
#label: 'OK'
|
|
5789 |
#name: 'OK'
|
|
5790 |
#translateLabel: true
|
|
5791 |
#model: #saveSettings
|
|
5792 |
#enableChannel: #modifiedChannel
|
|
5793 |
#extent: #(#Point 125 22)
|
|
5794 |
)
|
|
5795 |
#(#ActionButtonSpec
|
|
5796 |
#label: 'Cancel'
|
|
5797 |
#name: 'Cancel'
|
|
5798 |
#translateLabel: true
|
|
5799 |
#model: #doCancel
|
|
5800 |
#extent: #(#Point 125 22)
|
|
5801 |
)
|
|
5802 |
#(#ActionButtonSpec
|
|
5803 |
#label: 'Help'
|
|
5804 |
#name: 'Help'
|
|
5805 |
#translateLabel: true
|
|
5806 |
#model: #help
|
|
5807 |
#extent: #(#Point 125 22)
|
|
5808 |
)
|
|
5809 |
)
|
|
5810 |
|
|
5811 |
)
|
|
5812 |
)
|
|
5813 |
)
|
|
5814 |
|
|
5815 |
)
|
|
5816 |
)
|
|
5817 |
! !
|
|
5818 |
|
|
5819 |
!AbstractSettingsApplication::PrinterSettingsAppl methodsFor:'actions'!
|
|
5820 |
|
|
5821 |
doCancel
|
|
5822 |
|
|
5823 |
self isPartOfSettinsDialog ifTrue:[
|
|
5824 |
self loadRequest.
|
|
5825 |
].
|
|
5826 |
self closeRequest.
|
|
5827 |
!
|
|
5828 |
|
|
5829 |
evaluateModified
|
|
5830 |
|
|
5831 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
5832 |
!
|
|
5833 |
|
|
5834 |
help
|
|
5835 |
|
|
5836 |
"/ self warn:'no help available here'.
|
|
5837 |
self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/printerSettings.html'].
|
|
5838 |
!
|
|
5839 |
|
|
5840 |
loadRequest
|
|
5841 |
|
|
5842 |
self modifiedChannel value:false.
|
|
5843 |
!
|
|
5844 |
|
|
5845 |
saveRequest
|
|
5846 |
| result |
|
|
5847 |
|
|
5848 |
(self hasUnsavedChanges) ifTrue:[
|
|
5849 |
result := self confirmWithCancel:(resources string:'Save changed Printer Settings ?').
|
|
5850 |
result isNil ifTrue:[ ^ false].
|
|
5851 |
result ifTrue:[
|
|
5852 |
self saveSettings.
|
|
5853 |
] ifFalse:[
|
|
5854 |
self loadRequest.
|
|
5855 |
]
|
|
5856 |
].
|
|
5857 |
^ true
|
|
5858 |
!
|
|
5859 |
|
|
5860 |
saveSettings
|
|
5861 |
|
|
5862 |
self hasUnsavedChanges ifTrue:[
|
|
5863 |
Printer := possiblePrinters at:(self printerTypeSelection value).
|
|
5864 |
Printer printCommand:self printCommand value.
|
|
5865 |
|
|
5866 |
Printer supportsPageSizes ifTrue:[
|
|
5867 |
Printer pageFormat:(self pageFormatList at:self pageFormat value).
|
|
5868 |
Printer landscape:(self landscape value).
|
|
5869 |
].
|
|
5870 |
Printer supportsMargins ifTrue:[
|
|
5871 |
| unit |
|
|
5872 |
self selectedUnit value == 2 ifTrue:[
|
|
5873 |
unit := #mm
|
|
5874 |
] ifFalse:[
|
|
5875 |
unit := #inch
|
|
5876 |
].
|
|
5877 |
Printer topMargin:(UnitConverter convert:self topMargin value from:unit to:#inch).
|
|
5878 |
Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch).
|
|
5879 |
Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch).
|
|
5880 |
Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch).
|
|
5881 |
].
|
|
5882 |
Printer supportsPostscript ifTrue:[
|
|
5883 |
Printer supportsColor:self supportsColor value.
|
|
5884 |
].
|
|
5885 |
self modifiedChannel value:false.
|
|
5886 |
].
|
|
5887 |
! !
|
|
5888 |
|
|
5889 |
!AbstractSettingsApplication::PrinterSettingsAppl methodsFor:'aspects'!
|
|
5890 |
|
|
5891 |
bottomMargin
|
|
5892 |
|
|
5893 |
bottomMargin isNil ifTrue:[
|
|
5894 |
bottomMargin := Printer bottomMargin asValue.
|
|
5895 |
bottomMargin onChangeSend:#evaluateModified to:self
|
|
5896 |
].
|
|
5897 |
^ bottomMargin.
|
|
5898 |
!
|
|
5899 |
|
|
5900 |
enableColorBox
|
|
5901 |
|
|
5902 |
enableColorBox isNil ifTrue:[
|
|
5903 |
enableColorBox := true asValue.
|
|
5904 |
].
|
|
5905 |
^ enableColorBox.
|
|
5906 |
!
|
|
5907 |
|
|
5908 |
enableFormat
|
|
5909 |
|
|
5910 |
enableFormat isNil ifTrue:[
|
|
5911 |
enableFormat := true asValue.
|
|
5912 |
].
|
|
5913 |
^ enableFormat.
|
|
5914 |
!
|
|
5915 |
|
|
5916 |
enableMargins
|
|
5917 |
|
|
5918 |
enableMargins isNil ifTrue:[
|
|
5919 |
enableMargins := true asValue.
|
|
5920 |
].
|
|
5921 |
^ enableMargins.
|
|
5922 |
!
|
|
5923 |
|
|
5924 |
enablelandscape
|
|
5925 |
|
|
5926 |
enablelandscape isNil ifTrue:[
|
|
5927 |
enablelandscape := true asValue.
|
|
5928 |
].
|
|
5929 |
^ enablelandscape.
|
|
5930 |
!
|
|
5931 |
|
|
5932 |
landscape
|
|
5933 |
|
|
5934 |
landscape isNil ifTrue:[
|
|
5935 |
landscape := Printer landscape asValue.
|
|
5936 |
landscape onChangeSend:#evaluateModified to:self
|
|
5937 |
].
|
|
5938 |
^ landscape.
|
|
5939 |
!
|
|
5940 |
|
|
5941 |
leftMargin
|
|
5942 |
|
|
5943 |
leftMargin isNil ifTrue:[
|
|
5944 |
leftMargin := Printer leftMargin asValue.
|
|
5945 |
leftMargin onChangeSend:#evaluateModified to:self
|
|
5946 |
].
|
|
5947 |
^ leftMargin.
|
|
5948 |
!
|
|
5949 |
|
|
5950 |
modifiedChannel
|
|
5951 |
|
|
5952 |
modifiedChannel isNil ifTrue:[
|
|
5953 |
modifiedChannel := false asValue.
|
|
5954 |
].
|
|
5955 |
^ modifiedChannel
|
|
5956 |
!
|
|
5957 |
|
|
5958 |
pageFormat
|
|
5959 |
|
|
5960 |
pageFormat isNil ifTrue:[
|
|
5961 |
self pageFormatList notEmpty ifTrue:[
|
|
5962 |
| index |
|
|
5963 |
(index := self pageFormatList indexOf:#a4) ~~ 0 ifTrue:[
|
|
5964 |
pageFormat := index asValue.
|
|
5965 |
] ifFalse:[
|
|
5966 |
pageFormat := 1 asValue.
|
|
5967 |
]
|
|
5968 |
].
|
|
5969 |
pageFormat onChangeSend:#evaluateModified to:self
|
|
5970 |
].
|
|
5971 |
^ pageFormat.
|
|
5972 |
!
|
|
5973 |
|
|
5974 |
pageFormatList
|
|
5975 |
|
|
5976 |
pageFormatList isNil ifTrue:[
|
|
5977 |
pageFormatList := Printer defaultPageFormats asList.
|
|
5978 |
].
|
|
5979 |
^ pageFormatList.
|
|
5980 |
!
|
|
5981 |
|
|
5982 |
printCommand
|
|
5983 |
"automatically generated by UIPainter ..."
|
|
5984 |
|
|
5985 |
"*** the code below creates a default model when invoked."
|
|
5986 |
"*** (which may not be the one you wanted)"
|
|
5987 |
"*** Please change as required and accept it in the browser."
|
|
5988 |
"*** (and replace this comment by something more useful ;-)"
|
|
5989 |
|
|
5990 |
printCommand isNil ifTrue:[
|
|
5991 |
printCommand := Printer printCommand asValue.
|
|
5992 |
printCommand onChangeSend:#evaluateModified to:self
|
|
5993 |
].
|
|
5994 |
^ printCommand.
|
|
5995 |
!
|
|
5996 |
|
|
5997 |
printCommandList
|
|
5998 |
|
|
5999 |
printCommandList isNil ifTrue:[
|
|
6000 |
printCommandList := commandList asList.
|
|
6001 |
].
|
|
6002 |
^ printCommandList.
|
|
6003 |
!
|
|
6004 |
|
|
6005 |
printerType
|
|
6006 |
|
|
6007 |
printerType isNil ifTrue:[
|
|
6008 |
printerType := (possiblePrinters collect:[:cls | cls printerTypeName]) asList.
|
|
6009 |
printerType onChangeSend:#evaluateModified to:self
|
|
6010 |
].
|
|
6011 |
^ printerType.
|
|
6012 |
!
|
|
6013 |
|
|
6014 |
printerTypeSelection
|
|
6015 |
|
|
6016 |
printerTypeSelection isNil ifTrue:[
|
|
6017 |
printerTypeSelection := (possiblePrinters identityIndexOf:Printer) asValue.
|
|
6018 |
"/ printerTypeSelection onChangeSend:#printerTypeSelectionChanged to:self.
|
|
6019 |
printerTypeSelection addDependent:self.
|
|
6020 |
printerTypeSelection changed.
|
|
6021 |
printerTypeSelection onChangeSend:#evaluateModified to:self
|
|
6022 |
].
|
|
6023 |
^ printerTypeSelection.
|
|
6024 |
!
|
|
6025 |
|
|
6026 |
rightMargin
|
|
6027 |
|
|
6028 |
rightMargin isNil ifTrue:[
|
|
6029 |
rightMargin := Printer rightMargin asValue.
|
|
6030 |
rightMargin onChangeSend:#evaluateModified to:self
|
|
6031 |
].
|
|
6032 |
^ rightMargin.
|
|
6033 |
!
|
|
6034 |
|
|
6035 |
selectedUnit
|
|
6036 |
|
|
6037 |
selectedUnit isNil ifTrue:[
|
|
6038 |
selectedUnit := 1 asValue.
|
|
6039 |
selectedUnit addDependent:self.
|
|
6040 |
selectedUnit changed.
|
|
6041 |
selectedUnit onChangeSend:#evaluateModified to:self
|
|
6042 |
].
|
|
6043 |
^ selectedUnit.
|
|
6044 |
!
|
|
6045 |
|
|
6046 |
supportsColor
|
|
6047 |
|
|
6048 |
supportsColor isNil ifTrue:[
|
|
6049 |
supportsColor := Printer supportsColor asValue.
|
|
6050 |
supportsColor onChangeSend:#evaluateModified to:self
|
|
6051 |
].
|
|
6052 |
^ supportsColor.
|
|
6053 |
!
|
|
6054 |
|
|
6055 |
topMargin
|
|
6056 |
|
|
6057 |
topMargin isNil ifTrue:[
|
|
6058 |
topMargin := Printer topMargin asValue.
|
|
6059 |
topMargin onChangeSend:#evaluateModified to:self
|
|
6060 |
].
|
|
6061 |
^ topMargin.
|
|
6062 |
!
|
|
6063 |
|
|
6064 |
unitList
|
|
6065 |
|
|
6066 |
unitList isNil ifTrue:[
|
|
6067 |
unitList := #('inch' 'mm') asList.
|
|
6068 |
].
|
|
6069 |
^ unitList.
|
|
6070 |
! !
|
|
6071 |
|
|
6072 |
!AbstractSettingsApplication::PrinterSettingsAppl methodsFor:'change & update'!
|
|
6073 |
|
|
6074 |
printerTypeSelectionChanged
|
|
6075 |
|
|
6076 |
| p hasPageSize hasMargins|
|
|
6077 |
printerType selectionIndex ~~ 0 ifTrue:[
|
|
6078 |
p := possiblePrinters at:(printerType selectionIndex).
|
|
6079 |
hasPageSize := p supportsPageSizes.
|
|
6080 |
hasMargins := p supportsMargins.
|
|
6081 |
] ifFalse:[
|
|
6082 |
hasPageSize := false.
|
|
6083 |
hasMargins := false.
|
|
6084 |
].
|
|
6085 |
!
|
|
6086 |
|
|
6087 |
printerTypeSelectionOrUnitListChanged
|
|
6088 |
|
|
6089 |
| p hasPageSize hasMargins unit|
|
|
6090 |
|
|
6091 |
self printerTypeSelection value ~~ 0 ifTrue:[
|
|
6092 |
p := possiblePrinters at:(self printerTypeSelection value).
|
|
6093 |
hasPageSize := p supportsPageSizes.
|
|
6094 |
hasMargins := p supportsMargins.
|
|
6095 |
] ifFalse:[
|
|
6096 |
hasPageSize := false.
|
|
6097 |
hasMargins := false.
|
|
6098 |
].
|
|
6099 |
self enablelandscape value:hasPageSize.
|
|
6100 |
self enableFormat value:hasPageSize.
|
|
6101 |
hasPageSize ifTrue:[
|
|
6102 |
|
|
6103 |
self pageFormat value:(p pageFormat).
|
|
6104 |
self landscape value:(p landscape).
|
|
6105 |
] ifFalse:[
|
|
6106 |
self landscape value:false.
|
|
6107 |
].
|
|
6108 |
hasMargins ifTrue:[
|
|
6109 |
self selectedUnit value == 2 ifTrue:[
|
|
6110 |
unit := #mm
|
|
6111 |
] ifFalse:[
|
|
6112 |
unit := #inch
|
|
6113 |
].
|
|
6114 |
|
|
6115 |
topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit).
|
|
6116 |
leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit).
|
|
6117 |
rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit).
|
|
6118 |
bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit).
|
|
6119 |
|
|
6120 |
] ifFalse:[
|
|
6121 |
].
|
|
6122 |
self enableMargins value:hasMargins.
|
|
6123 |
|
|
6124 |
p notNil ifTrue:[
|
|
6125 |
| newCommandList |
|
|
6126 |
newCommandList := p defaultCommands.
|
|
6127 |
newCommandList notNil ifTrue:[
|
|
6128 |
self printCommandList contents:(newCommandList asList).
|
|
6129 |
self printCommandList changed.
|
|
6130 |
].
|
|
6131 |
|
|
6132 |
self printCommand value:(p printCommand).
|
|
6133 |
].
|
|
6134 |
self enableColorBox value:p supportsPostscript.
|
|
6135 |
p supportsPostscript ifFalse:[
|
|
6136 |
self supportsColor value:false
|
|
6137 |
] ifTrue:[
|
|
6138 |
self supportsColor value:(Printer supportsColor).
|
|
6139 |
]
|
|
6140 |
!
|
|
6141 |
|
|
6142 |
unitListChanged
|
|
6143 |
!
|
|
6144 |
|
|
6145 |
update:something with:aParameter from:changedObject
|
|
6146 |
"Invoked when an object that I depend upon sends a change notification."
|
|
6147 |
|
|
6148 |
"stub code automatically generated - please change as required"
|
|
6149 |
|
|
6150 |
(changedObject == self selectedUnit or:[changedObject == self printerTypeSelection]) ifTrue:[
|
|
6151 |
self printerTypeSelectionOrUnitListChanged.
|
|
6152 |
^ self.
|
|
6153 |
].
|
|
6154 |
|
|
6155 |
super update:something with:aParameter from:changedObject
|
|
6156 |
! !
|
|
6157 |
|
|
6158 |
!AbstractSettingsApplication::PrinterSettingsAppl methodsFor:'initialization & release'!
|
|
6159 |
|
|
6160 |
closeRequest
|
|
6161 |
|
|
6162 |
self saveRequest ifFalse:[
|
|
6163 |
^ self
|
|
6164 |
].
|
|
6165 |
|
|
6166 |
^ super closeRequest.
|
|
6167 |
!
|
|
6168 |
|
|
6169 |
initialize
|
|
6170 |
|
|
6171 |
resources := self class owningClass classResources.
|
|
6172 |
possiblePrinters := PrinterStream withAllSubclasses asArray.
|
|
6173 |
commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil.
|
|
6174 |
commandList isNil ifTrue:[
|
|
6175 |
commandList := PrinterStream defaultCommands.
|
|
6176 |
commandList isNil ifTrue:[
|
|
6177 |
commandList := #('lpr'
|
|
6178 |
'lp'
|
|
6179 |
).
|
|
6180 |
].
|
|
6181 |
(commandList includes:self printCommand value) not ifTrue:[
|
|
6182 |
commandList add:self printCommand value.
|
|
6183 |
].
|
|
6184 |
].
|
|
6185 |
super initialize
|
|
6186 |
!
|
|
6187 |
|
|
6188 |
postOpen
|
|
6189 |
!
|
|
6190 |
|
|
6191 |
postOpenAsSubcanvasWith:aBuilder
|
|
6192 |
|
|
6193 |
self postOpen.
|
|
6194 |
^ super postOpenAsSubcanvasWith:aBuilder
|
|
6195 |
!
|
|
6196 |
|
|
6197 |
postOpenWith:aBuilder
|
|
6198 |
|
|
6199 |
self postOpen.
|
|
6200 |
^ super postOpenWith:aBuilder
|
|
6201 |
! !
|
|
6202 |
|
|
6203 |
!AbstractSettingsApplication::PrinterSettingsAppl methodsFor:'queries'!
|
|
6204 |
|
|
6205 |
hasUnsavedChanges
|
|
6206 |
|
|
6207 |
|
|
6208 |
| printer unit|
|
|
6209 |
self selectedUnit value == 2 ifTrue:[
|
|
6210 |
unit := #mm
|
|
6211 |
] ifFalse:[
|
|
6212 |
unit := #inch
|
|
6213 |
].
|
|
6214 |
printer := possiblePrinters at:(self printerTypeSelection value).
|
|
6215 |
^ (
|
|
6216 |
printer ~= Printer or:[
|
|
6217 |
Printer printCommand ~= self printCommand value or:[
|
|
6218 |
(Printer supportsPageSizes and:[
|
|
6219 |
Printer pageFormat ~= (self pageFormatList at:self pageFormat value) or:[
|
|
6220 |
Printer landscape ~= (self landscape value) or:[
|
|
6221 |
]]]) or:[
|
|
6222 |
(Printer supportsMargins and:[
|
|
6223 |
Printer topMargin ~= (UnitConverter convert:self topMargin value from:unit to:#inch) or:[
|
|
6224 |
Printer leftMargin ~= (UnitConverter convert:leftMargin value from:unit to:#inch) or:[
|
|
6225 |
Printer rightMargin ~= (UnitConverter convert:rightMargin value from:unit to:#inch) or:[
|
|
6226 |
Printer bottomMargin ~= (UnitConverter convert:bottomMargin value from:unit to:#inch) or:[
|
|
6227 |
]]]]]) or:[
|
|
6228 |
Printer supportsPostscript and:[
|
|
6229 |
Printer supportsColor ~= self supportsColor value
|
|
6230 |
]]]]]
|
|
6231 |
)
|
|
6232 |
! !
|
|
6233 |
|
|
6234 |
!AbstractSettingsApplication::SourceAndDebuggerSettingsAppl class methodsFor:'interface specs'!
|
|
6235 |
|
|
6236 |
windowSpec
|
|
6237 |
"This resource specification was automatically generated
|
|
6238 |
by the UIPainter of ST/X."
|
|
6239 |
|
|
6240 |
"Do not manually edit this!! If it is corrupted,
|
|
6241 |
the UIPainter may not be able to read the specification."
|
|
6242 |
|
|
6243 |
"
|
|
6244 |
UIPainter new openOnClass:AbstractLauncherApplication::SourceAndDebuggerSettingsAppl andSelector:#windowSpec
|
|
6245 |
AbstractLauncherApplication::SourceAndDebuggerSettingsAppl new openInterface:#windowSpec
|
|
6246 |
AbstractLauncherApplication::SourceAndDebuggerSettingsAppl open
|
|
6247 |
"
|
|
6248 |
|
|
6249 |
<resource: #canvas>
|
|
6250 |
|
|
6251 |
^
|
|
6252 |
#(#FullSpec
|
|
6253 |
#name: #windowSpec
|
|
6254 |
#window:
|
|
6255 |
#(#WindowSpec
|
|
6256 |
#label: 'Source & Debugger Settings'
|
|
6257 |
#name: 'Source & Debugger Settings'
|
|
6258 |
#min: #(#Point 10 10)
|
|
6259 |
#max: #(#Point 1024 768)
|
|
6260 |
#bounds: #(#Rectangle 12 14 612 572)
|
|
6261 |
)
|
|
6262 |
#component:
|
|
6263 |
#(#SpecCollection
|
|
6264 |
#collection: #(
|
|
6265 |
#(#CheckBoxSpec
|
|
6266 |
#label: 'Log compiles in Changefile'
|
|
6267 |
#name: 'LogCompilesInChangefileCheckBox'
|
|
6268 |
#layout: #(#LayoutFrame 5 0 5 0 214 0 28 0)
|
|
6269 |
#model: #updChanges
|
|
6270 |
#translateLabel: true
|
|
6271 |
)
|
|
6272 |
#(#CheckBoxSpec
|
|
6273 |
#label: 'Log doIts in Changefile'
|
|
6274 |
#name: 'LogDoItsInChangefileCheckBox'
|
|
6275 |
#layout: #(#LayoutFrame 5 0 30 0 214 0 53 0)
|
|
6276 |
#model: #logDoits
|
|
6277 |
#translateLabel: true
|
|
6278 |
)
|
|
6279 |
#(#LabelSpec
|
|
6280 |
#label: 'Changefile Name:'
|
|
6281 |
#name: 'ChangefileNameLabel'
|
|
6282 |
#layout: #(#LayoutFrame 96 0 60 0 300 0 82 0)
|
|
6283 |
#translateLabel: true
|
|
6284 |
#adjust: #right
|
|
6285 |
)
|
|
6286 |
#(#InputFieldSpec
|
|
6287 |
#name: 'ChangeFileNameEntryField'
|
|
6288 |
#layout: #(#LayoutFrame 300 0 60 0 -5 1 82 0)
|
|
6289 |
#model: #changeFileName
|
|
6290 |
#immediateAccept: true
|
|
6291 |
#acceptOnReturn: true
|
|
6292 |
#acceptOnTab: true
|
|
6293 |
#acceptOnLostFocus: true
|
|
6294 |
#acceptOnPointerLeave: false
|
|
6295 |
)
|
|
6296 |
#(#DividerSpec
|
|
6297 |
#name: 'Separator1'
|
|
6298 |
#layout: #(#LayoutFrame 0 0.0 95 0 0 1.0 99 0)
|
|
6299 |
)
|
|
6300 |
#(#CheckBoxSpec
|
|
6301 |
#label: 'Sourcecode Management'
|
|
6302 |
#name: 'SourcecodeManagementCheckBox'
|
|
6303 |
#layout: #(#LayoutFrame 5 0 110 0 220 0 132 0)
|
|
6304 |
#enableChannel: #cvsIsSetup
|
|
6305 |
#model: #useManager
|
|
6306 |
#translateLabel: true
|
|
6307 |
)
|
|
6308 |
#(#ActionButtonSpec
|
|
6309 |
#label: 'Setup...'
|
|
6310 |
#name: 'SetupButton1'
|
|
6311 |
#layout: #(#LayoutFrame -250 1 110 0 -5 1 130 0)
|
|
6312 |
#translateLabel: true
|
|
6313 |
#model: #setupSourceCodeManager
|
|
6314 |
#enableChannel: #useManager
|
|
6315 |
)
|
|
6316 |
#(#LabelSpec
|
|
6317 |
#label: 'Source Cache Dir:'
|
|
6318 |
#name: 'SourceCacheDirLabel'
|
|
6319 |
#layout: #(#LayoutFrame 96 0 145 0 300 0 167 0)
|
|
6320 |
#translateLabel: true
|
|
6321 |
#adjust: #right
|
|
6322 |
)
|
|
6323 |
#(#InputFieldSpec
|
|
6324 |
#name: 'SourceCacheDirEntryField'
|
|
6325 |
#layout: #(#LayoutFrame 300 0 145 0 -5 1 167 0)
|
|
6326 |
#enableChannel: #useManager
|
|
6327 |
#model: #sourceCacheDir
|
|
6328 |
#immediateAccept: true
|
|
6329 |
#acceptOnReturn: true
|
|
6330 |
#acceptOnTab: true
|
|
6331 |
#acceptOnLostFocus: true
|
|
6332 |
#acceptOnPointerLeave: false
|
|
6333 |
)
|
|
6334 |
#(#ActionButtonSpec
|
|
6335 |
#label: 'Flush Cache now'
|
|
6336 |
#name: 'FlushCacheNowButton'
|
|
6337 |
#layout: #(#LayoutFrame -250 1 179 0 -5 1 199 0)
|
|
6338 |
#translateLabel: true
|
|
6339 |
#model: #flushSourceCache
|
|
6340 |
#enableChannel: #useManager
|
|
6341 |
)
|
|
6342 |
#(#ActionButtonSpec
|
|
6343 |
#label: 'Condense Cache now'
|
|
6344 |
#name: 'CondenseCacheNowButton'
|
|
6345 |
#layout: #(#LayoutFrame -250 1 204 0 -5 1 224 0)
|
|
6346 |
#translateLabel: true
|
|
6347 |
#model: #condenseSourceCache
|
|
6348 |
#enableChannel: #useManager
|
|
6349 |
)
|
|
6350 |
#(#CheckBoxSpec
|
|
6351 |
#label: 'If Present, Use Local Source (Suppress Checkout)'
|
|
6352 |
#name: 'CheckBox4'
|
|
6353 |
#layout: #(#LayoutFrame 50 0 232 0 -5 1 254 0)
|
|
6354 |
#model: #localSourceFirst
|
|
6355 |
#translateLabel: true
|
|
6356 |
)
|
|
6357 |
#(#CheckBoxSpec
|
|
6358 |
#label: 'Check for halt/error-Sends when Checking in'
|
|
6359 |
#name: 'CheckBox5'
|
|
6360 |
#layout: #(#LayoutFrame 50 0 257 0 -5 1 279 0)
|
|
6361 |
#model: #checkClassesWhenCheckingIn
|
|
6362 |
#translateLabel: true
|
|
6363 |
)
|
|
6364 |
#(#DividerSpec
|
|
6365 |
#name: 'Separator2'
|
|
6366 |
#layout: #(#LayoutFrame 0 0.0 282 0 0 1.0 286 0)
|
|
6367 |
)
|
|
6368 |
#(#CheckBoxSpec
|
|
6369 |
#label: 'Syntax Coloring'
|
|
6370 |
#name: 'SyntaxColoringCheckBox'
|
|
6371 |
#layout: #(#LayoutFrame 5 0 292 0 300 0 316 0)
|
|
6372 |
#model: #syntaxColoring
|
|
6373 |
#translateLabel: true
|
|
6374 |
)
|
|
6375 |
#(#ActionButtonSpec
|
|
6376 |
#label: 'Configure...'
|
|
6377 |
#name: 'SyntaxColorButton'
|
|
6378 |
#layout: #(#LayoutFrame -250 1 292 0 -5 1 312 0)
|
|
6379 |
#translateLabel: true
|
|
6380 |
#model: #syntaxColorConfiguration
|
|
6381 |
#enableChannel: #syntaxColoring
|
|
6382 |
)
|
|
6383 |
#(#CheckBoxSpec
|
|
6384 |
#label: 'Immediate Selector Check'
|
|
6385 |
#name: 'ImmediateSelectorCheckBox'
|
|
6386 |
#layout: #(#LayoutFrame 5 0 317 0 300 0 339 0)
|
|
6387 |
#enableChannel: #syntaxColoring
|
|
6388 |
#model: #fullSelectorCheck
|
|
6389 |
#translateLabel: true
|
|
6390 |
)
|
|
6391 |
#(#CheckBoxSpec
|
|
6392 |
#label: 'Auto Format'
|
|
6393 |
#name: 'AutoFormatCheckBox'
|
|
6394 |
#layout: #(#LayoutFrame 5 0 342 0 300 0 364 0)
|
|
6395 |
#model: #autoFormat
|
|
6396 |
#translateLabel: true
|
|
6397 |
)
|
|
6398 |
#(#ActionButtonSpec
|
|
6399 |
#label: 'Configure...'
|
|
6400 |
#name: 'FormattingConfigurationButton'
|
|
6401 |
#layout: #(#LayoutFrame -250 1 342 0 -5 1 362 0)
|
|
6402 |
#translateLabel: true
|
|
6403 |
#model: #formattingConfiguration
|
|
6404 |
)
|
|
6405 |
#(#DividerSpec
|
|
6406 |
#name: 'Separator3'
|
|
6407 |
#layout: #(#LayoutFrame 0 0.0 369 0 0 1.0 373 0)
|
|
6408 |
)
|
|
6409 |
#(#CheckBoxSpec
|
|
6410 |
#label: 'Show Error Notifier before Opening Debugger'
|
|
6411 |
#name: 'ShowErrorNotifierCheckBox'
|
|
6412 |
#layout: #(#LayoutFrame 5 0 378 0 -5 1 400 0)
|
|
6413 |
#model: #showErrorNotifier
|
|
6414 |
#translateLabel: true
|
|
6415 |
)
|
|
6416 |
#(#CheckBoxSpec
|
|
6417 |
#label: 'Verbose Backtrace by Default in Debugger'
|
|
6418 |
#name: 'ShowVerboseStackCheckBox'
|
|
6419 |
#layout: #(#LayoutFrame 5 0 403 0 -5 1 428 0)
|
|
6420 |
#model: #showVerboseStack
|
|
6421 |
#translateLabel: true
|
|
6422 |
)
|
|
6423 |
#(#DividerSpec
|
|
6424 |
#name: 'Separator4'
|
|
6425 |
#layout: #(#LayoutFrame 0 0.0 431 0 0 1.0 435 0)
|
|
6426 |
)
|
|
6427 |
#(#HorizontalPanelViewSpec
|
|
6428 |
#name: 'HorizontalPanel1'
|
|
6429 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
6430 |
#horizontalLayout: #center
|
|
6431 |
#verticalLayout: #center
|
|
6432 |
#horizontalSpace: 3
|
|
6433 |
#verticalSpace: 3
|
|
6434 |
#component:
|
|
6435 |
#(#SpecCollection
|
|
6436 |
#collection: #(
|
|
6437 |
#(#ActionButtonSpec
|
|
6438 |
#label: 'OK'
|
|
6439 |
#name: 'OK'
|
|
6440 |
#translateLabel: true
|
|
6441 |
#model: #saveSettings
|
|
6442 |
#enableChannel: #modifiedChannel
|
|
6443 |
#extent: #(#Point 125 22)
|
|
6444 |
)
|
|
6445 |
#(#ActionButtonSpec
|
|
6446 |
#label: 'Cancel'
|
|
6447 |
#name: 'Cancel'
|
|
6448 |
#translateLabel: true
|
|
6449 |
#model: #doCancel
|
|
6450 |
#extent: #(#Point 125 22)
|
|
6451 |
)
|
|
6452 |
#(#ActionButtonSpec
|
|
6453 |
#label: 'Help'
|
|
6454 |
#name: 'Help'
|
|
6455 |
#translateLabel: true
|
|
6456 |
#model: #help
|
|
6457 |
#extent: #(#Point 125 22)
|
|
6458 |
)
|
|
6459 |
)
|
|
6460 |
|
|
6461 |
)
|
|
6462 |
)
|
|
6463 |
)
|
|
6464 |
|
|
6465 |
)
|
|
6466 |
)
|
|
6467 |
! !
|
|
6468 |
|
|
6469 |
!AbstractSettingsApplication::SourceAndDebuggerSettingsAppl methodsFor:'accessing'!
|
|
6470 |
|
|
6471 |
manager
|
|
6472 |
|
|
6473 |
^ Smalltalk at:#SourceCodeManager
|
|
6474 |
! !
|
|
6475 |
|
|
6476 |
!AbstractSettingsApplication::SourceAndDebuggerSettingsAppl methodsFor:'actions'!
|
|
6477 |
|
|
6478 |
condenseSourceCache
|
|
6479 |
|
|
6480 |
self withWaitCursorDo:[ AbstractSourceCodeManager condenseSourceCache ]
|
|
6481 |
!
|
|
6482 |
|
|
6483 |
doCancel
|
|
6484 |
|
|
6485 |
self isPartOfSettinsDialog ifTrue:[
|
|
6486 |
self loadRequest.
|
|
6487 |
].
|
|
6488 |
self closeRequest.
|
|
6489 |
!
|
|
6490 |
|
|
6491 |
evaluateModified
|
|
6492 |
|
|
6493 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
6494 |
!
|
|
6495 |
|
|
6496 |
flushSourceCache
|
|
6497 |
|
|
6498 |
self withWaitCursorDo:[ AbstractSourceCodeManager flushSourceCache ]
|
|
6499 |
!
|
|
6500 |
|
|
6501 |
formattingConfiguration
|
|
6502 |
|
|
6503 |
AbstractLauncherApplication::LauncherDialogs formattingConfigurationDialog
|
|
6504 |
!
|
|
6505 |
|
|
6506 |
help
|
|
6507 |
|
|
6508 |
"/ self warn:'no help available here'.
|
|
6509 |
self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/sourceSettings.html'].
|
|
6510 |
!
|
|
6511 |
|
|
6512 |
loadRequest
|
|
6513 |
|
|
6514 |
self logDoits value:Smalltalk logDoits.
|
|
6515 |
self updChanges value:Class updatingChanges.
|
|
6516 |
self changeFileName value:ObjectMemory nameForChanges.
|
|
6517 |
self hasManager ifTrue:[
|
|
6518 |
self useManager value:(manager := Smalltalk at:#SourceCodeManager) notNil.
|
|
6519 |
self localSourceFirst value:Class tryLocalSourceFirst.
|
|
6520 |
self sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
|
|
6521 |
manager notNil ifTrue:[
|
|
6522 |
manager forgetDisabledModules.
|
|
6523 |
repository := manager repositoryName.
|
|
6524 |
repository notNil ifTrue:[
|
|
6525 |
repositoryHolder := repository asValue.
|
|
6526 |
] ifFalse:[
|
|
6527 |
repositoryHolder := '' asValue.
|
|
6528 |
].
|
|
6529 |
].
|
|
6530 |
self cvsIsSetup value:true.
|
|
6531 |
] ifFalse:[
|
|
6532 |
self useManager value: false.
|
|
6533 |
self localSourceFirst value:false.
|
|
6534 |
self cvsIsSetup value:false.
|
|
6535 |
].
|
|
6536 |
self showErrorNotifier value:(Exception emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler).
|
|
6537 |
self showVerboseStack value:(DebugView defaultVerboseBacktrace ? false).
|
|
6538 |
self syntaxColoring value:currentUserPrefs syntaxColoring.
|
|
6539 |
self fullSelectorCheck value:currentUserPrefs fullSelectorCheck.
|
|
6540 |
self autoFormat value:currentUserPrefs autoFormatting.
|
|
6541 |
|
|
6542 |
self checkClassesWhenCheckingIn value:(currentUserPrefs at:#checkClassesWhenCheckingIn ifAbsent:true).
|
|
6543 |
self modifiedChannel value:false.
|
|
6544 |
!
|
|
6545 |
|
|
6546 |
saveRequest
|
|
6547 |
| result |
|
|
6548 |
|
|
6549 |
(self hasUnsavedChanges) ifTrue:[
|
|
6550 |
result := self confirmWithCancel:(resources string:'Save changed Font Settings ?').
|
|
6551 |
result isNil ifTrue:[ ^ false].
|
|
6552 |
result ifTrue:[
|
|
6553 |
self saveSettings.
|
|
6554 |
] ifFalse:[
|
|
6555 |
self loadRequest.
|
|
6556 |
]
|
|
6557 |
].
|
|
6558 |
^ true
|
|
6559 |
!
|
|
6560 |
|
|
6561 |
saveSettings
|
|
6562 |
|
|
6563 |
self hasUnsavedChanges ifTrue:[
|
|
6564 |
Smalltalk logDoits:self logDoits value.
|
|
6565 |
Class updateChanges:self updChanges value.
|
|
6566 |
ObjectMemory nameForChanges:self changeFileName value.
|
|
6567 |
|
|
6568 |
(self hasManager and:[self useManager value]) ifTrue:[
|
|
6569 |
manager isNil ifTrue:[
|
|
6570 |
Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager).
|
|
6571 |
manager := Smalltalk at:#SourceCodeManager.
|
|
6572 |
].
|
|
6573 |
Class tryLocalSourceFirst:self localSourceFirst value.
|
|
6574 |
|
|
6575 |
manager notNil ifTrue:[
|
|
6576 |
| nm fn|
|
|
6577 |
nm := self sourceCacheDir value.
|
|
6578 |
nm size > 0 ifTrue:[
|
|
6579 |
(fn := nm asFilename) exists ifFalse:[
|
|
6580 |
(self confirm:('CVS cache directory ''' , nm , ''' does not exists\create ?' withCRs)) ifTrue:[
|
|
6581 |
fn makeDirectory;
|
|
6582 |
makeReadableForAll;
|
|
6583 |
makeWritableForAll;
|
|
6584 |
makeExecutableForAll.
|
|
6585 |
]
|
|
6586 |
].
|
|
6587 |
(fn exists
|
|
6588 |
and:[fn isDirectory
|
|
6589 |
and:[fn isReadable
|
|
6590 |
and:[fn isWritable]]]) ifTrue:[
|
|
6591 |
AbstractSourceCodeManager cacheDirectoryName:(self sourceCacheDir value).
|
|
6592 |
] ifFalse:[
|
|
6593 |
self warn:'Invalid sourceCache directory.'
|
|
6594 |
]
|
|
6595 |
]
|
|
6596 |
].
|
|
6597 |
|
|
6598 |
repositoryHolder notNil ifTrue:[
|
|
6599 |
repositoryHolder value size > 0 ifTrue:[
|
|
6600 |
manager notNil ifTrue:[
|
|
6601 |
manager initializeForRepository:repositoryHolder value.
|
|
6602 |
]
|
|
6603 |
].
|
|
6604 |
].
|
|
6605 |
] ifFalse:[
|
|
6606 |
Smalltalk at:#SourceCodeManager put:nil
|
|
6607 |
].
|
|
6608 |
|
|
6609 |
self showErrorNotifier value ifFalse:[
|
|
6610 |
Exception emergencyHandler:nil
|
|
6611 |
] ifTrue:[
|
|
6612 |
Exception emergencyHandler:(AbstractLauncherApplication notifyingEmergencyHandler)
|
|
6613 |
].
|
|
6614 |
DebugView defaultVerboseBacktrace:self showVerboseStack value.
|
|
6615 |
currentUserPrefs syntaxColoring:self syntaxColoring value.
|
|
6616 |
currentUserPrefs at:#fullSelectorCheck put:self fullSelectorCheck value.
|
|
6617 |
currentUserPrefs autoFormatting:self autoFormat value.
|
|
6618 |
|
|
6619 |
UserPreferences current at:#checkClassesWhenCheckingIn put:self checkClassesWhenCheckingIn value.
|
|
6620 |
self modifiedChannel value:false.
|
|
6621 |
].
|
|
6622 |
!
|
|
6623 |
|
|
6624 |
setupSourceCodeManager
|
|
6625 |
|
|
6626 |
AbstractLauncherApplication::LauncherDialogs cvsConfigurationDialog.
|
|
6627 |
manager := (Smalltalk at:#SourceCodeManager).
|
|
6628 |
cvsIsSetup value:manager notNil.
|
|
6629 |
manager notNil ifTrue:[
|
|
6630 |
repositoryHolder value: manager repositoryName.
|
|
6631 |
sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
|
|
6632 |
].
|
|
6633 |
!
|
|
6634 |
|
|
6635 |
syntaxColorConfiguration
|
|
6636 |
"automatically generated by UIPainter ..."
|
|
6637 |
|
|
6638 |
"*** the code below performs no action"
|
|
6639 |
"*** (except for some feedback on the Transcript)"
|
|
6640 |
"*** Please change as required and accept in the browser."
|
|
6641 |
|
|
6642 |
"action to be added ..."
|
|
6643 |
|
|
6644 |
Transcript showCR:self class name, ': action for syntaxColorConfiguration ...'.
|
|
6645 |
! !
|
|
6646 |
|
|
6647 |
!AbstractSettingsApplication::SourceAndDebuggerSettingsAppl methodsFor:'aspects'!
|
|
6648 |
|
|
6649 |
autoFormat
|
|
6650 |
|
|
6651 |
autoFormat isNil ifTrue:[
|
|
6652 |
autoFormat := currentUserPrefs autoFormatting asValue.
|
|
6653 |
autoFormat onChangeSend:#evaluateModified to:self
|
|
6654 |
].
|
|
6655 |
^ autoFormat.
|
|
6656 |
!
|
|
6657 |
|
|
6658 |
changeFileName
|
|
6659 |
|
|
6660 |
changeFileName isNil ifTrue:[
|
|
6661 |
changeFileName := ObjectMemory nameForChanges asValue.
|
|
6662 |
changeFileName onChangeSend:#evaluateModified to:self
|
|
6663 |
].
|
|
6664 |
^ changeFileName.
|
|
6665 |
!
|
|
6666 |
|
|
6667 |
checkClassesWhenCheckingIn
|
|
6668 |
|
|
6669 |
checkClassesWhenCheckingIn isNil ifTrue:[
|
|
6670 |
checkClassesWhenCheckingIn := (currentUserPrefs at:#checkClassesWhenCheckingIn ifAbsent:true) asValue.
|
|
6671 |
checkClassesWhenCheckingIn onChangeSend:#evaluateModified to:self
|
|
6672 |
].
|
|
6673 |
^ checkClassesWhenCheckingIn.
|
|
6674 |
!
|
|
6675 |
|
|
6676 |
cvsIsSetup
|
|
6677 |
|
|
6678 |
cvsIsSetup isNil ifTrue:[
|
|
6679 |
cvsIsSetup := true asValue.
|
|
6680 |
"/ if your app needs to be notified of changes, uncomment one of the lines below:
|
|
6681 |
"/ cvsIsSetup addDependent:self.
|
|
6682 |
"/ cvsIsSetup onChangeSend:#cvsIsSetupChanged to:self.
|
|
6683 |
].
|
|
6684 |
^ cvsIsSetup.
|
|
6685 |
!
|
|
6686 |
|
|
6687 |
fullSelectorCheck
|
|
6688 |
|
|
6689 |
fullSelectorCheck isNil ifTrue:[
|
|
6690 |
fullSelectorCheck := currentUserPrefs fullSelectorCheck asValue.
|
|
6691 |
fullSelectorCheck onChangeSend:#evaluateModified to:self
|
|
6692 |
].
|
|
6693 |
^ fullSelectorCheck.
|
|
6694 |
!
|
|
6695 |
|
|
6696 |
localSourceFirst
|
|
6697 |
|
|
6698 |
localSourceFirst isNil ifTrue:[
|
|
6699 |
localSourceFirst := ValueHolder new.
|
|
6700 |
localSourceFirst onChangeSend:#evaluateModified to:self
|
|
6701 |
].
|
|
6702 |
^ localSourceFirst.
|
|
6703 |
!
|
|
6704 |
|
|
6705 |
logDoits
|
|
6706 |
|
|
6707 |
logDoits isNil ifTrue:[
|
|
6708 |
logDoits := Smalltalk logDoits asValue.
|
|
6709 |
logDoits onChangeSend:#evaluateModified to:self
|
|
6710 |
].
|
|
6711 |
^ logDoits.
|
|
6712 |
!
|
|
6713 |
|
|
6714 |
modifiedChannel
|
|
6715 |
|
|
6716 |
modifiedChannel isNil ifTrue:[
|
|
6717 |
modifiedChannel := false asValue.
|
|
6718 |
].
|
|
6719 |
^ modifiedChannel
|
|
6720 |
!
|
|
6721 |
|
|
6722 |
showErrorNotifier
|
|
6723 |
|
|
6724 |
showErrorNotifier isNil ifTrue:[
|
|
6725 |
showErrorNotifier := (Exception emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler) asValue.
|
|
6726 |
showErrorNotifier onChangeSend:#evaluateModified to:self
|
|
6727 |
].
|
|
6728 |
^ showErrorNotifier.
|
|
6729 |
!
|
|
6730 |
|
|
6731 |
showVerboseStack
|
|
6732 |
|
|
6733 |
showVerboseStack isNil ifTrue:[
|
|
6734 |
showVerboseStack := (DebugView defaultVerboseBacktrace ? false) asValue.
|
|
6735 |
showVerboseStack onChangeSend:#evaluateModified to:self
|
|
6736 |
].
|
|
6737 |
^ showVerboseStack.
|
|
6738 |
!
|
|
6739 |
|
|
6740 |
sourceCacheDir
|
|
6741 |
|
|
6742 |
sourceCacheDir isNil ifTrue:[
|
|
6743 |
sourceCacheDir := nil asValue.
|
|
6744 |
sourceCacheDir addDependent:self.
|
|
6745 |
sourceCacheDir onChangeSend:#evaluateModified to:self
|
|
6746 |
].
|
|
6747 |
^ sourceCacheDir.
|
|
6748 |
!
|
|
6749 |
|
|
6750 |
syntaxColoring
|
|
6751 |
|
|
6752 |
syntaxColoring isNil ifTrue:[
|
|
6753 |
syntaxColoring := currentUserPrefs syntaxColoring asValue.
|
|
6754 |
syntaxColoring onChangeSend:#evaluateModified to:self
|
|
6755 |
].
|
|
6756 |
^ syntaxColoring.
|
|
6757 |
!
|
|
6758 |
|
|
6759 |
updChanges
|
|
6760 |
|
|
6761 |
updChanges isNil ifTrue:[
|
|
6762 |
updChanges := Class updatingChanges asValue.
|
|
6763 |
updChanges onChangeSend:#evaluateModified to:self
|
|
6764 |
].
|
|
6765 |
^ updChanges.
|
|
6766 |
!
|
|
6767 |
|
|
6768 |
useManager
|
|
6769 |
|
|
6770 |
useManager isNil ifTrue:[
|
|
6771 |
useManager := ValueHolder new.
|
|
6772 |
useManager onChangeSend:#evaluateModified to:self
|
|
6773 |
].
|
|
6774 |
^ useManager.
|
|
6775 |
! !
|
|
6776 |
|
|
6777 |
!AbstractSettingsApplication::SourceAndDebuggerSettingsAppl methodsFor:'change & update'!
|
|
6778 |
|
|
6779 |
sourceDirChanged
|
|
6780 |
|
|
6781 |
manager notNil ifTrue:[
|
|
6782 |
| nm fn|
|
|
6783 |
nm := self sourceCacheDir value.
|
|
6784 |
nm size > 0 ifTrue:[
|
|
6785 |
(fn := nm asFilename) exists ifFalse:[
|
|
6786 |
(self confirm:('CVS cache directory ''' , nm , ''' does not exists\create ?' withCRs)) ifTrue:[
|
|
6787 |
fn makeDirectory;
|
|
6788 |
makeReadableForAll;
|
|
6789 |
makeWritableForAll;
|
|
6790 |
makeExecutableForAll.
|
|
6791 |
]
|
|
6792 |
].
|
|
6793 |
(fn exists
|
|
6794 |
and:[fn isDirectory
|
|
6795 |
and:[fn isReadable
|
|
6796 |
and:[fn isWritable]]]) ifTrue:[
|
|
6797 |
AbstractSourceCodeManager cacheDirectoryName:(self sourceCacheDir value).
|
|
6798 |
] ifFalse:[
|
|
6799 |
self warn:'Invalid sourceCache directory.'.
|
|
6800 |
self sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
|
|
6801 |
]
|
|
6802 |
]
|
|
6803 |
].
|
|
6804 |
!
|
|
6805 |
|
|
6806 |
update:something with:aParameter from:changedObject
|
|
6807 |
"Invoked when an object that I depend upon sends a change notification."
|
|
6808 |
|
|
6809 |
"stub code automatically generated - please change as required"
|
|
6810 |
|
|
6811 |
changedObject == self sourceCacheDir ifTrue:[
|
|
6812 |
^ self sourceDirChanged.
|
|
6813 |
].
|
|
6814 |
|
|
6815 |
super update:something with:aParameter from:changedObject
|
|
6816 |
! !
|
|
6817 |
|
|
6818 |
!AbstractSettingsApplication::SourceAndDebuggerSettingsAppl methodsFor:'initialization & release'!
|
|
6819 |
|
|
6820 |
closeRequest
|
|
6821 |
|
|
6822 |
self saveRequest ifFalse:[
|
|
6823 |
^ self
|
|
6824 |
].
|
|
6825 |
|
|
6826 |
^ super closeRequest.
|
|
6827 |
!
|
|
6828 |
|
|
6829 |
initialize
|
|
6830 |
|
|
6831 |
resources := self class owningClass classResources.
|
|
6832 |
currentUserPrefs := UserPreferences current.
|
|
6833 |
(AbstractSourceCodeManager notNil
|
|
6834 |
and:[AbstractSourceCodeManager isLoaded not]) ifTrue:[
|
|
6835 |
AbstractSourceCodeManager autoload.
|
|
6836 |
].
|
|
6837 |
repositoryHolder := '' asValue.
|
|
6838 |
self loadRequest.
|
|
6839 |
super initialize
|
|
6840 |
!
|
|
6841 |
|
|
6842 |
postOpen
|
|
6843 |
!
|
|
6844 |
|
|
6845 |
postOpenAsSubcanvasWith:aBuilder
|
|
6846 |
|
|
6847 |
self postOpen.
|
|
6848 |
^ super postOpenAsSubcanvasWith:aBuilder
|
|
6849 |
!
|
|
6850 |
|
|
6851 |
postOpenWith:aBuilder
|
|
6852 |
|
|
6853 |
self postOpen.
|
|
6854 |
^ super postOpenWith:aBuilder
|
|
6855 |
! !
|
|
6856 |
|
|
6857 |
!AbstractSettingsApplication::SourceAndDebuggerSettingsAppl methodsFor:'queries'!
|
|
6858 |
|
|
6859 |
hasManager
|
|
6860 |
^ AbstractSourceCodeManager notNil
|
|
6861 |
and:[AbstractSourceCodeManager isLoaded]
|
|
6862 |
!
|
|
6863 |
|
|
6864 |
hasUnsavedChanges
|
|
6865 |
|
|
6866 |
^ (
|
|
6867 |
Smalltalk logDoits ~= self logDoits value or:[
|
|
6868 |
Class updatingChanges ~= self updChanges value or:[
|
|
6869 |
ObjectMemory nameForChanges ~= self changeFileName value or:[
|
|
6870 |
self useManager value ~= (Smalltalk at:#SourceCodeManager) notNil or:[
|
|
6871 |
((self hasManager and:[self useManager value]) and:[
|
|
6872 |
Class tryLocalSourceFirst ~= self localSourceFirst value or:[
|
|
6873 |
AbstractSourceCodeManager cacheDirectoryName ~= self sourceCacheDir value]]
|
|
6874 |
) or:[
|
|
6875 |
self showErrorNotifier value ~= (Exception emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler) or:[
|
|
6876 |
DebugView defaultVerboseBacktrace ? false ~= self showVerboseStack value or:[
|
|
6877 |
currentUserPrefs syntaxColoring ? false ~= self syntaxColoring value or:[
|
|
6878 |
(currentUserPrefs at:#fullSelectorCheck ifAbsent:false) ~= self fullSelectorCheck value or:[
|
|
6879 |
currentUserPrefs autoFormatting ? false ~= self autoFormat value or:[
|
|
6880 |
(UserPreferences current at:#checkClassesWhenCheckingIn ifAbsent:true) ~= self checkClassesWhenCheckingIn value
|
|
6881 |
]]]]]]]]]]
|
|
6882 |
)
|
|
6883 |
! !
|
|
6884 |
|
|
6885 |
!AbstractSettingsApplication::StyleSettingsAppl class methodsFor:'defaults'!
|
|
6886 |
|
|
6887 |
standardStyles
|
|
6888 |
|
|
6889 |
^ #(
|
|
6890 |
'decWindows'
|
|
6891 |
'iris'
|
|
6892 |
'motif'
|
|
6893 |
'mswindows95'
|
|
6894 |
'next'
|
|
6895 |
'normal'
|
|
6896 |
'os2'
|
|
6897 |
'st80'
|
|
6898 |
)
|
|
6899 |
! !
|
|
6900 |
|
|
6901 |
!AbstractSettingsApplication::StyleSettingsAppl class methodsFor:'interface specs'!
|
|
6902 |
|
|
6903 |
windowSpec
|
|
6904 |
"This resource specification was automatically generated
|
|
6905 |
by the UIPainter of ST/X."
|
|
6906 |
|
|
6907 |
"Do not manually edit this!! If it is corrupted,
|
|
6908 |
the UIPainter may not be able to read the specification."
|
|
6909 |
|
|
6910 |
"
|
|
6911 |
UIPainter new openOnClass:AbstractLauncherApplication::StyleSettingsAppl andSelector:#windowSpec
|
|
6912 |
AbstractLauncherApplication::StyleSettingsAppl new openInterface:#windowSpec
|
|
6913 |
AbstractLauncherApplication::StyleSettingsAppl open
|
|
6914 |
"
|
|
6915 |
|
|
6916 |
<resource: #canvas>
|
|
6917 |
|
|
6918 |
^
|
|
6919 |
#(#FullSpec
|
|
6920 |
#name: #windowSpec
|
|
6921 |
#window:
|
|
6922 |
#(#WindowSpec
|
|
6923 |
#label: 'Style Selection'
|
|
6924 |
#name: 'Style Selection'
|
|
6925 |
#min: #(#Point 10 10)
|
|
6926 |
#max: #(#Point 1024 768)
|
|
6927 |
#bounds: #(#Rectangle 12 22 487 553)
|
|
6928 |
)
|
|
6929 |
#component:
|
|
6930 |
#(#SpecCollection
|
|
6931 |
#collection: #(
|
|
6932 |
#(#LabelSpec
|
|
6933 |
#label: 'Label'
|
|
6934 |
#name: 'Label1'
|
|
6935 |
#layout: #(#LayoutFrame 0 0.0 -71 1 0 1.0 -34 1)
|
|
6936 |
#style: #(#FontDescription #helvetica #bold #roman 12)
|
|
6937 |
#translateLabel: true
|
|
6938 |
#labelChannel: #infoLabelHolder
|
|
6939 |
#resizeForLabel: true
|
|
6940 |
#adjust: #left
|
|
6941 |
)
|
|
6942 |
#(#HorizontalPanelViewSpec
|
|
6943 |
#name: 'HorizontalPanel1'
|
|
6944 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
6945 |
#horizontalLayout: #center
|
|
6946 |
#verticalLayout: #center
|
|
6947 |
#horizontalSpace: 3
|
|
6948 |
#verticalSpace: 3
|
|
6949 |
#component:
|
|
6950 |
#(#SpecCollection
|
|
6951 |
#collection: #(
|
|
6952 |
#(#ActionButtonSpec
|
|
6953 |
#label: 'OK'
|
|
6954 |
#name: 'OK'
|
|
6955 |
#translateLabel: true
|
|
6956 |
#model: #saveSettings
|
|
6957 |
#enableChannel: #modifiedChannel
|
|
6958 |
#extent: #(#Point 125 22)
|
|
6959 |
)
|
|
6960 |
#(#ActionButtonSpec
|
|
6961 |
#label: 'Cancel'
|
|
6962 |
#name: 'Cancel'
|
|
6963 |
#translateLabel: true
|
|
6964 |
#model: #doCancel
|
|
6965 |
#extent: #(#Point 125 22)
|
|
6966 |
)
|
|
6967 |
#(#ActionButtonSpec
|
|
6968 |
#label: 'Help'
|
|
6969 |
#name: 'Help'
|
|
6970 |
#translateLabel: true
|
|
6971 |
#model: #help
|
|
6972 |
#extent: #(#Point 125 22)
|
|
6973 |
)
|
|
6974 |
)
|
|
6975 |
|
|
6976 |
)
|
|
6977 |
)
|
|
6978 |
#(#LabelSpec
|
|
6979 |
#label: 'NoticeText'
|
|
6980 |
#name: 'Text'
|
|
6981 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 160 0)
|
|
6982 |
#translateLabel: true
|
|
6983 |
#labelChannel: #noticeLabelHolder
|
|
6984 |
#resizeForLabel: true
|
|
6985 |
#adjust: #left
|
|
6986 |
)
|
|
6987 |
#(#CheckBoxSpec
|
|
6988 |
#label: 'standard styles only'
|
|
6989 |
#name: 'CheckBox1'
|
|
6990 |
#layout: #(#LayoutFrame 0 0.0 160 0 0 1.0 182 0)
|
|
6991 |
#model: #showStandardStylesOnly
|
|
6992 |
#translateLabel: true
|
|
6993 |
)
|
|
6994 |
#(#SequenceViewSpec
|
|
6995 |
#name: 'StyleList'
|
|
6996 |
#layout: #(#LayoutFrame 0 0.0 182 0 0 1.0 -74 1)
|
|
6997 |
#model: #selectedStyle
|
|
6998 |
#hasHorizontalScrollBar: true
|
|
6999 |
#hasVerticalScrollBar: true
|
|
7000 |
#useIndex: false
|
|
7001 |
#sequenceList: #styleList
|
|
7002 |
)
|
|
7003 |
)
|
|
7004 |
|
|
7005 |
)
|
|
7006 |
)
|
|
7007 |
! !
|
|
7008 |
|
|
7009 |
!AbstractSettingsApplication::StyleSettingsAppl methodsFor:'actions'!
|
|
7010 |
|
|
7011 |
doCancel
|
|
7012 |
|
|
7013 |
self isPartOfSettinsDialog ifTrue:[
|
|
7014 |
self loadRequest.
|
|
7015 |
].
|
|
7016 |
self closeRequest.
|
|
7017 |
!
|
|
7018 |
|
|
7019 |
evaluateModified
|
|
7020 |
|
|
7021 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
7022 |
!
|
|
7023 |
|
|
7024 |
help
|
|
7025 |
|
|
7026 |
self warn:'no help available here'.
|
|
7027 |
"/ self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/keyboardSetting.html'].
|
|
7028 |
!
|
|
7029 |
|
|
7030 |
loadRequest
|
|
7031 |
|
|
7032 |
self modifiedChannel value:false.
|
|
7033 |
!
|
|
7034 |
|
|
7035 |
saveRequest
|
|
7036 |
| result |
|
|
7037 |
|
|
7038 |
(self hasUnsavedChanges) ifTrue:[
|
|
7039 |
result := self confirmWithCancel:(resources string:'Save changed Style Settings ?').
|
|
7040 |
result isNil ifTrue:[ ^ false].
|
|
7041 |
result ifTrue:[
|
|
7042 |
self saveSettings.
|
|
7043 |
] ifFalse:[
|
|
7044 |
self loadRequest.
|
|
7045 |
]
|
|
7046 |
].
|
|
7047 |
^ true
|
|
7048 |
!
|
|
7049 |
|
|
7050 |
saveSettings
|
|
7051 |
|
|
7052 |
| newStyle master requestor|
|
|
7053 |
|
|
7054 |
newStyle := self selectedStyle value.
|
|
7055 |
master := self masterApplication.
|
|
7056 |
master notNil ifTrue:[
|
|
7057 |
requestor := master requestor.
|
|
7058 |
].
|
|
7059 |
self hasUnsavedChanges ifTrue:[
|
|
7060 |
| launcher |
|
|
7061 |
requestor notNil ifTrue:[
|
|
7062 |
launcher := requestor.
|
|
7063 |
] ifFalse:[
|
|
7064 |
| transcript |
|
|
7065 |
transcript := Transcript current.
|
|
7066 |
transcript notNil ifTrue:[
|
|
7067 |
| app|
|
|
7068 |
app := transcript topView application.
|
|
7069 |
(app respondsTo:#reopenLauncher) ifTrue:[
|
|
7070 |
launcher := app.
|
|
7071 |
].
|
|
7072 |
].
|
|
7073 |
].
|
|
7074 |
self withWaitCursorDo:[
|
|
7075 |
Transcript showCR:'change style to ' , newStyle , ' ...'.
|
|
7076 |
View defaultStyle:newStyle asSymbol.
|
|
7077 |
].
|
|
7078 |
launcher notNil ifTrue:[
|
|
7079 |
launcher reopenLauncher.
|
|
7080 |
].
|
|
7081 |
DebugView newDebugger.
|
|
7082 |
self modifiedChannel value:false.
|
|
7083 |
].
|
|
7084 |
! !
|
|
7085 |
|
|
7086 |
!AbstractSettingsApplication::StyleSettingsAppl methodsFor:'aspects'!
|
|
7087 |
|
|
7088 |
infoLabelHolder
|
|
7089 |
|
|
7090 |
infoLabelHolder isNil ifTrue:[
|
|
7091 |
infoLabelHolder := '' asValue.
|
|
7092 |
].
|
|
7093 |
^ infoLabelHolder.
|
|
7094 |
!
|
|
7095 |
|
|
7096 |
modifiedChannel
|
|
7097 |
|
|
7098 |
modifiedChannel isNil ifTrue:[
|
|
7099 |
modifiedChannel := false asValue.
|
|
7100 |
].
|
|
7101 |
^ modifiedChannel
|
|
7102 |
!
|
|
7103 |
|
|
7104 |
noticeLabelHolder
|
|
7105 |
|
|
7106 |
noticeLabelHolder isNil ifTrue:[
|
|
7107 |
noticeLabelHolder := '' asValue.
|
|
7108 |
].
|
|
7109 |
^ noticeLabelHolder.
|
|
7110 |
!
|
|
7111 |
|
|
7112 |
selectedStyle
|
|
7113 |
|
|
7114 |
selectedStyle isNil ifTrue:[
|
|
7115 |
selectedStyle := ValueHolder new.
|
|
7116 |
selectedStyle addDependent:self.
|
|
7117 |
].
|
|
7118 |
^ selectedStyle.
|
|
7119 |
!
|
|
7120 |
|
|
7121 |
showStandardStylesOnly
|
|
7122 |
|
|
7123 |
showStandardStylesOnly isNil ifTrue:[
|
|
7124 |
showStandardStylesOnly := true asValue.
|
|
7125 |
showStandardStylesOnly addDependent:self.
|
|
7126 |
].
|
|
7127 |
^ showStandardStylesOnly.
|
|
7128 |
!
|
|
7129 |
|
|
7130 |
styleList
|
|
7131 |
|
|
7132 |
styleList isNil ifTrue:[
|
|
7133 |
styleList := List new.
|
|
7134 |
styleList addDependent:self.
|
|
7135 |
].
|
|
7136 |
^ styleList.
|
|
7137 |
! !
|
|
7138 |
|
|
7139 |
!AbstractSettingsApplication::StyleSettingsAppl methodsFor:'change & update'!
|
|
7140 |
|
|
7141 |
changeInfoLabel
|
|
7142 |
|
|
7143 |
|nm sheet comment|
|
|
7144 |
|
|
7145 |
comment := ''.
|
|
7146 |
nm := self selectedStyle value.
|
|
7147 |
nm notNil ifTrue:[
|
|
7148 |
sheet := ViewStyle fromFile:(nm , '.style').
|
|
7149 |
comment := (sheet at:#comment ifAbsent:'') withoutSeparators.
|
|
7150 |
].
|
|
7151 |
comment := comment withCRs asStringCollection.
|
|
7152 |
comment size == 1 ifTrue:[
|
|
7153 |
comment := comment first
|
|
7154 |
].
|
|
7155 |
self infoLabelHolder value:comment
|
|
7156 |
!
|
|
7157 |
|
|
7158 |
update:something with:aParameter from:changedObject
|
|
7159 |
"Invoked when an object that I depend upon sends a change notification."
|
|
7160 |
|
|
7161 |
"stub code automatically generated - please change as required"
|
|
7162 |
|
|
7163 |
changedObject == self showStandardStylesOnly ifTrue:[
|
|
7164 |
self updateList.
|
|
7165 |
^ self.
|
|
7166 |
].
|
|
7167 |
changedObject == self selectedStyle ifTrue:[
|
|
7168 |
self changeInfoLabel.
|
|
7169 |
self evaluateModified.
|
|
7170 |
^ self.
|
|
7171 |
].
|
|
7172 |
|
|
7173 |
super update:something with:aParameter from:changedObject
|
|
7174 |
!
|
|
7175 |
|
|
7176 |
updateList
|
|
7177 |
|
|
7178 |
|listOfStyles lastSelection|
|
|
7179 |
|
|
7180 |
lastSelection := self selectedStyle value.
|
|
7181 |
listOfStyles := styleDirectoryContents select:[:aFileName | aFileName asFilename hasSuffix:'style'].
|
|
7182 |
listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name].
|
|
7183 |
Filename isCaseSensitive ifFalse:[
|
|
7184 |
listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
|
|
7185 |
].
|
|
7186 |
listOfStyles remove:'generic' ifAbsent:nil; remove:'mswindows3' ifAbsent:nil.
|
|
7187 |
self showStandardStylesOnly value ifTrue:[
|
|
7188 |
listOfStyles := listOfStyles select:[:aStyleName | self class standardStyles includes:aStyleName].
|
|
7189 |
].
|
|
7190 |
|
|
7191 |
listOfStyles sort.
|
|
7192 |
self styleList contents:listOfStyles.
|
|
7193 |
self selectedStyle value:lastSelection.
|
|
7194 |
! !
|
|
7195 |
|
|
7196 |
!AbstractSettingsApplication::StyleSettingsAppl methodsFor:'initialization & release'!
|
|
7197 |
|
|
7198 |
closeDownViews
|
|
7199 |
"This is a hook method generated by the Browser.
|
|
7200 |
It will be invoked when your app/dialog-window is really closed.
|
|
7201 |
See also #closeDownViews, which is invoked before and may suppress the close
|
|
7202 |
or ask the user for confirmation."
|
|
7203 |
|
|
7204 |
"/ change the code below as required ...
|
|
7205 |
"/ This should cleanup any leftover resources
|
|
7206 |
"/ (for example, temporary files)
|
|
7207 |
"/ super closeRequest will initiate the closeDown
|
|
7208 |
|
|
7209 |
"/ add your code here
|
|
7210 |
|
|
7211 |
"/ do not remove the one below ...
|
|
7212 |
^ super closeDownViews
|
|
7213 |
!
|
|
7214 |
|
|
7215 |
closeRequest
|
|
7216 |
|
|
7217 |
self saveRequest ifFalse:[
|
|
7218 |
^ self
|
|
7219 |
].
|
|
7220 |
|
|
7221 |
^ super closeRequest.
|
|
7222 |
!
|
|
7223 |
|
|
7224 |
initialize
|
|
7225 |
|
|
7226 |
|someRsrcFile resourceDir|
|
|
7227 |
|
|
7228 |
resources := self class owningClass classResources.
|
|
7229 |
someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style').
|
|
7230 |
someRsrcFile isNil ifTrue:[
|
|
7231 |
someRsrcFile := Smalltalk getResourceFileName:'normal.style' forPackage:'stx:libview'.
|
|
7232 |
someRsrcFile isNil ifTrue:[
|
|
7233 |
someRsrcFile := Smalltalk getResourceFileName:'styles/normal.style' forPackage:'stx:libview'.
|
|
7234 |
].
|
|
7235 |
].
|
|
7236 |
someRsrcFile notNil ifTrue:[
|
|
7237 |
resourceDir := someRsrcFile asFilename directoryName
|
|
7238 |
] ifFalse:[
|
|
7239 |
resourceDir := Smalltalk getSystemFileName:'resources'.
|
|
7240 |
].
|
|
7241 |
|
|
7242 |
resourceDir isNil ifTrue:[
|
|
7243 |
self warn:'no styles found (missing ''resources'' directory)'.
|
|
7244 |
^ self
|
|
7245 |
].
|
|
7246 |
styleDirectoryContents := resourceDir asFilename directoryContents.
|
|
7247 |
self updateList.
|
|
7248 |
(self class standardStyles includes:View defaultStyle) ifFalse:[
|
|
7249 |
self showStandardStylesOnly value:false
|
|
7250 |
].
|
|
7251 |
self selectedStyle value:(View defaultStyle).
|
|
7252 |
self noticeLabelHolder value:(resources at:'STYLE_MSG' default:'Select a Style') withCRs.
|
|
7253 |
super initialize
|
|
7254 |
! !
|
|
7255 |
|
|
7256 |
!AbstractSettingsApplication::StyleSettingsAppl methodsFor:'queries'!
|
|
7257 |
|
|
7258 |
hasUnsavedChanges
|
|
7259 |
|
|
7260 |
^ (self selectedStyle value ~= View defaultStyle)
|
|
7261 |
! !
|
|
7262 |
|
|
7263 |
!AbstractSettingsApplication::SystemMessageSettingsAppl class methodsFor:'interface specs'!
|
|
7264 |
|
|
7265 |
windowSpec
|
|
7266 |
"This resource specification was automatically generated
|
|
7267 |
by the UIPainter of ST/X."
|
|
7268 |
|
|
7269 |
"Do not manually edit this!! If it is corrupted,
|
|
7270 |
the UIPainter may not be able to read the specification."
|
|
7271 |
|
|
7272 |
"
|
|
7273 |
UIPainter new openOnClass:AbstractLauncherApplication::SystemMessageSettingsAppl andSelector:#windowSpec
|
|
7274 |
AbstractLauncherApplication::SystemMessageSettingsAppl new openInterface:#windowSpec
|
|
7275 |
AbstractLauncherApplication::SystemMessageSettingsAppl open
|
|
7276 |
"
|
|
7277 |
|
|
7278 |
<resource: #canvas>
|
|
7279 |
|
|
7280 |
^
|
|
7281 |
#(#FullSpec
|
|
7282 |
#name: #windowSpec
|
|
7283 |
#window:
|
|
7284 |
#(#WindowSpec
|
|
7285 |
#label: 'Messages'
|
|
7286 |
#name: 'Messages'
|
|
7287 |
#min: #(#Point 10 10)
|
|
7288 |
#max: #(#Point 1024 768)
|
|
7289 |
#bounds: #(#Rectangle 24 22 499 293)
|
|
7290 |
)
|
|
7291 |
#component:
|
|
7292 |
#(#SpecCollection
|
|
7293 |
#collection: #(
|
|
7294 |
#(#CheckBoxSpec
|
|
7295 |
#label: 'VM Info Messages'
|
|
7296 |
#name: 'VMInfoMessages'
|
|
7297 |
#layout: #(#LayoutFrame 5 0 5 0 -5 1 30 0)
|
|
7298 |
#model: #vmInfo
|
|
7299 |
#translateLabel: true
|
|
7300 |
)
|
|
7301 |
#(#CheckBoxSpec
|
|
7302 |
#label: 'VM Error Messages'
|
|
7303 |
#name: 'VMErrorMessages'
|
|
7304 |
#layout: #(#LayoutFrame 5 0 40 0 -5 1 65 0)
|
|
7305 |
#model: #vmErrors
|
|
7306 |
#translateLabel: true
|
|
7307 |
)
|
|
7308 |
#(#DividerSpec
|
|
7309 |
#name: 'Separator2'
|
|
7310 |
#layout: #(#LayoutFrame 0 0.0 70 0 0 1 73 0)
|
|
7311 |
)
|
|
7312 |
#(#CheckBoxSpec
|
|
7313 |
#label: 'Display Error Messages (Xlib, Xtlib, WinAPI ...)'
|
|
7314 |
#name: 'DisplayErrorMessages'
|
|
7315 |
#layout: #(#LayoutFrame 5 0 80 0 -5 1 105 0)
|
|
7316 |
#model: #displayErrors
|
|
7317 |
#translateLabel: true
|
|
7318 |
)
|
|
7319 |
#(#CheckBoxSpec
|
|
7320 |
#label: 'Other Info Messages'
|
|
7321 |
#name: 'OtherInfoMessages'
|
|
7322 |
#layout: #(#LayoutFrame 4 0 115 0 -5 1 135 0)
|
|
7323 |
#model: #classInfos
|
|
7324 |
#translateLabel: true
|
|
7325 |
)
|
|
7326 |
#(#DividerSpec
|
|
7327 |
#name: 'Separator3'
|
|
7328 |
#layout: #(#LayoutFrame 2 0.0 144 0 2 1 147 0)
|
|
7329 |
)
|
|
7330 |
#(#HorizontalPanelViewSpec
|
|
7331 |
#name: 'HorizontalPanel1'
|
|
7332 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
7333 |
#horizontalLayout: #center
|
|
7334 |
#verticalLayout: #center
|
|
7335 |
#horizontalSpace: 3
|
|
7336 |
#verticalSpace: 3
|
|
7337 |
#component:
|
|
7338 |
#(#SpecCollection
|
|
7339 |
#collection: #(
|
|
7340 |
#(#ActionButtonSpec
|
|
7341 |
#label: 'OK'
|
|
7342 |
#name: 'OK'
|
|
7343 |
#translateLabel: true
|
|
7344 |
#model: #saveSettings
|
|
7345 |
#enableChannel: #modifiedChannel
|
|
7346 |
#extent: #(#Point 125 22)
|
|
7347 |
)
|
|
7348 |
#(#ActionButtonSpec
|
|
7349 |
#label: 'Cancel'
|
|
7350 |
#name: 'Cancel'
|
|
7351 |
#translateLabel: true
|
|
7352 |
#model: #doCancel
|
|
7353 |
#extent: #(#Point 125 22)
|
|
7354 |
)
|
|
7355 |
#(#ActionButtonSpec
|
|
7356 |
#label: 'Help'
|
|
7357 |
#name: 'Help'
|
|
7358 |
#translateLabel: true
|
|
7359 |
#model: #help
|
|
7360 |
#extent: #(#Point 125 22)
|
|
7361 |
)
|
|
7362 |
)
|
|
7363 |
|
|
7364 |
)
|
|
7365 |
)
|
|
7366 |
)
|
|
7367 |
|
|
7368 |
)
|
|
7369 |
)
|
|
7370 |
! !
|
|
7371 |
|
|
7372 |
!AbstractSettingsApplication::SystemMessageSettingsAppl methodsFor:'actions'!
|
|
7373 |
|
|
7374 |
doCancel
|
|
7375 |
|
|
7376 |
self isPartOfSettinsDialog ifTrue:[
|
|
7377 |
self loadRequest.
|
|
7378 |
].
|
|
7379 |
self closeRequest.
|
|
7380 |
!
|
|
7381 |
|
|
7382 |
evaluateModified
|
|
7383 |
|
|
7384 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
7385 |
!
|
|
7386 |
|
|
7387 |
help
|
|
7388 |
|
|
7389 |
self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/messageSettings.html'].
|
|
7390 |
!
|
|
7391 |
|
|
7392 |
loadRequest
|
|
7393 |
|
|
7394 |
self vmInfo value:ObjectMemory infoPrinting.
|
|
7395 |
self vmErrors value:ObjectMemory debugPrinting.
|
|
7396 |
self classInfos value:Object infoPrinting.
|
|
7397 |
self displayErrors value:DeviceWorkstation errorPrinting.
|
|
7398 |
self modifiedChannel value:false.
|
|
7399 |
!
|
|
7400 |
|
|
7401 |
saveRequest
|
|
7402 |
| result |
|
|
7403 |
|
|
7404 |
(self hasUnsavedChanges) ifTrue:[
|
|
7405 |
result := self confirmWithCancel:(resources string:'Save changed System Massage Settings ?').
|
|
7406 |
result isNil ifTrue:[ ^ false].
|
|
7407 |
result ifTrue:[
|
|
7408 |
self saveSettings.
|
|
7409 |
] ifFalse:[
|
|
7410 |
self loadRequest.
|
|
7411 |
]
|
|
7412 |
].
|
|
7413 |
^ true
|
|
7414 |
!
|
|
7415 |
|
|
7416 |
saveSettings
|
|
7417 |
|
|
7418 |
ObjectMemory infoPrinting:self vmInfo value.
|
|
7419 |
ObjectMemory debugPrinting:self vmErrors value.
|
|
7420 |
Object infoPrinting:self classInfos value.
|
|
7421 |
DeviceWorkstation errorPrinting:self displayErrors value.
|
|
7422 |
self modifiedChannel value:false.
|
|
7423 |
! !
|
|
7424 |
|
|
7425 |
!AbstractSettingsApplication::SystemMessageSettingsAppl methodsFor:'aspects'!
|
|
7426 |
|
|
7427 |
classInfos
|
|
7428 |
|
|
7429 |
classInfos isNil ifTrue:[
|
|
7430 |
classInfos := Object infoPrinting asValue.
|
|
7431 |
classInfos onChangeSend:#evaluateModified to:self
|
|
7432 |
].
|
|
7433 |
^ classInfos.
|
|
7434 |
!
|
|
7435 |
|
|
7436 |
displayErrors
|
|
7437 |
|
|
7438 |
displayErrors isNil ifTrue:[
|
|
7439 |
displayErrors := DeviceWorkstation errorPrinting asValue.
|
|
7440 |
displayErrors onChangeSend:#evaluateModified to:self
|
|
7441 |
].
|
|
7442 |
^ displayErrors.
|
|
7443 |
!
|
|
7444 |
|
|
7445 |
modifiedChannel
|
|
7446 |
|
|
7447 |
modifiedChannel isNil ifTrue:[
|
|
7448 |
modifiedChannel := false asValue.
|
|
7449 |
].
|
|
7450 |
^ modifiedChannel
|
|
7451 |
!
|
|
7452 |
|
|
7453 |
vmErrors
|
|
7454 |
|
|
7455 |
vmErrors isNil ifTrue:[
|
|
7456 |
vmErrors := ObjectMemory debugPrinting asValue.
|
|
7457 |
vmErrors onChangeSend:#evaluateModified to:self
|
|
7458 |
].
|
|
7459 |
^ vmErrors.
|
|
7460 |
!
|
|
7461 |
|
|
7462 |
vmInfo
|
|
7463 |
|
|
7464 |
vmInfo isNil ifTrue:[
|
|
7465 |
vmInfo := ObjectMemory infoPrinting asValue.
|
|
7466 |
vmInfo onChangeSend:#evaluateModified to:self
|
|
7467 |
].
|
|
7468 |
^ vmInfo.
|
|
7469 |
! !
|
|
7470 |
|
|
7471 |
!AbstractSettingsApplication::SystemMessageSettingsAppl methodsFor:'initialization & release'!
|
|
7472 |
|
|
7473 |
closeRequest
|
|
7474 |
|
|
7475 |
self saveRequest ifFalse:[
|
|
7476 |
^ self
|
|
7477 |
].
|
|
7478 |
|
|
7479 |
^ super closeRequest.
|
|
7480 |
!
|
|
7481 |
|
|
7482 |
initialize
|
|
7483 |
|
|
7484 |
resources := self class owningClass classResources.
|
|
7485 |
super initialize
|
|
7486 |
! !
|
|
7487 |
|
|
7488 |
!AbstractSettingsApplication::SystemMessageSettingsAppl methodsFor:'queries'!
|
|
7489 |
|
|
7490 |
hasUnsavedChanges
|
|
7491 |
|
|
7492 |
^(self vmInfo value ~= ObjectMemory infoPrinting or:[
|
|
7493 |
self vmErrors value ~= ObjectMemory debugPrinting or:[
|
|
7494 |
self classInfos value ~= Object infoPrinting or:[
|
|
7495 |
self displayErrors value ~= DeviceWorkstation errorPrinting ]]])
|
|
7496 |
! !
|
|
7497 |
|
|
7498 |
!AbstractSettingsApplication::ToolsSettingsAppl class methodsFor:'interface specs'!
|
|
7499 |
|
|
7500 |
windowSpec
|
|
7501 |
"This resource specification was automatically generated
|
|
7502 |
by the UIPainter of ST/X."
|
|
7503 |
|
|
7504 |
"Do not manually edit this!! If it is corrupted,
|
|
7505 |
the UIPainter may not be able to read the specification."
|
|
7506 |
|
|
7507 |
"
|
|
7508 |
UIPainter new openOnClass:AbstractLauncherApplication::ToolsSettingsAppl andSelector:#windowSpec
|
|
7509 |
AbstractLauncherApplication::ToolsSettingsAppl new openInterface:#windowSpec
|
|
7510 |
AbstractLauncherApplication::ToolsSettingsAppl open
|
|
7511 |
"
|
|
7512 |
|
|
7513 |
<resource: #canvas>
|
|
7514 |
|
|
7515 |
^
|
|
7516 |
#(#FullSpec
|
|
7517 |
#name: #windowSpec
|
|
7518 |
#window:
|
|
7519 |
#(#WindowSpec
|
|
7520 |
#label: 'AbstractLauncherApplication::LauncherDialogs::ToolsSettingsAppl'
|
|
7521 |
#name: 'AbstractLauncherApplication::LauncherDialogs::ToolsSettingsAppl'
|
|
7522 |
#min: #(#Point 10 10)
|
|
7523 |
#max: #(#Point 1024 768)
|
|
7524 |
#bounds: #(#Rectangle 16 42 491 313)
|
|
7525 |
)
|
|
7526 |
#component:
|
|
7527 |
#(#SpecCollection
|
|
7528 |
#collection: #(
|
|
7529 |
#(#CheckBoxSpec
|
|
7530 |
#label: 'Use the New Changes Browser'
|
|
7531 |
#name: 'ChangesBrowser'
|
|
7532 |
#layout: #(#LayoutFrame 5 0 5 0 250 0 30 0)
|
|
7533 |
#model: #useNewChangesBrowser
|
|
7534 |
#translateLabel: true
|
|
7535 |
)
|
|
7536 |
#(#DividerSpec
|
|
7537 |
#name: 'Separator1'
|
|
7538 |
#layout: #(#LayoutFrame 0 0.0 35 0 0 1 38 0)
|
|
7539 |
)
|
|
7540 |
#(#CheckBoxSpec
|
|
7541 |
#label: 'Use the New System Browser'
|
|
7542 |
#name: 'NewSystemBrowser'
|
|
7543 |
#layout: #(#LayoutFrame 250 0 5 0 0 1 30 0)
|
|
7544 |
#model: #useNewSystemBrowser
|
|
7545 |
#translateLabel: true
|
|
7546 |
)
|
|
7547 |
#(#DividerSpec
|
|
7548 |
#name: 'Separator2'
|
|
7549 |
#layout: #(#LayoutFrame 0 0.0 70 0 0 1 73 0)
|
|
7550 |
)
|
|
7551 |
#(#CheckBoxSpec
|
|
7552 |
#label: 'Use the New VersionDiff Browser'
|
|
7553 |
#name: 'VersionDiffBrowser'
|
|
7554 |
#layout: #(#LayoutFrame 5 0 40 0 250 0 65 0)
|
|
7555 |
#model: #useNewVersionDiffBrowser
|
|
7556 |
#translateLabel: true
|
|
7557 |
)
|
|
7558 |
#(#DividerSpec
|
|
7559 |
#name: 'Separator3'
|
|
7560 |
#layout: #(#LayoutFrame 0 0.0 105 0 0 1 108 0)
|
|
7561 |
)
|
|
7562 |
#(#CheckBoxSpec
|
|
7563 |
#label: 'Use the New File Browser'
|
|
7564 |
#name: 'NewFileBrowser'
|
|
7565 |
#layout: #(#LayoutFrame 250 0 40 0 0 1 65 0)
|
|
7566 |
#model: #useNewFileBrowser
|
|
7567 |
#translateLabel: true
|
|
7568 |
)
|
|
7569 |
#(#CheckBoxSpec
|
|
7570 |
#label: 'Use Hierarchical Inspector'
|
|
7571 |
#name: 'HierarchicalInspector'
|
|
7572 |
#layout: #(#LayoutFrame 5 0 75 0 250 0 100 0)
|
|
7573 |
#model: #useNewInspector
|
|
7574 |
#translateLabel: true
|
|
7575 |
)
|
|
7576 |
#(#CheckBoxSpec
|
|
7577 |
#label: 'Show Clock in Launcher'
|
|
7578 |
#name: 'Clock'
|
|
7579 |
#layout: #(#LayoutFrame 250 0 75 0 0 1 100 0)
|
|
7580 |
#model: #showClockInLauncher
|
|
7581 |
#translateLabel: true
|
|
7582 |
)
|
|
7583 |
#(#LabelSpec
|
|
7584 |
#label: '''Transcripts Buffer Size:'''
|
|
7585 |
#name: 'Label1'
|
|
7586 |
#layout: #(#LayoutFrame 9 0 133 0 154 0 155 0)
|
|
7587 |
#translateLabel: true
|
|
7588 |
#adjust: #left
|
|
7589 |
)
|
|
7590 |
#(#InputFieldSpec
|
|
7591 |
#name: 'Transcripts Buffer Size'
|
|
7592 |
#layout: #(#LayoutFrame 159 0 133 0 214 0 155 0)
|
|
7593 |
#model: #transcriptBufferSize
|
|
7594 |
#type: #number
|
|
7595 |
#immediateAccept: true
|
|
7596 |
#acceptOnReturn: true
|
|
7597 |
#acceptOnTab: true
|
|
7598 |
#acceptOnLostFocus: true
|
|
7599 |
#acceptOnPointerLeave: false
|
|
7600 |
)
|
|
7601 |
#(#HorizontalPanelViewSpec
|
|
7602 |
#name: 'HorizontalPanel1'
|
|
7603 |
#layout: #(#LayoutFrame 0 0.0 -34 1 0 1.0 0 1)
|
|
7604 |
#horizontalLayout: #center
|
|
7605 |
#verticalLayout: #center
|
|
7606 |
#horizontalSpace: 3
|
|
7607 |
#verticalSpace: 3
|
|
7608 |
#component:
|
|
7609 |
#(#SpecCollection
|
|
7610 |
#collection: #(
|
|
7611 |
#(#ActionButtonSpec
|
|
7612 |
#label: 'OK'
|
|
7613 |
#name: 'OK'
|
|
7614 |
#translateLabel: true
|
|
7615 |
#model: #saveSettings
|
|
7616 |
#enableChannel: #modifiedChannel
|
|
7617 |
#extent: #(#Point 125 22)
|
|
7618 |
)
|
|
7619 |
#(#ActionButtonSpec
|
|
7620 |
#label: 'Cancel'
|
|
7621 |
#name: 'Cancel'
|
|
7622 |
#translateLabel: true
|
|
7623 |
#model: #doCancel
|
|
7624 |
#extent: #(#Point 125 22)
|
|
7625 |
)
|
|
7626 |
#(#ActionButtonSpec
|
|
7627 |
#label: 'Help'
|
|
7628 |
#name: 'Help'
|
|
7629 |
#translateLabel: true
|
|
7630 |
#model: #help
|
|
7631 |
#extent: #(#Point 125 22)
|
|
7632 |
)
|
|
7633 |
)
|
|
7634 |
|
|
7635 |
)
|
|
7636 |
)
|
|
7637 |
)
|
|
7638 |
|
|
7639 |
)
|
|
7640 |
)
|
|
7641 |
! !
|
|
7642 |
|
|
7643 |
!AbstractSettingsApplication::ToolsSettingsAppl methodsFor:'actions'!
|
|
7644 |
|
|
7645 |
doCancel
|
|
7646 |
|
|
7647 |
self isPartOfSettinsDialog ifTrue:[
|
|
7648 |
self loadRequest.
|
|
7649 |
].
|
|
7650 |
self closeRequest.
|
|
7651 |
!
|
|
7652 |
|
|
7653 |
evaluateModified
|
|
7654 |
|
|
7655 |
self modifiedChannel value:(self hasUnsavedChanges).
|
|
7656 |
!
|
|
7657 |
|
|
7658 |
help
|
|
7659 |
|
|
7660 |
self withWaitCursorDo:[HTMLDocumentView openFullOnHelpFile:'Launcher/toolSettings.html'].
|
|
7661 |
!
|
|
7662 |
|
|
7663 |
loadRequest
|
|
7664 |
|
|
7665 |
self showClockInLauncher value:currentUserPrefs showClockInLauncher.
|
|
7666 |
self transcriptBufferSize value:Transcript current lineLimit.
|
|
7667 |
self useNewChangesBrowser value:currentUserPrefs useNewChangesBrowser.
|
|
7668 |
self useNewFileBrowser value:currentUserPrefs useNewFileBrowser.
|
|
7669 |
self useNewInspector value:currentUserPrefs useNewInspector.
|
|
7670 |
self useNewSystemBrowser value:currentUserPrefs useNewSystemBrowser.
|
|
7671 |
self useNewVersionDiffBrowser value:currentUserPrefs useNewVersionDiffBrowser.
|
|
7672 |
self modifiedChannel value:false.
|
|
7673 |
!
|
|
7674 |
|
|
7675 |
saveRequest
|
|
7676 |
| result |
|
|
7677 |
|
|
7678 |
(self hasUnsavedChanges) ifTrue:[
|
|
7679 |
result := self confirmWithCancel:(resources string:'Save changed Tool Settings ?').
|
|
7680 |
result isNil ifTrue:[ ^ false].
|
|
7681 |
result ifTrue:[
|
|
7682 |
self saveSettings.
|
|
7683 |
] ifFalse:[
|
|
7684 |
self loadRequest.
|
|
7685 |
]
|
|
7686 |
].
|
|
7687 |
^ true
|
|
7688 |
!
|
|
7689 |
|
|
7690 |
saveSettings
|
|
7691 |
|
|
7692 |
| showClock launcher |
|
|
7693 |
|
|
7694 |
currentUserPrefs useNewInspector:self useNewInspector value.
|
|
7695 |
currentUserPrefs useNewChangesBrowser:self useNewChangesBrowser value.
|
|
7696 |
currentUserPrefs useNewSystemBrowser:self useNewSystemBrowser value.
|
|
7697 |
currentUserPrefs useNewVersionDiffBrowser:self useNewVersionDiffBrowser value.
|
|
7698 |
currentUserPrefs useNewFileBrowser:self useNewFileBrowser value.
|
|
7699 |
(Smalltalk at:#FileBrowserV2) isBehavior ifTrue:[
|
|
7700 |
self useNewFileBrowser value ifTrue:[
|
|
7701 |
FileBrowserV2 installInLauncher.
|
|
7702 |
] ifFalse:[
|
|
7703 |
FileBrowserV2 isLoaded ifTrue:[
|
|
7704 |
FileBrowserV2 removeFromLauncher.
|
|
7705 |
]
|
|
7706 |
].
|
|
7707 |
].
|
|
7708 |
showClock := self showClockInLauncher value.
|
|
7709 |
currentUserPrefs showClockInLauncher ~= showClock ifTrue:[
|
|
7710 |
currentUserPrefs showClockInLauncher:showClock.
|
|
7711 |
launcher := Transcript application.
|
|
7712 |
(launcher isKindOf:ToolApplicationModel) ifTrue:[
|
|
7713 |
showClock ifTrue:[
|
|
7714 |
launcher startClock
|
|
7715 |
] ifFalse:[
|
|
7716 |
launcher stopClock
|
|
7717 |
]
|
|
7718 |
]
|
|
7719 |
].
|
|
7720 |
Inspector := currentUserPrefs inspectorClassSetting.
|
|
7721 |
Transcript current lineLimit:self transcriptBufferSize value.
|
|
7722 |
self modifiedChannel value:false.
|
|
7723 |
! !
|
|
7724 |
|
|
7725 |
!AbstractSettingsApplication::ToolsSettingsAppl methodsFor:'aspects'!
|
|
7726 |
|
|
7727 |
modifiedChannel
|
|
7728 |
|
|
7729 |
modifiedChannel isNil ifTrue:[
|
|
7730 |
modifiedChannel := false asValue.
|
|
7731 |
].
|
|
7732 |
^ modifiedChannel
|
|
7733 |
!
|
|
7734 |
|
|
7735 |
showClockInLauncher
|
|
7736 |
|
|
7737 |
showClockInLauncher isNil ifTrue:[
|
|
7738 |
showClockInLauncher := currentUserPrefs showClockInLauncher asValue.
|
|
7739 |
showClockInLauncher onChangeSend:#evaluateModified to:self
|
|
7740 |
].
|
|
7741 |
^ showClockInLauncher.
|
|
7742 |
!
|
|
7743 |
|
|
7744 |
transcriptBufferSize
|
|
7745 |
|
|
7746 |
transcriptBufferSize isNil ifTrue:[
|
|
7747 |
transcriptBufferSize := Transcript current lineLimit asValue.
|
|
7748 |
transcriptBufferSize onChangeSend:#evaluateModified to:self
|
|
7749 |
].
|
|
7750 |
^ transcriptBufferSize.
|
|
7751 |
!
|
|
7752 |
|
|
7753 |
useNewChangesBrowser
|
|
7754 |
|
|
7755 |
useNewChangesBrowser isNil ifTrue:[
|
|
7756 |
useNewChangesBrowser := currentUserPrefs useNewChangesBrowser asValue.
|
|
7757 |
useNewChangesBrowser onChangeSend:#evaluateModified to:self
|
|
7758 |
].
|
|
7759 |
^ useNewChangesBrowser.
|
|
7760 |
!
|
|
7761 |
|
|
7762 |
useNewFileBrowser
|
|
7763 |
|
|
7764 |
useNewFileBrowser isNil ifTrue:[
|
|
7765 |
useNewFileBrowser := currentUserPrefs useNewFileBrowser asValue.
|
|
7766 |
useNewFileBrowser onChangeSend:#evaluateModified to:self
|
|
7767 |
].
|
|
7768 |
^ useNewFileBrowser.
|
|
7769 |
!
|
|
7770 |
|
|
7771 |
useNewInspector
|
|
7772 |
|
|
7773 |
useNewInspector isNil ifTrue:[
|
|
7774 |
useNewInspector := currentUserPrefs useNewInspector asValue.
|
|
7775 |
useNewInspector onChangeSend:#evaluateModified to:self
|
|
7776 |
].
|
|
7777 |
^ useNewInspector.
|
|
7778 |
!
|
|
7779 |
|
|
7780 |
useNewSystemBrowser
|
|
7781 |
|
|
7782 |
useNewSystemBrowser isNil ifTrue:[
|
|
7783 |
useNewSystemBrowser := currentUserPrefs useNewSystemBrowser asValue.
|
|
7784 |
useNewSystemBrowser onChangeSend:#evaluateModified to:self
|
|
7785 |
].
|
|
7786 |
^ useNewSystemBrowser.
|
|
7787 |
!
|
|
7788 |
|
|
7789 |
useNewVersionDiffBrowser
|
|
7790 |
|
|
7791 |
useNewVersionDiffBrowser isNil ifTrue:[
|
|
7792 |
useNewVersionDiffBrowser := currentUserPrefs useNewVersionDiffBrowser asValue.
|
|
7793 |
useNewVersionDiffBrowser onChangeSend:#evaluateModified to:self
|
|
7794 |
].
|
|
7795 |
^ useNewVersionDiffBrowser.
|
|
7796 |
! !
|
|
7797 |
|
|
7798 |
!AbstractSettingsApplication::ToolsSettingsAppl methodsFor:'initialization & release'!
|
|
7799 |
|
|
7800 |
closeRequest
|
|
7801 |
|
|
7802 |
self saveRequest ifFalse:[
|
|
7803 |
^ self
|
|
7804 |
].
|
|
7805 |
|
|
7806 |
^ super closeRequest.
|
|
7807 |
!
|
|
7808 |
|
|
7809 |
initialize
|
|
7810 |
|
|
7811 |
resources := self class owningClass classResources.
|
|
7812 |
currentUserPrefs := UserPreferences current.
|
|
7813 |
super initialize
|
|
7814 |
! !
|
|
7815 |
|
|
7816 |
!AbstractSettingsApplication::ToolsSettingsAppl methodsFor:'queries'!
|
|
7817 |
|
|
7818 |
hasUnsavedChanges
|
|
7819 |
|
|
7820 |
^ ((self useNewInspector value ~= currentUserPrefs useNewInspector) or:[
|
|
7821 |
(self useNewChangesBrowser value ~= currentUserPrefs useNewChangesBrowser) or:[
|
|
7822 |
(self useNewSystemBrowser value ~= currentUserPrefs useNewSystemBrowser) or:[
|
|
7823 |
(self showClockInLauncher value ~= currentUserPrefs showClockInLauncher) or:[
|
|
7824 |
(self useNewVersionDiffBrowser value ~= currentUserPrefs useNewVersionDiffBrowser) or:[
|
|
7825 |
(self useNewFileBrowser value ~= currentUserPrefs useNewFileBrowser) or:[
|
|
7826 |
(self transcriptBufferSize value ~= Transcript current lineLimit)]]]]]])
|
|
7827 |
! !
|
|
7828 |
|
4226
|
7829 |
!AbstractSettingsApplication class methodsFor:'documentation'!
|
|
7830 |
|
|
7831 |
version
|
4292
|
7832 |
^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.5 2002-11-19 15:55:19 penk Exp $'
|
4226
|
7833 |
! !
|