author | Claus Gittinger <cg@exept.de> |
Fri, 26 Jan 2018 07:42:22 +0100 | |
changeset 22509 | 2eab1afa5e91 |
parent 22508 | 0f6d8b4bb9ed |
child 22510 | 16f285076355 |
permissions | -rw-r--r-- |
22508 | 1 |
"{ Encoding: utf8 }" |
2 |
||
3347 | 3 |
" |
4 |
COPYRIGHT (c) 1998 by eXept Software AG |
|
11143 | 5 |
All Rights Reserved |
3347 | 6 |
|
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
5516 | 14 |
"{ Package: 'stx:libbasic' }" |
15 |
||
17316 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
3347 | 18 |
IdentityDictionary subclass:#UserPreferences |
19633 | 19 |
instanceVariableNames:'modified' |
9742 | 20 |
classVariableNames:'CurrentPreferences DefaultPreferences' |
21 |
poolDictionaries:'' |
|
22 |
category:'System-Support' |
|
3347 | 23 |
! |
24 |
||
25 |
!UserPreferences class methodsFor:'documentation'! |
|
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1998 by eXept Software AG |
|
11143 | 30 |
All Rights Reserved |
3347 | 31 |
|
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
||
40 |
! |
|
41 |
||
42 |
documentation |
|
43 |
" |
|
4582
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
44 |
A Dictionary for user preference values. |
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
45 |
For non-existing keys, either a defaultValue (false), |
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
46 |
or the value from a defaultDictionary is returned. |
3353 | 47 |
|
3359 | 48 |
This will eventually keep track of ALL user preferences. |
8676 | 49 |
For now, not all preferences are found here - |
50 |
(some of them are currently spread over the system - especially, in Class-Variables) |
|
51 |
- but this will change over time. |
|
4582
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
52 |
|
10887 | 53 |
If more prefs are added, think about adding a corresponding UI to the SystemSettingsDialog too. |
54 |
||
18690 | 55 |
Notice, that ST/X is intended to be multi-user capable, supporting multiple users on multiple screens. |
56 |
This is effectively used by (at least) 2 ST/X customers we are aware of (for multi-screen applications). |
|
57 |
So do not break it, by putting user-specific stuff into class variables. |
|
58 |
||
59 |
Usage: |
|
60 |
UserPreferences current at:#foo |
|
61 |
or |
|
62 |
UserPreferences current at:#foo put:something |
|
3347 | 63 |
" |
64 |
! ! |
|
65 |
||
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
66 |
!UserPreferences class methodsFor:'initialization'! |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
67 |
|
19952 | 68 |
initializeDefaultsIn:preferences |
10240
9b59aa4f7bd4
dont try to create Color-prefs in non-GUI standalone apps.
Claus Gittinger <cg@exept.de>
parents:
10177
diff
changeset
|
69 |
Color isNil "Smalltalk isStandAloneApp" ifTrue:[ |
19952 | 70 |
^ self. |
10240
9b59aa4f7bd4
dont try to create Color-prefs in non-GUI standalone apps.
Claus Gittinger <cg@exept.de>
parents:
10177
diff
changeset
|
71 |
]. |
19954 | 72 |
Color initialize. |
10240
9b59aa4f7bd4
dont try to create Color-prefs in non-GUI standalone apps.
Claus Gittinger <cg@exept.de>
parents:
10177
diff
changeset
|
73 |
|
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
74 |
#( |
19952 | 75 |
#useNewChangesBrowser false |
76 |
#useNewInspector false |
|
77 |
#showClockInLauncher true |
|
78 |
||
79 |
#autoFormatting false |
|
80 |
#syntaxColoring true |
|
81 |
#fullSelectorCheck false |
|
82 |
||
83 |
#defaultSyntaxColor (Color black) |
|
84 |
#defaultSyntaxEmphasis normal |
|
85 |
||
86 |
#errorColor (Color red) |
|
87 |
||
88 |
"/ #commentColor (Color 12.5 12.5 100) |
|
89 |
#commentColor (Color 0 50 0) |
|
90 |
#commentEmphasis normal |
|
91 |
||
92 |
#methodSelectorEmphasis bold |
|
93 |
#selectorEmphasis bold |
|
94 |
#unimplementedSelectorColor (Color red) |
|
95 |
#unimplementedSelectorEmphasis normal |
|
96 |
||
97 |
"/ I prefer red-underwave over red identifier ... |
|
98 |
"/ #badIdentifierColor (Color red) |
|
99 |
#instVarIdentifierColor (Color 33 0 33) |
|
100 |
||
101 |
"/ I prefer redish background |
|
102 |
"/ #sideEffectAssignmentColor (Color 75 0 0) |
|
103 |
"/ #sideEffectAssignmentBackgroundColor (Color 100 86 86) |
|
104 |
||
105 |
#jsKeywordEmphasis bold |
|
106 |
"/ #jsKeywordColor (Color black) |
|
107 |
#jsKeywordColor (Color 33 33 0) |
|
108 |
||
109 |
#controlFlowSelectorColor (Color 0 0 100) |
|
110 |
#debugSelectorColor (Color 80 0 0) |
|
111 |
#errorRaisingSelectorColor (Color 80 0 0) |
|
112 |
"/ #constantColor (Color 25 0 0) |
|
113 |
#constantColor (Color 64 8 8) |
|
114 |
||
115 |
#globalIdentifierColor (Color 67 0 67) |
|
116 |
#unknownIdentifierColor (Color 67 0 67) |
|
117 |
||
118 |
#returnColor (Color 0 0 100) |
|
119 |
#returnEmphasis bold |
|
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
120 |
) pairWiseDo:[:k :v | |
19952 | 121 |
preferences at:k put:(v decodeAsLiteralArray). |
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
122 |
]. |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
123 |
|
9913
b798d50affb3
focus follows mouse default.
Claus Gittinger <cg@exept.de>
parents:
9834
diff
changeset
|
124 |
"/ I prefer red-underwave over red identifier ... |
19952 | 125 |
preferences at:#badIdentifierEmphasis put:(Array with:#underwave with:(#underlineColor->Color red)). |
4335
b301d2c92490
underwave red for bad identifiers
Claus Gittinger <cg@exept.de>
parents:
4331
diff
changeset
|
126 |
|
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
127 |
" |
4580 | 128 |
self initializeDefaultPreferences |
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
129 |
" |
4335
b301d2c92490
underwave red for bad identifiers
Claus Gittinger <cg@exept.de>
parents:
4331
diff
changeset
|
130 |
|
19952 | 131 |
"Created: / 06-06-2016 / 10:42:14 / cg" |
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
132 |
! ! |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
133 |
|
3347 | 134 |
!UserPreferences class methodsFor:'accessing'! |
135 |
||
136 |
current |
|
137 |
CurrentPreferences isNil ifTrue:[ |
|
19952 | 138 |
CurrentPreferences := self new. |
139 |
self initializeDefaultsIn:CurrentPreferences. |
|
140 |
CurrentPreferences flyByHelpSettingChanged. |
|
3347 | 141 |
]. |
142 |
^ CurrentPreferences. |
|
143 |
||
8420 | 144 |
" |
145 |
CurrentPreferences := nil |
|
146 |
" |
|
17414
d2b54cba3e88
Changed preference lookup.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17398
diff
changeset
|
147 |
|
d2b54cba3e88
Changed preference lookup.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17398
diff
changeset
|
148 |
"Modified: / 05-02-2015 / 07:08:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
19952 | 149 |
"Modified: / 06-06-2016 / 10:42:59 / cg" |
3364 | 150 |
! |
151 |
||
4318 | 152 |
default |
4580 | 153 |
DefaultPreferences isNil ifTrue:[ |
19952 | 154 |
DefaultPreferences := self new. |
155 |
self initializeDefaultsIn:DefaultPreferences |
|
4580 | 156 |
]. |
4318 | 157 |
^ DefaultPreferences. |
158 |
||
4582
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
159 |
" |
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
160 |
DefaultPreferences := nil. |
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
161 |
" |
19952 | 162 |
|
163 |
"Modified: / 06-06-2016 / 10:41:45 / cg" |
|
4318 | 164 |
! |
165 |
||
3364 | 166 |
reset |
167 |
"resets the CurrentPreferences to its default values" |
|
168 |
||
169 |
CurrentPreferences := nil |
|
170 |
! |
|
171 |
||
19918 | 172 |
setCurrent:preferencesInstance |
173 |
"sets the CurrentPreferences to preferencesInstance" |
|
174 |
||
175 |
CurrentPreferences := preferencesInstance |
|
176 |
! |
|
177 |
||
4342
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
178 |
syntaxColorKeys |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
179 |
"returns the keys of syntax color items" |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
180 |
|
17359 | 181 |
^ self syntaxColorNamesAndKeys collectAll:[:each | each from:2] |
182 |
||
183 |
" |
|
184 |
self syntaxColorKeys |
|
185 |
" |
|
186 |
||
187 |
"/ ^#( |
|
188 |
"/ argumentIdentifierColor |
|
189 |
"/ argumentIdentifierEmphasis |
|
190 |
"/ booleanConstantColor |
|
191 |
"/ booleanConstantEmphasis |
|
192 |
"/ bracketColor |
|
193 |
"/ bracketEmphasis |
|
194 |
"/ classVariableIdentifierColor |
|
195 |
"/ classVariableIdentifierEmphasis |
|
196 |
"/ constantColor |
|
197 |
"/ constantEmphasis |
|
198 |
"/ controlFlowSelectorColor |
|
199 |
"/ controlFlowSelectorEmphasis |
|
200 |
"/ commentColor |
|
201 |
"/ commentEmphasis |
|
202 |
"/ defaultSyntaxColor |
|
203 |
"/ defaultSyntaxEmphasis |
|
204 |
"/ errorColor |
|
205 |
"/ globalIdentifierColor |
|
206 |
"/ globalIdentifierEmphasis |
|
207 |
"/ globalClassIdentifierColor |
|
208 |
"/ globalClassIdentifierEmphasis |
|
209 |
"/ hereColor |
|
210 |
"/ hereEmphasis |
|
211 |
"/ identifierColor |
|
212 |
"/ identifierEmphasis |
|
213 |
"/ instVarIdentifierColor |
|
214 |
"/ instVarIdentifierEmphasis |
|
215 |
"/ localIdentifierColor |
|
216 |
"/ localIdentifierEmphasis |
|
217 |
"/ methodSelectorColor |
|
218 |
"/ methodSelectorEmphasis |
|
219 |
"/ poolVariableIdentifierColor |
|
220 |
"/ poolVariableIdentifierEmphasis |
|
221 |
"/ returnColor |
|
222 |
"/ returnEmphasis |
|
223 |
"/ selectorColor |
|
224 |
"/ selectorEmphasis |
|
225 |
"/ selfColor |
|
226 |
"/ selfEmphasis |
|
227 |
"/ stringColor |
|
228 |
"/ stringEmphasis |
|
229 |
"/ superColor |
|
230 |
"/ superEmphasis |
|
231 |
"/ symbolColor |
|
232 |
"/ symbolEmphasis |
|
233 |
"/ thisContextColor |
|
234 |
"/ thisContextEmphasis |
|
235 |
"/ unknownIdentifierColor |
|
236 |
"/ unknownIdentifierEmphasis |
|
237 |
"/ unimplementedSelectorColor |
|
238 |
"/ unimplementedSelectorEmphasis |
|
239 |
"/ sideEffectAssignmentBackgroundColor |
|
240 |
"/ sideEffectAssignmentColor |
|
241 |
"/ colorForInstrumentedFullyCoveredCode |
|
242 |
"/ emphasisForInstrumentedFullyCoveredCode |
|
243 |
"/ colorForInstrumentedPartiallyCoveredCode |
|
244 |
"/ emphasisForInstrumentedPartiallyCoveredCode |
|
245 |
"/ colorForInstrumentedNeverCalledCode |
|
246 |
"/ emphasisForInstrumentedNeverCalledCode |
|
247 |
"/ ) |
|
4342
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
248 |
|
14007 | 249 |
"Modified: / 14-02-2012 / 10:17:46 / cg" |
4342
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
250 |
! |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
251 |
|
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
252 |
syntaxColorNames |
3364 | 253 |
"returns the syntax colors for the settings in the launcher" |
254 |
||
17359 | 255 |
^ self syntaxColorNamesAndKeys collect:#first. |
256 |
||
257 |
"/"/ warning, the strings below are presented to the user |
|
258 |
"/"/ as the syntax-color boxes comboList - however, they are |
|
259 |
"/"/ also used (without separators) as key into myself. |
|
260 |
"/"/ Therefore, do not change the strings below. |
|
261 |
"/"/ I know - this is bad coding .... |
|
262 |
"/ |
|
263 |
"/^#( |
|
264 |
"/'Argument Identifier Color' |
|
265 |
"/'Boolean Constant Color' |
|
266 |
"/'Bracket Color' |
|
267 |
"/'Class Variable Identifier Color' |
|
268 |
"/'Collection Enumeration Selector Color' |
|
269 |
"/'Constant Color' |
|
270 |
"/'Control Flow Selector Color' |
|
271 |
"/'Comment Color' |
|
272 |
"/'Debug Selector Color' |
|
273 |
"/'Error Raising Selector Color' |
|
274 |
"/'Global Identifier Color' |
|
275 |
"/'Global Class Identifier Color' |
|
276 |
"/'Here Color' |
|
277 |
"/'Identifier Color' |
|
278 |
"/'InstVar Identifier Color' |
|
279 |
"/'Local Identifier Color' |
|
280 |
"/'Method Selector Color' |
|
281 |
"/'Pool Variable Identifier Color' |
|
282 |
"/'Return Color' |
|
283 |
"/'Selector Color' |
|
284 |
"/'Self Color' |
|
285 |
"/'Side Effect Assignment Color' |
|
286 |
"/'Side Effect Assignment Background Color' |
|
287 |
"/'String Color' |
|
288 |
"/'Super Color' |
|
289 |
"/'Symbol Color' |
|
290 |
"/'This Context Color' |
|
291 |
"/'Unknown Identifier Color' |
|
292 |
"/'Unimplemented Selector Color' |
|
293 |
"/'Side Effect Assignment Color' |
|
294 |
"/'Coverage: Reached Color' |
|
295 |
"/'Coverage: Partially Reached Color' |
|
296 |
"/'Coverage: Unreached Color' |
|
297 |
"/) |
|
3364 | 298 |
|
14012 | 299 |
"Modified: / 14-02-2012 / 15:51:38 / cg" |
17359 | 300 |
! |
301 |
||
302 |
syntaxColorNamesAndKeys |
|
303 |
"returns the names and keys of syntax color items" |
|
304 |
||
305 |
^#( |
|
18262 | 306 |
( |
307 |
'Argument Identifier Color' |
|
308 |
argumentIdentifierColor |
|
309 |
argumentIdentifierEmphasis |
|
310 |
) |
|
311 |
( |
|
312 |
'Boolean Constant Color' |
|
313 |
booleanConstantColor |
|
314 |
booleanConstantEmphasis |
|
315 |
) |
|
316 |
( |
|
317 |
'Bracket Color' |
|
318 |
bracketColor |
|
319 |
bracketEmphasis |
|
320 |
) |
|
321 |
( |
|
322 |
'Class Variable Identifier Color' |
|
323 |
classVariableIdentifierColor |
|
324 |
classVariableIdentifierEmphasis |
|
325 |
) |
|
326 |
( |
|
327 |
'Constant Color' |
|
328 |
constantColor |
|
329 |
constantEmphasis |
|
330 |
) |
|
331 |
( |
|
332 |
'Control Flow Selector Color' |
|
333 |
controlFlowSelectorColor |
|
334 |
controlFlowSelectorEmphasis |
|
335 |
) |
|
336 |
( |
|
337 |
'Comment Color' |
|
338 |
commentColor |
|
339 |
commentEmphasis |
|
340 |
) |
|
341 |
( |
|
342 |
'Collection Enumeration Selector Color' |
|
343 |
collectionEnumerationSelectorColor |
|
344 |
collectionEnumerationSelectorEmphasis |
|
345 |
) |
|
346 |
( |
|
347 |
'Debug Selector Color' |
|
348 |
debugSelectorColor |
|
349 |
debugSelectorEmphasis |
|
350 |
) |
|
351 |
( |
|
352 |
'Default Syntax Color' |
|
353 |
defaultSyntaxColor |
|
354 |
defaultSyntaxEmphasis |
|
355 |
) |
|
356 |
( |
|
357 |
'Error Raising Selector Color' |
|
358 |
errorColor |
|
359 |
errorEmphasis |
|
360 |
) |
|
361 |
( |
|
362 |
'Global Identifier Color' |
|
363 |
globalIdentifierColor |
|
364 |
globalIdentifierEmphasis |
|
365 |
) |
|
366 |
( |
|
367 |
'Global Class Identifier Color' |
|
368 |
globalClassIdentifierColor |
|
369 |
globalClassIdentifierEmphasis |
|
370 |
) |
|
371 |
( |
|
372 |
'Here Color' |
|
373 |
hereColor |
|
374 |
hereEmphasis |
|
375 |
) |
|
376 |
( |
|
377 |
'Identifier Color' |
|
378 |
identifierColor |
|
379 |
identifierEmphasis |
|
380 |
) |
|
381 |
( |
|
382 |
'InstVar Identifier Color' |
|
383 |
instVarIdentifierColor |
|
384 |
instVarIdentifierEmphasis |
|
385 |
) |
|
386 |
( |
|
387 |
'Local Identifier Color' |
|
388 |
localIdentifierColor |
|
389 |
localIdentifierEmphasis |
|
390 |
) |
|
391 |
( |
|
392 |
'Method Selector Color' |
|
393 |
methodSelectorColor |
|
394 |
methodSelectorEmphasis |
|
395 |
) |
|
396 |
( |
|
397 |
'Pool Variable Identifier Color' |
|
398 |
poolVariableIdentifierColor |
|
399 |
poolVariableIdentifierEmphasis |
|
400 |
) |
|
401 |
( |
|
402 |
'Return Color' |
|
403 |
returnColor |
|
404 |
returnEmphasis |
|
405 |
) |
|
406 |
( |
|
407 |
'Selector Color' |
|
408 |
selectorColor |
|
409 |
selectorEmphasis |
|
410 |
) |
|
411 |
( |
|
412 |
'Self Color' |
|
413 |
selfColor |
|
414 |
selfEmphasis |
|
415 |
) |
|
416 |
( |
|
417 |
'String Color' |
|
418 |
stringColor |
|
419 |
stringEmphasis |
|
420 |
) |
|
421 |
( |
|
422 |
'Super Color' |
|
423 |
superColor |
|
424 |
superEmphasis |
|
425 |
) |
|
426 |
( |
|
427 |
'Symbol Color' |
|
428 |
symbolColor |
|
429 |
symbolEmphasis |
|
430 |
) |
|
431 |
( |
|
432 |
'This Context Color' |
|
433 |
thisContextColor |
|
434 |
thisContextEmphasis |
|
435 |
) |
|
436 |
( |
|
437 |
'Unknown Identifier Color' |
|
438 |
unknownIdentifierColor |
|
439 |
unknownIdentifierEmphasis |
|
440 |
) |
|
441 |
( |
|
442 |
'Unimplemented Selector Color' |
|
443 |
unimplementedSelectorColor |
|
444 |
unimplementedSelectorEmphasis |
|
445 |
) |
|
446 |
( |
|
447 |
'Side Effect Assignment Color' |
|
448 |
sideEffectAssignmentColor |
|
449 |
sideEffectAssignmentColorEmphasis |
|
450 |
) |
|
451 |
( |
|
452 |
'Side Effect Assignment Background Color' |
|
453 |
sideEffectAssignmentBackgroundColor |
|
454 |
sideEffectAssignmentBackgroundColorEmphasis |
|
455 |
) |
|
456 |
( |
|
457 |
'Coverage: Reached Color' |
|
458 |
colorForInstrumentedFullyCoveredCode |
|
459 |
emphasisForInstrumentedFullyCoveredCode |
|
460 |
) |
|
461 |
( |
|
462 |
'Coverage: Partially Reached Color' |
|
463 |
colorForInstrumentedPartiallyCoveredCode |
|
464 |
emphasisForInstrumentedPartiallyCoveredCode |
|
465 |
) |
|
466 |
( |
|
467 |
'Coverage: Unreached Color' |
|
468 |
colorForInstrumentedNeverCalledCode |
|
469 |
emphasisForInstrumentedNeverCalledCode |
|
470 |
) |
|
17359 | 471 |
) |
472 |
||
473 |
"Modified: / 14-02-2012 / 10:17:46 / cg" |
|
3347 | 474 |
! ! |
475 |
||
13399 | 476 |
!UserPreferences class methodsFor:'accessing - defaults'! |
477 |
||
478 |
defaultUserSettingsFile |
|
16651 | 479 |
^ (Filename usersPrivateSmalltalkDirectory) / 'settings.stx' |
13399 | 480 |
|
481 |
"Created: / 06-10-2008 / 08:27:15 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
18867 | 482 |
! |
483 |
||
484 |
defaultWorkspaceDirectory |
|
485 |
^ (Filename usersPrivateSmalltalkDirectory) / 'workspace' |
|
13399 | 486 |
! ! |
487 |
||
6019 | 488 |
!UserPreferences class methodsFor:'accessing defaultPrefs'! |
489 |
||
11006
fc11f0af9902
changed #showTipOfTheDayAtStartupHolder
Claus Gittinger <cg@exept.de>
parents:
11005
diff
changeset
|
490 |
defaultSettingsFilename |
fc11f0af9902
changed #showTipOfTheDayAtStartupHolder
Claus Gittinger <cg@exept.de>
parents:
11005
diff
changeset
|
491 |
^ 'settings.stx' |
fc11f0af9902
changed #showTipOfTheDayAtStartupHolder
Claus Gittinger <cg@exept.de>
parents:
11005
diff
changeset
|
492 |
! |
fc11f0af9902
changed #showTipOfTheDayAtStartupHolder
Claus Gittinger <cg@exept.de>
parents:
11005
diff
changeset
|
493 |
|
6763 | 494 |
fileBrowserClass |
22239 | 495 |
"the class to be used for file browsing |
496 |
(used to be the simple FileBrowser, but is now the FileBrowserV2)" |
|
12949
1780725fdc63
comment/format in: #fileBrowserClass
Claus Gittinger <cg@exept.de>
parents:
12947
diff
changeset
|
497 |
|
6763 | 498 |
^ self current fileBrowserClass |
499 |
||
500 |
" |
|
501 |
UserPreferences fileBrowserClass |
|
502 |
" |
|
12949
1780725fdc63
comment/format in: #fileBrowserClass
Claus Gittinger <cg@exept.de>
parents:
12947
diff
changeset
|
503 |
|
1780725fdc63
comment/format in: #fileBrowserClass
Claus Gittinger <cg@exept.de>
parents:
12947
diff
changeset
|
504 |
"Modified: / 17-07-2010 / 14:50:34 / cg" |
22239 | 505 |
"Modified (comment): / 01-09-2017 / 14:02:23 / cg" |
6763 | 506 |
! |
507 |
||
6019 | 508 |
systemBrowserClass |
509 |
^ self current systemBrowserClass |
|
510 |
||
511 |
" |
|
512 |
UserPreferences systemBrowserClass |
|
513 |
" |
|
514 |
! |
|
515 |
||
516 |
versionDiffViewerClass |
|
517 |
^ self current versionDiffViewerClass |
|
518 |
||
519 |
" |
|
520 |
UserPreferences versionDiffViewerClass |
|
521 |
" |
|
522 |
! ! |
|
523 |
||
7028 | 524 |
!UserPreferences class methodsFor:'saving'! |
525 |
||
17425 | 526 |
saveSettings:userPrefs in:fileNameOrString |
7028 | 527 |
"save settings to a settings-file." |
528 |
||
11143 | 529 |
"a temporary kludge for old classVariable-based settings |
7028 | 530 |
- all of those MUST go into the user-preferences dictionary eventually" |
531 |
||
17425 | 532 |
|screen fileName dir| |
533 |
||
534 |
fileName := fileNameOrString asFilename. |
|
7028 | 535 |
|
536 |
screen := Screen current. |
|
537 |
||
17425 | 538 |
(dir := fileName directory) exists ifFalse:[ |
18419 | 539 |
dir recursiveMakeDirectory. |
17417 | 540 |
]. |
17425 | 541 |
fileName writingFileDo:[:s| |
18419 | 542 |
s nextPutLine:'"/ ST/X saved settings'; |
543 |
nextPutLine:'"/ DO NOT MODIFY MANUALLY'; |
|
544 |
nextPutLine:'"/ (modifications would be lost with next save-settings)'; |
|
545 |
nextPutLine:'"/'; |
|
546 |
nextPutLine:'"/ this file was automatically generated by the'; |
|
547 |
nextPutLine:'"/ ''save settings'' function of the SettingsDialog'; |
|
548 |
nextPutLine:'"/'. |
|
549 |
s cr. |
|
550 |
||
551 |
s nextPutLine:'"/'. |
|
552 |
s nextPutLine:'"/ saved by ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName , ' at ' , Timestamp now printString. |
|
553 |
s nextPutLine:'"/'. |
|
554 |
s cr. |
|
555 |
||
556 |
s nextPutLine:'"/'. |
|
557 |
s nextPutLine:'"/ Display settings:'. |
|
558 |
s nextPutLine:'"/'. |
|
559 |
s nextPutLine:'"/ only restore the display settings, if on the same Display ...'. |
|
560 |
s nextPutLine:'Display notNil ifTrue:['. |
|
561 |
s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['. |
|
562 |
screen fixColors notNil ifTrue:[ |
|
563 |
s nextPutLine:' Image flushDeviceImages.'. |
|
564 |
s nextPutLine:' Color colorAllocationFailSignal catch:['. |
|
565 |
s nextPutLine:' Color getColorsRed:6 green:6 blue:4 on:Display'. |
|
566 |
s nextPutLine:' ].'. |
|
567 |
] ifFalse:[ |
|
568 |
s nextPutLine:' Display releaseFixColors.'. |
|
569 |
]. |
|
570 |
s nextPutLine:' Display hasColors: ' , (screen hasColors storeString) , '.'. |
|
571 |
s nextPutLine:' Display widthInMillimeter: ' , (screen widthInMillimeter storeString) , '.'. |
|
572 |
s nextPutLine:' Display heightInMillimeter: ' , (screen heightInMillimeter storeString) , '.'. |
|
573 |
s nextPutLine:' Display supportsDeepIcons: ' , (screen supportsDeepIcons storeString) , '.'. |
|
574 |
s nextPutLine:' Image ditherAlgorithm: ' , (Image ditherAlgorithm storeString) , '.'. |
|
575 |
s nextPutLine:' View defaultStyle:' , View defaultStyle storeString , '.'. |
|
576 |
s nextPutLine:' ].'. |
|
577 |
s nextPutLine:'].'. |
|
578 |
s cr. |
|
579 |
||
580 |
s nextPutLine:'"/'. |
|
581 |
s nextPutLine:'"/ Parser/Compiler settings:'. |
|
582 |
s nextPutLine:'"/'. |
|
583 |
s nextPutLine:'ParserFlags warnSTXSpecials: ' , (ParserFlags warnSTXSpecials storeString) , '.'; |
|
584 |
nextPutLine:'ParserFlags warnings: ' , (ParserFlags warnings storeString) , '.'; |
|
585 |
nextPutLine:'ParserFlags warnUnderscoreInIdentifier: ' , (ParserFlags warnUnderscoreInIdentifier storeString) , '.'; |
|
586 |
nextPutLine:'ParserFlags warnOldStyleAssignment: ' , (ParserFlags warnOldStyleAssignment storeString) , '.'; |
|
587 |
nextPutLine:'ParserFlags warnCommonMistakes: ' , (ParserFlags warnCommonMistakes storeString) , '.'; |
|
588 |
nextPutLine:'ParserFlags warnPossibleIncompatibilities: ' , (ParserFlags warnPossibleIncompatibilities storeString) , '.'; |
|
589 |
nextPutLine:'ParserFlags allowUnderscoreInIdentifier: ' , (ParserFlags allowUnderscoreInIdentifier storeString) , '.'; |
|
590 |
nextPutLine:'ParserFlags allowSqueakExtensions: ' , (ParserFlags allowSqueakExtensions storeString) , '.'; |
|
591 |
nextPutLine:'ParserFlags allowDolphinExtensions: ' , (ParserFlags allowDolphinExtensions storeString) , '.'; |
|
592 |
nextPutLine:'ParserFlags allowQualifiedNames: ' , (ParserFlags allowQualifiedNames storeString) , '.'; |
|
21643 | 593 |
nextPutLine:'ParserFlags stringsAreImmutable: ' , (ParserFlags stringsAreImmutable storeString) , '.'; |
18419 | 594 |
nextPutLine:'ParserFlags arraysAreImmutable: ' , (ParserFlags arraysAreImmutable storeString) , '.'; |
595 |
nextPutLine:'ParserFlags lineNumberInfo: ' , (ParserFlags lineNumberInfo storeString) , '.'; |
|
596 |
||
597 |
nextPutLine:'Compiler foldConstants: ' , (Compiler foldConstants storeString) , '.'; |
|
598 |
nextPutLine:'ParserFlags stcCompilation: ' , (ParserFlags stcCompilation storeString) , '.'; |
|
599 |
nextPutLine:'OperatingSystem getOSType = ' , (OperatingSystem getOSType storeString) , ' ifTrue:['; |
|
600 |
nextPutLine:' ParserFlags stcCompilationDefines: ' , (ParserFlags stcCompilationDefines storeString) , '.'; |
|
601 |
nextPutLine:' ParserFlags stcCompilationOptions: ' , (ParserFlags stcCompilationOptions storeString) , '.'; |
|
19310 | 602 |
nextPutLine:' ParserFlags ccCompilationOptions: ' , (ParserFlags ccCompilationOptions storeString) , '.'; |
603 |
nextPutLine:' ParserFlags makeCommand: ' , (ParserFlags makeCommand storeString) , '.'; |
|
19493 | 604 |
nextPutLine:' ExternalAddress pointerSize = ' , (ExternalAddress pointerSize storeString) , ' ifTrue:['; |
19310 | 605 |
nextPutLine:' ParserFlags stcCompilationIncludes: ' , (ParserFlags stcCompilationIncludes storeString) , '.'; |
606 |
nextPutLine:' ',(ParserFlags stcModulePath ? 'modules') storeString , ' asFilename exists ifTrue:['; |
|
607 |
nextPutLine:' ParserFlags stcModulePath: ' , (ParserFlags stcModulePath ? 'modules') storeString , '.'; |
|
608 |
nextPutLine:' ].'; |
|
609 |
nextPutLine:' ParserFlags stcPath: ' , (ParserFlags stcPath storeString) , '.'; |
|
610 |
nextPutLine:' ParserFlags ccPath: ' , (ParserFlags ccPath storeString) , '.'; |
|
611 |
nextPutLine:' ParserFlags linkArgs: ' , (ParserFlags linkArgs storeString) , '.'; |
|
612 |
nextPutLine:' ParserFlags linkSharedArgs: ' , (ParserFlags linkSharedArgs storeString) , '.'; |
|
613 |
nextPutLine:' ParserFlags linkCommand: ' , (ParserFlags linkCommand storeString) , '.'; |
|
614 |
nextPutLine:' ParserFlags libPath: ' , (ParserFlags libPath storeString) , '.'; |
|
615 |
nextPutLine:' ParserFlags searchedLibraries: ' , (ParserFlags searchedLibraries storeString) , '.'; |
|
18419 | 616 |
nextPutLine:' ].'; |
617 |
nextPutLine:'].'; |
|
618 |
||
619 |
nextPutLine:'ObjectMemory justInTimeCompilation: ' , (ObjectMemory justInTimeCompilation storeString) , '.'; |
|
620 |
nextPutLine:'ObjectMemory fullSingleStepSupport: ' , (ObjectMemory fullSingleStepSupport storeString) , '.'. |
|
621 |
||
622 |
HistoryManager notNil ifTrue:[ |
|
623 |
HistoryManager isActive ifTrue:[ |
|
624 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager activate].'. |
|
625 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager fullHistoryUpdate:' , HistoryManager fullHistoryUpdate storeString , '].'. |
|
626 |
] ifFalse:[ |
|
627 |
s nextPutLine:'HistoryManager notNil ifTrue:[HistoryManager deactivate].'. |
|
628 |
]. |
|
629 |
]. |
|
630 |
||
631 |
s nextPutLine:'Class catchMethodRedefinitions: ' , (Class catchMethodRedefinitions storeString) , '.'. |
|
632 |
s nextPutLine:'ClassCategoryReader sourceMode: ' , (ClassCategoryReader sourceMode storeString) , '.'. |
|
633 |
||
634 |
s cr. |
|
635 |
s nextPutLine:'"/'. |
|
636 |
s nextPutLine:'"/ Info & Debug Messages:'. |
|
637 |
s nextPutLine:'"/'. |
|
638 |
s nextPutLine:'Smalltalk hasNoConsole ifFalse:[ ObjectMemory infoPrinting: ' , (ObjectMemory infoPrinting storeString) , '].'; |
|
639 |
nextPutLine:'ObjectMemory debugPrinting: ' , (ObjectMemory debugPrinting storeString) , '.'; |
|
640 |
nextPutLine:'Smalltalk hasNoConsole ifFalse:[ Object infoPrinting: ' , (Object infoPrinting storeString) , '].'; |
|
641 |
nextPutLine:'DeviceWorkstation errorPrinting: ' , (DeviceWorkstation errorPrinting storeString) , '.'. |
|
14307 | 642 |
|
643 |
"/ FlyByHelp isActive ifTrue:[ |
|
644 |
"/ s nextPutLine:'FlyByHelp start.' |
|
645 |
"/ ]. |
|
646 |
||
18419 | 647 |
s cr. |
648 |
s nextPutLine:'"/'. |
|
649 |
s nextPutLine:'"/ Edit settings:'. |
|
650 |
s nextPutLine:'"/'. |
|
651 |
"/ s nextPutLine:'EditTextView st80Mode: ' , (EditTextView st80Mode storeString) , '.'. |
|
652 |
"/ s nextPutLine:'TextView st80SelectMode: ' , (TextView st80SelectMode storeString) , '.'. |
|
653 |
s nextPutLine:'UserPreferences current syntaxColoring: ' , (userPrefs syntaxColoring storeString) , '.'. |
|
654 |
(ListView userDefaultTabPositions = ListView tab4Positions) ifTrue:[ |
|
655 |
s nextPutLine:'ListView userDefaultTabPositions:(ListView tab4Positions).'. |
|
656 |
] ifFalse:[ |
|
657 |
s nextPutLine:'ListView userDefaultTabPositions:(ListView tab8Positions).'. |
|
658 |
]. |
|
659 |
||
660 |
s nextPutLine:'"/'. |
|
661 |
s nextPutLine:'"/ User preference values:'. |
|
662 |
s nextPutLine:'"/'. |
|
663 |
userPrefs keysAndValuesDo:[:k :v | |
|
664 |
|putSelector| |
|
665 |
||
666 |
putSelector := (k , ':') asSymbolIfInterned. |
|
667 |
(UserPreferences includesSelector:putSelector) ifTrue:[ |
|
668 |
s nextPutAll:'UserPreferences current '; |
|
669 |
nextPutAll:putSelector. |
|
670 |
] ifFalse:[ |
|
671 |
s nextPutAll:'UserPreferences current at:'. |
|
672 |
k storeOn:s. |
|
673 |
s nextPutAll:' put:'. |
|
674 |
]. |
|
675 |
v storeOn:s. |
|
676 |
s nextPut:$.; cr. |
|
677 |
]. |
|
678 |
||
679 |
s cr. |
|
680 |
s nextPutLine:'"/'. |
|
681 |
s nextPutLine:'"/ GC settings:'. |
|
682 |
s nextPutLine:'"/'. |
|
683 |
s nextPutLine:'ObjectMemory newSpaceSize: ' , (ObjectMemory newSpaceSize storeString) , '.'; |
|
684 |
nextPutLine:'ObjectMemory dynamicCodeGCTrigger: ' , (ObjectMemory dynamicCodeGCTrigger storeString) , '.'; |
|
685 |
nextPutLine:'ObjectMemory freeSpaceGCAmount: ' , (ObjectMemory freeSpaceGCAmount storeString) , '.'; |
|
686 |
nextPutLine:'ObjectMemory freeSpaceGCLimit: ' , (ObjectMemory freeSpaceGCLimit storeString) , '.'; |
|
687 |
nextPutLine:'ObjectMemory incrementalGCLimit: ' , (ObjectMemory incrementalGCLimit storeString) , '.'; |
|
688 |
nextPutLine:'ObjectMemory oldSpaceCompressLimit: ' , (ObjectMemory oldSpaceCompressLimit storeString) , '.'; |
|
689 |
nextPutLine:'ObjectMemory oldSpaceIncrement: ' , (ObjectMemory oldSpaceIncrement storeString) , '.'. |
|
690 |
||
691 |
s cr. |
|
692 |
s nextPutLine:'"/'. |
|
693 |
s nextPutLine:'"/ Misc settings:'. |
|
694 |
s nextPutLine:'"/'. |
|
695 |
s nextPutLine:'Class keepMethodHistory: ' , (Class methodHistory notNil storeString) , '.'; |
|
696 |
nextPutLine:'Smalltalk logDoits: ' , (Smalltalk logDoits storeString) , '.'; |
|
697 |
nextPutLine:'Autoload compileLazy: ' , (Autoload compileLazy storeString) , '.'; |
|
698 |
nextPutLine:'Smalltalk loadBinaries: ' , (Smalltalk loadBinaries storeString) , '.'; |
|
699 |
nextPutLine:'StandardSystemView includeHostNameInLabel: ' , (StandardSystemView includeHostNameInLabel storeString) , '.'; |
|
700 |
||
20815 | 701 |
"/ claus - I don't think its a good idea to save those ... |
14307 | 702 |
"/ nextPutLine:'"/ Class updateChanges: ' , (Class updatingChanges storeString) , '.'; |
703 |
"/ nextPutLine:'"/ ObjectMemory nameForChanges: ' , (ObjectMemory nameForChanges storeString) , '.'; |
|
704 |
||
18419 | 705 |
nextPutLine:'StandardSystemView returnFocusWhenClosingModalBoxes: ' , (StandardSystemView returnFocusWhenClosingModalBoxes storeString) , '.'; |
706 |
nextPutLine:'StandardSystemView takeFocusWhenMapped: ' , (StandardSystemView takeFocusWhenMapped storeString) , '.'; |
|
707 |
nextPutLine:'Display notNil ifTrue:['; |
|
708 |
nextPutLine:' Display activateOnClick: ' , ((screen activateOnClick:nil) storeString) , '.'; |
|
709 |
nextPutLine:'].'; |
|
710 |
nextPutLine:'MenuView showAcceleratorKeys: ' , (MenuView showAcceleratorKeys storeString) , '.'; |
|
711 |
nextPutLine:'Class tryLocalSourceFirst: ' , (Class tryLocalSourceFirst storeString) , '.'. |
|
712 |
(NoHandlerError emergencyHandler == AbstractLauncherApplication notifyingEmergencyHandler) ifTrue:[ |
|
713 |
s nextPutLine:'NoHandlerError emergencyHandler:(AbstractLauncherApplication notifyingEmergencyHandler).'. |
|
714 |
]. |
|
715 |
Processor isTimeSlicing ifTrue:[ |
|
716 |
s nextPutLine:'Processor startTimeSlicing.'. |
|
717 |
s nextPutLine:('Processor supportDynamicPriorities:' , (Processor supportDynamicPriorities ? false) storeString , '.'). |
|
718 |
] ifFalse:[ |
|
719 |
s nextPutLine:'Processor stopTimeSlicing.'. |
|
720 |
]. |
|
721 |
||
722 |
s cr. |
|
723 |
s nextPutLine:'"/'. |
|
724 |
s nextPutLine:'"/ Printer settings:'. |
|
725 |
s nextPutLine:'"/'. |
|
726 |
Printer notNil ifTrue:[ |
|
727 |
s nextPutLine:'Printer := ' , (Printer name) , '.'. |
|
728 |
Printer supportsPrintingToCommand ifTrue:[ |
|
729 |
s nextPutLine:'Printer printCommand: ' , (Printer printCommand storeString) , '.'. |
|
730 |
]. |
|
731 |
Printer supportsPageSizes ifTrue:[ |
|
732 |
s nextPutLine:'Printer pageFormat: ' , (Printer pageFormat storeString) , '.'. |
|
733 |
s nextPutLine:'Printer landscape: ' , (Printer landscape storeString) , '.'. |
|
734 |
]. |
|
735 |
Printer supportsMargins ifTrue:[ |
|
736 |
s nextPutLine:'Printer topMargin: ' , (Printer topMargin storeString) , '.'. |
|
737 |
s nextPutLine:'Printer leftMargin: ' , (Printer leftMargin storeString) , '.'. |
|
738 |
s nextPutLine:'Printer rightMargin: ' , (Printer rightMargin storeString) , '.'. |
|
739 |
s nextPutLine:'Printer bottomMargin: ' , (Printer bottomMargin storeString) , '.'. |
|
740 |
]. |
|
741 |
Printer supportsPostscript ifTrue:[ |
|
742 |
s nextPutLine:'Printer supportsColor: ' , (Printer supportsColor storeString) , '.'. |
|
743 |
]. |
|
744 |
]. |
|
745 |
s cr. |
|
746 |
s nextPutLine:'"/'. |
|
747 |
s nextPutLine:'"/ Font settings:'. |
|
748 |
s nextPutLine:'"/ (only restored, if image is restarted on the same display)'. |
|
749 |
s nextPutLine:'"/'. |
|
750 |
s nextPutLine:'Display notNil ifTrue:['. |
|
751 |
s nextPutLine:' Display displayName = ' , (screen displayName storeString) , ' ifTrue:['. |
|
752 |
{ |
|
753 |
SimpleView . Label . CheckBox . CheckLabel . Button . Toggle . |
|
754 |
SelectionInListView . MenuView . MenuPanel . NoteBookView . PullDownMenu . |
|
755 |
TextView . EditTextView . CodeView |
|
756 |
} do:[:cls | |
|
757 |
s nextPutLine:' ',cls name,' defaultFont: ' , (cls defaultFont storeString) , '.'. |
|
758 |
]. |
|
759 |
s nextPutLine:' ].'. |
|
760 |
s nextPutLine:'].'. |
|
761 |
||
762 |
s cr. |
|
763 |
s nextPutLine:'"/'. |
|
764 |
s nextPutLine:'"/ SourceCodeManager settings:'. |
|
765 |
s nextPutLine:'"/ (repositories are networked nowadays, so the settings are host independent)'. |
|
766 |
s nextPutLine:'"/'. |
|
767 |
s nextPutLine:'Class tryLocalSourceFirst:' , Class tryLocalSourceFirst storeString , '.'. |
|
768 |
s nextPutLine:'AbstractSourceCodeManager notNil ifTrue:[AbstractSourceCodeManager cacheDirectoryName:' , AbstractSourceCodeManager cacheDirectoryName storeString , '].'. |
|
769 |
||
770 |
AbstractSourceCodeManager availableManagers do:[:eachManager | |
|
771 |
eachManager savePreferencesOn:s |
|
772 |
]. |
|
20243 | 773 |
|
18824 | 774 |
userPrefs useSystemLanguage ifFalse:[ |
18825 | 775 |
s nextPutAll:('Smalltalk language:',UserPreferences current language storeString). |
18826 | 776 |
s nextPutLine:(' territory:',UserPreferences current languageTerritory storeString,'.'). |
20243 | 777 |
]. |
18419 | 778 |
s syncData. |
19634 | 779 |
userPrefs beUnmodified. |
7028 | 780 |
]. |
781 |
||
782 |
" |
|
783 |
Transcript topView application saveSettings |
|
784 |
" |
|
785 |
||
9492 | 786 |
"Modified: / 09-08-2006 / 18:52:14 / fm" |
14358
0537cf5714b0
lineNumberInfo moved from parser to parserflags
Claus Gittinger <cg@exept.de>
parents:
14342
diff
changeset
|
787 |
"Modified: / 26-09-2012 / 13:33:47 / cg" |
21643 | 788 |
"Modified: / 13-03-2017 / 17:21:04 / mawalch" |
7028 | 789 |
! ! |
790 |
||
7549 | 791 |
!UserPreferences methodsFor:'accessing'! |
3883 | 792 |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
793 |
at:key |
13941 | 794 |
^ super at:key asSymbol |
795 |
||
796 |
"Created: / 15-01-2012 / 14:27:29 / cg" |
|
797 |
! |
|
798 |
||
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
799 |
at:key ifAbsent:exceptionValue |
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
800 |
^ super |
18262 | 801 |
at:key asSymbol |
802 |
ifAbsent:[ |
|
803 |
"/ Look to DefaultPreferences first... |
|
804 |
(DefaultPreferences notNil and:[self ~~ DefaultPreferences]) ifTrue:[ |
|
805 |
DefaultPreferences at:key ifAbsent:exceptionValue |
|
806 |
] ifFalse:[ |
|
807 |
exceptionValue value |
|
808 |
] |
|
809 |
]. |
|
13941 | 810 |
|
811 |
"Created: / 15-01-2012 / 14:27:21 / cg" |
|
17414
d2b54cba3e88
Changed preference lookup.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17398
diff
changeset
|
812 |
"Modified (format): / 05-02-2015 / 07:10:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13941 | 813 |
! |
814 |
||
5790 | 815 |
at:key put:value |
816 |
|classNameToCheck classToCheck| |
|
817 |
||
13119 | 818 |
"/ key isSymbol ifFalse:[ |
819 |
"/ self halt. |
|
820 |
"/ self at:key asSymbol put:value. |
|
821 |
"/ ^ self |
|
822 |
"/ ]. |
|
823 |
||
6059 | 824 |
value == true ifTrue:[ |
18262 | 825 |
key == #useNewVersionDiffBrowser ifTrue:[ |
826 |
classNameToCheck := #'VersionDiffBrowser'. |
|
827 |
]. |
|
828 |
key == #useNewChangesBrowser ifTrue:[ |
|
829 |
classNameToCheck := #'NewChangesBrowser'. |
|
830 |
]. |
|
831 |
key == #useNewFileBrowser ifTrue:[ |
|
832 |
classNameToCheck := #'FileBrowserV2'. |
|
833 |
]. |
|
834 |
key == #useNewSystemBrowser ifTrue:[ |
|
835 |
classNameToCheck := #'Tools::NewSystemBrowser'. |
|
836 |
]. |
|
837 |
key == #useNewInspector ifTrue:[ |
|
838 |
classNameToCheck := #'NewInspector::NewInspectorView'. |
|
839 |
]. |
|
5790 | 840 |
]. |
841 |
||
5791 | 842 |
classNameToCheck notNil ifTrue:[ |
18262 | 843 |
classToCheck := Smalltalk at:classNameToCheck. |
844 |
classToCheck isNil ifTrue:[ |
|
845 |
('UserPreferences [warning]: no class ' , classNameToCheck , ' class in system.') errorPrintCR. |
|
846 |
] ifFalse:[ |
|
847 |
Autoload autoloadFailedSignal handle:[:ex | |
|
848 |
'UserPreferences [warning]: autoload of ' , classNameToCheck , ' failed.' errorPrintCR. |
|
849 |
] do:[ |
|
850 |
classToCheck autoload. |
|
851 |
] |
|
852 |
] |
|
5790 | 853 |
]. |
854 |
||
13941 | 855 |
^ super at:key asSymbol put:value |
856 |
||
857 |
"Modified: / 15-01-2012 / 14:26:53 / cg" |
|
19633 | 858 |
! |
859 |
||
860 |
beModified |
|
19634 | 861 |
"this is not needed for settings applications, which notice any modifications |
862 |
themself. Howvever, if someone else modifies the settings (programmatically), |
|
863 |
the change should be remembered, so that the user can be warned at session end" |
|
864 |
||
19633 | 865 |
modified := true |
866 |
! |
|
867 |
||
868 |
beUnmodified |
|
19634 | 869 |
"done when saved" |
870 |
||
19633 | 871 |
modified := false |
872 |
! |
|
873 |
||
874 |
isModified |
|
19634 | 875 |
"this is set, if someone modifies the settings programmatically, |
876 |
so that the user can be warned at session end" |
|
877 |
||
19633 | 878 |
^ modified ? false |
7549 | 879 |
! ! |
880 |
||
14342 | 881 |
!UserPreferences methodsFor:'accessing-locale'! |
882 |
||
883 |
dateInputFormat |
|
884 |
"return a format used when tools read a date from the user" |
|
885 |
||
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
886 |
^ self |
18262 | 887 |
at:#dateInputFormat |
888 |
ifAbsentPut:[ |
|
889 |
(self language == #en and:[ self languageTerritory ~= #en]) |
|
890 |
ifTrue:[ '%m %d %y' ] |
|
891 |
ifFalse:[ '%d %m %y' ] |
|
892 |
] |
|
14342 | 893 |
! |
894 |
||
895 |
dateInputFormat:aFormatString |
|
896 |
"return a format used when tools read a date from the user" |
|
897 |
||
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
898 |
^ self |
18262 | 899 |
at:#dateInputFormat |
900 |
ifAbsentPut:[ |
|
901 |
(self language == #en and:[ self languageTerritory ~= #en]) |
|
902 |
ifTrue:[ '%m %d %y' ] |
|
903 |
ifFalse:[ '%d %m %y' ] |
|
904 |
] |
|
14342 | 905 |
|
906 |
" |
|
907 |
UserPreferences current dateInputFormat:'%d %m %y' -- european |
|
908 |
UserPreferences current dateInputFormat:'%m %d %y' -- us |
|
909 |
" |
|
910 |
! |
|
911 |
||
912 |
decimalPointCharacter |
|
913 |
"toDo: migrate from ClassVar in Number; |
|
914 |
use this for new applications" |
|
915 |
||
20865 | 916 |
^ self at:#decimalPointCharacter ifAbsent:[ $. ] |
917 |
! |
|
918 |
||
919 |
decimalPointCharacter:aCharacter |
|
920 |
^ self at:#decimalPointCharacter put:aCharacter |
|
14342 | 921 |
! |
922 |
||
923 |
thousandsSeparatorCharacter |
|
924 |
"toDo: migrate from ClassVar elsewhere; |
|
925 |
use this for new applications" |
|
926 |
||
20865 | 927 |
^ self at:#thousandsSeparatorCharacter ifAbsent:[ $, ] |
928 |
! |
|
929 |
||
930 |
thousandsSeparatorCharacter:aCharacter |
|
931 |
^ self at:#thousandsSeparatorCharacter put:aCharacter |
|
14342 | 932 |
! ! |
933 |
||
14267 | 934 |
!UserPreferences methodsFor:'accessing-misc'! |
935 |
||
936 |
selectorNamespacesEnabled |
|
937 |
"Return true, if selector namespaces support is enabled |
|
938 |
for this system. Note, that this method may return true |
|
939 |
even if selector namespaces are not supported by this system. |
|
940 |
||
941 |
This is rather user setting. To ask whether the selector namespaces |
|
942 |
support should be used, use: |
|
943 |
||
18928 | 944 |
UserPreferences current selectorNamespacesSupportedAndEnabled |
945 |
" |
|
946 |
||
947 |
^self at:#selectorNamespacesEnabled ifAbsent:false. |
|
948 |
||
949 |
" |
|
950 |
UserPreferences current selectorNamespacesEnabled |
|
951 |
UserPreferences current selectorNamespacesSupportedAndEnabled |
|
952 |
||
953 |
UserPreferences current selectorNamespacesEnabled: true. |
|
954 |
UserPreferences current selectorNamespacesEnabled: false. |
|
14267 | 955 |
" |
956 |
||
957 |
"Created: / 19-07-2012 / 15:26:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
958 |
! |
|
959 |
||
960 |
selectorNamespacesEnabled: aBoolean |
|
961 |
"Enables/disables selector namespaces support for this system. |
|
962 |
Please note that even if selector namespaces are enabled here, |
|
963 |
they may not be supported by the system/VM. |
|
964 |
||
965 |
This is rather user setting. To ask whether the selector namespaces |
|
966 |
are supported use |
|
967 |
||
18262 | 968 |
ConfigurableFeatures includesFeature:#SelectorNamespaces |
14267 | 969 |
" |
970 |
||
971 |
self at:#selectorNamespacesEnabled put: aBoolean |
|
972 |
||
973 |
" |
|
18262 | 974 |
UserPreferences current selectorNamespacesEnabled |
975 |
UserPreferences current selectorNamespacesSupportedAndEnabled |
|
976 |
||
977 |
UserPreferences current selectorNamespacesEnabled: true. |
|
978 |
UserPreferences current selectorNamespacesEnabled: false. |
|
14267 | 979 |
" |
980 |
||
981 |
"Created: / 19-07-2012 / 15:27:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
982 |
! |
|
983 |
||
984 |
selectorNamespacesSupportedAndEnabled |
|
985 |
"Return true, if selector namespaces are both enabled |
|
986 |
and supported by this system/VM, false otherwise |
|
987 |
" |
|
988 |
||
989 |
^ (ConfigurableFeatures includesFeature:#SelectorNamespaces) |
|
18262 | 990 |
and:[self selectorNamespacesEnabled] |
991 |
||
992 |
" |
|
993 |
UserPreferences current selectorNamespacesEnabled |
|
994 |
UserPreferences current selectorNamespacesSupportedAndEnabled |
|
995 |
||
996 |
UserPreferences current selectorNamespacesEnabled: true. |
|
997 |
UserPreferences current selectorNamespacesEnabled: false. |
|
14267 | 998 |
" |
999 |
||
1000 |
"Created: / 19-07-2012 / 15:32:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1001 |
! ! |
|
1002 |
||
10723 | 1003 |
!UserPreferences methodsFor:'accessing-misc-communication'! |
1004 |
||
11023 | 1005 |
dotNetBridgeRunsInIDE |
11930 | 1006 |
"a debugging flag: if true, the dotNetBridge is assumed to be |
1007 |
already running and the bridge-exe will not be started by st/x" |
|
1008 |
||
11023 | 1009 |
^ self at:#dotNetBridgeRunsInIDE ifAbsent:false |
1010 |
! |
|
1011 |
||
1012 |
dotNetBridgeRunsInIDE:aBoolean |
|
11930 | 1013 |
"a debugging flag: if true, the dotNetBridge is assumed to be |
1014 |
already running and the bridge-exe will not be started by st/x" |
|
1015 |
||
11023 | 1016 |
^ self at:#dotNetBridgeRunsInIDE put:aBoolean |
1017 |
! |
|
1018 |
||
1019 |
dotNetBridgeVerbose |
|
1020 |
^ self at:#dotNetBridgeVerbose ifAbsent:false |
|
11027 | 1021 |
|
1022 |
" |
|
1023 |
UserPreferences current dotNetBridgeVerbose |
|
1024 |
" |
|
11023 | 1025 |
! |
1026 |
||
1027 |
dotNetBridgeVerbose:aBoolean |
|
1028 |
^ self at:#dotNetBridgeVerbose put:aBoolean |
|
1029 |
! |
|
1030 |
||
11930 | 1031 |
javaBridgeRunsInIDE |
1032 |
"a debugging flag: if true, the javaBridge is assumed to be |
|
1033 |
already running and the bridge-exe will not be started by st/x" |
|
1034 |
||
1035 |
^ self at:#javaBridgeRunsInIDE ifAbsent:false |
|
1036 |
! |
|
1037 |
||
1038 |
javaBridgeRunsInIDE:aBoolean |
|
1039 |
"a debugging flag: if true, the javaBridge is assumed to be |
|
1040 |
already running and the bridge-exe will not be started by st/x" |
|
1041 |
||
1042 |
^ self at:#javaBridgeRunsInIDE put:aBoolean |
|
1043 |
! |
|
1044 |
||
12792 | 1045 |
logHTTPRequests |
1046 |
^ self at:#logHTTPRequests ifAbsent:false |
|
1047 |
! |
|
1048 |
||
1049 |
logHTTPRequests:aBoolean |
|
1050 |
^ self at:#logHTTPRequests put:aBoolean |
|
1051 |
||
1052 |
" |
|
1053 |
UserPreferences current logHTTPRequests |
|
1054 |
UserPreferences current logHTTPRequests:true |
|
1055 |
UserPreferences current logHTTPRequests:false |
|
1056 |
" |
|
1057 |
! |
|
1058 |
||
1059 |
logSOAPRequests |
|
12793 | 1060 |
^ (self soapLoggingLevel ? 0) > 0 |
12792 | 1061 |
! |
1062 |
||
1063 |
logSOAPRequests:aBoolean |
|
12793 | 1064 |
self soapLoggingLevel:(aBoolean ifTrue:3 ifFalse:0) |
12792 | 1065 |
|
1066 |
" |
|
1067 |
UserPreferences current logSOAPRequests |
|
1068 |
UserPreferences current logSOAPRequests:true |
|
1069 |
UserPreferences current logSOAPRequests:false |
|
1070 |
" |
|
1071 |
! |
|
1072 |
||
19386 | 1073 |
smallteamViaXMPPEnabled |
1074 |
^ self at:#smallteamViaXMPPEnabled ifAbsent:false |
|
1075 |
! |
|
1076 |
||
1077 |
smallteamViaXMPPEnabled:aBoolean |
|
1078 |
self at:#smallteamViaXMPPEnabled put:aBoolean |
|
1079 |
! |
|
1080 |
||
1081 |
smallteamXMPPPassword |
|
1082 |
^ self at:#smallteamXMPPPassword ifAbsent:[ '' ] |
|
1083 |
! |
|
1084 |
||
1085 |
smallteamXMPPPassword:aPasswordString |
|
1086 |
self at:#smallteamXMPPPassword put:aPasswordString |
|
1087 |
! |
|
1088 |
||
1089 |
smallteamXMPPServer |
|
1090 |
^ self at:#smallteamXMPPServer ifAbsent:[ 'exept.de' ] |
|
1091 |
! |
|
1092 |
||
1093 |
smallteamXMPPServer:aHostname |
|
1094 |
self at:#smallteamXMPPServer put:aHostname |
|
19391 | 1095 |
|
1096 |
" |
|
1097 |
UserPreferences current smallteamXMPPUser:'exept.de'. |
|
1098 |
" |
|
19386 | 1099 |
! |
1100 |
||
1101 |
smallteamXMPPUser |
|
1102 |
^ self at:#smallteamXMPPUser ifAbsent:[ OperatingSystem getLoginName ] |
|
1103 |
! |
|
1104 |
||
1105 |
smallteamXMPPUser:aUsernameString |
|
1106 |
self at:#smallteamXMPPUser put:aUsernameString |
|
19391 | 1107 |
|
1108 |
" |
|
1109 |
UserPreferences current smallteamXMPPUser:'cg'. |
|
1110 |
" |
|
19386 | 1111 |
! |
1112 |
||
10723 | 1113 |
smtpServerName |
1114 |
^ self at:#smtpServerName ifAbsent:nil |
|
1115 |
||
1116 |
"Created: / 20-09-2007 / 15:59:20 / cg" |
|
1117 |
! |
|
1118 |
||
1119 |
smtpServerName:aHostnameString |
|
1120 |
^ self at:#smtpServerName put:aHostnameString |
|
1121 |
||
1122 |
" |
|
1123 |
UserPreferences current smtpServerName |
|
1124 |
UserPreferences current smtpServerName:'mailhost' |
|
1125 |
" |
|
1126 |
||
1127 |
"Created: / 20-09-2007 / 15:59:58 / cg" |
|
12562 | 1128 |
! |
1129 |
||
12563 | 1130 |
soapErrorDebugging |
1131 |
"open a debugger on error, or report it as a soap-error" |
|
1132 |
||
1133 |
^ self at:#soapErrorDebugging ifAbsent:false |
|
1134 |
! |
|
1135 |
||
1136 |
soapErrorDebugging:aBoolean |
|
1137 |
"open a debugger on error, or report it as a soap-error" |
|
1138 |
^ self at:#soapErrorDebugging put:aBoolean |
|
12774
3d5e2c85faef
comment/format in: #soapErrorDebugging:
Claus Gittinger <cg@exept.de>
parents:
12619
diff
changeset
|
1139 |
|
3d5e2c85faef
comment/format in: #soapErrorDebugging:
Claus Gittinger <cg@exept.de>
parents:
12619
diff
changeset
|
1140 |
" |
3d5e2c85faef
comment/format in: #soapErrorDebugging:
Claus Gittinger <cg@exept.de>
parents:
12619
diff
changeset
|
1141 |
UserPreferences current soapErrorDebugging:true |
3d5e2c85faef
comment/format in: #soapErrorDebugging:
Claus Gittinger <cg@exept.de>
parents:
12619
diff
changeset
|
1142 |
" |
12563 | 1143 |
! |
1144 |
||
12562 | 1145 |
soapLoggingLevel |
20674 | 1146 |
^ self at:#soapLoggingLevel ifAbsent:[0] |
1147 |
||
1148 |
"Modified: / 16-10-2016 / 23:55:34 / cg" |
|
12562 | 1149 |
! |
1150 |
||
1151 |
soapLoggingLevel:anIntegerBetween0_and_3 |
|
1152 |
^ self at:#soapLoggingLevel put:anIntegerBetween0_and_3 |
|
13884 | 1153 |
! |
1154 |
||
1155 |
socksProxyHost |
|
1156 |
^ self at:#socksProxyHost ifAbsent:nil |
|
1157 |
||
1158 |
"Created: / 27-12-2011 / 14:40:27 / cg" |
|
1159 |
! |
|
1160 |
||
13885 | 1161 |
socksProxyHost:aString |
1162 |
^ self at:#socksProxyHost put:aString |
|
1163 |
||
1164 |
"Created: / 27-12-2011 / 14:42:15 / cg" |
|
1165 |
! |
|
1166 |
||
13884 | 1167 |
socksProxyPort |
1168 |
^ self at:#socksProxyPort ifAbsent:nil |
|
1169 |
||
1170 |
"Created: / 27-12-2011 / 14:40:32 / cg" |
|
13885 | 1171 |
! |
1172 |
||
1173 |
socksProxyPort:aNumber |
|
1174 |
^ self at:#socksProxyPort put:aNumber |
|
1175 |
||
1176 |
"Created: / 27-12-2011 / 14:42:29 / cg" |
|
10723 | 1177 |
! ! |
1178 |
||
7549 | 1179 |
!UserPreferences methodsFor:'accessing-pref''d tools'! |
5790 | 1180 |
|
13477
2cf9f960c33e
added: #changeSetBrowserClass
Claus Gittinger <cg@exept.de>
parents:
13470
diff
changeset
|
1181 |
changeSetBrowserClass |
15960 | 1182 |
|
1183 |
| class className | |
|
1184 |
||
1185 |
className := self at: #changeSetBrowserClassName ifAbsent:[nil]. |
|
1186 |
className notNil ifTrue:[ |
|
19576 | 1187 |
class := Smalltalk at: className asSymbol. |
1188 |
class notNil ifTrue:[ ^ class ]. |
|
15960 | 1189 |
]. |
1190 |
||
1191 |
"Original code" |
|
1192 |
^ ChangeSetBrowser. |
|
19576 | 1193 |
|
1194 |
"/ self useNewChangeSetBrowser ifTrue:[ |
|
1195 |
"/ ^ Tools::ChangeSetBrowser2 ? ChangeSetBrowser |
|
1196 |
"/ ]. |
|
1197 |
"/ ^ ChangeSetBrowser ? Tools::ChangeSetBrowser2 |
|
14252 | 1198 |
|
1199 |
" |
|
1200 |
self current changeSetBrowserClass |
|
1201 |
" |
|
13477
2cf9f960c33e
added: #changeSetBrowserClass
Claus Gittinger <cg@exept.de>
parents:
13470
diff
changeset
|
1202 |
|
2cf9f960c33e
added: #changeSetBrowserClass
Claus Gittinger <cg@exept.de>
parents:
13470
diff
changeset
|
1203 |
"Created: / 01-07-2011 / 16:33:13 / cg" |
13523 | 1204 |
"Modified: / 25-07-2011 / 12:21:42 / sr" |
15960 | 1205 |
"Modified: / 25-01-2012 / 17:11:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1206 |
! |
|
1207 |
||
1208 |
changeSetBrowserClass: aClass |
|
1209 |
||
1210 |
self at: #changeSetBrowserClassName put: aClass name. |
|
1211 |
||
1212 |
" |
|
18262 | 1213 |
UserPreferences current changeSetBrowserClass |
1214 |
UserPreferences current changeSetBrowserClass: Tools::ChangeSetBrowser2. |
|
1215 |
UserPreferences current changeSetBrowserClass: ChangeSetBrowser. |
|
15960 | 1216 |
" |
1217 |
||
1218 |
"Created: / 25-01-2012 / 17:08:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13477
2cf9f960c33e
added: #changeSetBrowserClass
Claus Gittinger <cg@exept.de>
parents:
13470
diff
changeset
|
1219 |
! |
2cf9f960c33e
added: #changeSetBrowserClass
Claus Gittinger <cg@exept.de>
parents:
13470
diff
changeset
|
1220 |
|
3883 | 1221 |
changesBrowserClass |
14252 | 1222 |
"the browser to be used for the changeFile" |
1223 |
||
15960 | 1224 |
| class className | |
1225 |
||
1226 |
className := self at: #changesBrowserClassName ifAbsent:[nil]. |
|
1227 |
className notNil ifTrue:[ |
|
18262 | 1228 |
class := Smalltalk at: className asSymbol. |
1229 |
class notNil ifTrue:[ ^ class ]. |
|
15960 | 1230 |
]. |
1231 |
||
1232 |
"/ Old code |
|
3883 | 1233 |
self useNewChangesBrowser ifTrue:[ |
18262 | 1234 |
^ (NewChangesBrowser ? ChangesBrowser) |
3883 | 1235 |
]. |
1236 |
^ ChangesBrowser |
|
1237 |
||
14252 | 1238 |
"Created: / 17-10-1998 / 14:37:46 / cg" |
15960 | 1239 |
"Modified: / 25-01-2012 / 17:11:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1240 |
! |
|
1241 |
||
1242 |
changesBrowserClass: aClass |
|
1243 |
||
1244 |
self at: #changesBrowserClassName put: aClass name. |
|
1245 |
||
1246 |
" |
|
18262 | 1247 |
UserPreferences current changesBrowserClass |
1248 |
UserPreferences current changesBrowserClass: Tools::ChangeSetBrowser2. |
|
1249 |
UserPreferences current changesBrowserClass: ChangeSetBrowser. |
|
15960 | 1250 |
" |
1251 |
||
1252 |
"Created: / 25-01-2012 / 17:12:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5535 | 1253 |
! |
1254 |
||
14735 | 1255 |
externalDiffCommandTemplate |
1256 |
"the external command to use for diff" |
|
1257 |
||
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
1258 |
^ self |
18262 | 1259 |
at:#externalDiffCommandTemplate |
1260 |
ifAbsent:[ |
|
1261 |
OperatingSystem isMSDOSlike ifTrue:[ |
|
1262 |
'diff %1 %2' |
|
1263 |
] ifFalse:[ |
|
1264 |
'diff -b %1 %2' |
|
1265 |
] |
|
1266 |
] |
|
14735 | 1267 |
|
14736 | 1268 |
" |
1269 |
UserPreferences current externalDiffCommandTemplate |
|
1270 |
" |
|
1271 |
||
14735 | 1272 |
"Modified: / 13-10-1998 / 15:53:05 / cg" |
1273 |
"Created: / 26-07-2012 / 15:06:31 / cg" |
|
1274 |
! |
|
1275 |
||
1276 |
externalDiffCommandTemplate:aString |
|
1277 |
"the external command to use for diff. |
|
1278 |
The default is 'diff %1 %2' on msdos and 'diff -b %1 %2' on unix" |
|
1279 |
||
1280 |
self at:#externalDiffCommandTemplate put:aString |
|
1281 |
||
1282 |
" |
|
1283 |
UserPreferences current externalDiffCommandTemplate |
|
1284 |
" |
|
1285 |
! |
|
1286 |
||
6177 | 1287 |
inspectorClassSetting |
1288 |
self useNewInspector ifTrue:[ |
|
11143 | 1289 |
^ (NewInspector::NewInspectorView ? InspectorView) |
6177 | 1290 |
]. |
1291 |
^ InspectorView |
|
1292 |
||
1293 |
"Modified: / 12.11.2001 / 15:47:35 / cg" |
|
1294 |
"Created: / 12.11.2001 / 15:49:00 / cg" |
|
5541 | 1295 |
! |
1296 |
||
11005 | 1297 |
showTipOfTheDayAtStartup |
1298 |
^ self at:#showTipOfTheDayAtStartup ifAbsent:false |
|
1299 |
! |
|
1300 |
||
1301 |
showTipOfTheDayAtStartup:aBoolean |
|
1302 |
self at:#showTipOfTheDayAtStartup put:aBoolean. |
|
1303 |
! |
|
1304 |
||
5535 | 1305 |
systemBrowserClass |
1306 |
self useNewSystemBrowser ifTrue:[ |
|
11143 | 1307 |
^ ((Tools::NewSystemBrowser ? NewSystemBrowser) ? SystemBrowser) |
5535 | 1308 |
]. |
1309 |
^ SystemBrowser |
|
5536 | 1310 |
! |
1311 |
||
13502 | 1312 |
testRunnerClass |
1313 |
self useTestRunner2 ifTrue:[ |
|
18262 | 1314 |
^ Tools::TestRunner2 ? TestRunner |
13502 | 1315 |
]. |
1316 |
^ TestRunner |
|
1317 |
||
1318 |
"Created: / 06-07-2011 / 13:55:03 / cg" |
|
1319 |
! |
|
1320 |
||
13486 | 1321 |
useInspector2 |
1322 |
"using brand new or old inspector" |
|
1323 |
||
1324 |
^ self at:#useInspector2 ifAbsent:false |
|
1325 |
||
1326 |
" |
|
1327 |
UserPreferences current useInspector2 |
|
1328 |
" |
|
1329 |
||
1330 |
"Modified: / 17-10-1998 / 14:45:12 / cg" |
|
1331 |
"Created: / 03-07-2011 / 22:35:50 / cg" |
|
1332 |
! |
|
1333 |
||
1334 |
useInspector2:aBoolean |
|
1335 |
"using very new or old inspector" |
|
1336 |
||
1337 |
self at:#useInspector2 put:aBoolean |
|
1338 |
||
1339 |
" |
|
1340 |
UserPreferences current useInspector2 |
|
1341 |
" |
|
1342 |
||
1343 |
"Created: / 03-07-2011 / 22:36:13 / cg" |
|
1344 |
! |
|
1345 |
||
10924 | 1346 |
useNativeFileDialog |
13047 | 1347 |
^ self nativeFileDialogs |
1348 |
||
1349 |
"Modified: / 24-08-2010 / 17:02:10 / sr" |
|
10924 | 1350 |
! |
1351 |
||
1352 |
useNativeFileDialog:aBoolean |
|
13047 | 1353 |
self nativeFileDialogs:aBoolean |
1354 |
||
1355 |
"Modified: / 24-08-2010 / 17:02:13 / sr" |
|
10924 | 1356 |
! |
1357 |
||
14252 | 1358 |
useNewChangeSetBrowser |
1359 |
"using old or jan's changeSetBrowser for package diffs" |
|
1360 |
||
1361 |
^ self at:#useNewChangeSetBrowser ifAbsent:false |
|
1362 |
||
1363 |
"Modified: / 13-10-1998 / 15:53:05 / cg" |
|
1364 |
"Created: / 26-07-2012 / 15:06:31 / cg" |
|
1365 |
! |
|
1366 |
||
1367 |
useNewChangeSetBrowser:aBoolean |
|
1368 |
"using old or jan's changeSetBrowser for package diffs" |
|
1369 |
||
1370 |
^ self at:#useNewChangeSetBrowser put:aBoolean |
|
1371 |
||
1372 |
"Created: / 26-07-2012 / 15:06:50 / cg" |
|
1373 |
! |
|
1374 |
||
5536 | 1375 |
useNewChangesBrowser |
14252 | 1376 |
"using new or old change browser for the changes file" |
5536 | 1377 |
|
9302 | 1378 |
^ self at:#useNewChangesBrowser ifAbsent:false |
5536 | 1379 |
|
14252 | 1380 |
"Modified: / 13-10-1998 / 15:53:05 / cg" |
1381 |
"Modified (comment): / 26-07-2012 / 15:04:37 / cg" |
|
5536 | 1382 |
! |
1383 |
||
1384 |
useNewChangesBrowser:aBoolean |
|
14252 | 1385 |
"using new or old changeBrowser for the changes file" |
5536 | 1386 |
|
5784
c6458c4f3c49
oops - usage of new tools could not be turned off
Claus Gittinger <cg@exept.de>
parents:
5712
diff
changeset
|
1387 |
self at:#useNewChangesBrowser put:aBoolean |
5536 | 1388 |
|
1389 |
" |
|
1390 |
UserPreferences current useNewChangesBrowser |
|
1391 |
" |
|
1392 |
||
14252 | 1393 |
"Modified: / 13-10-1998 / 15:53:21 / cg" |
1394 |
"Modified (comment): / 26-07-2012 / 15:04:39 / cg" |
|
5536 | 1395 |
! |
1396 |
||
6717 | 1397 |
useNewFileBrowser |
1398 |
"using new or old version diff viewer" |
|
1399 |
||
9302 | 1400 |
^ self at:#useNewFileBrowser ifAbsent:(FileBrowserV2 notNil and:[FileBrowserV2 isLoaded]) |
6717 | 1401 |
|
1402 |
"Modified: / 13.10.1998 / 15:53:05 / cg" |
|
1403 |
! |
|
1404 |
||
1405 |
useNewFileBrowser:aBoolean |
|
6765
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1406 |
"using new or old file browser" |
6717 | 1407 |
|
1408 |
self at:#useNewFileBrowser put:aBoolean |
|
1409 |
||
1410 |
" |
|
6769 | 1411 |
UserPreferences current useNewFileBrowser |
6717 | 1412 |
" |
1413 |
||
1414 |
"Modified: / 13.10.1998 / 15:53:21 / cg" |
|
1415 |
! |
|
1416 |
||
6765
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1417 |
useNewFileDialog |
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1418 |
"using new or old file dialog" |
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1419 |
|
9302 | 1420 |
^ self at:#useNewFileDialog ifAbsent:true |
13973
c5f0893cbb11
comment/format in: #useNewFileDialog
Claus Gittinger <cg@exept.de>
parents:
13967
diff
changeset
|
1421 |
|
c5f0893cbb11
comment/format in: #useNewFileDialog
Claus Gittinger <cg@exept.de>
parents:
13967
diff
changeset
|
1422 |
" |
c5f0893cbb11
comment/format in: #useNewFileDialog
Claus Gittinger <cg@exept.de>
parents:
13967
diff
changeset
|
1423 |
UserPreferences current useNewFileDialog:false |
c5f0893cbb11
comment/format in: #useNewFileDialog
Claus Gittinger <cg@exept.de>
parents:
13967
diff
changeset
|
1424 |
UserPreferences current useNewFileDialog:true |
c5f0893cbb11
comment/format in: #useNewFileDialog
Claus Gittinger <cg@exept.de>
parents:
13967
diff
changeset
|
1425 |
" |
c5f0893cbb11
comment/format in: #useNewFileDialog
Claus Gittinger <cg@exept.de>
parents:
13967
diff
changeset
|
1426 |
|
c5f0893cbb11
comment/format in: #useNewFileDialog
Claus Gittinger <cg@exept.de>
parents:
13967
diff
changeset
|
1427 |
"Modified (comment): / 23-01-2012 / 17:25:01 / cg" |
6765
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1428 |
! |
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1429 |
|
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1430 |
useNewFileDialog:aBoolean |
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1431 |
"using new or old file dialog" |
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1432 |
|
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1433 |
self at:#useNewFileDialog put:aBoolean |
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1434 |
|
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1435 |
" |
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1436 |
UserPreferences current useNewFileDialog:true |
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1437 |
" |
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1438 |
! |
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1439 |
|
5536 | 1440 |
useNewInspector |
1441 |
"using new or old inspector" |
|
1442 |
||
9302 | 1443 |
^ self at:#useNewInspector ifAbsent:false |
5536 | 1444 |
|
1445 |
" |
|
1446 |
UserPreferences current useNewInspector |
|
1447 |
" |
|
1448 |
||
1449 |
"Modified: / 17.10.1998 / 14:45:12 / cg" |
|
1450 |
! |
|
1451 |
||
1452 |
useNewInspector:aBoolean |
|
1453 |
"using new or old inspector" |
|
1454 |
||
5784
c6458c4f3c49
oops - usage of new tools could not be turned off
Claus Gittinger <cg@exept.de>
parents:
5712
diff
changeset
|
1455 |
self at:#useNewInspector put:aBoolean |
5536 | 1456 |
|
1457 |
" |
|
1458 |
UserPreferences current useNewInspector |
|
1459 |
" |
|
1460 |
! |
|
1461 |
||
6935 | 1462 |
useNewSettingsApplication |
6838 | 1463 |
"using one application for the settings" |
1464 |
||
9302 | 1465 |
^ self at:#useNewSettingsApplication ifAbsent:true |
6838 | 1466 |
! |
1467 |
||
6935 | 1468 |
useNewSettingsApplication:aBoolean |
6838 | 1469 |
"using one application for the settings" |
1470 |
||
6935 | 1471 |
self at:#useNewSettingsApplication put:aBoolean |
6838 | 1472 |
|
1473 |
" |
|
6935 | 1474 |
UserPreferences current useNewSettingsApplication:true |
6838 | 1475 |
" |
1476 |
||
1477 |
"Modified: / 13.10.1998 / 15:53:21 / cg" |
|
1478 |
! |
|
1479 |
||
5536 | 1480 |
useNewSystemBrowser |
1481 |
"using new or old system browser" |
|
1482 |
||
8593 | 1483 |
|newSystemBrowserClass useIt| |
8000 | 1484 |
|
1485 |
newSystemBrowserClass := (Tools::NewSystemBrowser ? NewSystemBrowser). |
|
8593 | 1486 |
useIt := self at:#useNewSystemBrowser ifAbsent:nil. |
1487 |
useIt isNil ifTrue:[ |
|
11143 | 1488 |
useIt := (newSystemBrowserClass notNil and:[ newSystemBrowserClass isLoaded]). |
1489 |
useIt ifTrue:[ |
|
1490 |
self at:#useNewSystemBrowser put:true. |
|
1491 |
]. |
|
8593 | 1492 |
]. |
11143 | 1493 |
^ useIt |
5536 | 1494 |
! |
1495 |
||
1496 |
useNewSystemBrowser:aBoolean |
|
1497 |
"using new or old systemBrowser" |
|
1498 |
||
5784
c6458c4f3c49
oops - usage of new tools could not be turned off
Claus Gittinger <cg@exept.de>
parents:
5712
diff
changeset
|
1499 |
self at:#useNewSystemBrowser put:aBoolean |
5536 | 1500 |
|
1501 |
" |
|
5541 | 1502 |
UserPreferences current useNewSystemBrowser:true |
5536 | 1503 |
" |
1504 |
||
1505 |
"Modified: / 13.10.1998 / 15:53:21 / cg" |
|
1506 |
! |
|
1507 |
||
1508 |
useNewVersionDiffBrowser |
|
1509 |
"using new or old version diff viewer" |
|
1510 |
||
9302 | 1511 |
^ self at:#useNewVersionDiffBrowser ifAbsent:true |
5536 | 1512 |
|
1513 |
"Modified: / 13.10.1998 / 15:53:05 / cg" |
|
1514 |
! |
|
1515 |
||
1516 |
useNewVersionDiffBrowser:aBoolean |
|
6765
446b64493274
use newFileDialog preferences added and FileBrowserV2 class name changed
penk
parents:
6763
diff
changeset
|
1517 |
"using new or old versionDiffBrowser" |
5536 | 1518 |
|
5784
c6458c4f3c49
oops - usage of new tools could not be turned off
Claus Gittinger <cg@exept.de>
parents:
5712
diff
changeset
|
1519 |
self at:#useNewVersionDiffBrowser put:aBoolean |
5536 | 1520 |
|
1521 |
" |
|
1522 |
UserPreferences current useNewVersionDiffBrowser |
|
1523 |
" |
|
1524 |
||
1525 |
"Modified: / 13.10.1998 / 15:53:21 / cg" |
|
1526 |
! |
|
1527 |
||
6959 | 1528 |
useProcessMonitorV2 |
1529 |
"using ProcessMonitorV2 application for display Processes" |
|
1530 |
||
9302 | 1531 |
^ self at:#useProcessMonitorV2 ifAbsent:(ProcessMonitorV2 notNil) |
6959 | 1532 |
! |
1533 |
||
1534 |
useProcessMonitorV2:aBoolean |
|
1535 |
"using ProcessMonitorV2 application for display Processes" |
|
1536 |
||
1537 |
self at:#useProcessMonitorV2 put:aBoolean |
|
1538 |
||
1539 |
" |
|
1540 |
UserPreferences current useProcessMonitorV2:true |
|
1541 |
" |
|
1542 |
||
1543 |
"Modified: / 13.10.1998 / 15:53:21 / cg" |
|
1544 |
! |
|
1545 |
||
9302 | 1546 |
useSmalltalkDocumentViewer |
1547 |
"using the smalltalk-DocumentViewer (as opposed to the native systems Browser) |
|
1548 |
to display documentation" |
|
1549 |
||
1550 |
^ self at:#useSmalltalkDocumentViewer ifAbsent:true |
|
1551 |
||
1552 |
" |
|
1553 |
UserPreferences current useSmalltalkDocumentViewer |
|
1554 |
UserPreferences current useSmalltalkDocumentViewer:false |
|
1555 |
" |
|
1556 |
! |
|
1557 |
||
1558 |
useSmalltalkDocumentViewer:aBoolean |
|
1559 |
"using the smalltalk-DocumentViewer (as opposed to the native systems Browser) |
|
1560 |
to display documentation" |
|
1561 |
||
1562 |
^ self at:#useSmalltalkDocumentViewer put:aBoolean |
|
1563 |
! |
|
1564 |
||
13501 | 1565 |
useTestRunner2 |
1566 |
"using new or old test runner" |
|
1567 |
||
1568 |
^ self at:#useTestRunner2 ifAbsent:true |
|
1569 |
||
1570 |
"Created: / 06-07-2011 / 13:41:33 / cg" |
|
1571 |
! |
|
1572 |
||
1573 |
useTestRunner2:aBoolean |
|
1574 |
"using new or old test runner" |
|
1575 |
||
1576 |
self at:#useTestRunner2 put:aBoolean |
|
1577 |
||
1578 |
" |
|
1579 |
UserPreferences current useTestRunner2:true |
|
1580 |
" |
|
1581 |
||
1582 |
"Created: / 06-07-2011 / 13:41:40 / cg" |
|
1583 |
! |
|
1584 |
||
16542 | 1585 |
useXTermViewIfAvailable |
1586 |
"switch between xtermView (xembed) and vt100 (st/x emulation) |
|
1587 |
if possible on that architecture." |
|
1588 |
||
1589 |
^ self at:#useXTermViewIfAvailable ifAbsent:false |
|
1590 |
||
1591 |
" |
|
1592 |
UserPreferences current useXTermViewIfAvailable |
|
1593 |
" |
|
1594 |
! |
|
1595 |
||
1596 |
useXTermViewIfAvailable:aBoolean |
|
1597 |
"switch between xtermView (xembed) and vt100 (st/x emulation) |
|
1598 |
if possible on that architecture." |
|
1599 |
||
1600 |
self at:#useXTermViewIfAvailable put:aBoolean |
|
1601 |
||
1602 |
" |
|
1603 |
UserPreferences current useXTermViewIfAvailable |
|
1604 |
" |
|
1605 |
! |
|
1606 |
||
5536 | 1607 |
versionDiffViewerClass |
1608 |
self useNewVersionDiffBrowser ifTrue:[ |
|
11143 | 1609 |
^ (VersionDiffBrowser ? DiffTextView) |
5536 | 1610 |
]. |
10992 | 1611 |
^ DiffCodeView |
3883 | 1612 |
! ! |
1613 |
||
21776 | 1614 |
|
7549 | 1615 |
!UserPreferences methodsFor:'accessing-prefs-UI'! |
3358 | 1616 |
|
11390 | 1617 |
allowMouseWheelZoom |
1618 |
"return the flag which controls if text can be magnified via the ALT-wheel-action" |
|
1619 |
||
1620 |
^ self at:#allowMouseWheelZoom ifAbsent:[ true ] |
|
1621 |
||
1622 |
" |
|
1623 |
UserPreferences current allowMouseWheelZoom |
|
1624 |
" |
|
1625 |
! |
|
1626 |
||
1627 |
allowMouseWheelZoom:aBooleanOrNil |
|
1628 |
"set/clear the flag which controls if text can be magnified via the ALT-wheel-action" |
|
1629 |
||
1630 |
^ self at:#allowMouseWheelZoom put:aBooleanOrNil |
|
1631 |
||
1632 |
" |
|
1633 |
UserPreferences current allowMouseWheelZoom:true |
|
1634 |
UserPreferences current allowMouseWheelZoom:false |
|
1635 |
UserPreferences current allowMouseWheelZoom |
|
1636 |
" |
|
1637 |
! |
|
1638 |
||
14342 | 1639 |
avoidConfirmationsForExperiencedUsers |
1640 |
"some confirmers ara annoying, if you are an experienced st/x user" |
|
1641 |
||
1642 |
^ self at:#avoidConfirmationsForExperiencedUsers ifAbsent:[ false ] |
|
1643 |
||
1644 |
" |
|
1645 |
UserPreferences current avoidConfirmationsForExperiencedUsers |
|
14698 | 1646 |
UserPreferences current avoidConfirmationsForExperiencedUsers:true |
14342 | 1647 |
" |
1648 |
||
1649 |
"Created: / 05-09-2012 / 11:26:55 / cg" |
|
1650 |
! |
|
1651 |
||
1652 |
avoidConfirmationsForExperiencedUsers:aBooleanOrNil |
|
1653 |
"some confirmers ara annoying, if you are an experienced st/x user. |
|
1654 |
Set/clear the flag which controls this" |
|
1655 |
||
1656 |
^ self at:#avoidConfirmationsForExperiencedUsers put:aBooleanOrNil |
|
1657 |
||
1658 |
" |
|
1659 |
UserPreferences current avoidConfirmationsForExperiencedUsers:true |
|
1660 |
" |
|
1661 |
||
1662 |
"Created: / 05-09-2012 / 11:27:09 / cg" |
|
1663 |
! |
|
1664 |
||
11929 | 1665 |
avoidSlowDrawingOperationsUnderWindows |
1666 |
^ OperatingSystem isMSWINDOWSlike |
|
1667 |
! |
|
1668 |
||
5071 | 1669 |
beepEnabled |
22447 | 1670 |
"return the flag which controls the beeper. |
1671 |
This affects any beeping" |
|
5071 | 1672 |
|
1673 |
^ self at:#beepEnabled ifAbsentPut:true |
|
1674 |
||
1675 |
" |
|
1676 |
UserPreferences current beepEnabled |
|
1677 |
" |
|
1678 |
||
1679 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
|
1680 |
"Created: / 3.12.1999 / 17:09:49 / ps" |
|
1681 |
! |
|
1682 |
||
1683 |
beepEnabled:aBoolean |
|
22447 | 1684 |
"set/clear the flag which controls the beeper. |
1685 |
This affects any beeping" |
|
5071 | 1686 |
|
1687 |
^ self at:#beepEnabled put:aBoolean |
|
1688 |
||
1689 |
" |
|
1690 |
UserPreferences current beepEnabled:false |
|
1691 |
" |
|
1692 |
||
1693 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
|
1694 |
"Created: / 3.12.1999 / 17:10:27 / ps" |
|
1695 |
! |
|
1696 |
||
8676 | 1697 |
beepForErrorDialog |
22447 | 1698 |
"return the flag which controls beeping for error dialogs |
1699 |
(unless completely disabled via beepEnabled)" |
|
8676 | 1700 |
|
9302 | 1701 |
^ self at:#beepForErrorDialog ifAbsent:true |
8676 | 1702 |
|
1703 |
" |
|
1704 |
UserPreferences current beepForErrorDialog |
|
1705 |
" |
|
1706 |
! |
|
1707 |
||
1708 |
beepForErrorDialog:aBoolean |
|
22447 | 1709 |
"set/clear the flag which controls beeping for error dialogs. |
1710 |
(unless completely disabled via beepEnabled)" |
|
8676 | 1711 |
|
1712 |
^ self at:#beepForErrorDialog put:aBoolean |
|
1713 |
||
1714 |
" |
|
1715 |
UserPreferences current beepForErrorDialog:true |
|
1716 |
" |
|
1717 |
! |
|
1718 |
||
1719 |
beepForInfoDialog |
|
22447 | 1720 |
"return the flag which controls beeping for info dialogs. |
1721 |
(unless completely disabled via beepEnabled)" |
|
8676 | 1722 |
|
9302 | 1723 |
^ self at:#beepForInfoDialog ifAbsent:false |
8676 | 1724 |
|
1725 |
" |
|
1726 |
UserPreferences current beepForInfoDialog |
|
1727 |
" |
|
1728 |
! |
|
1729 |
||
1730 |
beepForInfoDialog:aBoolean |
|
22447 | 1731 |
"set/clear the flag which controls beeping for info dialogs. |
1732 |
(unless completely disabled via beepEnabled)" |
|
8676 | 1733 |
|
1734 |
^ self at:#beepForInfoDialog put:aBoolean |
|
1735 |
||
1736 |
" |
|
1737 |
UserPreferences current beepForInfoDialog:true |
|
1738 |
" |
|
1739 |
! |
|
1740 |
||
1741 |
beepForWarningDialog |
|
22447 | 1742 |
"return the flag which controls beeping for warning dialogs. |
1743 |
(unless completely disabled via beepEnabled)" |
|
8676 | 1744 |
|
9302 | 1745 |
^ self at:#beepForWarningDialog ifAbsent:true |
8676 | 1746 |
|
1747 |
" |
|
1748 |
UserPreferences current beepForWarningDialog |
|
1749 |
" |
|
1750 |
! |
|
1751 |
||
1752 |
beepForWarningDialog:aBoolean |
|
22447 | 1753 |
"set/clear the flag which controls beeping for warning dialogs. |
1754 |
(unless completely disabled via beepEnabled)" |
|
8676 | 1755 |
|
1756 |
^ self at:#beepForWarningDialog put:aBoolean |
|
1757 |
||
1758 |
" |
|
1759 |
UserPreferences current beepForWarningDialog:true |
|
1760 |
" |
|
1761 |
! |
|
1762 |
||
11691 | 1763 |
beepInEditor |
22447 | 1764 |
"return the flag which controls the beeper in editors. |
1765 |
This affects beeping in response to a bad user operation (not system failure beeps). |
|
1766 |
(unless completely disabled via beepEnabled)" |
|
11691 | 1767 |
|
1768 |
^ self at:#beepInEditor ifAbsentPut:true |
|
1769 |
||
1770 |
" |
|
1771 |
UserPreferences current beepInEditor |
|
1772 |
" |
|
1773 |
! |
|
1774 |
||
22447 | 1775 |
beepInEditor:aBoolean |
1776 |
"set/clear the flag which controls the beeper in editors. |
|
1777 |
This affects beeping in response to a bad user operation (not system failure beeps). |
|
1778 |
(unless completely disabled via beepEnabled)" |
|
1779 |
||
1780 |
^ self at:#beepInEditor put:aBoolean |
|
1781 |
||
1782 |
" |
|
1783 |
UserPreferences current beepInEditor |
|
1784 |
" |
|
1785 |
! |
|
1786 |
||
22330 | 1787 |
busyBackgroundColorInDoits |
1788 |
"if non nil, that color is shown as background in editors while |
|
1789 |
performing a doit (i.e. in addition to showing a busy cursor). |
|
1790 |
If nil is returned, the color remains unchanged." |
|
1791 |
||
22339 | 1792 |
^ self at:#busyBackgroundColorInDoits ifAbsent:[ Color green lightened lightened lightened ] |
22330 | 1793 |
|
1794 |
"Created: / 01-11-2017 / 11:25:02 / cg" |
|
22339 | 1795 |
"Modified: / 09-11-2017 / 21:12:30 / cg" |
22330 | 1796 |
! |
1797 |
||
1798 |
busyBackgroundColorInDoits:aColorOrNil |
|
1799 |
"if non nil, that color is shown as background in editors while |
|
1800 |
performing a doit (i.e. in addition to showing a busy cursor). |
|
1801 |
If nil is returned, the color remains unchanged." |
|
1802 |
||
1803 |
self at:#busyBackgroundColorInDoits put:aColorOrNil. |
|
1804 |
||
1805 |
"Created: / 01-11-2017 / 11:25:38 / cg" |
|
1806 |
! |
|
1807 |
||
14734 | 1808 |
button2WithAltKey |
1809 |
"if true, an ALT-left click is translated to a right click |
|
1810 |
Useful with 1-button mice" |
|
1811 |
||
1812 |
^ self at:#button2WithAltKey ifAbsent:[ false ] |
|
1813 |
||
1814 |
" |
|
1815 |
UserPreferences current button2WithAltKey |
|
1816 |
" |
|
1817 |
! |
|
1818 |
||
1819 |
button2WithAltKey: aBoolean |
|
1820 |
"if true, an ALT-left click is translated to a right click |
|
1821 |
Useful with 1-button mice" |
|
1822 |
||
1823 |
^ self at:#button2WithAltKey put: aBoolean |
|
1824 |
||
1825 |
" |
|
1826 |
UserPreferences current button2WithAltKey |
|
1827 |
UserPreferences current button2WithAltKey:true |
|
1828 |
UserPreferences current button2WithAltKey:false |
|
1829 |
" |
|
1830 |
! |
|
1831 |
||
12209 | 1832 |
closePopUpMenuChainOnEscape |
1833 |
"if true, the whole chain of popUpMenus is closed when escape is pressed. |
|
1834 |
if false (the default), only the last popup-view is closed. |
|
1835 |
The first corresponds to X-behavior, the later is how windows does it - sigh." |
|
1836 |
||
1837 |
^ self at:#closePopUpMenuChainOnEscape ifAbsent:false |
|
1838 |
||
1839 |
" |
|
1840 |
UserPreferences current closePopUpMenuChainOnEscape:false |
|
1841 |
UserPreferences current closePopUpMenuChainOnEscape:true |
|
1842 |
" |
|
1843 |
! |
|
1844 |
||
1845 |
closePopUpMenuChainOnEscape:aBoolean |
|
1846 |
"if true, the whole chain of popUpMenus is closed when escape is pressed. |
|
1847 |
if false (the default), only the last popup-view is closed. |
|
1848 |
The first corresponds to X-behavior, the later is how windows does it - sigh." |
|
1849 |
||
1850 |
^ self at:#closePopUpMenuChainOnEscape put:aBoolean |
|
1851 |
||
1852 |
" |
|
1853 |
UserPreferences current closePopUpMenuChainOnEscape:true |
|
1854 |
UserPreferences current closePopUpMenuChainOnEscape:false |
|
1855 |
" |
|
1856 |
! |
|
1857 |
||
13151 | 1858 |
delayedMenuShowAndHide |
1859 |
"the Windows behavior of showing submenus of a menu slightly delayed, |
|
1860 |
to allow for short-time leaving of the mouse pointer. |
|
1861 |
(bug #D1480943)" |
|
1862 |
||
1863 |
^ self at:#delayedMenuShowAndHide ifAbsent:true |
|
1864 |
||
1865 |
"Created: / 29-11-2010 / 19:47:21 / cg" |
|
1866 |
! |
|
1867 |
||
1868 |
delayedMenuShowAndHide:aBoolean |
|
1869 |
"the Windows behavior of showing submenus of a menu slightly delayed, |
|
1870 |
to allow for short-time leaving of the mouse pointer. |
|
1871 |
(bug #D1480943)" |
|
1872 |
||
1873 |
^ self at:#delayedMenuShowAndHide put:aBoolean |
|
1874 |
||
1875 |
" |
|
1876 |
UserPreferences current delayedMenuShowAndHide |
|
1877 |
" |
|
1878 |
||
1879 |
"Created: / 29-11-2010 / 19:47:36 / cg" |
|
1880 |
! |
|
1881 |
||
13503 | 1882 |
eclipseStyleMenus |
1883 |
"if true, return menus organized like in eclipse; |
|
1884 |
if false (the default) return them as usual" |
|
1885 |
||
1886 |
^ self at:#eclipseStyleMenus ifAbsent:false |
|
1887 |
||
1888 |
"Created: / 08-07-2011 / 13:22:45 / cg" |
|
1889 |
! |
|
1890 |
||
1891 |
eclipseStyleMenus:aBoolean |
|
1892 |
"if true, return menus organized like in eclipse; |
|
1893 |
if false (the default) return them as usual" |
|
1894 |
||
1895 |
^ self at:#eclipseStyleMenus put:aBoolean |
|
1896 |
||
1897 |
" |
|
1898 |
UserPreferences current eclipseStyleMenus:true |
|
1899 |
" |
|
1900 |
||
1901 |
"Created: / 08-07-2011 / 13:22:50 / cg" |
|
1902 |
! |
|
1903 |
||
15817 | 1904 |
enableVMWareDrawingBugWorkaround |
1905 |
"return the flag which enables a workaround for a redraw bug when running X/Linux in the VMWare virtual machine" |
|
1906 |
||
1907 |
^ self at:#enableVMWareDrawingBugWorkaround ifAbsent:[ false ] |
|
1908 |
||
1909 |
" |
|
1910 |
UserPreferences current enableVMWareDrawingBugWorkaround |
|
1911 |
" |
|
1912 |
||
1913 |
"Created: / 19-11-2013 / 09:53:20 / cg" |
|
1914 |
! |
|
1915 |
||
1916 |
enableVMWareDrawingBugWorkaround:aBoolean |
|
1917 |
"change the flag which enables a workaround for a redraw bug when running X/Linux in the VMWare virtual machine" |
|
1918 |
||
20712 | 1919 |
"/ self assert:(aBoolean isBoolean). |
15817 | 1920 |
self at:#enableVMWareDrawingBugWorkaround put:aBoolean. |
20712 | 1921 |
(Screen notNil and:[Screen current notNil and:[Screen current isX11Platform]]) ifTrue:[ |
18489 | 1922 |
Screen current maxOperationsUntilFlush:(aBoolean ifTrue:[1] ifFalse:[nil]) |
15817 | 1923 |
]. |
1924 |
||
1925 |
" |
|
1926 |
UserPreferences current enableVMWareDrawingBugWorkaround |
|
1927 |
UserPreferences current enableVMWareDrawingBugWorkaround:true |
|
1928 |
UserPreferences current enableVMWareDrawingBugWorkaround:false |
|
1929 |
" |
|
1930 |
||
1931 |
"Created: / 19-11-2013 / 09:53:45 / cg" |
|
1932 |
! |
|
1933 |
||
22509 | 1934 |
enforcedPositionOfOKButtonInDialogs |
22508 | 1935 |
"this can be used to override any setting from the viewStyle, |
1936 |
and force it to true. This is a customer request and useful if either |
|
1937 |
the stylesheet is in error, or the user is using expecco on both windows |
|
1938 |
and unix machines and wants to have the same feeling. |
|
1939 |
Return: #left to force at left, #right to force to the right, |
|
1940 |
nil to use whatever the stylesheet uses" |
|
1941 |
||
22509 | 1942 |
^ self at:#enforcedPositionOfOKButtonInDialogs ifAbsent:[ nil ] |
1943 |
! |
|
1944 |
||
1945 |
enforcedPositionOfOKButtonInDialogs:aSymbolOrNil |
|
22508 | 1946 |
"this can be used to override any setting from the viewStyle, |
1947 |
and force it to true. This is a customer request and useful if either |
|
1948 |
the stylesheet is in error, or the user is using expecco on both windows |
|
1949 |
and unix machines and wants to have the same feeling. |
|
1950 |
Return: #left to force at left, #right to force to the right, |
|
1951 |
nil to use whatever the stylesheet uses" |
|
1952 |
||
1953 |
aSymbolOrNil isNil ifTrue:[ |
|
22509 | 1954 |
self removeKey:#enforcedPositionOfOKButtonInDialogs |
22508 | 1955 |
] ifFalse:[ |
22509 | 1956 |
self at:#enforcedPositionOfOKButtonInDialogs put:aSymbolOrNil |
22508 | 1957 |
]. |
1958 |
! |
|
1959 |
||
10880
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1960 |
expandSelectionOnMouseMoveWithButtonPressed |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1961 |
"expand the selection in a selectionInListView if the mouse is pressed while moving over |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1962 |
more lines. Default is not FALSE !!" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1963 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1964 |
^ self at:#expandSelectionOnMouseMoveWithButtonPressed ifAbsent:false |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1965 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1966 |
" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1967 |
UserPreferences current expandSelectionOnMouseMoveWithButtonPressed |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1968 |
" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1969 |
! |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1970 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1971 |
expandSelectionOnMouseMoveWithButtonPressed:aBoolean |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1972 |
"expand the selection in a selectionInListView if the mouse is pressed while moving over |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1973 |
more lines. Default is not FALSE !!" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1974 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1975 |
^ self at:#expandSelectionOnMouseMoveWithButtonPressed put:aBoolean |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1976 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1977 |
" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1978 |
UserPreferences current expandSelectionOnMouseMoveWithButtonPressed |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1979 |
" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1980 |
! |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
1981 |
|
13967 | 1982 |
flyByHelpActive |
1983 |
||
1984 |
^ self at:#flyByHelpActive ifAbsent:true "(FlyByHelp notNil and:[FlyByHelp isActive])" |
|
1985 |
! |
|
1986 |
||
1987 |
flyByHelpActive:aBoolean |
|
1988 |
aBoolean ~~ self flyByHelpActive ifTrue:[ |
|
18262 | 1989 |
self at:#flyByHelpActive put:aBoolean. |
13967 | 1990 |
]. |
17104 | 1991 |
self flyByHelpSettingChanged. |
13967 | 1992 |
! |
1993 |
||
4075
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
1994 |
focusFollowsMouse |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
1995 |
"return the flag which controls if the keyboard focus should |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
1996 |
follow the mouse (as in X) - as opposed to click mode (as in MS-win). |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
1997 |
This only affects certain widgets (EditFields, EditTextViews and SelectionInListViews). |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
1998 |
The returned value has 3 states: true/false and nil, which means: as defined in styleSheet." |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
1999 |
|
13391 | 2000 |
^ self at:#focusFollowsMouse ifAbsent:[ false ] |
4075
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2001 |
|
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2002 |
" |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2003 |
UserPreferences current focusFollowsMouse |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2004 |
" |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2005 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2006 |
! |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2007 |
|
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2008 |
focusFollowsMouse:aBooleanOrNil |
4121 | 2009 |
"set/clear the flag which controls if the keyboard focus should |
4075
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2010 |
follow the mouse (as in X) - as opposed to click mode (as in MS-win). |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2011 |
This only affects certain widgets (EditFields, EditTextViews and SelectionInListViews). |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2012 |
Allowed are: true/false and nil, which means: as defined in styleSheet." |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2013 |
|
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2014 |
^ self at:#focusFollowsMouse put:aBooleanOrNil |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2015 |
|
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2016 |
" |
4121 | 2017 |
UserPreferences current focusFollowsMouse:true |
2018 |
UserPreferences current focusFollowsMouse:false |
|
4075
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2019 |
UserPreferences current focusFollowsMouse |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2020 |
" |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2021 |
|
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2022 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2023 |
! |
816898d4922c
added #focusFollowsMouse setting
Claus Gittinger <cg@exept.de>
parents:
4024
diff
changeset
|
2024 |
|
18812 | 2025 |
fontPreferences |
2026 |
"experimental" |
|
2027 |
||
2028 |
^ self at:#fontPreferences |
|
2029 |
||
2030 |
" |
|
2031 |
UserPreferences current fontPreferences |
|
2032 |
UserPreferences current fontPreferences:nil |
|
2033 |
" |
|
2034 |
! |
|
2035 |
||
2036 |
fontPreferences:aDictionary |
|
2037 |
"experimental" |
|
2038 |
||
18818 | 2039 |
self at:#fontPreferences put:aDictionary. |
2040 |
aDictionary isNil ifTrue:[^ self]. |
|
2041 |
||
2042 |
self fontPreferencesChanged. |
|
19630 | 2043 |
|
2044 |
" |
|
2045 |
UserPreferences current fontPreferences |
|
2046 |
UserPreferences current fontPreferences:nil |
|
2047 |
" |
|
18818 | 2048 |
! |
2049 |
||
2050 |
fontPreferencesChanged |
|
2051 |
"tells view classes about changed font preferences" |
|
2052 |
||
2053 |
|dict fn getFont| |
|
20243 | 2054 |
|
18818 | 2055 |
dict := self at:#fontPreferences. |
2056 |
dict isNil ifTrue:[^ self]. |
|
20243 | 2057 |
|
2058 |
getFont := |
|
18812 | 2059 |
[:key| |
2060 |
|s fn| |
|
20243 | 2061 |
|
18818 | 2062 |
s := dict at:key ifAbsent:nil. |
18812 | 2063 |
s notNil ifTrue:[ |
18813 | 2064 |
fn := Object readFrom:s. |
18812 | 2065 |
self useXftFontsOnly ifTrue:[ |
2066 |
fn := XftFontDescription for:fn |
|
20243 | 2067 |
"/ cg: don't allocate on the display, because it takes |
2068 |
"/ dam long sometimes when Xft fonts are used. |
|
2069 |
"/ startup feels better, if we do it lazy. |
|
2070 |
] ifFalse:[ |
|
19787
08c4eaf6cfb3
lazy Xft font allocation makes startup faster
Claus Gittinger <cg@exept.de>
parents:
19783
diff
changeset
|
2071 |
Display notNil ifTrue:[fn := fn onDevice:Display]. |
20243 | 2072 |
] |
18812 | 2073 |
]. |
2074 |
fn |
|
2075 |
]. |
|
20243 | 2076 |
|
18812 | 2077 |
fn := getFont value:#Other. |
20243 | 2078 |
fn notNil ifTrue:[ |
18812 | 2079 |
SimpleView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
2080 |
]. |
|
20243 | 2081 |
|
18812 | 2082 |
fn := getFont value:#Label. |
20243 | 2083 |
fn notNil ifTrue:[ |
18812 | 2084 |
Label defaultFont:fn. |
2085 |
CheckBox defaultFont:fn. |
|
2086 |
]. |
|
20243 | 2087 |
|
18812 | 2088 |
fn := getFont value:#Button. |
20243 | 2089 |
fn notNil ifTrue:[ |
18812 | 2090 |
Button defaultFont:fn. |
2091 |
Toggle defaultFont:fn. |
|
2092 |
]. |
|
20243 | 2093 |
|
18812 | 2094 |
fn := getFont value:#Text. |
20243 | 2095 |
fn notNil ifTrue:[ |
18812 | 2096 |
TextView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
2097 |
]. |
|
20243 | 2098 |
|
18812 | 2099 |
fn := getFont value:#InputField. |
20243 | 2100 |
fn notNil ifTrue:[ |
18812 | 2101 |
EditField withAllSubclasses do:[:cls | cls defaultFont:fn]. |
2102 |
]. |
|
20243 | 2103 |
|
18812 | 2104 |
fn := getFont value:#List. |
20243 | 2105 |
fn notNil ifTrue:[ |
18812 | 2106 |
SelectionInListView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
2107 |
]. |
|
20243 | 2108 |
|
18812 | 2109 |
fn := getFont value:#Tooltip. |
20243 | 2110 |
fn notNil ifTrue:[ |
18812 | 2111 |
ActiveHelpView withAllSubclasses do:[:cls | cls defaultFont:fn]. |
2112 |
]. |
|
20243 | 2113 |
|
18812 | 2114 |
fn := getFont value:#Menu. |
20243 | 2115 |
fn notNil ifTrue:[ |
18812 | 2116 |
ListView defaultFont:fn. |
2117 |
MenuView defaultFont:fn. |
|
2118 |
MenuPanel defaultFont:fn. |
|
2119 |
NoteBookView defaultFont:fn. |
|
2120 |
PullDownMenu defaultFont:fn. |
|
2121 |
]. |
|
2122 |
! |
|
2123 |
||
13103 | 2124 |
forceWindowsIntoMonitorBounds |
2125 |
"if true, windows are forced to be placed into a monitor's bounds completely; |
|
2126 |
if false, they may be placed as to cross a boundary. This only affects initial placement, |
|
2127 |
not window movement." |
|
2128 |
||
2129 |
^ self at:#forceWindowsIntoMonitorBounds ifAbsent:true |
|
2130 |
||
2131 |
"Created: / 22-10-2010 / 10:59:10 / cg" |
|
2132 |
! |
|
2133 |
||
2134 |
forceWindowsIntoMonitorBounds:aBoolean |
|
2135 |
"if true, windows are forced to be placed into a monitor's bounds completely; |
|
2136 |
if false, they may be placed as to cross a boundary. This only affects initial placement, |
|
2137 |
not window movement." |
|
2138 |
||
2139 |
^ self at:#forceWindowsIntoMonitorBounds put:aBoolean |
|
2140 |
||
2141 |
" |
|
2142 |
UserPreferences current forceWindowsIntoMonitorBounds:false |
|
2143 |
UserPreferences current forceWindowsIntoMonitorBounds:true |
|
2144 |
" |
|
2145 |
||
2146 |
"Modified: / 22-10-2010 / 11:13:54 / cg" |
|
2147 |
! |
|
2148 |
||
14543 | 2149 |
menuPanelTakesFocusOnClick |
2150 |
"if true, the menu panel takes the focus and allows further control via |
|
14742 | 2151 |
cursor and tab keys." |
2152 |
||
15713 | 2153 |
"/ read comment in menuPanel - for now, it should be on, |
2154 |
"/ otherwise you cannot control a menu with cursor keys or escape. sigh. |
|
21125 | 2155 |
^ self at:#menuPanelTakesFocusOnClick ifAbsent:[ true "false" ] |
14543 | 2156 |
|
2157 |
" |
|
2158 |
UserPreferences current menuPanelTakesFocusOnClick |
|
16641 | 2159 |
UserPreferences current menuPanelTakesFocusOnClick:false |
2160 |
UserPreferences current menuPanelTakesFocusOnClick:true |
|
14543 | 2161 |
" |
14742 | 2162 |
|
14543 | 2163 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
2164 |
! |
|
2165 |
||
2166 |
menuPanelTakesFocusOnClick:aBooleanOrNil |
|
2167 |
"if true, the menu panel takes the focus and allows further control via |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
2168 |
cursor and tab keys. |
14543 | 2169 |
Used to be on, but now we changed the default as it turned out to be counter productive" |
2170 |
||
2171 |
^ self at:#menuPanelTakesFocusOnClick put:aBooleanOrNil |
|
2172 |
||
2173 |
" |
|
2174 |
UserPreferences current menuPanelTakesFocusOnClick:true |
|
2175 |
UserPreferences current menuPanelTakesFocusOnClick:false |
|
2176 |
UserPreferences current menuPanelTakesFocusOnClick |
|
2177 |
" |
|
2178 |
||
2179 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
|
2180 |
! |
|
2181 |
||
22225 | 2182 |
metaIsMouseWheelZoom |
2183 |
"return the flag which controls if meta+mouseWheel shall invoke the zoom. |
|
2184 |
(or else, the horizontal scroll)" |
|
2185 |
||
2186 |
^ self at:#metaIsMouseWheelZoom ifAbsent:[ false ] |
|
2187 |
||
2188 |
" |
|
2189 |
UserPreferences current metaIsMouseWheelZoom |
|
2190 |
" |
|
2191 |
||
2192 |
"Created: / 30-08-2017 / 14:46:12 / cg" |
|
2193 |
! |
|
2194 |
||
2195 |
metaIsMouseWheelZoom:aBoolean |
|
2196 |
"set/clear the flag which controls if meta+mouseWheel shall invoke the zoom. |
|
2197 |
(or else, the horizontal scroll)" |
|
2198 |
||
2199 |
self at:#metaIsMouseWheelZoom put:aBoolean |
|
2200 |
||
2201 |
" |
|
2202 |
UserPreferences current metaIsMouseWheelZoom |
|
2203 |
UserPreferences current metaIsMouseWheelZoom:true |
|
2204 |
UserPreferences current metaIsMouseWheelZoom:false |
|
2205 |
" |
|
2206 |
||
2207 |
"Created: / 30-08-2017 / 14:46:34 / cg" |
|
2208 |
! |
|
2209 |
||
8759 | 2210 |
motionDistanceToStartDrag |
2211 |
"the motion distance (in pixel) to start drag (as opposed to adding to the selection)" |
|
2212 |
||
2213 |
^ "DragMotionDistance ?" 10 |
|
2214 |
! |
|
2215 |
||
17457 | 2216 |
mouseWheelDirectionReversed |
17458 | 2217 |
"if set, mouse wheel motions are upside-down. |
18262 | 2218 |
I got very confused with macOSX10.9, behavind different from 10.6, |
17458 | 2219 |
so I added this option" |
17457 | 2220 |
|
2221 |
^ self at:#mouseWheelDirectionReversed ifAbsent:[ false ] |
|
2222 |
||
2223 |
" |
|
2224 |
UserPreferences current mouseWheelDirectionReversed |
|
2225 |
UserPreferences current mouseWheelDirectionReversed:true |
|
2226 |
UserPreferences current mouseWheelDirectionReversed:false |
|
2227 |
" |
|
2228 |
! |
|
2229 |
||
2230 |
mouseWheelDirectionReversed:aBoolean |
|
17458 | 2231 |
"if set, mouse wheel motions are upside-down. |
18262 | 2232 |
I got very confused with macOSX10.9, behavind different from 10.6, |
17458 | 2233 |
so I added this option" |
17457 | 2234 |
|
2235 |
self at:#mouseWheelDirectionReversed put:aBoolean |
|
2236 |
||
2237 |
" |
|
2238 |
UserPreferences current mouseWheelDirectionReversed |
|
2239 |
UserPreferences current mouseWheelDirectionReversed:true |
|
2240 |
UserPreferences current mouseWheelDirectionReversed:false |
|
2241 |
" |
|
2242 |
! |
|
2243 |
||
11589
13741af10676
+mouseWheelFocusFollowsMouse
Claus Gittinger <cg@exept.de>
parents:
11419
diff
changeset
|
2244 |
mouseWheelFocusFollowsMouse |
13741af10676
+mouseWheelFocusFollowsMouse
Claus Gittinger <cg@exept.de>
parents:
11419
diff
changeset
|
2245 |
"return the flag which controls if the mouseWheel focus should |
13741af10676
+mouseWheelFocusFollowsMouse
Claus Gittinger <cg@exept.de>
parents:
11419
diff
changeset
|
2246 |
follow the mouse (as in X) - as opposed to click mode (as in MS-win)" |
13741af10676
+mouseWheelFocusFollowsMouse
Claus Gittinger <cg@exept.de>
parents:
11419
diff
changeset
|
2247 |
|
13741af10676
+mouseWheelFocusFollowsMouse
Claus Gittinger <cg@exept.de>
parents:
11419
diff
changeset
|
2248 |
self focusFollowsMouse ifTrue:[^ true]. |
16859 | 2249 |
^ self at:#mouseWheelFocusFollowsMouse ifAbsent:[ Screen current isWindowsPlatform ] |
11589
13741af10676
+mouseWheelFocusFollowsMouse
Claus Gittinger <cg@exept.de>
parents:
11419
diff
changeset
|
2250 |
|
13741af10676
+mouseWheelFocusFollowsMouse
Claus Gittinger <cg@exept.de>
parents:
11419
diff
changeset
|
2251 |
" |
13741af10676
+mouseWheelFocusFollowsMouse
Claus Gittinger <cg@exept.de>
parents:
11419
diff
changeset
|
2252 |
UserPreferences current mouseWheelFocusFollowsMouse |
13741af10676
+mouseWheelFocusFollowsMouse
Claus Gittinger <cg@exept.de>
parents:
11419
diff
changeset
|
2253 |
" |
13741af10676
+mouseWheelFocusFollowsMouse
Claus Gittinger <cg@exept.de>
parents:
11419
diff
changeset
|
2254 |
! |
13741af10676
+mouseWheelFocusFollowsMouse
Claus Gittinger <cg@exept.de>
parents:
11419
diff
changeset
|
2255 |
|
17316 | 2256 |
mouseWheelScale |
2257 |
"if set, mouse wheel motions are scaled by this number" |
|
2258 |
||
2259 |
^ self at:#mouseWheelScale ifAbsent:[ 1 ] |
|
2260 |
||
2261 |
" |
|
2262 |
UserPreferences current mouseWheelScale |
|
2263 |
UserPreferences current mouseWheelScale:0.5 |
|
2264 |
UserPreferences current mouseWheelScale:1 |
|
2265 |
" |
|
2266 |
! |
|
2267 |
||
2268 |
mouseWheelScale:aNumber |
|
2269 |
"if set, mouse wheel motions are scaled by this number" |
|
2270 |
||
18643 | 2271 |
self at:#mouseWheelScale put:aNumber. |
2272 |
WindowSensor mouseWheelScale:aNumber. |
|
17316 | 2273 |
|
2274 |
" |
|
2275 |
UserPreferences current mouseWheelScale |
|
18643 | 2276 |
UserPreferences current mouseWheelScale:0.25 |
17316 | 2277 |
UserPreferences current mouseWheelScale:0.5 |
2278 |
UserPreferences current mouseWheelScale:1 |
|
18643 | 2279 |
|
2280 |
WindowSensor mouseWheelScale |
|
17316 | 2281 |
" |
2282 |
! |
|
2283 |
||
13967 | 2284 |
nativeDialogs |
2285 |
^ self at:#nativeDialogs ifAbsent:false |
|
2286 |
||
2287 |
"Created: / 24-08-2010 / 17:01:47 / sr" |
|
2288 |
! |
|
2289 |
||
2290 |
nativeDialogs:aBoolean |
|
2291 |
|currentScreen| |
|
2292 |
||
2293 |
self at:#nativeDialogs put:aBoolean. |
|
2294 |
currentScreen := Screen current. |
|
2295 |
currentScreen notNil ifTrue:[ |
|
18262 | 2296 |
currentScreen supportsNativeDialogs ifTrue:[ |
2297 |
currentScreen nativeDialogs:aBoolean |
|
2298 |
]. |
|
13967 | 2299 |
]. |
2300 |
||
2301 |
"Modified: / 24-08-2010 / 18:06:43 / sr" |
|
2302 |
! |
|
2303 |
||
2304 |
nativeFileDialogs |
|
2305 |
^ self at:#nativeFileDialogs ifAbsent:false |
|
2306 |
||
2307 |
"Created: / 24-08-2010 / 17:01:59 / sr" |
|
2308 |
! |
|
2309 |
||
2310 |
nativeFileDialogs:aBoolean |
|
2311 |
|currentScreen| |
|
2312 |
||
2313 |
self at:#nativeFileDialogs put:aBoolean. |
|
2314 |
currentScreen := Screen current. |
|
2315 |
currentScreen notNil ifTrue:[ |
|
18262 | 2316 |
currentScreen supportsNativeFileDialogs ifTrue:[ |
2317 |
currentScreen nativeFileDialogs:aBoolean |
|
2318 |
]. |
|
13967 | 2319 |
]. |
2320 |
||
2321 |
"Modified: / 24-08-2010 / 18:06:27 / sr" |
|
2322 |
! |
|
2323 |
||
2324 |
nativeWidgets |
|
2325 |
^ self at:#nativeWidgets ifAbsent:false |
|
2326 |
||
2327 |
"Created: / 24-08-2010 / 16:58:44 / sr" |
|
2328 |
! |
|
2329 |
||
2330 |
nativeWidgets:aBoolean |
|
16813 | 2331 |
"enable/disable native widgets on the current display" |
2332 |
||
13967 | 2333 |
|currentScreen| |
2334 |
||
2335 |
self at:#nativeWidgets put:aBoolean. |
|
2336 |
currentScreen := Screen current. |
|
2337 |
currentScreen notNil ifTrue:[ |
|
18262 | 2338 |
currentScreen supportsNativeWidgets ifTrue:[ |
2339 |
currentScreen nativeWidgets:aBoolean |
|
2340 |
]. |
|
13967 | 2341 |
]. |
2342 |
||
2343 |
"Created: / 24-08-2010 / 16:58:14 / sr" |
|
2344 |
"Modified: / 24-08-2010 / 18:05:56 / sr" |
|
2345 |
! |
|
2346 |
||
16587 | 2347 |
onlyShowTooltipsForActiveWindow |
2348 |
"on a mac (and maybe on others), it is preferable to turn this on" |
|
2349 |
||
17180 | 2350 |
^ self at:#onlyShowTooltipsForActiveWindow ifAbsent:true |
16587 | 2351 |
|
2352 |
" |
|
2353 |
UserPreferences current onlyShowTooltipsForActiveWindow |
|
21031 | 2354 |
UserPreferences current onlyShowTooltipsForActiveWindow:false |
16587 | 2355 |
" |
2356 |
! |
|
2357 |
||
2358 |
onlyShowTooltipsForActiveWindow:aBooleanOrNil |
|
2359 |
"on a mac (and maybe on others), it is preferable to turn this on" |
|
2360 |
||
2361 |
^ self at:#onlyShowTooltipsForActiveWindow put:aBooleanOrNil |
|
2362 |
! |
|
2363 |
||
5808 | 2364 |
opaqueTableColumnResizing |
2365 |
"return the flag which controls if table column resizing should be done |
|
2366 |
animated (opaque)" |
|
2367 |
||
9302 | 2368 |
^ self at:#opaqueTableColumnResizing ifAbsent:false |
5808 | 2369 |
|
2370 |
" |
|
2371 |
UserPreferences current opaqueTableColumnResizing |
|
2372 |
" |
|
2373 |
! |
|
2374 |
||
2375 |
opaqueTableColumnResizing:aBoolean |
|
2376 |
"change the flag which controls if table column resizing should be done |
|
2377 |
animated (opaque)" |
|
2378 |
||
2379 |
^ self at:#opaqueTableColumnResizing put:aBoolean |
|
2380 |
||
2381 |
" |
|
2382 |
UserPreferences current opaqueTableColumnResizing:true |
|
2383 |
" |
|
2384 |
||
2385 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
|
2386 |
! |
|
2387 |
||
4684
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2388 |
opaqueVariablePanelResizing |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2389 |
"return the flag which controls if variable panel resizing should be done |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2390 |
animated (opaque)" |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2391 |
|
18550 | 2392 |
^ self at:#opaqueVariablePanelResizing ifAbsent:true |
4684
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2393 |
|
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2394 |
" |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2395 |
UserPreferences current opaqueVariablePanelResizing |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2396 |
" |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2397 |
|
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2398 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2399 |
! |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2400 |
|
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2401 |
opaqueVariablePanelResizing:aBoolean |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2402 |
"change the flag which controls if variable panel resizing should be done |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2403 |
animated (opaque)" |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2404 |
|
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2405 |
^ self at:#opaqueVariablePanelResizing put:aBoolean |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2406 |
|
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2407 |
" |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2408 |
UserPreferences current opaqueVariablePanelResizing:true |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2409 |
" |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2410 |
|
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2411 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2412 |
! |
45fe4b0a22b0
moved variablePanelOpaqueResize setting to userprefs.
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
2413 |
|
6525 | 2414 |
searchDialogIsModal |
2415 |
"true if the search dialog (in textViews) shall be modal (the default)" |
|
2416 |
||
2417 |
^ self at:#searchDialogIsModal ifAbsent:true |
|
2418 |
||
2419 |
" |
|
2420 |
UserPreferences current searchDialogIsModal |
|
2421 |
" |
|
2422 |
! |
|
2423 |
||
2424 |
searchDialogIsModal:aBooleanOrNil |
|
2425 |
"true if the search dialog (in textViews) shall be modal (the default)" |
|
2426 |
||
2427 |
^ self at:#searchDialogIsModal put:aBooleanOrNil |
|
2428 |
||
2429 |
" |
|
2430 |
UserPreferences current searchDialogIsModal:true |
|
2431 |
UserPreferences current searchDialogIsModal:false |
|
2432 |
UserPreferences current searchDialogIsModal |
|
2433 |
" |
|
2434 |
! |
|
2435 |
||
11931
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2436 |
selectOnRightClick |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2437 |
"the Windows behavior of selecting on a right-click" |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2438 |
|
21385 | 2439 |
^ self |
2440 |
at:#selectOnRightClick |
|
2441 |
ifAbsent:[ OperatingSystem isMSWINDOWSlike ] |
|
11931
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2442 |
! |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2443 |
|
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2444 |
selectOnRightClick:aBoolean |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2445 |
"the Windows behavior of selecting on a right-click" |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2446 |
|
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2447 |
^ self at:#selectOnRightClick put:aBoolean |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2448 |
|
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2449 |
" |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2450 |
UserPreferences current selectOnRightClick:true. |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2451 |
UserPreferences current selectOnRightClick:false. |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2452 |
" |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2453 |
! |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2454 |
|
18808 | 2455 |
shiftMouseWheelScrollsHorizontally |
2456 |
"if true (the default), a shift-mouse-wheel does horizontal scrolling" |
|
2457 |
||
2458 |
^ self at:#shiftMouseWheelScrollsHorizontally ifAbsent:[ true ] |
|
2459 |
||
2460 |
" |
|
2461 |
UserPreferences current shiftMouseWheelScrollsHorizontally |
|
2462 |
" |
|
2463 |
! |
|
2464 |
||
2465 |
shiftMouseWheelScrollsHorizontally:aBoolean |
|
2466 |
"if true (the default), a shift-mouse-wheel does horizontal scrolling" |
|
2467 |
||
2468 |
self at:#shiftMouseWheelScrollsHorizontally put:aBoolean |
|
2469 |
||
2470 |
" |
|
2471 |
UserPreferences current shiftMouseWheelScrollsHorizontally |
|
2472 |
" |
|
2473 |
! |
|
2474 |
||
15588 | 2475 |
shouldRememberLastExtent |
2476 |
^ self at:#shouldRememberLastExtent ifAbsent:true |
|
2477 |
||
2478 |
"Created: / 31-07-2013 / 18:11:17 / cg" |
|
2479 |
! |
|
2480 |
||
2481 |
shouldRememberLastExtent:aBoolean |
|
2482 |
^ self at:#shouldRememberLastExtent put:aBoolean |
|
2483 |
||
2484 |
" |
|
2485 |
UserPreferences current shouldRememberLastExtent. |
|
2486 |
UserPreferences current shouldRememberLastExtent:true. |
|
2487 |
UserPreferences current shouldRememberLastExtent:false. |
|
2488 |
" |
|
2489 |
||
2490 |
"Created: / 31-07-2013 / 18:11:25 / cg" |
|
2491 |
! |
|
2492 |
||
13161 | 2493 |
showDottedLinesInTree |
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
2494 |
^ self |
18262 | 2495 |
at:#showDottedLinesInTree |
2496 |
ifAbsent:[ OperatingSystem isMSWINDOWSlike not |
|
2497 |
or:[ OperatingSystem isVistaLike not ] ] |
|
13161 | 2498 |
|
2499 |
"Created: / 03-12-2010 / 11:31:46 / cg" |
|
13304
19bb57822f90
changed: #showDottedLinesInTree
Claus Gittinger <cg@exept.de>
parents:
13161
diff
changeset
|
2500 |
"Modified: / 09-02-2011 / 23:27:03 / cg" |
13161 | 2501 |
! |
2502 |
||
2503 |
showDottedLinesInTree:aBoolean |
|
2504 |
^ self at:#showDottedLinesInTree put:aBoolean |
|
2505 |
||
2506 |
" |
|
2507 |
UserPreferences current showDottedLinesInTree:true. |
|
2508 |
UserPreferences current showDottedLinesInTree:false. |
|
2509 |
" |
|
2510 |
||
2511 |
"Created: / 03-12-2010 / 11:31:53 / cg" |
|
2512 |
! |
|
2513 |
||
11931
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2514 |
showRightButtonMenuOnRelease |
17232 | 2515 |
"the Windows behavior of showing the right-button menu on a release." |
11931
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2516 |
|
21385 | 2517 |
^ self |
2518 |
at:#showRightButtonMenuOnRelease |
|
2519 |
ifAbsent:[ OperatingSystem isMSWINDOWSlike ] |
|
11931
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2520 |
! |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2521 |
|
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2522 |
showRightButtonMenuOnRelease:aBoolean |
17232 | 2523 |
"the Windows behavior of showing the right-button menu on a release." |
11931
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2524 |
|
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2525 |
^ self at:#showRightButtonMenuOnRelease put:aBoolean |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2526 |
|
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2527 |
" |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2528 |
UserPreferences current showRightButtonMenuOnRelease:true. |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2529 |
UserPreferences current showRightButtonMenuOnRelease:false. |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2530 |
" |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2531 |
! |
59251a906e85
preps for right-menu on buttonRelease
Claus Gittinger <cg@exept.de>
parents:
11930
diff
changeset
|
2532 |
|
6730
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2533 |
startTextDragWithControl |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2534 |
"if true, textDrag is only started when the CTRL-key is down" |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2535 |
|
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2536 |
^ self at:#startTextDragWithControl ifAbsent:true |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2537 |
|
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2538 |
" |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2539 |
UserPreferences current startTextDragWithControl |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2540 |
" |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2541 |
! |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2542 |
|
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2543 |
startTextDragWithControl:aBooleanOrNil |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2544 |
"if true, textDrag is only started when the CTRL-key is down" |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2545 |
|
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2546 |
^ self at:#startTextDragWithControl put:aBooleanOrNil |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2547 |
|
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2548 |
" |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2549 |
UserPreferences current startTextDragWithControl:true |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2550 |
UserPreferences current startTextDragWithControl:false |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2551 |
UserPreferences current startTextDragWithControl |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2552 |
" |
12522 | 2553 |
! |
2554 |
||
13125 | 2555 |
toolTipAutoHideDelay |
16466 | 2556 |
"return the time in seconds, tooltips are shown. 0 means: show forever" |
13125 | 2557 |
|
2558 |
^ self at:#toolTipAutoHideDelay ifAbsentPut:[FlyByHelp showTime] |
|
2559 |
||
2560 |
" |
|
2561 |
UserPreferences current toolTipAutoHideDelay |
|
2562 |
" |
|
2563 |
||
2564 |
"Created: / 10-11-2010 / 12:08:58 / cg" |
|
2565 |
! |
|
2566 |
||
2567 |
toolTipAutoHideDelay:aTimeDuration |
|
20815 | 2568 |
"set the time, tooltips are shown. 0 means: don't hide" |
13125 | 2569 |
|
2570 |
self at:#toolTipAutoHideDelay put:aTimeDuration. |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
2571 |
FlyByHelp showTime: (aTimeDuration isInteger |
20815 | 2572 |
ifTrue:[aTimeDuration] |
2573 |
ifFalse:[aTimeDuration asSeconds]). |
|
13125 | 2574 |
|
2575 |
" |
|
2576 |
UserPreferences current toolTipAutoHideDelay:10 seconds |
|
16466 | 2577 |
UserPreferences current toolTipAutoHideDelay:0 |
13125 | 2578 |
" |
2579 |
||
2580 |
"Created: / 10-11-2010 / 12:09:33 / cg" |
|
13399 | 2581 |
"Modified: / 07-03-2011 / 23:56:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13125 | 2582 |
! |
2583 |
||
15728 | 2584 |
toolTipShapeStyle |
2585 |
"return a symbol, or nil. If nil, the value from the stylesheet is used." |
|
2586 |
||
2587 |
^ self at:#toolTipShapeStyle ifAbsent:[ nil ] |
|
2588 |
||
2589 |
" |
|
2590 |
UserPreferences current toolTipShapeStyle |
|
2591 |
UserPreferences current toolTipShapeStyle:#cartoon |
|
2592 |
UserPreferences current toolTipShapeStyle:nil |
|
2593 |
" |
|
2594 |
! |
|
2595 |
||
2596 |
toolTipShapeStyle:aSymbolOrNil |
|
2597 |
"A symbol, or nil. If nil, the value from the stylesheet is used." |
|
2598 |
||
2599 |
self at:#toolTipShapeStyle put:aSymbolOrNil |
|
2600 |
||
2601 |
" |
|
2602 |
UserPreferences current toolTipShapeStyle |
|
2603 |
UserPreferences current toolTipShapeStyle:#cartoon |
|
2604 |
UserPreferences current toolTipShapeStyle:nil |
|
2605 |
" |
|
2606 |
! |
|
2607 |
||
17541 | 2608 |
useColorsForColorBlindness |
2609 |
"return the flag which controls some color combinations |
|
17593 | 2610 |
to compensate for color deficiencies, such as red-green blindness. |
17541 | 2611 |
For example, red-green is replaced by red-blue" |
2612 |
||
2613 |
^ self at:#useColorsForColorBlindness ifAbsent:[ false ] |
|
2614 |
||
2615 |
" |
|
2616 |
UserPreferences current useColorsForColorBlindness |
|
2617 |
UserPreferences current useColorsForColorBlindness:true |
|
2618 |
UserPreferences current useColorsForColorBlindness:false |
|
2619 |
" |
|
2620 |
! |
|
2621 |
||
2622 |
useColorsForColorBlindness:aBoolean |
|
2623 |
"change the flag which controls some color combinations |
|
17593 | 2624 |
to compensate for color deficiencies, such as red-green blindness. |
17541 | 2625 |
For example, red-green is replaced by red-blue" |
2626 |
||
2627 |
self at:#useColorsForColorBlindness put:aBoolean |
|
2628 |
||
2629 |
" |
|
2630 |
UserPreferences current useColorsForColorBlindness |
|
2631 |
UserPreferences current useColorsForColorBlindness:true |
|
2632 |
UserPreferences current useColorsForColorBlindness:false |
|
2633 |
" |
|
2634 |
! |
|
2635 |
||
17138 | 2636 |
useXFontsOnly |
2637 |
"experimental: |
|
2638 |
a flag to suppress any use of Xft Fonts on X window displays" |
|
2639 |
||
2640 |
^ self at:#useXFontsOnly ifAbsent:[ false ] |
|
2641 |
||
2642 |
" |
|
2643 |
UserPreferences current useXFontsOnly |
|
2644 |
" |
|
2645 |
! |
|
2646 |
||
2647 |
useXFontsOnly:aBoolean |
|
2648 |
"experimental: |
|
2649 |
a flag to suppress any use of Xft Fonts on X window displays" |
|
2650 |
||
2651 |
self at:#useXFontsOnly put:aBoolean |
|
2652 |
||
2653 |
" |
|
2654 |
UserPreferences current useXFontsOnly |
|
2655 |
UserPreferences current useXFontsOnly:true |
|
2656 |
UserPreferences current useXFontsOnly:false |
|
2657 |
UserPreferences current useXftFontsOnly:true |
|
2658 |
UserPreferences current useXftFontsOnly:false |
|
2659 |
" |
|
2660 |
! |
|
2661 |
||
16265 | 2662 |
useXftFontsOnly |
16266 | 2663 |
"experimental: |
2664 |
return the flag which controls if ONLY Xft fonts should be used. |
|
16265 | 2665 |
If changed, this should be done very early during startup, before any other fonts |
20119 | 2666 |
are already acquired (i.e. before any views are opened)" |
16265 | 2667 |
|
2668 |
^ self at:#useXftFontsOnly ifAbsent:[ false ] |
|
2669 |
||
2670 |
" |
|
2671 |
UserPreferences current useXftFontsOnly |
|
2672 |
" |
|
2673 |
! |
|
2674 |
||
2675 |
useXftFontsOnly:aBooleanOrNil |
|
16266 | 2676 |
"experimental: |
2677 |
set/clear the flag which controls if ONLY Xft fonts should be used. |
|
16265 | 2678 |
If changed, this should be done very early during startup, before any other fonts |
20119 | 2679 |
are already acquired (i.e. before any views are opened)" |
16265 | 2680 |
|
2681 |
^ self at:#useXftFontsOnly put:aBooleanOrNil |
|
2682 |
||
2683 |
" |
|
2684 |
UserPreferences current useXftFontsOnly:true |
|
2685 |
UserPreferences current useXftFontsOnly:false |
|
2686 |
UserPreferences current useXftFontsOnly |
|
2687 |
" |
|
2688 |
! |
|
2689 |
||
21041 | 2690 |
viewStyle |
2691 |
^ self at:#viewStyle ifAbsent:[ nil ] |
|
2692 |
||
2693 |
" |
|
2694 |
UserPreferences current viewStyle |
|
2695 |
UserPreferences current viewStyle:(ViewStyle adwaita) |
|
2696 |
" |
|
2697 |
||
2698 |
"Created: / 24-11-2016 / 17:58:30 / cg" |
|
2699 |
! |
|
2700 |
||
2701 |
viewStyle:aStyleSymbol |
|
2702 |
self at:#viewStyle put:aStyleSymbol |
|
2703 |
||
2704 |
" |
|
2705 |
UserPreferences current viewStyle |
|
2706 |
UserPreferences current viewStyle:(ViewStyle adwaita) |
|
2707 |
" |
|
2708 |
||
2709 |
"Created: / 24-11-2016 / 17:58:51 / cg" |
|
2710 |
! |
|
2711 |
||
12522 | 2712 |
waitCursorVisibleTime |
21781 | 2713 |
"answer the time (in ms), how long a wait cursor should be visible at least" |
12522 | 2714 |
|
13684
a55755f5d41b
changed: #waitCursorVisibleTime
Claus Gittinger <cg@exept.de>
parents:
13652
diff
changeset
|
2715 |
^ 100 |
a55755f5d41b
changed: #waitCursorVisibleTime
Claus Gittinger <cg@exept.de>
parents:
13652
diff
changeset
|
2716 |
|
a55755f5d41b
changed: #waitCursorVisibleTime
Claus Gittinger <cg@exept.de>
parents:
13652
diff
changeset
|
2717 |
"Modified: / 12-09-2011 / 11:08:53 / cg" |
21781 | 2718 |
"Modified (comment): / 30-05-2017 / 19:44:41 / mawalch" |
13122
ddeb0c08d6c7
added: #workAroundRenderingBugOnVista
Claus Gittinger <cg@exept.de>
parents:
13119
diff
changeset
|
2719 |
! |
ddeb0c08d6c7
added: #workAroundRenderingBugOnVista
Claus Gittinger <cg@exept.de>
parents:
13119
diff
changeset
|
2720 |
|
ddeb0c08d6c7
added: #workAroundRenderingBugOnVista
Claus Gittinger <cg@exept.de>
parents:
13119
diff
changeset
|
2721 |
workAroundRenderingBugOnVista |
13124
ae7477260767
changed: #workAroundRenderingBugOnVista
Claus Gittinger <cg@exept.de>
parents:
13122
diff
changeset
|
2722 |
"a temporary kludge for the vista-cleartype character redraw bug" |
13122
ddeb0c08d6c7
added: #workAroundRenderingBugOnVista
Claus Gittinger <cg@exept.de>
parents:
13119
diff
changeset
|
2723 |
|
ddeb0c08d6c7
added: #workAroundRenderingBugOnVista
Claus Gittinger <cg@exept.de>
parents:
13119
diff
changeset
|
2724 |
^ OperatingSystem isMSWINDOWSlike |
ddeb0c08d6c7
added: #workAroundRenderingBugOnVista
Claus Gittinger <cg@exept.de>
parents:
13119
diff
changeset
|
2725 |
|
ddeb0c08d6c7
added: #workAroundRenderingBugOnVista
Claus Gittinger <cg@exept.de>
parents:
13119
diff
changeset
|
2726 |
"Created: / 08-11-2010 / 14:47:52 / cg" |
13124
ae7477260767
changed: #workAroundRenderingBugOnVista
Claus Gittinger <cg@exept.de>
parents:
13122
diff
changeset
|
2727 |
"Modified: / 09-11-2010 / 13:02:43 / cg" |
7549 | 2728 |
! ! |
2729 |
||
2730 |
!UserPreferences methodsFor:'accessing-prefs-browser'! |
|
2731 |
||
19852 | 2732 |
acceptCancelBarOrder |
2733 |
"the original order was accept-cancel-compare. |
|
2734 |
However, we found that the danger of pressing cancel by accident |
|
2735 |
was too high, so we changed the default. |
|
2736 |
If you want to go back, return #acceptCancelCompare here" |
|
2737 |
||
2738 |
^ self at:#acceptCancelBarOrder ifAbsent:#acceptCompareCancel |
|
2739 |
||
2740 |
" |
|
2741 |
UserPreferences current acceptCancelBarOrder |
|
2742 |
UserPreferences current acceptCancelBarOrder: #acceptCompareCancel |
|
2743 |
UserPreferences current acceptCancelBarOrder: #acceptCancelCompare |
|
2744 |
" |
|
2745 |
! |
|
2746 |
||
2747 |
acceptCancelBarOrder:aSymbol |
|
2748 |
"the original order was accept-cancel-compare. |
|
2749 |
However, we found that the danger of pressing cancel by accident |
|
2750 |
was too high, so we changed the default. |
|
2751 |
If you want to go back, return #acceptCancelCompare here" |
|
2752 |
||
2753 |
self at:#acceptCancelBarOrder put:aSymbol |
|
2754 |
||
2755 |
" |
|
2756 |
UserPreferences current acceptCancelBarOrder |
|
2757 |
UserPreferences current acceptCancelBarOrder: #acceptCompareCancel |
|
2758 |
UserPreferences current acceptCancelBarOrder: #acceptCancelCompare |
|
2759 |
" |
|
2760 |
! |
|
2761 |
||
7549 | 2762 |
autoFormatting |
2763 |
"return the flag which controls automatic formatting of code (in some browsers) |
|
2764 |
Notice, the regular browser does not (yet) do automatic formating." |
|
2765 |
||
8233 | 2766 |
^ self at:#autoFormatting ifAbsent:false |
7549 | 2767 |
|
2768 |
" |
|
2769 |
UserPreferences current autoFormatting |
|
2770 |
" |
|
2771 |
||
2772 |
"Created: / 4.2.2000 / 20:08:08 / cg" |
|
2773 |
"Modified: / 5.2.2000 / 15:38:33 / cg" |
|
2774 |
! |
|
2775 |
||
2776 |
autoFormatting:aBoolean |
|
2777 |
"turn on/off automatic formatting of code (in some browsers); |
|
2778 |
Notice, the regular browser does not (yet) do automatic formating." |
|
2779 |
||
2780 |
^ self at:#autoFormatting put:aBoolean |
|
2781 |
||
2782 |
" |
|
2783 |
UserPreferences current autoFormatting:true |
|
2784 |
UserPreferences current autoFormatting:false |
|
2785 |
" |
|
2786 |
||
2787 |
"Created: / 4.2.2000 / 20:08:26 / cg" |
|
2788 |
"Modified: / 5.2.2000 / 15:38:20 / cg" |
|
2789 |
! |
|
2790 |
||
15290 | 2791 |
autoIndentInCodeView |
2792 |
"return the flag which controls automatic cursor control in editors which |
|
2793 |
show code(autoIndent)" |
|
2794 |
||
16699 | 2795 |
^ self at:#autoIndentInCodeView ifAbsent:true |
15290 | 2796 |
|
2797 |
" |
|
2798 |
UserPreferences current autoIndentInCodeView |
|
2799 |
" |
|
2800 |
! |
|
2801 |
||
2802 |
autoIndentInCodeView:aBoolean |
|
2803 |
"flag which controls automatic cursor control in editors which |
|
2804 |
show code(autoIndent)" |
|
2805 |
||
2806 |
^ self at:#autoIndentInCodeView put:aBoolean |
|
2807 |
||
2808 |
" |
|
2809 |
UserPreferences current autoIndentInCodeView:true |
|
2810 |
UserPreferences current autoIndentInCodeView:false |
|
2811 |
" |
|
2812 |
! |
|
2813 |
||
20852 | 2814 |
confirmCheckinOfPrivateClasses |
2815 |
"If set, a confirmation dialog is shown when attempting to checkin a private class." |
|
2816 |
||
2817 |
^ self at:#confirmCheckinOfPrivateClasses ifAbsent:[true]. |
|
2818 |
||
2819 |
" |
|
2820 |
UserPreferences current confirmCheckinOfPrivateClasses |
|
2821 |
UserPreferences current confirmCheckinOfPrivateClasses:true |
|
2822 |
UserPreferences current confirmCheckinOfPrivateClasses:false |
|
2823 |
" |
|
2824 |
! |
|
2825 |
||
2826 |
confirmCheckinOfPrivateClasses:aBoolean |
|
2827 |
"If set, a confirmation dialog is shown when attempting to checkin a private class." |
|
2828 |
||
2829 |
self at:#confirmCheckinOfPrivateClasses put:aBoolean. |
|
2830 |
||
2831 |
" |
|
2832 |
UserPreferences current confirmCheckinOfPrivateClasses |
|
2833 |
UserPreferences current confirmCheckinOfPrivateClasses:true |
|
2834 |
UserPreferences current confirmCheckinOfPrivateClasses:false |
|
2835 |
" |
|
2836 |
! |
|
2837 |
||
7549 | 2838 |
enforceCodeStyle |
2839 |
"return the flag which controls enforcing a certain code style (in some browsers)" |
|
2840 |
||
8233 | 2841 |
^ self at:#enforceCodeStyle ifAbsent:false |
7549 | 2842 |
|
2843 |
" |
|
2844 |
UserPreferences current enforceCodeStyle |
|
10478 | 2845 |
UserPreferences current enforceCodeStyle:true |
2846 |
UserPreferences current enforceCodeStyle:false |
|
7549 | 2847 |
" |
10478 | 2848 |
|
2849 |
"Modified: / 27-03-2007 / 21:51:42 / cg" |
|
6730
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2850 |
! |
7bbf6fdeda01
textDrag start with CTRL (optional)
Claus Gittinger <cg@exept.de>
parents:
6717
diff
changeset
|
2851 |
|
12947 | 2852 |
enforceComment |
2853 |
"return the flag which controls enforcing a comment in accepted methods" |
|
2854 |
||
2855 |
^ self at:#enforceComment ifAbsent:false |
|
2856 |
||
2857 |
" |
|
2858 |
UserPreferences current enforceComment |
|
2859 |
UserPreferences current enforceComment:true |
|
2860 |
UserPreferences current enforceComment:false |
|
2861 |
" |
|
2862 |
||
2863 |
"Created: / 17-07-2010 / 14:16:27 / cg" |
|
2864 |
! |
|
2865 |
||
2866 |
enforceComment:aBoolean |
|
2867 |
"set/clear the flag which controls enforcing a comment in accepted methods" |
|
2868 |
||
2869 |
^ self at:#enforceComment put:aBoolean |
|
2870 |
||
2871 |
" |
|
2872 |
UserPreferences current enforceComment:true |
|
2873 |
UserPreferences current enforceComment:false |
|
2874 |
" |
|
2875 |
||
2876 |
"Created: / 17-07-2010 / 14:17:02 / cg" |
|
2877 |
! |
|
2878 |
||
14415 | 2879 |
runLintChecksInBackground |
2880 |
"controls the browser's lint-check behavior; |
|
2881 |
background operation (Jan's pref) makes it difficult to stop and debug...)" |
|
2882 |
||
2883 |
^ self at:#runLintChecksInBackground ifAbsent:true |
|
2884 |
||
2885 |
" |
|
2886 |
UserPreferences current runLintChecksInBackground |
|
2887 |
UserPreferences current runLintChecksInBackground:true |
|
2888 |
UserPreferences current runLintChecksInBackground:false |
|
2889 |
" |
|
2890 |
||
2891 |
"Created: / 17-07-2010 / 14:16:27 / cg" |
|
2892 |
! |
|
2893 |
||
2894 |
runLintChecksInBackground:aBoolean |
|
2895 |
"controls the browser's lint-check behavior; |
|
2896 |
background operation (Jan's pref) makes it difficult to stop and debug...)" |
|
2897 |
||
2898 |
^ self at:#runLintChecksInBackground put:aBoolean |
|
2899 |
||
2900 |
" |
|
2901 |
UserPreferences current runLintChecksInBackground:true |
|
2902 |
UserPreferences current runLintChecksInBackground:false |
|
2903 |
" |
|
2904 |
||
2905 |
"Created: / 17-07-2010 / 14:17:02 / cg" |
|
2906 |
! |
|
2907 |
||
9320 | 2908 |
showAcceptCancelBarInBrowser |
19797 | 2909 |
"this is a little confusing: the codeview2 has its own accept/cancel bar |
2910 |
which can be turned on separately. |
|
2911 |
The codeview2 will suppress the regular accept/cancel bar, if it uses its own." |
|
2912 |
||
11214
ad61819068b9
changed #showAcceptCancelBarInBrowser
Claus Gittinger <cg@exept.de>
parents:
11213
diff
changeset
|
2913 |
^ self at:#showAcceptCancelBarInBrowser ifAbsent:true |
9320 | 2914 |
|
2915 |
" |
|
2916 |
UserPreferences current showAcceptCancelBarInBrowser |
|
2917 |
UserPreferences current showAcceptCancelBarInBrowser:true |
|
2918 |
UserPreferences current showAcceptCancelBarInBrowser:false |
|
2919 |
" |
|
2920 |
! |
|
2921 |
||
2922 |
showAcceptCancelBarInBrowser:aBoolean |
|
19797 | 2923 |
"this is a little confusing: the codeview2 has its own accept/cancel bar |
2924 |
which can be turned on separately. |
|
2925 |
The codeview2 will suppress the regular accept/cancel bar, if it uses its own." |
|
9320 | 2926 |
|
2927 |
^ self at:#showAcceptCancelBarInBrowser put:aBoolean |
|
2928 |
||
2929 |
" |
|
2930 |
UserPreferences current showAcceptCancelBarInBrowser:true |
|
2931 |
UserPreferences current showAcceptCancelBarInBrowser:false |
|
2932 |
" |
|
2933 |
! |
|
2934 |
||
20625 | 2935 |
showMarqueeInfo |
2936 |
"If set, show multiline infos in the info area as a scrolling marquee text" |
|
2937 |
||
2938 |
^ self at:#showMarqueeInfo ifAbsent:[true]. |
|
2939 |
||
2940 |
" |
|
2941 |
UserPreferences current showMarqueeInfo |
|
2942 |
UserPreferences current showMarqueeInfo:true |
|
2943 |
UserPreferences current showMarqueeInfo:false |
|
2944 |
" |
|
2945 |
||
2946 |
"Created: / 04-04-2012 / 14:02:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2947 |
! |
|
2948 |
||
2949 |
showMarqueeInfo:aBoolean |
|
2950 |
"If set, show multiline infos in the info area as a scrolling marquee text" |
|
2951 |
||
2952 |
self at:#showMarqueeInfo put:aBoolean. |
|
2953 |
||
2954 |
" |
|
2955 |
UserPreferences current showMarqueeInfo |
|
2956 |
UserPreferences current showMarqueeInfo:true |
|
2957 |
UserPreferences current showMarqueeInfo:false |
|
2958 |
" |
|
2959 |
||
2960 |
"Created: / 04-04-2012 / 14:02:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2961 |
! |
|
2962 |
||
3347 | 2963 |
syntaxColoring |
3360 | 2964 |
"return the flag which controls syntax coloring (in the browsers)" |
2965 |
||
8233 | 2966 |
^ self at:#syntaxColoring ifAbsent:true |
3347 | 2967 |
|
2968 |
" |
|
2969 |
UserPreferences current syntaxColoring |
|
2970 |
" |
|
2971 |
||
3827
d3dd75b5ced3
syntax coloring is on by default;
Claus Gittinger <cg@exept.de>
parents:
3409
diff
changeset
|
2972 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
3347 | 2973 |
! |
2974 |
||
2975 |
syntaxColoring:aBoolean |
|
3360 | 2976 |
"turn on/off syntaxColoring (in the browsers)." |
2977 |
||
3347 | 2978 |
^ self at:#syntaxColoring put:aBoolean |
2979 |
||
3357 | 2980 |
" |
2981 |
UserPreferences current syntaxColoring:true |
|
2982 |
UserPreferences current syntaxColoring:false |
|
2983 |
" |
|
2984 |
||
3347 | 2985 |
"Created: / 31.3.1998 / 13:44:00 / cg" |
3360 | 2986 |
"Modified: / 1.4.1998 / 13:23:03 / cg" |
12189 | 2987 |
! |
2988 |
||
2989 |
useSearchBarInBrowser |
|
12191 | 2990 |
"true, if the search-entry fields are initially shown in the browser itself |
12189 | 2991 |
(like in firefox). False if a dialog is to be opened." |
2992 |
||
2993 |
"/ cg: disabled for now, until fixed. |
|
2994 |
"/ does not initially select the searchString. |
|
2995 |
"/ thereby interrupting the workflow... |
|
2996 |
||
2997 |
^ self at:#useSearchBarInBrowser ifAbsent:false |
|
2998 |
||
2999 |
" |
|
3000 |
UserPreferences current useSearchBarInBrowser |
|
3001 |
UserPreferences current useSearchBarInBrowser:true |
|
3002 |
UserPreferences current useSearchBarInBrowser:false |
|
3003 |
" |
|
3004 |
! |
|
3005 |
||
3006 |
useSearchBarInBrowser:aBoolean |
|
12191 | 3007 |
"true, if the search-entry fields are initially shown in the browser itself |
12189 | 3008 |
(like in firefox). False if a dialog is to be opened." |
3009 |
||
3010 |
^ self at:#useSearchBarInBrowser put:aBoolean |
|
3011 |
||
3012 |
" |
|
3013 |
UserPreferences current useSearchBarInBrowser:true |
|
3014 |
UserPreferences current useSearchBarInBrowser:false |
|
3015 |
" |
|
3360 | 3016 |
! ! |
3017 |
||
7549 | 3018 |
!UserPreferences methodsFor:'accessing-prefs-browser-colors'! |
3019 |
||
12905 | 3020 |
colorForInstrumentedFullyCoveredCode |
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
3021 |
"the color for code in the browser which is instrumented |
12905 | 3022 |
and where all branches have been executed (also code, which has been executed)" |
3023 |
||
3024 |
|clr| |
|
3025 |
||
3026 |
clr := self at:#colorForInstrumentedFullyCoveredCode ifAbsent:nil. |
|
3027 |
clr isNil ifTrue:[ |
|
18262 | 3028 |
clr := Color green slightlyDarkened "darkened". |
3029 |
"/ self at:#colorForInstrumentedFullyCoveredCode put:clr. |
|
12905 | 3030 |
]. |
3031 |
^ clr |
|
3032 |
||
3033 |
" |
|
3034 |
UserPreferences current |
|
18262 | 3035 |
at:#emphasisForInstrumentedFullyCoveredCode |
3036 |
put:(Color green slightlyDarkened). |
|
12905 | 3037 |
" |
3038 |
||
3039 |
"Created: / 28-04-2010 / 13:58:52 / cg" |
|
3040 |
! |
|
3041 |
||
15915 | 3042 |
colorForInstrumentedFullyCoveredCode:aColor |
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
3043 |
"the color for code in the browser which is instrumented |
15915 | 3044 |
and where all branches have been executed (also code, which has been executed)" |
3045 |
||
3046 |
self at:#colorForInstrumentedFullyCoveredCode put:aColor. |
|
3047 |
||
3048 |
" |
|
3049 |
UserPreferences current colorForInstrumentedFullyCoveredCode:(Color green slightlyDarkened). |
|
3050 |
UserPreferences current colorForInstrumentedFullyCoveredCode:nil. |
|
3051 |
" |
|
3052 |
||
3053 |
"Created: / 28-04-2010 / 13:58:52 / cg" |
|
3054 |
! |
|
3055 |
||
12905 | 3056 |
colorForInstrumentedNeverCalledCode |
3057 |
"the color for code in the browser which is instrumented but has never been called" |
|
3058 |
||
3059 |
|clr| |
|
3060 |
||
3061 |
clr := self at:#colorForInstrumentedNeverCalledCode ifAbsent:nil. |
|
3062 |
clr isNil ifTrue:[ |
|
18262 | 3063 |
clr := Color red "slightlyDarkened" "darkened". |
3064 |
"/ self at:#colorForInstrumentedNeverCalledCode put:clr. |
|
12905 | 3065 |
]. |
3066 |
^ clr |
|
3067 |
||
3068 |
" |
|
3069 |
UserPreferences current |
|
18262 | 3070 |
at:#colorForInstrumentedNeverCalledCode |
3071 |
put:(Color red slightlyDarkened). |
|
12905 | 3072 |
" |
3073 |
||
3074 |
"Created: / 28-04-2010 / 13:59:43 / cg" |
|
3075 |
! |
|
3076 |
||
15915 | 3077 |
colorForInstrumentedNeverCalledCode:aColor |
3078 |
"the color for code in the browser which is instrumented but has never been called" |
|
3079 |
||
3080 |
self at:#colorForInstrumentedNeverCalledCode put:aColor. |
|
3081 |
||
3082 |
" |
|
3083 |
UserPreferences current colorForInstrumentedNeverCalledCode:(Color red slightlyDarkened). |
|
3084 |
UserPreferences current colorForInstrumentedNeverCalledCode:nil. |
|
3085 |
" |
|
3086 |
||
3087 |
"Created: / 28-04-2010 / 13:59:43 / cg" |
|
3088 |
! |
|
3089 |
||
12905 | 3090 |
colorForInstrumentedPartiallyCoveredCode |
3091 |
"color for code in the browser which is instrumented and where some branches have been |
|
3092 |
executed" |
|
3093 |
||
3094 |
|clr| |
|
3095 |
||
3096 |
clr := self at:#colorForInstrumentedPartiallyCoveredCode ifAbsent:nil. |
|
3097 |
clr isNil ifTrue:[ |
|
18262 | 3098 |
clr := Color orange "slightlyDarkened". |
3099 |
"/ self at:#colorForInstrumentedPartiallyCoveredCode put:clr. |
|
12905 | 3100 |
]. |
3101 |
^ clr |
|
3102 |
||
3103 |
" |
|
3104 |
UserPreferences current |
|
18262 | 3105 |
at:#colorForInstrumentedPartiallyCoveredCode |
3106 |
put:(Color orange slightlyLightened). |
|
12905 | 3107 |
" |
3108 |
||
3109 |
"Created: / 28-04-2010 / 14:00:56 / cg" |
|
3110 |
! |
|
3111 |
||
15915 | 3112 |
colorForInstrumentedPartiallyCoveredCode:aColor |
3113 |
"color for code in the browser which is instrumented and where some branches have been |
|
3114 |
executed" |
|
3115 |
||
3116 |
self at:#colorForInstrumentedPartiallyCoveredCode put:aColor. |
|
3117 |
||
3118 |
" |
|
3119 |
UserPreferences current colorForInstrumentedPartiallyCoveredCode:(Color orange slightlyLightened). |
|
3120 |
UserPreferences current colorForInstrumentedPartiallyCoveredCode:nil. |
|
3121 |
" |
|
3122 |
||
3123 |
"Created: / 28-04-2010 / 14:00:56 / cg" |
|
3124 |
! |
|
3125 |
||
13652
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3126 |
colorForPseudoProtocolsInMethodListInBrowser |
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3127 |
"eventually, make this also a settings value (for people with weak gray-visibility)" |
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3128 |
|
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3129 |
|bg| |
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3130 |
|
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3131 |
SelectionInListView notNil ifTrue:[ |
18262 | 3132 |
bg := SelectionInListView defaultBackgroundColor. |
13652
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3133 |
]. |
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3134 |
bg isNil ifTrue:[ |
18262 | 3135 |
View notNil ifTrue:[ |
3136 |
bg := View defaultBackgroundColor. |
|
3137 |
]. |
|
3138 |
bg isNil ifTrue:[ |
|
3139 |
^ Color gray |
|
3140 |
]. |
|
13652
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3141 |
]. |
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3142 |
|
16698 | 3143 |
(Color gray brightness - (bg brightness)) abs < 0.3 ifTrue:[ |
18262 | 3144 |
(bg brightness) > 0.7 ifTrue:[ |
3145 |
^ Color gray:20. |
|
3146 |
]. |
|
3147 |
^ Color gray:80. |
|
13652
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3148 |
]. |
16698 | 3149 |
^ Color gray |
13652
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3150 |
|
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3151 |
"Created: / 07-09-2011 / 09:51:12 / cg" |
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3152 |
! |
af8438e37bd6
added: #colorForPseudoProtocolsInMethodListInBrowser
Claus Gittinger <cg@exept.de>
parents:
13597
diff
changeset
|
3153 |
|
7549 | 3154 |
emphasisForChangedCode |
10177 | 3155 |
"the emphasis for changed code (in changeSet) in the browser" |
3156 |
||
7549 | 3157 |
|emp| |
3158 |
||
3159 |
emp := self at:#emphasisForChangedCode ifAbsent:nil. |
|
3160 |
emp isNil ifTrue:[ |
|
11143 | 3161 |
emp := #color->Color red darkened. |
3162 |
emp := Array with:#bold with:emp. |
|
3163 |
"/ emp := #color->Color blue darkened. |
|
3164 |
self at:#emphasisForChangedCode put:emp. |
|
7549 | 3165 |
]. |
3166 |
^ emp |
|
9276
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3167 |
|
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3168 |
" |
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3169 |
self allInstancesDo:[:pref |pref at:#emphasisForChangedCode put:nil]. |
9807 | 3170 |
UserPreferences current emphasisForChangedCode. |
3171 |
UserPreferences current at:#emphasisForChangedCode put:nil. |
|
9276
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3172 |
" |
9807 | 3173 |
|
10177 | 3174 |
"Modified: / 10-11-2006 / 17:27:23 / cg" |
3175 |
! |
|
3176 |
||
3177 |
emphasisForChangedCodeInSmallTeam |
|
3178 |
"the emphasis for changed code (in a remote changeSet) in the browser. |
|
3179 |
You need the SmallTeam extension to be present for this to work." |
|
3180 |
||
3181 |
|emp| |
|
3182 |
||
3183 |
emp := self at:#emphasisForChangedCodeInSmallTeam ifAbsent:nil. |
|
3184 |
emp isNil ifTrue:[ |
|
11143 | 3185 |
emp := #color->Color yellow darkened. |
3186 |
emp := Array with:#bold with:emp. |
|
3187 |
self at:#emphasisForChangedCodeInSmallTeam put:emp. |
|
10177 | 3188 |
]. |
3189 |
^ emp |
|
3190 |
||
3191 |
" |
|
3192 |
self allInstancesDo:[:pref |pref at:#emphasisForChangedCodeInSmallTeam put:nil]. |
|
3193 |
UserPreferences current emphasisForChangedCodeInSmallTeam. |
|
3194 |
UserPreferences current at:#emphasisForChangedCodeInSmallTeam put:nil. |
|
3195 |
" |
|
3196 |
||
3197 |
"Created: / 10-11-2006 / 16:31:00 / cg" |
|
6832 | 3198 |
! |
3199 |
||
7549 | 3200 |
emphasisForDifferentPackage |
3201 |
|emp| |
|
3202 |
||
3203 |
emp := self at:#emphasisForDifferentPackage ifAbsent:nil. |
|
3204 |
emp isNil ifTrue:[ |
|
11143 | 3205 |
emp := #color->Color green darkened. |
3206 |
"/ emp := Array with:#bold with:emp. |
|
3207 |
self at:#emphasisForDifferentPackage put:emp. |
|
7549 | 3208 |
]. |
3209 |
^ emp |
|
9276
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3210 |
|
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3211 |
" |
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3212 |
self allInstancesDo:[:pref |pref at:#emphasisForDifferentPackage put:nil]. |
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3213 |
" |
6832 | 3214 |
! |
3215 |
||
12901 | 3216 |
emphasisForInstrumentedFullyCoveredCode |
3217 |
"the emphasis for code in the browser which is instrumented and where all branches have been |
|
3218 |
executed" |
|
3219 |
||
3220 |
|emp| |
|
3221 |
||
3222 |
emp := self at:#emphasisForInstrumentedFullyCoveredCode ifAbsent:nil. |
|
3223 |
emp isNil ifTrue:[ |
|
18262 | 3224 |
emp := #color->Color green slightlyDarkened. |
3225 |
emp := Array with:#bold with:emp. |
|
3226 |
"/ emp := #color->Color blue darkened. |
|
3227 |
self at:#emphasisForInstrumentedFullyCoveredCode put:emp. |
|
12901 | 3228 |
]. |
3229 |
^ emp |
|
3230 |
||
3231 |
" |
|
3232 |
UserPreferences current |
|
18262 | 3233 |
at:#emphasisForInstrumentedFullyCoveredCode |
3234 |
put:(Array with:#bold with:(#color->Color green slightlyDarkened)). |
|
12901 | 3235 |
" |
3236 |
||
3237 |
"Created: / 27-04-2010 / 13:01:01 / cg" |
|
3238 |
"Modified: / 27-04-2010 / 14:48:11 / cg" |
|
3239 |
! |
|
3240 |
||
3241 |
emphasisForInstrumentedNeverCalledCode |
|
3242 |
"the emphasis for code in the browser which is instrumented but has never been called" |
|
3243 |
||
3244 |
|emp| |
|
3245 |
||
3246 |
emp := self at:#emphasisForInstrumentedNeverCalledCode ifAbsent:nil. |
|
3247 |
emp isNil ifTrue:[ |
|
18262 | 3248 |
emp := #color->Color red slightlyDarkened. |
3249 |
emp := Array with:#bold with:emp. |
|
3250 |
"/ emp := #color->Color blue darkened. |
|
3251 |
self at:#emphasisForInstrumentedNeverCalledCode put:emp. |
|
12901 | 3252 |
]. |
3253 |
^ emp |
|
3254 |
||
3255 |
" |
|
3256 |
UserPreferences current |
|
18262 | 3257 |
at:#emphasisForInstrumentedNeverCalledCode |
3258 |
put:(Array with:#bold with:(#color->Color red slightlyDarkened)). |
|
12901 | 3259 |
" |
3260 |
||
3261 |
"Created: / 27-04-2010 / 12:59:47 / cg" |
|
3262 |
"Modified: / 27-04-2010 / 14:48:39 / cg" |
|
3263 |
! |
|
3264 |
||
3265 |
emphasisForInstrumentedPartiallyCoveredCode |
|
3266 |
"the emphasis for code in the browser which is instrumented and where some branches have been |
|
3267 |
executed" |
|
3268 |
||
3269 |
|emp| |
|
3270 |
||
3271 |
emp := self at:#emphasisForInstrumentedPartiallyCoveredCode ifAbsent:nil. |
|
3272 |
emp isNil ifTrue:[ |
|
18262 | 3273 |
emp := #color->Color orange. |
3274 |
emp := Array with:#bold with:emp. |
|
3275 |
"/ emp := #color->Color blue darkened. |
|
3276 |
self at:#emphasisForInstrumentedPartiallyCoveredCode put:emp. |
|
12901 | 3277 |
]. |
3278 |
^ emp |
|
3279 |
||
3280 |
" |
|
3281 |
UserPreferences current |
|
18262 | 3282 |
at:#emphasisForInstrumentedPartiallyCoveredCode |
3283 |
put:(Array with:#bold with:(#color->Color orange slightlyLightened)). |
|
12901 | 3284 |
" |
3285 |
||
3286 |
"Created: / 27-04-2010 / 13:01:20 / cg" |
|
12902
a7d0611e313a
comment/format in: #emphasisForInstrumentedPartiallyCoveredCode
Claus Gittinger <cg@exept.de>
parents:
12901
diff
changeset
|
3287 |
"Modified: / 27-04-2010 / 18:50:43 / cg" |
12901 | 3288 |
! |
3289 |
||
7549 | 3290 |
emphasisForModifiedBuffer |
3291 |
|emp| |
|
3292 |
||
3293 |
emp := self at:#emphasisForModifiedBuffer ifAbsent:nil. |
|
3294 |
emp isNil ifTrue:[ |
|
11143 | 3295 |
emp := #color->Color red darkened. |
3296 |
emp := Array with:#bold with:emp. |
|
3297 |
self at:#emphasisForModifiedBuffer put:emp. |
|
7549 | 3298 |
]. |
3299 |
^ emp |
|
9276
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3300 |
|
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3301 |
" |
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3302 |
self allInstancesDo:[:pref |pref at:#emphasisForModifiedBuffer put:nil]. |
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3303 |
" |
6832 | 3304 |
! |
3305 |
||
13399 | 3306 |
emphasisForNamespacedCode |
3307 |
"the emphasis for changed code (in changeSet) in the browser" |
|
3308 |
||
3309 |
|emp| |
|
3310 |
||
3311 |
emp := self at:#emphasisForNamespacedCode ifAbsent:nil. |
|
3312 |
emp isNil ifTrue:[ |
|
18262 | 3313 |
emp := #color->Color green darkened. |
3314 |
"/ emp := Array with:#bold with:emp. |
|
3315 |
"/ emp := #color->Color blue darkened. |
|
3316 |
self at:#emphasisForNamespacedCode put:emp. |
|
13399 | 3317 |
]. |
3318 |
^ emp |
|
3319 |
||
3320 |
" |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
3321 |
self allInstancesDo:[:pref |pref at:#emphasisForNamespacedCode put:nil]. |
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
3322 |
UserPreferences current emphasisForNamespacedCode. |
13399 | 3323 |
UserPreferences current at:#emphasisForNamespacedCode put:nil. |
3324 |
" |
|
3325 |
||
3326 |
"Created: / 01-07-2010 / 18:39:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3327 |
! |
|
3328 |
||
7549 | 3329 |
emphasisForObsoleteCode |
3330 |
|emp| |
|
3331 |
||
3332 |
emp := self at:#emphasisForObsoleteCode ifAbsent:nil. |
|
3333 |
emp isNil ifTrue:[ |
|
11143 | 3334 |
emp := #color->Color red. |
3335 |
emp := Array with:#bold with:emp. |
|
3336 |
self at:#emphasisForObsoleteCode put:emp. |
|
7549 | 3337 |
]. |
3338 |
^ emp |
|
9276
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3339 |
|
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3340 |
" |
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3341 |
self allInstancesDo:[:pref |pref at:#emphasisForObsoleteCode put:nil]. |
120c3f8fc50b
changed code: boldify by default
Claus Gittinger <cg@exept.de>
parents:
9184
diff
changeset
|
3342 |
" |
6832 | 3343 |
! |
3344 |
||
7549 | 3345 |
emphasisForReadVariable |
3346 |
|emp| |
|
3347 |
||
3348 |
emp := self at:#emphasisForReadVariable ifAbsent:nil. |
|
3349 |
emp isNil ifTrue:[ |
|
11143 | 3350 |
emp := #underline. |
3351 |
self at:#emphasisForReadVariable put:emp. |
|
7549 | 3352 |
]. |
3353 |
^ emp |
|
6832 | 3354 |
! |
3355 |
||
7549 | 3356 |
emphasisForWrittenVariable |
3357 |
|emp| |
|
3358 |
||
3359 |
emp := self at:#emphasisForWrittenVariable ifAbsent:nil. |
|
3360 |
emp isNil ifTrue:[ |
|
11143 | 3361 |
emp := Array with:#underline with:#underlineColor->Color red. |
3362 |
self at:#emphasisForWrittenVariable put:emp. |
|
7549 | 3363 |
]. |
3364 |
^ emp |
|
6832 | 3365 |
! ! |
3366 |
||
7549 | 3367 |
!UserPreferences methodsFor:'accessing-prefs-browser-syntaxColoring'! |
3360 | 3368 |
|
22318 | 3369 |
annotationColor |
3370 |
"the color used for annotations/resource specs; |
|
3371 |
If syntaxColoring is turned on." |
|
3372 |
||
3373 |
^ self at:#annotationColor ifAbsent:[nil] |
|
3374 |
||
3375 |
"Created: / 21-10-2017 / 17:02:15 / cg" |
|
3376 |
! |
|
3377 |
||
3378 |
annotationEmphasis |
|
3379 |
"the emphasis used for annotations/resource specs; |
|
3380 |
If syntaxColoring is turned on." |
|
3381 |
||
3382 |
^ self at:#annotationEmphasis ifAbsent:[nil] |
|
3383 |
||
3384 |
"Created: / 21-10-2017 / 17:02:32 / cg" |
|
3385 |
! |
|
3386 |
||
3360 | 3387 |
argumentIdentifierColor |
3388 |
"the color used for argument identifiers; |
|
3389 |
If syntaxColoring is turned on." |
|
3390 |
||
19255 | 3391 |
^ self at:#argumentIdentifierColor ifAbsent:[self identifierColor] |
3360 | 3392 |
|
3393 |
"Created: / 31.3.1998 / 15:08:20 / cg" |
|
3394 |
"Modified: / 1.4.1998 / 13:19:58 / cg" |
|
3395 |
! |
|
3396 |
||
3397 |
argumentIdentifierEmphasis |
|
3398 |
"the emphasis used for argument identifiers; |
|
3399 |
If syntaxColoring is turned on." |
|
3400 |
||
19255 | 3401 |
^ self at:#argumentIdentifierEmphasis ifAbsent:[self identifierEmphasis] |
3360 | 3402 |
|
3403 |
"Created: / 31.3.1998 / 15:16:40 / cg" |
|
3404 |
"Modified: / 1.4.1998 / 13:19:55 / cg" |
|
3405 |
! |
|
3406 |
||
4326
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3407 |
badIdentifierColor |
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3408 |
"the color used for illegal identifiers; |
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3409 |
If syntaxColoring is turned on." |
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3410 |
|
19255 | 3411 |
^ self at:#badIdentifierColor ifAbsent:[self identifierColor] |
4326
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3412 |
! |
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3413 |
|
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3414 |
badIdentifierEmphasis |
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3415 |
"the emphasis used for illegal identifiers; |
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3416 |
If syntaxColoring is turned on." |
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3417 |
|
22318 | 3418 |
^ self |
3419 |
at:#badIdentifierEmphasis |
|
3420 |
ifAbsent:[ |
|
3421 |
UserPreferences default |
|
3422 |
at:#badIdentifierEmphasis |
|
3423 |
ifAbsent:#normal] |
|
13347 | 3424 |
|
3425 |
"Modified: / 21-04-2011 / 12:34:50 / cg" |
|
22318 | 3426 |
"Modified (format): / 21-10-2017 / 17:01:23 / cg" |
4326
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3427 |
! |
9b1d4f1bf719
inserted badIdentifierColor & emphasis
Claus Gittinger <cg@exept.de>
parents:
4320
diff
changeset
|
3428 |
|
3360 | 3429 |
booleanConstantColor |
3430 |
"the color used for boolean constants; |
|
3431 |
If syntaxColoring is turned on." |
|
3432 |
||
16589 | 3433 |
^ self at:#booleanConstantColor ifAbsent:[self constantColor] |
3360 | 3434 |
|
3435 |
"Created: / 31.3.1998 / 18:12:06 / cg" |
|
3436 |
"Modified: / 1.4.1998 / 13:20:07 / cg" |
|
3437 |
! |
|
3438 |
||
3439 |
booleanConstantEmphasis |
|
3440 |
"the emphasis used for boolean constants; |
|
3441 |
If syntaxColoring is turned on." |
|
3442 |
||
16589 | 3443 |
^ self at:#booleanConstantEmphasis ifAbsent:[self constantEmphasis] |
3360 | 3444 |
|
3445 |
"Created: / 31.3.1998 / 18:12:46 / cg" |
|
3446 |
"Modified: / 1.4.1998 / 13:26:01 / cg" |
|
3447 |
! |
|
3448 |
||
3361 | 3449 |
bracketColor |
3450 |
"the color used for brackets; |
|
3451 |
If syntaxColoring is turned on." |
|
3452 |
||
19255 | 3453 |
^ self at:#bracketColor ifAbsent:[self defaultSyntaxColor] |
3361 | 3454 |
|
3455 |
" |
|
3456 |
self current at:#bracketColor put:Color red. |
|
3457 |
self current at:#bracketEmphasis put:#bold |
|
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3458 |
|
11143 | 3459 |
self current bracketColor |
3460 |
self current bracketEmphasis |
|
3361 | 3461 |
" |
3462 |
||
3463 |
"Created: / 31.3.1998 / 19:11:38 / cg" |
|
3464 |
"Modified: / 1.4.1998 / 13:22:33 / cg" |
|
3465 |
! |
|
3466 |
||
3467 |
bracketEmphasis |
|
3468 |
"the emphasis used for brackets; |
|
3469 |
If syntaxColoring is turned on." |
|
3470 |
||
19255 | 3471 |
^ self at:#bracketEmphasis ifAbsent:[self defaultSyntaxEmphasis] |
3361 | 3472 |
|
3473 |
" |
|
3474 |
self current at:#bracketEmphasis put:#bold |
|
11143 | 3475 |
self current bracketEmphasis |
3361 | 3476 |
" |
3477 |
||
3478 |
"Created: / 31.3.1998 / 19:11:38 / cg" |
|
3479 |
"Modified: / 1.4.1998 / 13:22:33 / cg" |
|
3480 |
! |
|
3481 |
||
4320 | 3482 |
classVariableIdentifierColor |
3483 |
"the color used for classVar/classInstVar identifiers |
|
3484 |
If syntaxColoring is turned on." |
|
3485 |
||
19255 | 3486 |
^ self at:#classVariableIdentifierColor ifAbsent:[self globalIdentifierColor] |
4320 | 3487 |
|
3488 |
"Modified: / 1.4.1998 / 13:20:47 / cg" |
|
3489 |
"Created: / 4.3.1999 / 12:50:31 / cg" |
|
3490 |
! |
|
3491 |
||
3492 |
classVariableIdentifierEmphasis |
|
3493 |
"the color used for classVar/classInstVar identifiers |
|
3494 |
If syntaxColoring is turned on." |
|
3495 |
||
19255 | 3496 |
^ self at:#classVariableIdentifierEmphasis ifAbsent:[self globalIdentifierEmphasis] |
4320 | 3497 |
|
3498 |
"Modified: / 1.4.1998 / 13:20:47 / cg" |
|
3499 |
"Created: / 4.3.1999 / 12:50:31 / cg" |
|
3500 |
! |
|
3501 |
||
14012 | 3502 |
collectionEnumerationSelectorColor |
3503 |
"the color used for some selected collection enumeration |
|
3504 |
selectors (such as collect:, select: etc.); |
|
3505 |
If syntaxColoring is turned on. |
|
3506 |
If left nil, the normal selector color is used." |
|
3507 |
||
22317 | 3508 |
^ self at:#collectionEnumerationSelectorColor ifAbsent:[self selectorColor] |
14012 | 3509 |
|
3510 |
"Created: / 14-02-2012 / 15:52:39 / cg" |
|
22317 | 3511 |
"Modified: / 21-10-2017 / 16:14:19 / cg" |
14012 | 3512 |
! |
3513 |
||
3514 |
collectionEnumerationSelectorEmphasis |
|
3515 |
"the color used for some selected collection enumeration |
|
3516 |
selectors (such as collect:, select: etc.); |
|
3517 |
If syntaxColoring is turned on. |
|
3518 |
If left nil, the normal selector emphasis is used." |
|
3519 |
||
22317 | 3520 |
^ self at:#collectionEnumerationSelectorEmphasis ifAbsent:[self selectorEmphasis] |
14012 | 3521 |
|
3522 |
"Created: / 14-02-2012 / 15:58:58 / cg" |
|
22317 | 3523 |
"Modified: / 21-10-2017 / 16:14:26 / cg" |
14012 | 3524 |
! |
3525 |
||
3360 | 3526 |
commentColor |
3527 |
"the color used for comments; |
|
3528 |
If syntaxColoring is turned on." |
|
3529 |
||
22318 | 3530 |
^ self |
3531 |
at:#commentColor |
|
3532 |
ifAbsent:[ |
|
3533 |
UserPreferences default |
|
3534 |
at:#commentColor |
|
3535 |
ifAbsent:[Color black]] |
|
13346 | 3536 |
|
3537 |
"Created: / 31-03-1998 / 15:10:23 / cg" |
|
3538 |
"Modified: / 21-04-2011 / 12:33:39 / cg" |
|
22318 | 3539 |
"Modified (format): / 21-10-2017 / 17:02:55 / cg" |
3360 | 3540 |
! |
3541 |
||
3542 |
commentEmphasis |
|
3543 |
"the emphasis used for comments; |
|
3544 |
If syntaxColoring is turned on." |
|
3545 |
||
22318 | 3546 |
^ self |
3547 |
at:#commentEmphasis |
|
3548 |
ifAbsent:[ |
|
3549 |
UserPreferences default |
|
3550 |
at:#commentEmphasis |
|
3551 |
ifAbsent:#normal] |
|
13346 | 3552 |
|
3553 |
"Created: / 31-03-1998 / 15:09:59 / cg" |
|
13347 | 3554 |
"Modified: / 21-04-2011 / 12:34:48 / cg" |
22318 | 3555 |
"Modified (format): / 21-10-2017 / 17:03:11 / cg" |
3360 | 3556 |
! |
3557 |
||
5258 | 3558 |
commentEmphasisAndColor |
13307 | 3559 |
^ self emphasis:(self commentEmphasis) andColor:(self commentColor). |
3560 |
||
3561 |
"Modified: / 17-02-2011 / 14:20:41 / cg" |
|
5258 | 3562 |
! |
3563 |
||
15925 | 3564 |
commentFont |
3565 |
"the font used for comments; nil if no special font has been defined. |
|
3566 |
If syntaxColoring is turned on." |
|
3567 |
||
3568 |
^ self at:#commentFont ifAbsent:nil |
|
3569 |
! |
|
3570 |
||
3571 |
commentFont:aFont |
|
3572 |
"the font used for comments; nil if no special font has been defined. |
|
3573 |
If syntaxColoring is turned on." |
|
3574 |
||
3575 |
self at:#commentFont put:aFont |
|
3576 |
||
3577 |
" |
|
3578 |
UserPreferences current commentFont:(XftFontDescription family: 'Comic Sans' size: 12) |
|
3579 |
UserPreferences current commentFont |
|
3580 |
" |
|
3581 |
! |
|
3582 |
||
3360 | 3583 |
constantColor |
3584 |
"the color used for constants; |
|
3585 |
If syntaxColoring is turned on." |
|
3586 |
||
19255 | 3587 |
^ self at:#constantColor ifAbsent:[UserPreferences default at:#constantColor ifAbsent:[Color black]] |
13346 | 3588 |
|
3589 |
"Created: / 31-03-1998 / 18:13:15 / cg" |
|
3590 |
"Modified: / 21-04-2011 / 12:33:36 / cg" |
|
3360 | 3591 |
! |
3592 |
||
3593 |
constantEmphasis |
|
3594 |
"the emphasis used for constants; |
|
3595 |
If syntaxColoring is turned on." |
|
3596 |
||
19255 | 3597 |
^ self at:#constantEmphasis ifAbsent:[self identifierEmphasis] |
3360 | 3598 |
|
3599 |
"Created: / 31.3.1998 / 18:13:23 / cg" |
|
3600 |
"Modified: / 1.4.1998 / 13:25:43 / cg" |
|
3601 |
! |
|
3602 |
||
9834 | 3603 |
controlFlowSelectorColor |
3604 |
"the color used for some selected controlFlow selectors (such as if, while etc.); |
|
3605 |
If syntaxColoring is turned on." |
|
3606 |
||
22317 | 3607 |
^ self at:#controlFlowSelectorColor ifAbsent:[self selectorColor] |
9834 | 3608 |
|
3609 |
"Created: / 08-09-2006 / 15:51:20 / cg" |
|
22317 | 3610 |
"Modified: / 21-10-2017 / 16:13:58 / cg" |
9834 | 3611 |
! |
3612 |
||
3613 |
controlFlowSelectorEmphasis |
|
3614 |
"the emphasis used for some selected controlFlow selectors (such as if, while etc.); |
|
3615 |
If syntaxColoring is turned on." |
|
3616 |
||
22317 | 3617 |
^ self at:#controlFlowSelectorEmphasis ifAbsent:[self selectorEmphasis] |
9834 | 3618 |
|
3619 |
"Created: / 08-09-2006 / 15:51:04 / cg" |
|
22317 | 3620 |
"Modified: / 21-10-2017 / 16:14:07 / cg" |
9834 | 3621 |
! |
3622 |
||
15545 | 3623 |
debugSelectorColor |
3624 |
"the color used for some selected debug |
|
3625 |
selectors (such as halt etc.); |
|
3626 |
If syntaxColoring is turned on. |
|
3627 |
If left nil, the normal selector color is used." |
|
3628 |
||
3629 |
^ self at:#debugSelectorColor ifAbsent:nil |
|
3630 |
! |
|
3631 |
||
3632 |
debugSelectorEmphasis |
|
3633 |
"the color used for some selected debug |
|
3634 |
selectors (such as halt etc.); |
|
3635 |
If syntaxColoring is turned on. |
|
3636 |
If left nil, the normal selector emphasis is used." |
|
3637 |
||
3638 |
^ self at:#debugSelectorEmphasis ifAbsent:nil |
|
3639 |
! |
|
3640 |
||
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3641 |
defaultSyntaxColor |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3642 |
"the color used for anything else; |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3643 |
If syntaxColoring is turned on." |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3644 |
|
19255 | 3645 |
^ self at:#defaultSyntaxColor ifAbsent:[UserPreferences default at:#defaultSyntaxColor ifAbsent:[Color black]] |
13346 | 3646 |
|
3647 |
"Modified: / 21-04-2011 / 12:31:48 / cg" |
|
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3648 |
! |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3649 |
|
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3650 |
defaultSyntaxEmphasis |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3651 |
"the emphasis used for anything else; |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3652 |
If syntaxColoring is turned on." |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3653 |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
3654 |
^ self |
19255 | 3655 |
at:#defaultSyntaxEmphasis |
3656 |
ifAbsent:[UserPreferences default at:#defaultSyntaxEmphasis ifAbsent:#normal] |
|
13347 | 3657 |
|
3658 |
"Modified: / 21-04-2011 / 12:34:46 / cg" |
|
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3659 |
! |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
3660 |
|
13307 | 3661 |
emphasis:e andColor:c |
3662 |
^ Text addEmphasis:e to:(#color->c). |
|
3663 |
||
3664 |
"Created: / 17-02-2011 / 14:20:25 / cg" |
|
3665 |
! |
|
3666 |
||
8965
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3667 |
emphasizeParenthesisLevel |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3668 |
^ self at:#emphasizeParenthesisLevel ifAbsent:true |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3669 |
|
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3670 |
" |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3671 |
UserPreferences current emphasizeParenthesisLevel |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3672 |
UserPreferences current emphasizeParenthesisLevel:true |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3673 |
UserPreferences current emphasizeParenthesisLevel:false |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3674 |
" |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3675 |
! |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3676 |
|
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3677 |
emphasizeParenthesisLevel:aBoolean |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3678 |
self at:#emphasizeParenthesisLevel put:aBoolean |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3679 |
|
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3680 |
" |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3681 |
UserPreferences current emphasizeParenthesisLevel |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3682 |
UserPreferences current emphasizeParenthesisLevel:true |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3683 |
UserPreferences current emphasizeParenthesisLevel:false |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3684 |
" |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3685 |
! |
b3cebce55744
emphasize parenthesis nesting
Claus Gittinger <cg@exept.de>
parents:
8869
diff
changeset
|
3686 |
|
4341 | 3687 |
errorColor |
3688 |
"the color used for illegal identifiers; |
|
3689 |
If syntaxColoring is turned on." |
|
3690 |
||
19255 | 3691 |
^ self at:#errorColor ifAbsent:[UserPreferences default at:#errorColor ifAbsent:[Color black]] |
13346 | 3692 |
|
3693 |
"Modified: / 21-04-2011 / 12:33:33 / cg" |
|
4341 | 3694 |
! |
3695 |
||
15545 | 3696 |
errorRaisingSelectorColor |
3697 |
"the color used for some selected error raising |
|
3698 |
selectors (such as raise etc.); |
|
3699 |
If syntaxColoring is turned on. |
|
3700 |
If left nil, the normal selector color is used." |
|
3701 |
||
22317 | 3702 |
^ self at:#errorRaisingSelectorColor ifAbsent:[self selectorColor] |
3703 |
||
3704 |
"Modified: / 21-10-2017 / 16:14:43 / cg" |
|
15545 | 3705 |
! |
3706 |
||
3707 |
errorRaisingSelectorEmphasis |
|
3708 |
"the color used for some selected error raising |
|
3709 |
selectors (such as raise etc.); |
|
3710 |
If syntaxColoring is turned on. |
|
3711 |
If left nil, the normal selector emphasis is used." |
|
3712 |
||
22317 | 3713 |
^ self at:#errorRaisingSelectorEmphasis ifAbsent:[self selectorEmphasis] |
3714 |
||
3715 |
"Modified: / 21-10-2017 / 16:14:37 / cg" |
|
15545 | 3716 |
! |
3717 |
||
4306 | 3718 |
fullSelectorCheck |
3719 |
"with fullSelector check, selectors are searched immediately for |
|
3720 |
being implemented in the system. This may not be useful on slow machines" |
|
3721 |
||
19255 | 3722 |
^ self at:#fullSelectorCheck ifAbsent:[UserPreferences default at:#fullSelectorCheck] |
4306 | 3723 |
|
3724 |
"Created: / 31.3.1998 / 15:09:41 / cg" |
|
3725 |
"Modified: / 1.4.1998 / 13:25:06 / cg" |
|
3726 |
! |
|
3727 |
||
4023 | 3728 |
globalClassIdentifierColor |
3729 |
"the color used for global identifiers which are known to be classes; |
|
3730 |
If syntaxColoring is turned on." |
|
3731 |
||
19255 | 3732 |
^ self at:#globalClassIdentifierColor ifAbsent:[self globalIdentifierColor] |
4023 | 3733 |
|
3734 |
"Modified: / 1.4.1998 / 13:20:47 / cg" |
|
3735 |
"Created: / 4.3.1999 / 12:50:31 / cg" |
|
3736 |
! |
|
3737 |
||
3738 |
globalClassIdentifierEmphasis |
|
3739 |
"the emphasis used for global variable identifiers which are known to be classes; |
|
3740 |
If syntaxColoring is turned on." |
|
3741 |
||
19255 | 3742 |
^ self at:#globalClassIdentifierEmphasis ifAbsent:[self globalIdentifierEmphasis] |
4023 | 3743 |
|
3744 |
"Modified: / 1.4.1998 / 13:25:31 / cg" |
|
3745 |
"Created: / 4.3.1999 / 12:51:00 / cg" |
|
3746 |
! |
|
3747 |
||
3360 | 3748 |
globalIdentifierColor |
3749 |
"the color used for global identifiers; |
|
3750 |
If syntaxColoring is turned on." |
|
3751 |
||
19255 | 3752 |
^ self at:#globalIdentifierColor ifAbsent:[self identifierColor] |
3360 | 3753 |
|
3754 |
"Created: / 31.3.1998 / 15:18:49 / cg" |
|
3755 |
"Modified: / 1.4.1998 / 13:20:47 / cg" |
|
3756 |
! |
|
3757 |
||
3758 |
globalIdentifierEmphasis |
|
3759 |
"the emphasis used for global variable identifiers; |
|
3760 |
If syntaxColoring is turned on." |
|
3761 |
||
19255 | 3762 |
^ self at:#globalIdentifierEmphasis ifAbsent:[self identifierEmphasis] |
3360 | 3763 |
|
3764 |
"Created: / 31.3.1998 / 15:18:29 / cg" |
|
3765 |
"Modified: / 1.4.1998 / 13:25:31 / cg" |
|
3766 |
! |
|
3767 |
||
3768 |
hereColor |
|
3769 |
"the color used for the here pseudoVariable; |
|
3770 |
If syntaxColoring is turned on." |
|
3771 |
||
19255 | 3772 |
^ self at:#hereColor ifAbsent:[self selfColor] |
3360 | 3773 |
|
3774 |
"Created: / 31.3.1998 / 17:38:09 / cg" |
|
3775 |
"Modified: / 1.4.1998 / 13:20:57 / cg" |
|
3776 |
! |
|
3777 |
||
3778 |
hereEmphasis |
|
3779 |
"the emphasis used for the hre special variable; |
|
3780 |
If syntaxColoring is turned on." |
|
3781 |
||
19255 | 3782 |
^ self at:#hereEmphasis ifAbsent:[self selfEmphasis] |
3360 | 3783 |
|
3784 |
"Created: / 31.3.1998 / 17:35:13 / cg" |
|
3785 |
"Modified: / 1.4.1998 / 13:25:17 / cg" |
|
3786 |
! |
|
3787 |
||
3788 |
identifierColor |
|
3789 |
"the color used for other identifiers; |
|
3790 |
If syntaxColoring is turned on." |
|
3791 |
||
19255 | 3792 |
^ self at:#identifierColor ifAbsent:[self defaultSyntaxColor] |
3360 | 3793 |
|
3362 | 3794 |
" |
3795 |
UserPreferences current at:#identifierColor put:Color green darkened darkened. |
|
3796 |
UserPreferences current at:#identifierColor put:Color black. |
|
3797 |
" |
|
3798 |
||
3360 | 3799 |
"Created: / 31.3.1998 / 17:35:55 / cg" |
3362 | 3800 |
"Modified: / 2.4.1998 / 10:39:42 / cg" |
3360 | 3801 |
! |
3802 |
||
3803 |
identifierEmphasis |
|
3804 |
"the emphasis used for other identifiers; |
|
3805 |
If syntaxColoring is turned on." |
|
3806 |
||
19255 | 3807 |
^ self at:#identifierEmphasis ifAbsent:[self defaultSyntaxEmphasis] |
3360 | 3808 |
|
3809 |
"Created: / 31.3.1998 / 15:09:41 / cg" |
|
3810 |
"Modified: / 1.4.1998 / 13:25:06 / cg" |
|
3811 |
! |
|
3812 |
||
3378 | 3813 |
instVarIdentifierColor |
3377 | 3814 |
"the color used for instance variable identifiers; |
3815 |
If syntaxColoring is turned on." |
|
3816 |
||
19255 | 3817 |
^ self at:#instVarIdentifierColor ifAbsent:[self identifierColor] |
3377 | 3818 |
|
3819 |
" |
|
3378 | 3820 |
UserPreferences current at:#instVarIdentifierColor put:Color green darkened. |
3821 |
UserPreferences current at:#instVarIdentifierColor put:Color black. |
|
11143 | 3822 |
UserPreferences current instVarIdentifierColor |
3377 | 3823 |
" |
3824 |
||
3825 |
"Created: / 16.4.1998 / 18:31:29 / cg" |
|
3378 | 3826 |
"Modified: / 16.4.1998 / 18:57:06 / cg" |
3377 | 3827 |
! |
3828 |
||
3378 | 3829 |
instVarIdentifierEmphasis |
3377 | 3830 |
"the emphais used for instance variable identifiers; |
3831 |
If syntaxColoring is turned on." |
|
3832 |
||
19255 | 3833 |
^ self at:#instVarIdentifierEmphasis ifAbsent:[self identifierEmphasis] |
3377 | 3834 |
|
3835 |
"Modified: / 1.4.1998 / 13:24:42 / cg" |
|
3378 | 3836 |
"Created: / 16.4.1998 / 18:40:05 / cg" |
3377 | 3837 |
! |
3838 |
||
8420 | 3839 |
jsKeywordColor |
19255 | 3840 |
^ self at:#jsKeywordColor ifAbsent:[self defaultSyntaxColor] |
8420 | 3841 |
! |
3842 |
||
3843 |
jsKeywordEmphasis |
|
19255 | 3844 |
^ self at:#jsKeywordEmphasis ifAbsent:[self defaultSyntaxEmphasis] |
8420 | 3845 |
! |
3846 |
||
3360 | 3847 |
localIdentifierColor |
3848 |
"the color used for local variable identifiers; |
|
3849 |
If syntaxColoring is turned on." |
|
3850 |
||
9144 | 3851 |
^ self at:#localIdentifierColor ifAbsent:[self identifierColor] |
3360 | 3852 |
|
3362 | 3853 |
" |
3854 |
UserPreferences current at:#localIdentifierColor put:Color green darkened. |
|
3855 |
UserPreferences current at:#localIdentifierColor put:Color black. |
|
3856 |
" |
|
3857 |
||
3360 | 3858 |
"Created: / 31.3.1998 / 15:18:07 / cg" |
3362 | 3859 |
"Modified: / 2.4.1998 / 10:40:05 / cg" |
3360 | 3860 |
! |
3861 |
||
3862 |
localIdentifierEmphasis |
|
3863 |
"the emphais used for local variable identifiers; |
|
3864 |
If syntaxColoring is turned on." |
|
3865 |
||
9144 | 3866 |
^ self at:#localIdentifierEmphasis ifAbsent:[self identifierEmphasis] |
3360 | 3867 |
|
3868 |
"Created: / 31.3.1998 / 15:16:56 / cg" |
|
3869 |
"Modified: / 1.4.1998 / 13:24:42 / cg" |
|
3870 |
! |
|
3871 |
||
3872 |
methodSelectorColor |
|
3873 |
"the color used for a methods selector pattern; |
|
3874 |
If syntaxColoring is turned on." |
|
3875 |
||
19255 | 3876 |
^ self at:#methodSelectorColor ifAbsent:[self defaultSyntaxColor] |
3360 | 3877 |
|
3878 |
"Created: / 31.3.1998 / 15:11:24 / cg" |
|
3879 |
"Modified: / 1.4.1998 / 13:24:26 / cg" |
|
3880 |
! |
|
3881 |
||
3882 |
methodSelectorEmphasis |
|
3883 |
"the emphasis used for a methods selector pattern; |
|
3884 |
If syntaxColoring is turned on." |
|
3885 |
||
19255 | 3886 |
^ self at:#methodSelectorEmphasis ifAbsent:[UserPreferences default at:#methodSelectorEmphasis ifAbsent:#normal] |
13346 | 3887 |
|
3888 |
"Created: / 31-03-1998 / 15:11:16 / cg" |
|
13347 | 3889 |
"Modified: / 21-04-2011 / 12:34:42 / cg" |
3360 | 3890 |
! |
3891 |
||
9144 | 3892 |
numberConstantColor |
3893 |
"the color used for number constants; |
|
3894 |
If syntaxColoring is turned on." |
|
3895 |
||
3896 |
^ self at:#numberConstantColor ifAbsent:[ self constantColor ] |
|
3897 |
! |
|
3898 |
||
3899 |
numberConstantEmphasis |
|
3900 |
"the emphasis used for number constants; |
|
3901 |
If syntaxColoring is turned on." |
|
3902 |
||
3903 |
^ self at:#numberConstantEmphasis ifAbsent:[ self constantEmphasis ] |
|
3904 |
! |
|
3905 |
||
8551 | 3906 |
poolVariableIdentifierColor |
3907 |
"the color used for pool variable identifiers |
|
3908 |
If syntaxColoring is turned on." |
|
3909 |
||
19255 | 3910 |
^ self at:#poolVariableIdentifierColor ifAbsent:[self globalIdentifierColor] |
8551 | 3911 |
! |
3912 |
||
3913 |
poolVariableIdentifierEmphasis |
|
3914 |
"the color used for pool variable identifiers |
|
3915 |
If syntaxColoring is turned on." |
|
3916 |
||
19255 | 3917 |
^ self at:#poolVariableIdentifierEmphasis ifAbsent:[self globalIdentifierEmphasis] |
8551 | 3918 |
! |
3919 |
||
4076 | 3920 |
returnColor |
3921 |
"the color used for the return expression; |
|
3922 |
If syntaxColoring is turned on." |
|
3923 |
||
19255 | 3924 |
^ self at:#returnColor ifAbsent:[self defaultSyntaxColor] |
4076 | 3925 |
|
3926 |
"Modified: / 5.1.1980 / 00:43:52 / cg" |
|
3927 |
! |
|
3928 |
||
3929 |
returnEmphasis |
|
3930 |
"the emphasis used for returns; |
|
3931 |
If syntaxColoring is turned on." |
|
3932 |
||
19255 | 3933 |
^ self at:#returnEmphasis ifAbsent:[#bold "self defaultSyntaxEmphasis"] |
4076 | 3934 |
|
3935 |
"Created: / 5.1.1980 / 00:43:39 / cg" |
|
3936 |
! |
|
3937 |
||
3360 | 3938 |
selectorColor |
3939 |
"the color used for message selectors; |
|
3940 |
If syntaxColoring is turned on." |
|
3941 |
||
19255 | 3942 |
^ self at:#selectorColor ifAbsent:[self defaultSyntaxColor] |
3360 | 3943 |
|
3944 |
"Created: / 31.3.1998 / 15:19:19 / cg" |
|
3945 |
"Modified: / 1.4.1998 / 13:24:04 / cg" |
|
3946 |
! |
|
3947 |
||
3948 |
selectorEmphasis |
|
3949 |
"the emphasis used for message selectors; |
|
3950 |
If syntaxColoring is turned on." |
|
3951 |
||
19255 | 3952 |
^ self at:#selectorEmphasis ifAbsent:[UserPreferences default at:#selectorEmphasis ifAbsent:#normal] |
13346 | 3953 |
|
3954 |
"Created: / 31-03-1998 / 15:19:09 / cg" |
|
13347 | 3955 |
"Modified: / 21-04-2011 / 12:34:39 / cg" |
3360 | 3956 |
! |
3957 |
||
3958 |
selfColor |
|
3959 |
"the color used for the self pseudoVariable; |
|
3960 |
If syntaxColoring is turned on." |
|
3961 |
||
19255 | 3962 |
^ self at:#selfColor ifAbsent:[self identifierColor] |
3360 | 3963 |
|
3964 |
"Created: / 31.3.1998 / 17:35:45 / cg" |
|
3965 |
"Modified: / 1.4.1998 / 13:21:07 / cg" |
|
3966 |
! |
|
3967 |
||
3968 |
selfEmphasis |
|
3969 |
"the emphasis used for the self pseudoVariable; |
|
3970 |
If syntaxColoring is turned on." |
|
3971 |
||
19255 | 3972 |
^ self at:#selfEmphasis ifAbsent:[self identifierEmphasis] |
3360 | 3973 |
|
3974 |
"Created: / 31.3.1998 / 17:34:57 / cg" |
|
3975 |
"Modified: / 1.4.1998 / 13:21:51 / cg" |
|
3976 |
! |
|
3977 |
||
14004 | 3978 |
sideEffectAssignmentBackgroundColor |
3979 |
"the bg-color used for assignments with side effect (i.e. to instvars, globals, classvars or pool vars). |
|
3980 |
If nil is returned, the variable's color is used" |
|
3981 |
||
3982 |
^ self at:#sideEffectAssignmentBackgroundColor ifAbsent:[ nil ] |
|
3983 |
||
3984 |
"Created: / 13-02-2012 / 11:35:20 / cg" |
|
3985 |
! |
|
3986 |
||
3987 |
sideEffectAssignmentColor |
|
3988 |
"the color used for assignments with side effect (i.e. to instvars, globals, classvars or pool vars). |
|
3989 |
If nil is returned, the variable's color is used" |
|
3990 |
||
3991 |
^ self at:#sideEffectAssignmentColor ifAbsent:[ nil ] |
|
3992 |
||
3993 |
"Created: / 13-02-2012 / 11:35:09 / cg" |
|
3994 |
! |
|
3995 |
||
3360 | 3996 |
stringColor |
3997 |
"the color used for string constants; |
|
3998 |
If syntaxColoring is turned on." |
|
3999 |
||
16589 | 4000 |
^ self at:#stringColor ifAbsent:[self constantColor] |
3360 | 4001 |
|
4002 |
"Created: / 31.3.1998 / 15:19:50 / cg" |
|
4003 |
"Modified: / 1.4.1998 / 13:22:06 / cg" |
|
4004 |
! |
|
4005 |
||
4006 |
stringEmphasis |
|
4007 |
"the emphasis used for string constants; |
|
4008 |
If syntaxColoring is turned on." |
|
4009 |
||
19255 | 4010 |
^ self at:#stringEmphasis ifAbsent:[self constantEmphasis] |
3360 | 4011 |
|
4012 |
"Created: / 31.3.1998 / 15:19:09 / cg" |
|
4013 |
"Modified: / 1.4.1998 / 13:22:00 / cg" |
|
4014 |
! |
|
4015 |
||
13308
d49548a99889
added: #stringEmphasisAndColor
Claus Gittinger <cg@exept.de>
parents:
13307
diff
changeset
|
4016 |
stringEmphasisAndColor |
d49548a99889
added: #stringEmphasisAndColor
Claus Gittinger <cg@exept.de>
parents:
13307
diff
changeset
|
4017 |
^ self emphasis:(self stringEmphasis) andColor:(self stringColor). |
d49548a99889
added: #stringEmphasisAndColor
Claus Gittinger <cg@exept.de>
parents:
13307
diff
changeset
|
4018 |
|
d49548a99889
added: #stringEmphasisAndColor
Claus Gittinger <cg@exept.de>
parents:
13307
diff
changeset
|
4019 |
"Created: / 17-02-2011 / 14:29:10 / cg" |
d49548a99889
added: #stringEmphasisAndColor
Claus Gittinger <cg@exept.de>
parents:
13307
diff
changeset
|
4020 |
! |
d49548a99889
added: #stringEmphasisAndColor
Claus Gittinger <cg@exept.de>
parents:
13307
diff
changeset
|
4021 |
|
3360 | 4022 |
superColor |
4023 |
"the color used for the super pseudoVariable; |
|
4024 |
If syntaxColoring is turned on." |
|
4025 |
||
19255 | 4026 |
^ self at:#superColor ifAbsent:[self selfColor] |
3360 | 4027 |
|
4028 |
"Created: / 31.3.1998 / 17:37:56 / cg" |
|
4029 |
"Modified: / 1.4.1998 / 13:21:15 / cg" |
|
4030 |
! |
|
4031 |
||
4032 |
superEmphasis |
|
4033 |
"the emphasis used for the super pseudoVariable; |
|
4034 |
If syntaxColoring is turned on." |
|
4035 |
||
19255 | 4036 |
^ self at:#superEmphasis ifAbsent:[self selfEmphasis] |
3360 | 4037 |
|
4038 |
"Created: / 31.3.1998 / 17:35:08 / cg" |
|
4039 |
"Modified: / 1.4.1998 / 13:21:41 / cg" |
|
4040 |
! |
|
4041 |
||
4042 |
symbolColor |
|
4043 |
"the color used for symbol constants; |
|
4044 |
If syntaxColoring is turned on." |
|
4045 |
||
16589 | 4046 |
^ self at:#symbolColor ifAbsent:[self constantColor] |
3360 | 4047 |
|
4048 |
"Created: / 1.4.1998 / 12:57:35 / cg" |
|
4049 |
"Modified: / 1.4.1998 / 13:22:16 / cg" |
|
4050 |
! |
|
4051 |
||
4052 |
symbolEmphasis |
|
4053 |
"the emphasis used for symbol constants; |
|
4054 |
If syntaxColoring is turned on." |
|
4055 |
||
19255 | 4056 |
^ self at:#symbolEmphasis ifAbsent:[self constantEmphasis] |
3360 | 4057 |
|
4058 |
"Created: / 1.4.1998 / 12:57:43 / cg" |
|
4059 |
"Modified: / 1.4.1998 / 13:23:43 / cg" |
|
3352 | 4060 |
! |
4061 |
||
4062 |
thisContextColor |
|
3360 | 4063 |
"the color used for the thisContext pseudoVariable; |
4064 |
If syntaxColoring is turned on." |
|
4065 |
||
19255 | 4066 |
^ self at:#thisContextColor ifAbsent:[self identifierColor] |
3352 | 4067 |
|
4068 |
"Created: / 31.3.1998 / 17:37:49 / cg" |
|
3360 | 4069 |
"Modified: / 1.4.1998 / 13:21:24 / cg" |
3352 | 4070 |
! |
4071 |
||
4072 |
thisContextEmphasis |
|
3360 | 4073 |
"the emphasis used for the thisContext pseudoVariable; |
4074 |
If syntaxColoring is turned on." |
|
4075 |
||
19255 | 4076 |
^ self at:#thisContextEmphasis ifAbsent:[self identifierEmphasis] |
3352 | 4077 |
|
4078 |
"Created: / 31.3.1998 / 17:35:27 / cg" |
|
3360 | 4079 |
"Modified: / 1.4.1998 / 13:21:30 / cg" |
3354 | 4080 |
! |
4081 |
||
4316
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4082 |
unimplementedSelectorColor |
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4083 |
"the color used for bad message selectors; |
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4084 |
If syntaxColoring is turned on." |
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4085 |
|
22317 | 4086 |
^ self |
4087 |
at:#unimplementedSelectorColor |
|
4088 |
ifAbsent:[ |
|
4089 |
UserPreferences default |
|
4090 |
at:#unimplementedSelectorColor |
|
4091 |
ifAbsent:[Color black]] |
|
13346 | 4092 |
|
4093 |
"Modified: / 21-04-2011 / 12:33:29 / cg" |
|
22317 | 4094 |
"Modified (format): / 21-10-2017 / 16:15:10 / cg" |
4316
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4095 |
! |
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4096 |
|
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4097 |
unimplementedSelectorEmphasis |
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4098 |
"the emphasis used for bad message selectors; |
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4099 |
If syntaxColoring is turned on." |
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4100 |
|
22317 | 4101 |
^ self |
4102 |
at:#unimplementedSelectorEmphasis |
|
4103 |
ifAbsent:[ |
|
4104 |
UserPreferences default |
|
4105 |
at:#unimplementedSelectorEmphasis |
|
4106 |
ifAbsent:#normal] |
|
13346 | 4107 |
|
4108 |
"Created: / 31-03-1998 / 15:19:09 / cg" |
|
13347 | 4109 |
"Modified: / 21-04-2011 / 12:34:36 / cg" |
22317 | 4110 |
"Modified (format): / 21-10-2017 / 16:15:25 / cg" |
4316
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4111 |
! |
c3934d0d1e3e
added unimplementedSelector emphasis&colors
Claus Gittinger <cg@exept.de>
parents:
4306
diff
changeset
|
4112 |
|
3354 | 4113 |
unknownIdentifierColor |
3360 | 4114 |
"the color used for unknown identifiers; |
4115 |
If syntaxColoring is turned on." |
|
4116 |
||
19255 | 4117 |
^ self at:#unknownIdentifierColor ifAbsent:[self badIdentifierColor] |
3354 | 4118 |
|
3361 | 4119 |
" |
4120 |
self current at:#unknownIdentifierColor put:Color red. |
|
4121 |
self current at:#unknownIdentifierEmphasis put:#bold |
|
4317
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
4122 |
|
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
4123 |
self current unknownIdentifierColor |
aba88adaf752
concentrated defaults into #initialize method.
Claus Gittinger <cg@exept.de>
parents:
4316
diff
changeset
|
4124 |
self current unknownIdentifierEmphasis |
3361 | 4125 |
" |
4126 |
||
3354 | 4127 |
"Created: / 31.3.1998 / 19:11:38 / cg" |
3360 | 4128 |
"Modified: / 1.4.1998 / 13:22:33 / cg" |
3354 | 4129 |
! |
4130 |
||
4131 |
unknownIdentifierEmphasis |
|
3360 | 4132 |
"the emphasis used for unknown identifiers; |
4133 |
If syntaxColoring is turned on." |
|
4134 |
||
19255 | 4135 |
^ self at:#unknownIdentifierEmphasis ifAbsent:[self badIdentifierEmphasis] |
3354 | 4136 |
|
4137 |
"Created: / 31.3.1998 / 19:11:55 / cg" |
|
3360 | 4138 |
"Modified: / 1.4.1998 / 13:22:45 / cg" |
13307 | 4139 |
! |
4140 |
||
13522 | 4141 |
xmlAttributeColor |
4142 |
"the emphasis used for xml-attributes; |
|
4143 |
If syntaxColoring is turned on." |
|
4144 |
||
18804 | 4145 |
^ self at:#xmlAttributeColor ifAbsent:[ Color green darkened ] |
13522 | 4146 |
|
4147 |
" |
|
4148 |
self current at:#xmlAttributeColor put:Color black |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4149 |
self current xmlAttributeColor |
13522 | 4150 |
" |
4151 |
||
4152 |
"Created: / 24-07-2011 / 21:30:59 / cg" |
|
4153 |
! |
|
4154 |
||
4155 |
xmlAttributeEmphasis |
|
4156 |
"the emphasis used for xml-attributes; |
|
4157 |
If syntaxColoring is turned on." |
|
4158 |
||
18804 | 4159 |
^ self at:#xmlAttributeEmphasis ifAbsent:[ #bold "#normal" ] |
13522 | 4160 |
|
4161 |
" |
|
4162 |
self current at:#xmlAttributeEmphasis put:#normal |
|
18804 | 4163 |
self current at:#xmlAttributeEmphasis put:#bold |
13522 | 4164 |
self current xmlAttributeEmphasis |
4165 |
" |
|
4166 |
||
4167 |
"Created: / 24-07-2011 / 21:30:29 / cg" |
|
4168 |
! |
|
4169 |
||
4170 |
xmlCDataColor |
|
4171 |
"the emphasis used for xml-CData; |
|
4172 |
If syntaxColoring is turned on." |
|
4173 |
||
18804 | 4174 |
^ self at:#xmlCDataColor ifAbsent:[ Color blue ] |
13522 | 4175 |
|
4176 |
" |
|
4177 |
self current at:#xmlCDataColor put:Color black |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4178 |
self current xmlCDataColor |
13522 | 4179 |
" |
4180 |
||
4181 |
"Created: / 24-07-2011 / 21:31:30 / cg" |
|
4182 |
! |
|
4183 |
||
4184 |
xmlCDataEmphasis |
|
4185 |
"the emphasis used for xml-CData; |
|
4186 |
If syntaxColoring is turned on." |
|
4187 |
||
18804 | 4188 |
^ self at:#xmlCDataEmphasis ifAbsent:[ #normal ] |
13522 | 4189 |
|
4190 |
" |
|
4191 |
self current at:#xmlCDataEmphasis put:#normal |
|
4192 |
self current xmlCDataEmphasis |
|
4193 |
" |
|
4194 |
||
4195 |
"Created: / 24-07-2011 / 21:31:52 / cg" |
|
4196 |
! |
|
4197 |
||
13307 | 4198 |
xmlTagColor |
4199 |
"the emphasis used for xml-tags; |
|
4200 |
If syntaxColoring is turned on." |
|
4201 |
||
18804 | 4202 |
^ self at:#xmlTagColor ifAbsent:[ Color blue ] |
13307 | 4203 |
|
4204 |
" |
|
4205 |
self current at:#xmlTagColor put:Color black |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4206 |
self current xmlTagColor |
13307 | 4207 |
" |
4208 |
||
4209 |
"Created: / 17-02-2011 / 14:18:28 / cg" |
|
4210 |
! |
|
4211 |
||
4212 |
xmlTagEmphasis |
|
4213 |
"the emphasis used for xml-tags; |
|
4214 |
If syntaxColoring is turned on." |
|
4215 |
||
18804 | 4216 |
^ self at:#xmlTagEmphasis ifAbsent:[ #bold ] |
13307 | 4217 |
|
4218 |
" |
|
4219 |
self current at:#xmlTagEmphasis put:#normal |
|
4220 |
self current xmlTagEmphasis |
|
4221 |
" |
|
4222 |
||
4223 |
"Created: / 17-02-2011 / 14:18:01 / cg" |
|
3347 | 4224 |
! ! |
4225 |
||
19472 | 4226 |
!UserPreferences methodsFor:'accessing-prefs-changes & history'! |
4227 |
||
4228 |
historyManagerAllowEditOfHistory:aBoolean |
|
4229 |
"useful if you have 'beginner students', to prevent them from changing the history" |
|
4230 |
||
4231 |
self |
|
4232 |
at: #'history-manager.allow-edit-of-history' |
|
4233 |
put:aBoolean |
|
21234 | 4234 |
! |
4235 |
||
4236 |
historyManagerEnabled |
|
21235 | 4237 |
"automatically add history line comments to accepted methods" |
4238 |
||
21234 | 4239 |
^self |
4240 |
at: #'history-manager.enabled' |
|
4241 |
ifAbsent: true |
|
4242 |
! |
|
4243 |
||
4244 |
historyManagerEnabled:aBoolean |
|
21235 | 4245 |
"automatically add history line comments to accepted methods" |
4246 |
||
21234 | 4247 |
^self |
4248 |
at: #'history-manager.enabled' |
|
4249 |
put: aBoolean |
|
21235 | 4250 |
|
4251 |
||
4252 |
" |
|
4253 |
UserPreferences current historyManagerEnabled |
|
4254 |
UserPreferences current historyManagerEnabled:true |
|
4255 |
UserPreferences current historyManagerEnabled:false |
|
4256 |
" |
|
19472 | 4257 |
! ! |
4258 |
||
8232
371649bcd96a
generateComments (from codeGenerator tool) settings
Claus Gittinger <cg@exept.de>
parents:
8005
diff
changeset
|
4259 |
!UserPreferences methodsFor:'accessing-prefs-code'! |
371649bcd96a
generateComments (from codeGenerator tool) settings
Claus Gittinger <cg@exept.de>
parents:
8005
diff
changeset
|
4260 |
|
371649bcd96a
generateComments (from codeGenerator tool) settings
Claus Gittinger <cg@exept.de>
parents:
8005
diff
changeset
|
4261 |
categoryForMenuActionsMethods |
371649bcd96a
generateComments (from codeGenerator tool) settings
Claus Gittinger <cg@exept.de>
parents:
8005
diff
changeset
|
4262 |
^ 'menu actions'. |
12117
5ffce12a6b14
added: #numberOfLinesForLongMethod
Claus Gittinger <cg@exept.de>
parents:
12104
diff
changeset
|
4263 |
! |
5ffce12a6b14
added: #numberOfLinesForLongMethod
Claus Gittinger <cg@exept.de>
parents:
12104
diff
changeset
|
4264 |
|
15715 | 4265 |
haltInObsoleteMethod |
4266 |
"sometimes, these are annoying..." |
|
4267 |
||
4268 |
^ self at:#haltInObsoleteMethod ifAbsent:true |
|
4269 |
||
4270 |
" |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4271 |
UserPreferences current haltInObsoleteMethod |
15715 | 4272 |
|
4273 |
UserPreferences current haltInObsoleteMethod:true |
|
4274 |
UserPreferences current haltInObsoleteMethod:false |
|
4275 |
" |
|
4276 |
! |
|
4277 |
||
13722 | 4278 |
ignorePublicPrivateCategories |
4279 |
"used when loading dolphin code (which defines multiple categories per method); |
|
4280 |
if on, categories like public and private are ignored (if the method already has a category). |
|
4281 |
Turn this on, to get reasonable categories when loading dolphin code" |
|
4282 |
||
4283 |
^ self at:#ignorePublicPrivateCategories ifAbsent:true |
|
4284 |
||
4285 |
" |
|
4286 |
UserPreferences current ignorePublicPrivateCategories |
|
4287 |
" |
|
4288 |
||
4289 |
"Created: / 23-09-2011 / 19:49:37 / cg" |
|
4290 |
! |
|
4291 |
||
4292 |
ignorePublicPrivateCategories:aBoolean |
|
4293 |
"used when loading dolphin code (which defines multiple categories per method); |
|
4294 |
if on, categories like public and private are ignored (if the method already has a category). |
|
4295 |
Turn this on, to get reasonable categories when loading dolphin code" |
|
4296 |
||
4297 |
self at:#ignorePublicPrivateCategories put:aBoolean |
|
4298 |
||
4299 |
" |
|
4300 |
UserPreferences current ignorePublicPrivateCategories |
|
4301 |
" |
|
4302 |
||
4303 |
"Created: / 23-09-2011 / 19:49:54 / cg" |
|
4304 |
! |
|
4305 |
||
12618 | 4306 |
keepMethodSourceCode |
4307 |
"when fetching the source from a file/cvs, should the source be kept in the image ? |
|
12619 | 4308 |
If on, the image will grow over time by about 10-20 Mb. |
4309 |
(will stay that high, even if switched off afterwards)" |
|
12618 | 4310 |
|
19755 | 4311 |
"/ changed to always cache the sources. |
4312 |
"/ these days, memory is so cheap (times of 4Mb machines are gone) |
|
4313 |
^ self at:#keepMethodSourceCode ifAbsent:true |
|
12618 | 4314 |
|
4315 |
" |
|
4316 |
UserPreferences current keepMethodSourceCode |
|
4317 |
" |
|
4318 |
! |
|
4319 |
||
4320 |
keepMethodSourceCode:aBoolean |
|
4321 |
"when fetching the source from a file/cvs, should the source be kept in the image ? |
|
12619 | 4322 |
If on, the image will grow over time by about 10-20 Mb. |
4323 |
(will stay that high, even if switched off afterwards)" |
|
12618 | 4324 |
|
4325 |
^ self at:#keepMethodSourceCode put:aBoolean |
|
4326 |
||
4327 |
" |
|
4328 |
UserPreferences current keepMethodSourceCode |
|
4329 |
UserPreferences current keepMethodSourceCode:true |
|
4330 |
" |
|
4331 |
! |
|
4332 |
||
12117
5ffce12a6b14
added: #numberOfLinesForLongMethod
Claus Gittinger <cg@exept.de>
parents:
12104
diff
changeset
|
4333 |
numberOfLinesForLongMethod |
5ffce12a6b14
added: #numberOfLinesForLongMethod
Claus Gittinger <cg@exept.de>
parents:
12104
diff
changeset
|
4334 |
"how many lines for a method's source to be considered as 'long'" |
5ffce12a6b14
added: #numberOfLinesForLongMethod
Claus Gittinger <cg@exept.de>
parents:
12104
diff
changeset
|
4335 |
|
12175
d22d131dbfed
changed: #numberOfLinesForLongMethod
Claus Gittinger <cg@exept.de>
parents:
12167
diff
changeset
|
4336 |
^ self at:#numberOfLinesForLongMethod ifAbsent:30 |
d22d131dbfed
changed: #numberOfLinesForLongMethod
Claus Gittinger <cg@exept.de>
parents:
12167
diff
changeset
|
4337 |
|
d22d131dbfed
changed: #numberOfLinesForLongMethod
Claus Gittinger <cg@exept.de>
parents:
12167
diff
changeset
|
4338 |
" |
d22d131dbfed
changed: #numberOfLinesForLongMethod
Claus Gittinger <cg@exept.de>
parents:
12167
diff
changeset
|
4339 |
UserPreferences current numberOfLinesForLongMethod |
d22d131dbfed
changed: #numberOfLinesForLongMethod
Claus Gittinger <cg@exept.de>
parents:
12167
diff
changeset
|
4340 |
" |
8232
371649bcd96a
generateComments (from codeGenerator tool) settings
Claus Gittinger <cg@exept.de>
parents:
8005
diff
changeset
|
4341 |
! ! |
371649bcd96a
generateComments (from codeGenerator tool) settings
Claus Gittinger <cg@exept.de>
parents:
8005
diff
changeset
|
4342 |
|
12501 | 4343 |
!UserPreferences methodsFor:'accessing-prefs-code generator'! |
4344 |
||
4345 |
generateComments |
|
4346 |
"return true; comments shall be generated (by the codeGenerator tool)" |
|
4347 |
||
4348 |
^ self at:#generateComments ifAbsent:true. |
|
4349 |
||
4350 |
" |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4351 |
UserPreferences current generateComments |
12501 | 4352 |
UserPreferences current generateComments:false |
4353 |
UserPreferences current generateComments:true |
|
4354 |
" |
|
4355 |
! |
|
4356 |
||
4357 |
generateComments:aBoolean |
|
4358 |
"true if comments shall be generated (by the codeGenerator tool)" |
|
4359 |
||
4360 |
self at:#generateComments put:aBoolean. |
|
4361 |
||
4362 |
" |
|
4363 |
UserPreferences current generateComments |
|
4364 |
UserPreferences current generateComments:false |
|
4365 |
" |
|
4366 |
! |
|
4367 |
||
4368 |
generateCommentsForAspectMethods |
|
4369 |
"return true; comments shall be generated (by the codeGenerator tool)" |
|
4370 |
||
4371 |
^ self at:#generateCommentsForAspectMethods ifAbsent:true. |
|
4372 |
||
4373 |
" |
|
4374 |
UserPreferences current generateCommentsForAspectMethods |
|
4375 |
" |
|
4376 |
! |
|
4377 |
||
4378 |
generateCommentsForAspectMethods:aBoolean |
|
4379 |
"true if comments shall be generated (by the codeGenerator tool)" |
|
4380 |
||
4381 |
self at:#generateCommentsForAspectMethods put:aBoolean. |
|
4382 |
||
4383 |
" |
|
4384 |
UserPreferences current generateCommentsForAspectMethods:false |
|
4385 |
" |
|
4386 |
! |
|
4387 |
||
4388 |
generateCommentsForGetters |
|
4389 |
"return true if comments for simple getters are to be generated (by the codeGenerator tool). |
|
4390 |
The default is now false, as these look stupid in the browser and were only generated |
|
20243 | 4391 |
for the HTMLDocumentGenerator, which is not able to generate these comments on the fly." |
12501 | 4392 |
|
4393 |
^ self generateComments and:[self at:#generateCommentsForGetters ifAbsent:false]. |
|
4394 |
||
4395 |
" |
|
4396 |
UserPreferences current generateCommentsForGetters |
|
4397 |
" |
|
4398 |
! |
|
4399 |
||
4400 |
generateCommentsForGetters:aBoolean |
|
4401 |
"true if comments for simple getters are to be generated (by the codeGenerator tool). |
|
4402 |
The default is now false, as these look stupid in the browser and were only generated |
|
20243 | 4403 |
for the HTMLDocumentGenerator, which is not able to generate these comments on the fly." |
12501 | 4404 |
|
4405 |
self at:#generateCommentsForGetters put:aBoolean. |
|
4406 |
||
4407 |
" |
|
4408 |
UserPreferences current generateCommentsForGetters |
|
4409 |
" |
|
4410 |
! |
|
4411 |
||
4412 |
generateCommentsForSetters |
|
4413 |
"return true if comments for simple setters are to be generated (by the codeGenerator tool). |
|
4414 |
The default is now false, as these look stupid in the browser and were only generated |
|
20243 | 4415 |
for the HTMLDocumentGenerator, which is not able to generate these comments on the fly." |
12501 | 4416 |
|
4417 |
^ self generateComments and:[self at:#generateCommentsForSetters ifAbsent:false]. |
|
4418 |
||
4419 |
" |
|
4420 |
UserPreferences current generateCommentsForSetters |
|
4421 |
" |
|
4422 |
! |
|
4423 |
||
4424 |
generateCommentsForSetters:aBoolean |
|
4425 |
"true if comments for simple setters are to be generated (by the codeGenerator tool). |
|
4426 |
The default is now false, as these look stupid in the browser and were only generated |
|
20243 | 4427 |
for the HTMLDocumentGenerator, which is not able to generate these comments on the fly." |
12501 | 4428 |
|
4429 |
self at:#generateCommentsForSetters put:aBoolean. |
|
4430 |
||
4431 |
" |
|
4432 |
UserPreferences current generateSommentsForGetters |
|
4433 |
" |
|
4434 |
! ! |
|
4435 |
||
14732 | 4436 |
!UserPreferences methodsFor:'accessing-prefs-code view'! |
4437 |
||
15426 | 4438 |
assignmentBackgroundColorForNavigationService |
4439 |
^ (Color rgbValue:16rFFDBDB) |
|
4440 |
! |
|
4441 |
||
15290 | 4442 |
codeView2AutoPrettyPrint |
4443 |
||
4444 |
^self at:#codeView2AutoPrettyPrint ifAbsent: false |
|
4445 |
||
4446 |
" |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4447 |
UserPreferences current codeView2AutoPrettyPrint |
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4448 |
UserPreferences current codeView2AutoPrettyPrint:true |
15290 | 4449 |
UserPreferences current codeView2AutoPrettyPrint:false" |
4450 |
||
4451 |
"Modified: / 15-02-2010 / 09:26:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4452 |
"Created: / 07-08-2011 / 12:46:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4453 |
! |
|
4454 |
||
4455 |
codeView2AutoPrettyPrint: aBoolean |
|
4456 |
||
4457 |
^self at:#codeView2AutoPrettyPrint put: aBoolean |
|
4458 |
||
4459 |
" |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4460 |
UserPreferences current codeView2AutoPrettyPrint |
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4461 |
UserPreferences current codeView2AutoPrettyPrint:true |
15290 | 4462 |
UserPreferences current codeView2AutoPrettyPrint:false" |
4463 |
||
4464 |
"Modified: / 15-02-2010 / 09:26:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4465 |
"Created: / 07-08-2011 / 12:47:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4466 |
! |
|
4467 |
||
14732 | 4468 |
codeView2QuickSendersAndImplementorsOnControl |
14733 | 4469 |
"if true, CTRL-click opens the quick senders/implementors menu; |
4470 |
if false, you have to press ALT" |
|
4471 |
||
14732 | 4472 |
^self at:#codeView2QuickSendersAndImplementorsOnControl ifAbsent: false |
4473 |
||
4474 |
" |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4475 |
UserPreferences current codeView2QuickSendersAndImplementorsOnControl |
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4476 |
UserPreferences current codeView2QuickSendersAndImplementorsOnControl:true |
14732 | 4477 |
UserPreferences current codeView2QuickSendersAndImplementorsOnControl:false" |
4478 |
! |
|
4479 |
||
4480 |
codeView2QuickSendersAndImplementorsOnControl: aBoolean |
|
14733 | 4481 |
"if true, CTRL-click opens the quick senders/implementors menu; |
4482 |
if false, you have to press ALT" |
|
4483 |
||
14732 | 4484 |
^self at:#codeView2QuickSendersAndImplementorsOnControl put: aBoolean |
4485 |
||
4486 |
" |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4487 |
UserPreferences current codeView2QuickSendersAndImplementorsOnControl |
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4488 |
UserPreferences current codeView2QuickSendersAndImplementorsOnControl:true |
14732 | 4489 |
UserPreferences current codeView2QuickSendersAndImplementorsOnControl:false" |
14915 | 4490 |
! |
4491 |
||
4492 |
selectorBackgroundColorForNavigationService |
|
4493 |
^ (Color rgbValue:"16rADD9FF" 16rDBEEFF) |
|
4494 |
! |
|
4495 |
||
4496 |
variableBackgroundColorForNavigationService |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4497 |
^ self |
18262 | 4498 |
at: #variableBackgroundColorForNavigationService |
4499 |
ifAbsent: [ |
|
4500 |
(Color rgbValue:16rFFFFA7) |
|
4501 |
"/ (Color rgbValue:16rEFD7A7) |
|
4502 |
] |
|
15960 | 4503 |
|
4504 |
"Modified: / 01-10-2013 / 11:35:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14732 | 4505 |
! ! |
13547
f08daec3c459
changed: #historyManagerSignature
Claus Gittinger <cg@exept.de>
parents:
13523
diff
changeset
|
4506 |
|
17569 | 4507 |
!UserPreferences methodsFor:'accessing-prefs-defaultPackages'! |
4508 |
||
4509 |
addPreloadedPackage:packageName |
|
4510 |
"add this to the set of preloaded packages. |
|
4511 |
This will be automatically loaded whenever the system starts" |
|
4512 |
||
4513 |
(self at:#preloadedPackages ifAbsentPut:[Set new]) add:packageName. |
|
4514 |
Smalltalk loadPackage:packageName. |
|
4515 |
||
4516 |
" |
|
18557 | 4517 |
UserPreferences current preloadedPackages |
4518 |
||
18262 | 4519 |
UserPreferences current addPreloadedPackage:'stx:goodies/smallsense' |
4520 |
UserPreferences current removePreloadedPackage:'stx:goodies/smallsense' |
|
17569 | 4521 |
" |
4522 |
! |
|
4523 |
||
4524 |
preloadedPackages |
|
4525 |
"the set of preloaded packages. |
|
4526 |
These will be automatically loaded whenever the system starts" |
|
4527 |
||
4528 |
^ self at:#preloadedPackages ifAbsent:[ #() ]. |
|
4529 |
||
4530 |
" |
|
18262 | 4531 |
UserPreferences current addPreloadedPackage:'stx:goodies/smallsense' |
4532 |
UserPreferences current removePreloadedPackage:'stx:goodies/smallsense' |
|
4533 |
UserPreferences current preloadedPackages |
|
17569 | 4534 |
" |
4535 |
! |
|
4536 |
||
4537 |
preloadedPackages:setOfPreloadedPackages |
|
4538 |
"define the set of preloaded packages. |
|
4539 |
This will be automatically loaded whenever the system starts" |
|
4540 |
||
4541 |
|set| |
|
4542 |
||
4543 |
set := setOfPreloadedPackages asSet. |
|
4544 |
self at:#preloadedPackages put:set. |
|
4545 |
set do:[:each | |
|
18262 | 4546 |
Smalltalk loadPackage:each |
17569 | 4547 |
]. |
4548 |
||
4549 |
" |
|
18262 | 4550 |
UserPreferences current addPreloadedPackage:'stx:goodies/smallsense' |
4551 |
UserPreferences current removePreloadedPackage:'stx:goodies/smallsense' |
|
4552 |
UserPreferences current preloadedPackages |
|
17569 | 4553 |
" |
4554 |
! |
|
4555 |
||
4556 |
removePreloadedPackage:packageName |
|
4557 |
"remove this from the set of preloaded packages. |
|
4558 |
This will be no longer be automatically loaded whenever the system starts" |
|
4559 |
||
18557 | 4560 |
|preloaded| |
4561 |
||
4562 |
preloaded := self at:#preloadedPackages ifAbsent:[nil]. |
|
4563 |
preloaded notNil ifTrue:[ |
|
4564 |
preloaded remove:packageName ifAbsent:[] |
|
4565 |
]. |
|
4566 |
||
4567 |
" |
|
4568 |
UserPreferences current preloadedPackages |
|
4569 |
||
18262 | 4570 |
UserPreferences current addPreloadedPackage:'stx:goodies/smallsense' |
4571 |
UserPreferences current removePreloadedPackage:'stx:goodies/smallsense' |
|
17569 | 4572 |
" |
4573 |
! ! |
|
4574 |
||
10055 | 4575 |
!UserPreferences methodsFor:'accessing-prefs-editor'! |
4576 |
||
15913 | 4577 |
appendAbbreviationsToCompletionSuggestions |
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4578 |
"show abbreviations in completion" |
15913 | 4579 |
|
4580 |
^ self at:#appendAbbreviationsToCompletionSuggestions ifAbsent:false |
|
4581 |
||
4582 |
" |
|
4583 |
UserPreferences current appendAbbreviationsToCompletionSuggestions |
|
4584 |
UserPreferences current appendAbbreviationsToCompletionSuggestions:true |
|
4585 |
UserPreferences current appendAbbreviationsToCompletionSuggestions:false |
|
4586 |
" |
|
4587 |
! |
|
4588 |
||
4589 |
appendAbbreviationsToCompletionSuggestions:aBoolean |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4590 |
"show abbreviations in completion" |
15913 | 4591 |
|
4592 |
^ self at:#appendAbbreviationsToCompletionSuggestions put:aBoolean |
|
4593 |
||
4594 |
" |
|
4595 |
UserPreferences current appendAbbreviationsToCompletionSuggestions |
|
4596 |
UserPreferences current appendAbbreviationsToCompletionSuggestions:true |
|
4597 |
UserPreferences current appendAbbreviationsToCompletionSuggestions:false |
|
4598 |
" |
|
4599 |
! |
|
4600 |
||
15742 | 4601 |
codeCompletionOnControlKey |
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4602 |
"show completion with CTRL-key - experimental" |
15742 | 4603 |
|
4604 |
^ self at:#codeCompletionOnControlKey ifAbsent:false |
|
4605 |
||
4606 |
" |
|
4607 |
UserPreferences current codeCompletionOnControlKey |
|
4608 |
UserPreferences current codeCompletionOnControlKey:true |
|
4609 |
UserPreferences current codeCompletionOnControlKey:false |
|
4610 |
" |
|
4611 |
! |
|
4612 |
||
4613 |
codeCompletionOnControlKey:aBoolean |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4614 |
"show completion with CTRL key - experimental" |
15742 | 4615 |
|
4616 |
^ self at:#codeCompletionOnControlKey put:aBoolean |
|
4617 |
||
4618 |
" |
|
4619 |
UserPreferences current codeCompletionOnControlKey |
|
4620 |
UserPreferences current codeCompletionOnControlKey:true |
|
4621 |
UserPreferences current codeCompletionOnControlKey:false |
|
4622 |
" |
|
4623 |
! |
|
4624 |
||
15747 | 4625 |
codeCompletionOnTabKey |
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4626 |
"show completion with TAB-key - experimental" |
15747 | 4627 |
|
15767 | 4628 |
^ self at:#codeCompletionOnTabKey ifAbsent:true |
15747 | 4629 |
|
4630 |
" |
|
4631 |
UserPreferences current codeCompletionOnTabKey |
|
4632 |
UserPreferences current codeCompletionOnTabKey:true |
|
4633 |
UserPreferences current codeCompletionOnTabKey:false |
|
4634 |
" |
|
4635 |
! |
|
4636 |
||
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4637 |
codeCompletionOnTabKey:aBoolean |
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4638 |
"show completion with TAB-key - experimental" |
15747 | 4639 |
|
4640 |
self at:#codeCompletionOnTabKey put:aBoolean |
|
4641 |
||
4642 |
" |
|
4643 |
UserPreferences current codeCompletionOnTabKey |
|
4644 |
UserPreferences current codeCompletionOnTabKey:true |
|
4645 |
UserPreferences current codeCompletionOnTabKey:false |
|
4646 |
" |
|
4647 |
! |
|
4648 |
||
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4649 |
codeCompletionViewKeyboardNavigationNeedsModifier |
16584 | 4650 |
"if you find it annoying, that cursor up/down is intercepted by a floating |
4651 |
completion view, set this to true. Then cursor up/down are only passed to the completion |
|
16585 | 4652 |
view if a shift- or control modifier is pressed. |
16584 | 4653 |
The default is false for backward compatibility" |
4654 |
||
4655 |
^ self at:#codeCompletionViewKeyboardNavigationNeedsModifier ifAbsent:[false] |
|
4656 |
||
4657 |
" |
|
4658 |
UserPreferences current codeCompletionViewKeyboardNavigationNeedsModifier |
|
4659 |
UserPreferences current codeCompletionViewKeyboardNavigationNeedsModifier:true |
|
4660 |
UserPreferences current codeCompletionViewKeyboardNavigationNeedsModifier:false |
|
4661 |
" |
|
4662 |
! |
|
4663 |
||
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4664 |
codeCompletionViewKeyboardNavigationNeedsModifier:aBoolean |
16584 | 4665 |
"if you find it annoying, that cursor up/down is intercepted by a floating |
4666 |
completion view, set this to true. Then cursor up/down are only passed to the completion |
|
16585 | 4667 |
view if a shift- or control modifier is pressed. |
16584 | 4668 |
The default is false for backward compatibility" |
4669 |
||
4670 |
self at:#codeCompletionViewKeyboardNavigationNeedsModifier put:aBoolean |
|
4671 |
||
4672 |
" |
|
4673 |
UserPreferences current codeCompletionViewKeyboardNavigationNeedsModifier |
|
4674 |
UserPreferences current codeCompletionViewKeyboardNavigationNeedsModifier:true |
|
4675 |
UserPreferences current codeCompletionViewKeyboardNavigationNeedsModifier:false |
|
4676 |
" |
|
4677 |
! |
|
4678 |
||
10055 | 4679 |
deleteSetsClipboardText |
4680 |
"if true, a delete also updates the clipboard with the deleted text" |
|
4681 |
||
4682 |
^ self at:#deleteSetsClipboardText ifAbsent:false |
|
4683 |
||
4684 |
" |
|
4685 |
UserPreferences current deleteSetsClipboardText |
|
4686 |
" |
|
4687 |
! |
|
4688 |
||
4689 |
deleteSetsClipboardText:aBooleanOrNil |
|
4690 |
"if true, a delete also updates the clipboard with the deleted text" |
|
4691 |
||
4692 |
^ self at:#deleteSetsClipboardText put:aBooleanOrNil |
|
4693 |
||
4694 |
" |
|
4695 |
UserPreferences current deleteSetsClipboardTextdeleteSetsClipboardText:true |
|
4696 |
UserPreferences current deleteSetsClipboardText:false |
|
4697 |
UserPreferences current deleteSetsClipboardText |
|
4698 |
" |
|
4699 |
! |
|
4700 |
||
11897
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4701 |
enforcedDropModeForFiles |
12930 | 4702 |
"when dropping a file, paste the #name, the #contents or ask ? |
11897
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4703 |
(default is nil, for ask)" |
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4704 |
|
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4705 |
^ self at:#enforcedDropModeForFiles ifAbsent:nil |
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4706 |
|
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4707 |
" |
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4708 |
UserPreferences current enforcedDropModeForFiles |
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4709 |
" |
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4710 |
! |
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4711 |
|
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4712 |
enforcedDropModeForFiles:aSymbolOrNil |
12930 | 4713 |
"when dropping a file, paste the #name, the #contents or ask ? |
11897
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4714 |
(default is nil, for ask)" |
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4715 |
|
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4716 |
^ self at:#enforcedDropModeForFiles put:aSymbolOrNil |
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4717 |
|
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4718 |
" |
12930 | 4719 |
UserPreferences current enforcedDropModeForFiles:#contents |
4720 |
UserPreferences current enforcedDropModeForFiles:#name |
|
11897
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4721 |
" |
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4722 |
! |
e8003f2d538c
Always Paste the Contents when Dropping a File
Claus Gittinger <cg@exept.de>
parents:
11694
diff
changeset
|
4723 |
|
10055 | 4724 |
extendedWordSelectMode |
4725 |
"when double clicking, include underscore, dollar and at-character as word-characters ? |
|
10880
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
4726 |
(default is on)" |
10055 | 4727 |
|
10310
89d972739353
extendedWordSelectMode (underline in word) defaults to true
Claus Gittinger <cg@exept.de>
parents:
10240
diff
changeset
|
4728 |
^ self at:#extendedWordSelectMode ifAbsent:true |
10055 | 4729 |
|
4730 |
" |
|
4731 |
UserPreferences current extendedWordSelectMode |
|
4732 |
" |
|
4733 |
||
4734 |
"Created: / 03-07-2006 / 16:49:58 / cg" |
|
4735 |
! |
|
4736 |
||
4737 |
extendedWordSelectMode:aBoolean |
|
4738 |
"when double clicking, include underscore, dollar and at-character as word-characters ? |
|
10880
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
4739 |
(default is on)" |
10055 | 4740 |
|
4741 |
^ self at:#extendedWordSelectMode put:aBoolean |
|
4742 |
||
4743 |
" |
|
4744 |
UserPreferences current extendedWordSelectMode:true |
|
4745 |
UserPreferences current extendedWordSelectMode:false |
|
4746 |
" |
|
4747 |
||
4748 |
"Created: / 03-07-2006 / 16:50:20 / cg" |
|
4749 |
! |
|
4750 |
||
19965 | 4751 |
generateBackupFileWhenSaving |
4752 |
"if true, the editor will write a backup file |
|
4753 |
before saving. The default is true" |
|
4754 |
||
4755 |
^ self at:#generateBackupFileWhenSaving ifAbsent:true "false" |
|
4756 |
! |
|
4757 |
||
4758 |
generateBackupFileWhenSaving:aBoolean |
|
4759 |
"if true, the editor will write a backup file |
|
4760 |
before saving. The default is true" |
|
4761 |
||
4762 |
self at:#generateBackupFileWhenSaving put:aBoolean |
|
4763 |
! |
|
4764 |
||
15724 | 4765 |
immediateCodeCompletion |
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4766 |
"show completion, as you type - experimental" |
15724 | 4767 |
|
19684 | 4768 |
^ self at:#immediateCodeCompletion ifAbsent:true "false" |
15724 | 4769 |
|
4770 |
" |
|
15725 | 4771 |
UserPreferences current immediateCodeCompletion |
4772 |
UserPreferences current immediateCodeCompletion:true |
|
4773 |
UserPreferences current immediateCodeCompletion:false |
|
15724 | 4774 |
" |
4775 |
! |
|
4776 |
||
4777 |
immediateCodeCompletion:aBoolean |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4778 |
"show completion, as you type - experimental" |
15724 | 4779 |
|
15726 | 4780 |
^ self at:#immediateCodeCompletion put:aBoolean |
15724 | 4781 |
|
4782 |
" |
|
15725 | 4783 |
UserPreferences current immediateCodeCompletion |
4784 |
UserPreferences current immediateCodeCompletion:true |
|
4785 |
UserPreferences current immediateCodeCompletion:false |
|
15724 | 4786 |
" |
4787 |
! |
|
4788 |
||
10055 | 4789 |
numberOfRememberedUndoOperationsInEditor |
4790 |
"the number of possible undo-operations. |
|
4791 |
Nil means: unlimited. |
|
4792 |
Notice: you may run out of memory, if editing a lot and the number of undos is not limited." |
|
4793 |
||
4794 |
^ self at:#numberOfRememberedUndoOperationsInEditor ifAbsent:nil |
|
4795 |
||
4796 |
" |
|
4797 |
UserPreferences current numberOfRememberedUndoOperationsInEditor |
|
4798 |
" |
|
4799 |
||
4800 |
"Modified: / 09-10-2006 / 11:01:35 / cg" |
|
4801 |
! |
|
4802 |
||
4803 |
numberOfRememberedUndoOperationsInEditor:aNumberOrNil |
|
4804 |
"the number of possible undo-operations. |
|
4805 |
Nil means: unlimited. |
|
4806 |
Notice: you may run out of memory, if editing a lot and the number of undos is not limited." |
|
4807 |
||
4808 |
^ self at:#numberOfRememberedUndoOperationsInEditor put:aNumberOrNil |
|
4809 |
||
4810 |
" |
|
4811 |
UserPreferences current numberOfRememberedUndoOperationsInEditor:20 |
|
4812 |
" |
|
4813 |
||
4814 |
"Created: / 09-10-2006 / 11:00:56 / cg" |
|
4815 |
! |
|
4816 |
||
14052 | 4817 |
selectAllWhenClickingBeyondEnd |
4818 |
"select mode, when clicking after the end of text, |
|
4819 |
as in st80 (or squeak), select all" |
|
4820 |
||
4821 |
^ self at:#selectAllWhenClickingBeyondEnd ifAbsent:false |
|
4822 |
||
4823 |
" |
|
4824 |
UserPreferences current selectAllWhenClickingBeyondEnd |
|
4825 |
" |
|
4826 |
||
4827 |
"Created: / 07-03-2012 / 14:00:17 / cg" |
|
4828 |
! |
|
4829 |
||
4830 |
selectAllWhenClickingBeyondEnd:aBoolean |
|
4831 |
"select mode, when clicking after the end of text, |
|
4832 |
as in st80 (or squeak), select all" |
|
4833 |
||
4834 |
^ self at:#selectAllWhenClickingBeyondEnd put:aBoolean |
|
4835 |
||
4836 |
" |
|
4837 |
UserPreferences current selectAllWhenClickingBeyondEnd:true |
|
4838 |
UserPreferences current selectAllWhenClickingBeyondEnd:false |
|
4839 |
" |
|
4840 |
||
4841 |
"Created: / 07-03-2012 / 14:00:23 / cg" |
|
4842 |
! |
|
4843 |
||
16284 | 4844 |
selectionExtensionMode |
4845 |
"Returns selection extension mode. Mode is either |
|
4846 |
||
4847 |
#traditional ... Shift-End always moves end of selection (iff it is on the same line) |
|
18262 | 4848 |
Shift->Home always moves beggining of selection (iff it is on the same line) |
4849 |
That's how CG likes it. |
|
16284 | 4850 |
|
4851 |
#standard ... That's how vast majority text editors and text widgets behaves, therefore |
|
18262 | 4852 |
this is how most users expects it to behave. |
16284 | 4853 |
|
4854 |
||
4855 |
For historical reasons, #traditional is the default..." |
|
4856 |
||
4857 |
^ self at: #selectionExtensionMode ifAbsent:[ #traditional ] |
|
4858 |
||
4859 |
||
4860 |
||
4861 |
" |
|
4862 |
UserPreferences current selectionExtensionMode |
|
4863 |
||
4864 |
UserPreferences current selectionExtensionMode:#traditional |
|
4865 |
UserPreferences current selectionExtensionMode:#standard |
|
4866 |
UserPreferences current selectionExtensionMode:nil |
|
4867 |
||
4868 |
UserPreferences current selectionExtensionMode |
|
4869 |
||
4870 |
" |
|
4871 |
||
4872 |
"Created: / 27-03-2014 / 09:19:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4873 |
! |
|
4874 |
||
4875 |
selectionExtensionMode: aSymbol |
|
4876 |
"Sets selection extension mode. Must be either: |
|
4877 |
||
4878 |
#traditional ... Shift-End always moves end of selection (iff it is on the same line) |
|
18262 | 4879 |
Shift->Home always moves beggining of selection (iff it is on the same line) |
4880 |
That's how CG likes it. |
|
16284 | 4881 |
|
4882 |
#standard ... That's how vast majority text editors and text widgets behaves, therefore |
|
18262 | 4883 |
this is how most users expects it to behave. |
16284 | 4884 |
|
4885 |
||
4886 |
For historical reasons, #traditional is the default..." |
|
4887 |
||
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4888 |
aSymbol isNil ifTrue:[ |
18262 | 4889 |
self removeKey:#selectionExtensionMode. |
4890 |
^ self. |
|
16284 | 4891 |
]. |
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4892 |
|
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4893 |
(#(traditional standard) includes: aSymbol) ifFalse:[ |
18262 | 4894 |
self error:'Invalid value. Possible values are #traditional and #standard'. |
16284 | 4895 |
]. |
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
4896 |
self at: #selectionExtensionMode put: aSymbol |
16284 | 4897 |
|
4898 |
||
4899 |
||
4900 |
" |
|
4901 |
UserPreferences current selectionExtensionMode |
|
4902 |
||
4903 |
UserPreferences current selectionExtensionMode:#traditional |
|
4904 |
UserPreferences current selectionExtensionMode:#standard |
|
4905 |
UserPreferences current selectionExtensionMode:nil |
|
4906 |
||
4907 |
UserPreferences current selectionExtensionMode |
|
4908 |
||
4909 |
" |
|
4910 |
||
4911 |
"Created: / 27-03-2014 / 09:18:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4912 |
! |
|
4913 |
||
10055 | 4914 |
st80EditMode |
4915 |
"editing as in st80 (do not allow cursor beyond endOfLine/endOftext)." |
|
4916 |
||
20613 | 4917 |
^ self at:#st80EditMode ifAbsent:[false] |
4918 |
||
4919 |
" |
|
4920 |
UserPreferences current st80EditMode |
|
4921 |
UserPreferences current st80EditMode:true |
|
4922 |
UserPreferences current st80EditMode |
|
4923 |
UserPreferences current st80EditMode:false |
|
10055 | 4924 |
UserPreferences current st80EditMode |
4925 |
" |
|
4926 |
! |
|
4927 |
||
4928 |
st80EditMode:aBoolean |
|
4929 |
"editing as in st80 (do not allow cursor beyond endOfLine/endOftext)." |
|
4930 |
||
4931 |
^ self at:#st80EditMode put:aBoolean |
|
4932 |
||
4933 |
" |
|
4934 |
UserPreferences current st80EditMode:true |
|
20613 | 4935 |
UserPreferences current st80EditMode:false |
10055 | 4936 |
" |
4937 |
! |
|
4938 |
||
4939 |
st80SelectMode |
|
11143 | 4940 |
"select mode, when double clicking as in st80 |
10055 | 4941 |
(select to corresponding lparen/double-quote) ?" |
4942 |
||
20613 | 4943 |
^ self at:#st80SelectMode ifAbsent:[false] |
10055 | 4944 |
|
4945 |
" |
|
4946 |
UserPreferences current st80SelectMode |
|
4947 |
" |
|
4948 |
||
4949 |
"Created: / 03-07-2006 / 16:25:19 / cg" |
|
4950 |
! |
|
4951 |
||
4952 |
st80SelectMode:aBoolean |
|
11143 | 4953 |
"select mode, when double clicking as in st80 |
10055 | 4954 |
(select to corresponding lparen/double-quote)." |
4955 |
||
4956 |
^ self at:#st80SelectMode put:aBoolean |
|
4957 |
||
4958 |
" |
|
4959 |
UserPreferences current st80SelectMode:true |
|
4960 |
UserPreferences current st80SelectMode:false |
|
4961 |
" |
|
4962 |
||
4963 |
"Created: / 03-07-2006 / 16:25:27 / cg" |
|
10880
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
4964 |
! |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
4965 |
|
20613 | 4966 |
trimBlankLines |
4967 |
"if true, blank lines are trimmed to zero size in the editor" |
|
4968 |
||
4969 |
^ self at:#trimBlankLines ifAbsent:[true] |
|
4970 |
||
4971 |
" |
|
4972 |
UserPreferences current trimBlankLines |
|
4973 |
UserPreferences current trimBlankLines:true |
|
4974 |
UserPreferences current trimBlankLines |
|
4975 |
UserPreferences current trimBlankLines:false |
|
4976 |
UserPreferences current trimBlankLines |
|
4977 |
" |
|
4978 |
! |
|
4979 |
||
4980 |
trimBlankLines:aBoolean |
|
4981 |
"if true, blank lines are trimmed to zero size in the editor" |
|
4982 |
||
4983 |
self at:#trimBlankLines put:aBoolean |
|
4984 |
||
4985 |
" |
|
4986 |
UserPreferences current trimBlankLines |
|
4987 |
UserPreferences current trimBlankLines:true |
|
4988 |
UserPreferences current trimBlankLines |
|
4989 |
UserPreferences current trimBlankLines:false |
|
4990 |
UserPreferences current trimBlankLines |
|
4991 |
" |
|
4992 |
! |
|
4993 |
||
10880
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
4994 |
whitespaceWordSelectMode |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
4995 |
"when double clicking, treat ANY non-whitespace as word-characters ? |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
4996 |
(default is off)" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
4997 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
4998 |
^ self at:#whitespaceWordSelectMode ifAbsent:false |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
4999 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5000 |
" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5001 |
UserPreferences current whitespaceWordSelectMode |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5002 |
" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5003 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5004 |
"Created: / 03-07-2006 / 16:49:58 / cg" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5005 |
! |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5006 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5007 |
whitespaceWordSelectMode:aBoolean |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5008 |
"when double clicking, treat ANY non-whitespace as word-characters ? |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5009 |
(default is off)" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5010 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5011 |
^ self at:#whitespaceWordSelectMode put:aBoolean |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5012 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5013 |
" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5014 |
UserPreferences current whitespaceWordSelectMode:true |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5015 |
UserPreferences current whitespaceWordSelectMode:false |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5016 |
" |
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5017 |
|
96f17c8c9d3a
expandSelectionOnMouseMoveWithButtonPressed
Claus Gittinger <cg@exept.de>
parents:
10861
diff
changeset
|
5018 |
"Created: / 03-07-2006 / 16:50:20 / cg" |
10055 | 5019 |
! ! |
5020 |
||
18920 | 5021 |
!UserPreferences methodsFor:'accessing-prefs-external tools'! |
5022 |
||
19386 | 5023 |
defaultFileOpenCommandFor:suffix |
5024 |
"for the fileBrowser - remember which command to use as-per suffix" |
|
5025 |
||
5026 |
^ (self at:#defaultFileOpenCommands ifAbsentPut:[Dictionary new]) |
|
5027 |
at:suffix ifAbsent:nil |
|
5028 |
! |
|
5029 |
||
5030 |
defaultFileOpenCommandFor:suffix put:openCmd |
|
5031 |
"for the fileBrowser - remember which command to use as-per suffix" |
|
5032 |
||
5033 |
(self at:#defaultFileOpenCommands ifAbsentPut:[Dictionary new]) |
|
5034 |
at:suffix put:openCmd |
|
5035 |
! |
|
5036 |
||
22145 | 5037 |
dllPath |
5038 |
^ self at:#dllPath ifAbsent:[OrderedCollection new] |
|
5039 |
||
5040 |
" |
|
5041 |
ExpeccoPreferences current dllPath. |
|
5042 |
ExpeccoPreferences current dllPath:{ '/usr/local/lib' '/opt/local/lib' } |
|
5043 |
" |
|
5044 |
||
5045 |
"Created: / 12-02-2017 / 01:39:41 / cg" |
|
5046 |
! |
|
5047 |
||
5048 |
dllPath:aCollectionOfFolderNames |
|
5049 |
self at:#dllPath put:aCollectionOfFolderNames. |
|
5050 |
||
5051 |
" |
|
5052 |
UserPreferences current dllPath. |
|
5053 |
UserPreferences current dllPath:{ '/usr/local/lib' '/opt/local/lib' } |
|
5054 |
" |
|
5055 |
||
5056 |
"Created: / 12-02-2017 / 01:39:57 / cg" |
|
5057 |
! |
|
5058 |
||
18920 | 5059 |
osFileExplorerCommand |
5060 |
"return an OS command template to open a finder/explorer or similar" |
|
5061 |
||
5062 |
^ self at:#osFileExplorerCommand ifAbsent:nil |
|
5063 |
! |
|
5064 |
||
5065 |
osFileExplorerCommand:aString |
|
5066 |
"define an OS command template to open a finder/explorer or similar" |
|
5067 |
||
5068 |
self at:#osFileExplorerCommand put:aString |
|
5069 |
||
5070 |
" |
|
5071 |
UserPreferences current osFileExplorerCommand |
|
5072 |
||
5073 |
osx: |
|
5074 |
UserPreferences current osFileExplorerCommand:'open %1' |
|
5075 |
||
5076 |
linux: |
|
5077 |
UserPreferences current osFileExplorerCommand:'nautilus %1' |
|
18922 | 5078 |
UserPreferences current osFileExplorerCommand:'dolphin %1' |
18920 | 5079 |
" |
5080 |
! ! |
|
5081 |
||
18871 | 5082 |
!UserPreferences methodsFor:'accessing-prefs-files and directories'! |
5083 |
||
5084 |
changeFileName |
|
5085 |
"were to keep changes" |
|
5086 |
||
5087 |
^ self |
|
5088 |
at: #'changeFileName' |
|
5089 |
ifAbsent: [nil] |
|
5090 |
! |
|
5091 |
||
5092 |
changeFileName:aFilename |
|
5093 |
"were to keep changes" |
|
5094 |
||
5095 |
self |
|
5096 |
at: #'changeFileName' |
|
5097 |
put: aFilename. |
|
5098 |
! |
|
5099 |
||
5100 |
usersModuleName |
|
5101 |
"this will be taken as the user's module in the workspace and as a default for new projects" |
|
5102 |
||
5103 |
^ self at:#usersModuleName ifAbsent:[OperatingSystem getLoginName ] |
|
5104 |
! |
|
5105 |
||
5106 |
usersModuleName:aString |
|
5107 |
self at:#usersModuleName put:aString |
|
5108 |
! |
|
5109 |
||
5110 |
workspaceDirectory |
|
20607 | 5111 |
"this is the folder where snapshot images, the change file and any stc-compiled |
5112 |
object files are stored. |
|
5113 |
The idea is to keep that stuff together, so we can move it as a bunch. |
|
5114 |
These used to be in the bin-folder of st/x, but that would not work with readonly/shared |
|
5115 |
st/x installations." |
|
5116 |
||
18871 | 5117 |
^ self at:#workspaceDirectory ifAbsent:[self class defaultWorkspaceDirectory] |
5118 |
! |
|
5119 |
||
5120 |
workspaceDirectory:aDirectoryOrNilForDefault |
|
5121 |
|d| |
|
5122 |
||
5123 |
(d := aDirectoryOrNilForDefault) notNil ifTrue:[ |
|
5124 |
d := d asFilename |
|
5125 |
]. |
|
5126 |
self at:#workspaceDirectory put:d |
|
5127 |
! ! |
|
5128 |
||
13373 | 5129 |
!UserPreferences methodsFor:'accessing-prefs-localization'! |
5130 |
||
5131 |
language |
|
5132 |
"/ intermediate migration code; |
|
5133 |
"/ for now, Smalltalk uses a global language and territory setting; |
|
5134 |
"/ however, for multi-user operation, this must be in a preference-setting. |
|
21845 | 5135 |
"/ For now, forward to Smalltalk, while all references to "Smalltalk-language" |
5136 |
"/ and "Smalltalk-languageTerritory" are replaced with "UserPreferences current"-messages |
|
13373 | 5137 |
|
5138 |
^ self at:#language ifAbsent:[Smalltalk language]. |
|
5139 |
||
5140 |
" |
|
5141 |
UserPreferences current language |
|
5142 |
" |
|
5143 |
||
5144 |
"Created: / 20-09-2006 / 23:55:01 / cg" |
|
21845 | 5145 |
"Modified (comment): / 20-06-2017 / 09:03:04 / cg" |
13373 | 5146 |
! |
5147 |
||
5148 |
language:aLanguageSymbol |
|
5149 |
"/ intermediate migration code; |
|
5150 |
"/ for now, Smalltalk uses a global language and territory setting; |
|
5151 |
"/ however, for multi-user operation, this must be in a preference-setting. |
|
21845 | 5152 |
"/ For now, forward to Smalltalk, while all references to "Smalltalk-language" |
5153 |
"/ and "Smalltalk-languageTerritory" are replaced with "UserPreferences current"-messages |
|
13373 | 5154 |
|
5155 |
self at:#language put:aLanguageSymbol. |
|
5156 |
Smalltalk language:aLanguageSymbol |
|
5157 |
||
5158 |
" |
|
5159 |
UserPreferences current language |
|
5160 |
UserPreferences current language:#en |
|
5161 |
" |
|
5162 |
||
5163 |
"Created: / 20-09-2006 / 23:55:01 / cg" |
|
21845 | 5164 |
"Modified (comment): / 20-06-2017 / 09:03:09 / cg" |
13373 | 5165 |
! |
5166 |
||
21776 | 5167 |
language:aLanguageSymbol territory:aTerritorySymbol |
5168 |
"/ intermediate migration code; |
|
5169 |
"/ for now, Smalltalk uses a global language and territory setting; |
|
5170 |
"/ however, for multi-user operation, this must be in a preference-setting. |
|
21845 | 5171 |
"/ For now, forward to Smalltalk, while all references to "Smalltalk-language" |
5172 |
"/ and "Smalltalk-languageTerritory" are replaced with "UserPreferences current"-messages |
|
21776 | 5173 |
|
5174 |
self at:#language put:aLanguageSymbol. |
|
5175 |
self at:#languageTerritory put:aTerritorySymbol. |
|
5176 |
Smalltalk language:aLanguageSymbol territory:aTerritorySymbol |
|
5177 |
||
5178 |
" |
|
5179 |
UserPreferences current language |
|
5180 |
UserPreferences current language:#en territory:#us |
|
5181 |
UserPreferences current language:#de territory:#de |
|
5182 |
" |
|
5183 |
||
5184 |
"Created: / 30-05-2017 / 16:02:06 / stefan" |
|
21845 | 5185 |
"Modified (comment): / 20-06-2017 / 09:03:16 / cg" |
21776 | 5186 |
! |
5187 |
||
13373 | 5188 |
languageTerritory |
5189 |
"/ intermediate migration code; |
|
5190 |
"/ for now, Smalltalk uses a global language and territory setting; |
|
5191 |
"/ however, for multi-user operation, this must be in a preference-setting. |
|
21845 | 5192 |
"/ For now, forward to Smalltalk, while all references to "Smalltalk-language" |
5193 |
"/ and "Smalltalk-languageTerritory" are replaced with "UserPreferences current"-messages |
|
13373 | 5194 |
|
5195 |
^ self at:#languageTerritory ifAbsent:[Smalltalk languageTerritory] |
|
5196 |
||
5197 |
" |
|
5198 |
UserPreferences current languageTerritory |
|
5199 |
" |
|
5200 |
||
5201 |
"Created: / 20-09-2006 / 23:55:01 / cg" |
|
21845 | 5202 |
"Modified (comment): / 20-06-2017 / 09:02:59 / cg" |
13373 | 5203 |
! |
5204 |
||
5205 |
languageTerritory:aLanguageSymbol |
|
5206 |
"/ intermediate migration code; |
|
5207 |
"/ for now, Smalltalk uses a global language and territory setting; |
|
5208 |
"/ however, for multi-user operation, this must be in a preference-setting. |
|
21845 | 5209 |
"/ For now, forward to Smalltalk, while all references to "Smalltalk-language" |
5210 |
"/ and "Smalltalk-languageTerritory" are replaced with "UserPreferences current"-messages |
|
13373 | 5211 |
|
5212 |
self at:#languageTerritory put:aLanguageSymbol. |
|
5213 |
Smalltalk languageTerritory:aLanguageSymbol |
|
5214 |
||
5215 |
" |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
5216 |
UserPreferences current languageTerritory |
13373 | 5217 |
UserPreferences current languageTerritory:#en |
5218 |
" |
|
5219 |
||
5220 |
"Created: / 20-09-2006 / 23:55:01 / cg" |
|
21845 | 5221 |
"Modified (comment): / 20-06-2017 / 09:03:23 / cg" |
18496 | 5222 |
! |
5223 |
||
5224 |
unitForFileSize |
|
18497 | 5225 |
"may return either 1000 or 1024" |
5226 |
||
5227 |
^ self at:#unitForFileSize ifAbsent:[1000] |
|
18496 | 5228 |
! |
5229 |
||
5230 |
unitStringsForFileSize |
|
5231 |
self unitForFileSize == 1024 ifTrue:[ |
|
5232 |
^ #('Byte' 'KiB' 'MiB' 'GiB' 'TiB' 'PiB' 'EiB' 'ZiB' 'YiB') |
|
5233 |
] ifFalse:[ |
|
22359 | 5234 |
^ #('Byte' 'kB' 'MB' 'GB' 'TB' 'PB' 'EB' 'ZB' 'YB') |
18496 | 5235 |
]. |
22359 | 5236 |
|
5237 |
"Modified (format): / 17-11-2017 / 10:31:42 / cg" |
|
18823 | 5238 |
! |
5239 |
||
5240 |
useSystemLanguage |
|
5241 |
"if true, the operating system's language is used (i.e. LANG environment variable), |
|
5242 |
when the system comes up. If false, the setting here is used. |
|
5243 |
The default is true." |
|
5244 |
||
5245 |
^ self at:#useSystemLanguage ifAbsent:[true]. |
|
5246 |
||
5247 |
" |
|
5248 |
UserPreferences current useSystemLanguage |
|
5249 |
UserPreferences current useSystemLanguage:false |
|
18824 | 5250 |
UserPreferences current useSystemLanguage:true |
18823 | 5251 |
" |
5252 |
! |
|
5253 |
||
5254 |
useSystemLanguage:aBoolean |
|
5255 |
"if true, the operating system's language is used (i.e. LANG environment variable), |
|
5256 |
when the system comes up. If false, the setting here is used. |
|
5257 |
The default is true." |
|
5258 |
||
5259 |
self at:#useSystemLanguage put:aBoolean. |
|
5260 |
||
5261 |
" |
|
5262 |
UserPreferences current useSystemLanguage |
|
5263 |
UserPreferences current useSystemLanguage:false |
|
5264 |
" |
|
13373 | 5265 |
! ! |
5266 |
||
19472 | 5267 |
!UserPreferences methodsFor:'accessing-prefs-startup'! |
5268 |
||
5269 |
autoloadedPackages |
|
5270 |
"list of package names, which are automatically loaded upon startup" |
|
5271 |
||
5272 |
^ self at:#autoloadedPackages ifAbsent:[#()] |
|
5273 |
! |
|
5274 |
||
5275 |
autoloadedPackages:aCollectionOfPackageNames |
|
5276 |
"list of package names, which are automatically loaded upon startup" |
|
5277 |
||
5278 |
self at:#autoloadedPackages put:aCollectionOfPackageNames |
|
5279 |
! ! |
|
5280 |
||
7549 | 5281 |
!UserPreferences methodsFor:'accessing-prefs-times'! |
5282 |
||
5283 |
timeToAutoExpandItemsWhenDraggingOver |
|
5284 |
"in a hierarchical tree view" |
|
5285 |
||
5286 |
^ 700 "/ millis |
|
5287 |
! |
|
5288 |
||
5289 |
twoDigitDateHandler |
|
5290 |
"return a block which converts a two-digit date. |
|
5291 |
Possible algorithms: |
|
11143 | 5292 |
- identity: treat as year 00..99 |
5293 |
- add 1900: treat as 1900..1999 |
|
5294 |
- around: treat as 1950..1999 if value is 50..99; 2000..2049 otherwise. |
|
7549 | 5295 |
|
5296 |
TODO: make this configurable, keep in dictionary and add to settings. |
|
5297 |
" |
|
5298 |
||
5299 |
^ [:x | (x >= 50) ifTrue:[1900+x] ifFalse:[2000+x]]. |
|
5300 |
"/ ^ [:x | 1900+x]. |
|
5301 |
"/ ^ [:x | x]. |
|
5302 |
! ! |
|
5303 |
||
5304 |
!UserPreferences methodsFor:'accessing-prefs-tools'! |
|
5305 |
||
5306 |
allowSendMailFromDebugger |
|
5307 |
"if true inserts a button in Debugger for open a GUI to send useful debugger infos per mail to a default |
|
5308 |
mail account " |
|
5309 |
||
5310 |
^ self at:#allowSendMailFromDebugger ifAbsent:true |
|
5311 |
||
5312 |
" |
|
5313 |
UserPreferences current allowSendMailFromDebugger |
|
5314 |
" |
|
5315 |
||
5316 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
|
5317 |
! |
|
5318 |
||
5319 |
allowSendMailFromDebugger:aBoolean |
|
5320 |
"if true inserts a button in Debugger for open a GUI to send useful debugger infos per mail to a default |
|
5321 |
mail account " |
|
5322 |
||
5323 |
^ self at:#allowSendMailFromDebugger put:aBoolean |
|
5324 |
||
5325 |
" |
|
5326 |
UserPreferences current allowSendMailFromDebugger:true |
|
5327 |
UserPreferences current allowSendMailFromDebugger:false |
|
5328 |
" |
|
5329 |
! |
|
5330 |
||
5331 |
autoDefineWorkspaceVariables |
|
5332 |
"return the flag which controls automatic definition of unknown variables |
|
5333 |
as workspace variables (in doIts)" |
|
5334 |
||
9302 | 5335 |
^ self at:#autoDefineWorkspaceVariables ifAbsent:false |
7549 | 5336 |
|
5337 |
" |
|
5338 |
UserPreferences current autoDefineWorkspaceVariables |
|
5339 |
" |
|
5340 |
! |
|
5341 |
||
5342 |
autoDefineWorkspaceVariables:aBoolean |
|
5343 |
"turn on/off automatic definition of unknown variables |
|
5344 |
as workspace variables (in doIts)" |
|
5345 |
||
5346 |
^ self at:#autoDefineWorkspaceVariables put:aBoolean |
|
5347 |
||
5348 |
" |
|
5349 |
UserPreferences current autoDefineWorkspaceVariables:true |
|
5350 |
UserPreferences current autoDefineWorkspaceVariables:false |
|
5351 |
" |
|
5352 |
! |
|
5353 |
||
10540 | 5354 |
autoRaiseDebugger |
5355 |
"if true, the debugger raises itself automatically when entered. |
|
5356 |
The default is true" |
|
5357 |
||
5358 |
^ self at:#autoRaiseDebugger ifAbsent:true |
|
5359 |
||
5360 |
" |
|
5361 |
UserPreferences current autoRaiseDebugger |
|
5362 |
" |
|
5363 |
||
5364 |
"Created: / 15-05-2007 / 13:29:10 / cg" |
|
5365 |
! |
|
5366 |
||
5367 |
autoRaiseDebugger:aBoolean |
|
5368 |
"if true, the debugger raises itself automatically when entered. |
|
5369 |
The default is true" |
|
5370 |
||
5371 |
^ self at:#autoRaiseDebugger put:aBoolean |
|
5372 |
||
5373 |
" |
|
11143 | 5374 |
UserPreferences current autoRaiseDebugger |
10540 | 5375 |
UserPreferences current autoRaiseDebugger:false |
5376 |
UserPreferences current autoRaiseDebugger:true |
|
5377 |
" |
|
5378 |
||
5379 |
"Created: / 15-05-2007 / 13:29:31 / cg" |
|
5380 |
! |
|
5381 |
||
15130 | 5382 |
autoRaiseOnFocusInDelay |
5383 |
"if non-nil, an application window will raise automatically, |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
5384 |
when it gets the focus (via the window manager) after that |
15130 | 5385 |
number of milliseconds. If nil, autoRaise is disabled. |
5386 |
Especially useful with focusFollowsMouse under X11" |
|
5387 |
||
5388 |
^ self at:#autoRaiseOnFocusInDelay ifAbsent:nil |
|
5389 |
||
5390 |
" |
|
5391 |
UserPreferences current autoRaiseOnFocusInDelay |
|
5392 |
" |
|
5393 |
! |
|
5394 |
||
5395 |
autoRaiseOnFocusInDelay:anIntegerOrNil |
|
5396 |
"if non-nil, an application window will raise automatically, |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
5397 |
when it gets the focus (via the window manager) after that |
15130 | 5398 |
number of milliseconds. If nil, autoRaise is disabled. |
5399 |
Especially useful with focusFollowsMouse under X11" |
|
5400 |
||
5401 |
^ self at:#autoRaiseOnFocusInDelay put:anIntegerOrNil |
|
5402 |
||
5403 |
" |
|
5404 |
UserPreferences current autoRaiseOnFocusInDelay |
|
5405 |
UserPreferences current autoRaiseOnFocusInDelay:nil |
|
5406 |
UserPreferences current autoRaiseOnFocusInDelay:750 |
|
5407 |
" |
|
5408 |
! |
|
5409 |
||
15417 | 5410 |
autoRaiseTranscript |
5411 |
"if true, the transcript raises itself automatically when new messages appear. |
|
5412 |
The default is false" |
|
5413 |
||
5414 |
^ self at:#autoRaiseTranscript ifAbsent:false |
|
5415 |
||
5416 |
" |
|
5417 |
UserPreferences current autoRaiseTranscript |
|
5418 |
" |
|
5419 |
! |
|
5420 |
||
5421 |
autoRaiseTranscript:aBoolean |
|
5422 |
"if true, the transcript raises itself automatically when new messages appear. |
|
5423 |
The default is false" |
|
5424 |
||
15427 | 5425 |
|transcript| |
5426 |
||
5427 |
self at:#autoRaiseTranscript put:aBoolean. |
|
5428 |
(self == UserPreferences current) ifTrue:[ |
|
18641 | 5429 |
transcript := Transcript current. |
5430 |
(transcript notNil and:[transcript isTextCollector]) ifTrue:[ |
|
5431 |
transcript autoRaise:aBoolean. |
|
5432 |
]. |
|
15427 | 5433 |
]. |
15417 | 5434 |
|
5435 |
" |
|
5436 |
UserPreferences current autoRaiseTranscript:true |
|
5437 |
UserPreferences current autoRaiseTranscript:false |
|
5438 |
UserPreferences current autoRaiseTranscript |
|
5439 |
" |
|
5440 |
! |
|
5441 |
||
19087 | 5442 |
debuggerLogFile |
5443 |
"if non nil, any entered debugger writes a backrace to that logfile. |
|
5444 |
This is useful to record all session-problems" |
|
5445 |
||
5446 |
^ self at:#debuggerLogFile ifAbsent:nil |
|
5447 |
||
5448 |
" |
|
5449 |
UserPreferences current debuggerLogFile |
|
5450 |
UserPreferences current debuggerLogFile:'debug.log' |
|
5451 |
UserPreferences current debuggerLogFile:nil |
|
5452 |
" |
|
5453 |
! |
|
5454 |
||
5455 |
debuggerLogFile:aFilename |
|
5456 |
"if non nil, any entered debugger writes a backrace to that logfile. |
|
5457 |
This is useful to record all session-problems" |
|
20243 | 5458 |
|
19087 | 5459 |
^ self at:#debuggerLogFile put:aFilename |
5460 |
||
5461 |
" |
|
5462 |
UserPreferences current debuggerLogFile |
|
5463 |
UserPreferences current debuggerLogFile:'debug.log' |
|
5464 |
UserPreferences current debuggerLogFile:nil |
|
5465 |
" |
|
5466 |
! |
|
5467 |
||
11419 | 5468 |
editToolbarVisibleInWorkspace |
5469 |
"return the flag which defaults the edit-toolbar-visibility in a workspace application" |
|
5470 |
||
5471 |
^ self at:#editToolbarVisibleInWorkspace ifAbsent:false |
|
5472 |
! |
|
5473 |
||
5474 |
editToolbarVisibleInWorkspace:aBooleanOrNil |
|
5475 |
"set the flag which defaults the edit-toolbar-visibility in a workspace application" |
|
5476 |
||
5477 |
^ self at:#editToolbarVisibleInWorkspace put:aBooleanOrNil |
|
5478 |
! |
|
5479 |
||
7549 | 5480 |
functionKeySequences |
5481 |
"return the collection of function-key macros. |
|
19953 | 5482 |
That's a dictionary, which assigns code to F-keys" |
7549 | 5483 |
|
5484 |
^ self at:#functionKeySequences ifAbsentPut:[Dictionary new] |
|
5485 |
||
5486 |
" |
|
5487 |
UserPreferences current functionKeySequences |
|
5488 |
" |
|
5489 |
||
19953 | 5490 |
"Modified: / 11-09-1998 / 00:09:59 / cg" |
5491 |
"Modified (comment): / 06-06-2016 / 10:43:30 / cg" |
|
7549 | 5492 |
! |
5493 |
||
14160 | 5494 |
hideSupportCodeInDebugger |
5495 |
^ self at:#hideSupportCodeInDebugger ifAbsent:true |
|
5496 |
||
5497 |
" |
|
5498 |
UserPreferences current hideSupportCodeInDebugger |
|
5499 |
" |
|
5500 |
||
5501 |
"Created: / 10-06-2012 / 21:24:09 / cg" |
|
5502 |
! |
|
5503 |
||
5504 |
hideSupportCodeInDebugger:aBooleanOrNil |
|
5505 |
^ self at:#hideSupportCodeInDebugger put:aBooleanOrNil |
|
5506 |
||
5507 |
"Created: / 10-06-2012 / 21:24:18 / cg" |
|
14159 | 5508 |
! |
5509 |
||
10661 | 5510 |
infoVisibleInWorkspace |
5511 |
"return the flag which defaults the info-visibility in a workspace application" |
|
5512 |
||
5513 |
^ self at:#infoVisibleInWorkspace ifAbsent:false |
|
5514 |
||
5515 |
"Created: / 14-07-2007 / 16:43:37 / cg" |
|
5516 |
! |
|
5517 |
||
5518 |
infoVisibleInWorkspace:aBooleanOrNil |
|
5519 |
"set the flag which defaults the info-visibility in a workspace application" |
|
5520 |
||
5521 |
^ self at:#infoVisibleInWorkspace put:aBooleanOrNil |
|
5522 |
||
5523 |
"Created: / 14-07-2007 / 16:43:44 / cg" |
|
5524 |
! |
|
5525 |
||
16377 | 5526 |
sendMessagesAlsoToTranscript |
5527 |
"return the flag which controls if info/error messages are to be shown |
|
5528 |
on both Stderr AND the Transcript, or only on Stderr" |
|
5529 |
||
5530 |
^ self at:#sendMessagesAlsoToTranscript ifAbsent:true |
|
5531 |
||
5532 |
" |
|
5533 |
UserPreferences current sendMessagesAlsoToTranscript |
|
5534 |
" |
|
5535 |
! |
|
5536 |
||
5537 |
sendMessagesAlsoToTranscript:aBooleanOrNil |
|
5538 |
"set/clear the flag which controls if info/error messages are to be shown |
|
5539 |
on both Stderr AND the Transcript, or only on Stderr" |
|
5540 |
||
5541 |
^ self at:#sendMessagesAlsoToTranscript put:aBooleanOrNil |
|
5542 |
||
5543 |
" |
|
5544 |
UserPreferences current sendMessagesAlsoToTranscript:false. |
|
5545 |
'hello' infoPrintCR. |
|
5546 |
||
5547 |
UserPreferences current sendMessagesAlsoToTranscript:true. |
|
5548 |
'hello' infoPrintCR. |
|
5549 |
" |
|
5550 |
! |
|
5551 |
||
19783 | 5552 |
sendMessagesOnlyToTranscript |
5553 |
"return the flag which controls if info/error messages are to be shown |
|
5554 |
on Stderr (if true is returned, they are only shown on the Transcript)" |
|
5555 |
||
5556 |
^ self at:#sendMessagesOnlyToTranscript ifAbsent:false |
|
5557 |
||
5558 |
" |
|
5559 |
UserPreferences current sendMessagesOnlyToTranscript |
|
5560 |
" |
|
5561 |
! |
|
5562 |
||
5563 |
sendMessagesOnlyToTranscript:aBoolean |
|
5564 |
"set the flag which controls if info/error messages are to be shown |
|
5565 |
on Stderr (if true is returned, they are only shown on the Transcript)" |
|
5566 |
||
5567 |
self at:#sendMessagesOnlyToTranscript put:aBoolean |
|
5568 |
||
5569 |
" |
|
5570 |
UserPreferences current sendMessagesOnlyToTranscript:true. |
|
5571 |
'hello' errorPrintCR. |
|
5572 |
||
5573 |
UserPreferences current sendMessagesOnlyToTranscript:false. |
|
5574 |
'hello' errorPrintCR. |
|
5575 |
||
5576 |
UserPreferences current sendMessagesOnlyToTranscript |
|
5577 |
" |
|
5578 |
! |
|
5579 |
||
7549 | 5580 |
showClockInLauncher |
5581 |
"return the flag which controls if a clock is shown in the launcher" |
|
5582 |
||
9302 | 5583 |
^ self at:#showClockInLauncher ifAbsent:false |
7549 | 5584 |
|
5585 |
" |
|
5586 |
UserPreferences current showClockInLauncher |
|
5587 |
" |
|
5588 |
||
5589 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
|
5590 |
! |
|
5591 |
||
5592 |
showClockInLauncher:aBooleanOrNil |
|
5593 |
"set/clear the flag which controls if a clock is shown in the launcher" |
|
5594 |
||
5595 |
^ self at:#showClockInLauncher put:aBooleanOrNil |
|
5596 |
||
5597 |
" |
|
5598 |
UserPreferences current showClockInLauncher:false. |
|
11143 | 5599 |
NewLauncher open. |
7549 | 5600 |
|
5601 |
UserPreferences current showClockInLauncher:true. |
|
11143 | 5602 |
NewLauncher open. |
7549 | 5603 |
" |
5604 |
||
5605 |
"Modified: / 11.9.1998 / 00:09:59 / cg" |
|
7624 | 5606 |
! |
5607 |
||
14140 | 5608 |
showTypeIndicatorInInspector |
5609 |
^ self at:#showTypeIndicatorInInspector ifAbsent:true |
|
5610 |
||
5611 |
" |
|
5612 |
UserPreferences current showTypeIndicatorInInspector |
|
5613 |
" |
|
5614 |
||
5615 |
"Created: / 16-05-2012 / 19:09:50 / cg" |
|
5616 |
! |
|
5617 |
||
5618 |
showTypeIndicatorInInspector:aBooleanOrNil |
|
5619 |
^ self at:#showTypeIndicatorInInspector put:aBooleanOrNil |
|
5620 |
||
5621 |
" |
|
5622 |
UserPreferences current showTypeIndicatorInInspector:false. |
|
5623 |
NewLauncher inspect. |
|
5624 |
||
5625 |
UserPreferences current showTypeIndicatorInInspector:true. |
|
5626 |
NewLauncher inspect. |
|
5627 |
" |
|
5628 |
||
5629 |
"Created: / 16-05-2012 / 19:10:13 / cg" |
|
5630 |
! |
|
5631 |
||
18689 | 5632 |
terminalInputIsUTF8 |
5633 |
"if true, a shell or unix command accepts utf8 encoded input and character input |
|
5634 |
should be encoded as such by the terminal emulator." |
|
5635 |
||
5636 |
^ self |
|
5637 |
at:#terminalInputIsUTF8 |
|
5638 |
ifAbsent:[ OperatingSystem isOSXlike |
|
5639 |
"/ or ??? |
|
5640 |
] |
|
5641 |
||
5642 |
" |
|
5643 |
UserPreferences current terminalInputIsUTF8 |
|
5644 |
" |
|
5645 |
! |
|
5646 |
||
5647 |
terminalInputIsUTF8:aBoolean |
|
5648 |
"if true, a shell or unix command accepts utf8 encoded input and character input |
|
5649 |
should be encoded as such by the terminal emulator. |
|
5650 |
This specifies a default setting for terminal views; individual instances can be |
|
5651 |
changed be calling a corresponding setup method on it." |
|
5652 |
||
5653 |
^ self |
|
5654 |
at:#terminalInputIsUTF8 |
|
5655 |
put:aBoolean |
|
5656 |
||
5657 |
" |
|
5658 |
UserPreferences current terminalInputIsUTF8 |
|
5659 |
UserPreferences current terminalInputIsUTF8:true |
|
5660 |
UserPreferences current terminalInputIsUTF8:false |
|
5661 |
" |
|
5662 |
! |
|
5663 |
||
16552 | 5664 |
terminalOutputIsUTF8 |
5665 |
"if true, the shell's output is utf8 encoded and should be decoded by |
|
5666 |
the terminal emulator." |
|
5667 |
||
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
5668 |
^ self |
18262 | 5669 |
at:#terminalOutputIsUTF8 |
5670 |
ifAbsent:[ OperatingSystem isOSXlike |
|
5671 |
"/ or ??? |
|
5672 |
] |
|
16552 | 5673 |
|
5674 |
" |
|
5675 |
UserPreferences current terminalOutputIsUTF8 |
|
5676 |
" |
|
5677 |
! |
|
5678 |
||
5679 |
terminalOutputIsUTF8:aBoolean |
|
5680 |
"if true, the shell's output is utf8 encoded and should be decoded by |
|
18689 | 5681 |
the terminal emulator. |
5682 |
This specifies a default setting for terminal views; individual instances can be |
|
5683 |
changed be calling a corresponding setup method on it." |
|
16552 | 5684 |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
5685 |
^ self |
18689 | 5686 |
at:#terminalOutputIsUTF8 |
5687 |
put:aBoolean |
|
16552 | 5688 |
|
5689 |
" |
|
17415
50f3123cbbb7
Oops, fixed bug introduced in previous commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17414
diff
changeset
|
5690 |
UserPreferences current terminalOutputIsUTF8 |
18689 | 5691 |
UserPreferences current terminalOutputIsUTF8:true |
5692 |
UserPreferences current terminalOutputIsUTF8:false |
|
16552 | 5693 |
" |
5694 |
! |
|
5695 |
||
10661 | 5696 |
toolbarVisibleInWorkspace |
5697 |
"return the flag which defaults the toolbar-visibility in a workspace application" |
|
5698 |
||
10665
fd0702c99a8b
toolbarVisibleInWorkspace default
Claus Gittinger <cg@exept.de>
parents:
10661
diff
changeset
|
5699 |
^ self at:#toolbarVisibleInWorkspace ifAbsent:true |
fd0702c99a8b
toolbarVisibleInWorkspace default
Claus Gittinger <cg@exept.de>
parents:
10661
diff
changeset
|
5700 |
|
fd0702c99a8b
toolbarVisibleInWorkspace default
Claus Gittinger <cg@exept.de>
parents:
10661
diff
changeset
|
5701 |
"Modified: / 18-07-2007 / 08:55:44 / cg" |
10661 | 5702 |
! |
5703 |
||
5704 |
toolbarVisibleInWorkspace:aBooleanOrNil |
|
5705 |
"set the flag which defaults the toolbar-visibility in a workspace application" |
|
5706 |
||
5707 |
^ self at:#toolbarVisibleInWorkspace put:aBooleanOrNil |
|
5708 |
||
5709 |
"Created: / 14-07-2007 / 16:42:09 / cg" |
|
5710 |
! |
|
5711 |
||
19700 | 5712 |
useJavaCompletionEngineSimple |
5713 |
"/ switch to false, when the JavaCompletionEngine is |
|
5714 |
"/ finished. |
|
20243 | 5715 |
|
19700 | 5716 |
^ true |
5717 |
! |
|
5718 |
||
11024 | 5719 |
useNewLayoutInDebugger |
5720 |
^ self at:#useNewLayoutInDebugger ifAbsent:true |
|
5721 |
||
5722 |
" |
|
5723 |
UserPreferences current useNewLayoutInDebugger |
|
5724 |
" |
|
5725 |
! |
|
5726 |
||
5727 |
useNewLayoutInDebugger:aBoolean |
|
5728 |
^ self at:#useNewLayoutInDebugger put:aBoolean |
|
5729 |
! |
|
5730 |
||
7624 | 5731 |
useRefactoringSupport |
5732 |
"return the flag which enables/disables use of refactoring package in browser. |
|
5733 |
If enabled, this enables all kinds of refactorings, better search and undo features. |
|
5734 |
There is usually no reason to disable these." |
|
5735 |
||
9302 | 5736 |
^ self at:#useRefactoringSupport ifAbsent:true |
7624 | 5737 |
! |
5738 |
||
5739 |
useRefactoringSupport:aBooleanOrNil |
|
5740 |
"enable/disable use of refactoring package in browser. |
|
5741 |
If enabled, this enables all kinds of refactorings, better search and undo features. |
|
5742 |
There is usually no reason to disable these." |
|
5743 |
||
5744 |
^ self at:#useRefactoringSupport put:aBooleanOrNil |
|
7625 | 5745 |
|
5746 |
" |
|
5747 |
UserPreferences current useRefactoringSupport:false |
|
5748 |
UserPreferences current useRefactoringSupport:true |
|
5749 |
" |
|
11024 | 5750 |
! |
5751 |
||
5752 |
verboseBacktraceInDebugger |
|
5753 |
^ self at:#verboseBacktraceInDebugger ifAbsent:true |
|
5754 |
||
5755 |
" |
|
5756 |
UserPreferences current verboseBacktraceInDebugger |
|
5757 |
" |
|
5758 |
! |
|
5759 |
||
5760 |
verboseBacktraceInDebugger:aBoolean |
|
5761 |
^ self at:#verboseBacktraceInDebugger put:aBoolean |
|
7549 | 5762 |
! ! |
5763 |
||
13967 | 5764 |
!UserPreferences methodsFor:'accessing-prefs-tools-building'! |
5765 |
||
15917 | 5766 |
autoUnloadAutoloadedClassesInProjectDefinition |
5767 |
^ self at:#autoUnloadAutoloadedClassesInProjectDefinition ifAbsent:false |
|
5768 |
||
5769 |
" |
|
5770 |
UserPreferences current autoUnloadAutoloadedClassesInProjectDefinition |
|
5771 |
" |
|
5772 |
||
5773 |
"Created: / 28-01-2014 / 21:42:59 / cg" |
|
5774 |
! |
|
5775 |
||
5776 |
autoUnloadAutoloadedClassesInProjectDefinition:aBoolean |
|
5777 |
^ self at:#autoUnloadAutoloadedClassesInProjectDefinition put:aBoolean |
|
5778 |
||
5779 |
" |
|
5780 |
UserPreferences current autoUnloadAutoloadedClassesInProjectDefinition |
|
5781 |
UserPreferences current autoUnloadAutoloadedClassesInProjectDefinition:false |
|
5782 |
" |
|
5783 |
||
5784 |
"Created: / 28-01-2014 / 21:43:18 / cg" |
|
5785 |
! |
|
5786 |
||
13967 | 5787 |
buildDirectory |
5788 |
^ self at:#buildDirectory ifAbsent:nil |
|
5789 |
||
5790 |
" |
|
5791 |
UserPreferences current buildDirectory |
|
5792 |
" |
|
5793 |
! |
|
5794 |
||
5795 |
buildDirectory:aFilenameStringOrNil |
|
5796 |
^ self at:#buildDirectory put:aFilenameStringOrNil |
|
5797 |
||
5798 |
" |
|
5799 |
UserPreferences current buildDirectory |
|
5800 |
" |
|
5801 |
! |
|
5802 |
||
5803 |
localBuild |
|
5804 |
"deployment-build in a local directory (as opposed to making via the repository)" |
|
5805 |
||
5806 |
^ self at:#localBuild ifAbsent:true |
|
5807 |
||
5808 |
"Created: / 20-09-2006 / 23:55:01 / cg" |
|
5809 |
! |
|
5810 |
||
5811 |
localBuild:aBoolean |
|
5812 |
"deployment-build in a local directory (as opposed to making via the repository)" |
|
5813 |
||
5814 |
^ self at:#localBuild put:aBoolean |
|
5815 |
||
5816 |
" |
|
5817 |
UserPreferences current localBuild |
|
5818 |
" |
|
5819 |
||
5820 |
"Created: / 20-09-2006 / 23:55:26 / cg" |
|
5821 |
! |
|
5822 |
||
15917 | 5823 |
suppressProjectDefinitionWarnings |
5824 |
^ self at:#suppressProjectDefinitionWarnings ifAbsent:true |
|
5825 |
||
5826 |
" |
|
5827 |
UserPreferences current suppressProjectDefinitionWarnings |
|
5828 |
" |
|
5829 |
||
5830 |
"Created: / 28-01-2014 / 21:41:01 / cg" |
|
5831 |
! |
|
5832 |
||
5833 |
suppressProjectDefinitionWarnings:aBoolean |
|
5834 |
^ self at:#suppressProjectDefinitionWarnings put:aBoolean |
|
5835 |
||
5836 |
" |
|
5837 |
UserPreferences current suppressProjectDefinitionWarnings |
|
5838 |
UserPreferences current suppressProjectDefinitionWarnings:true |
|
5839 |
" |
|
5840 |
||
5841 |
"Created: / 28-01-2014 / 21:41:12 / cg" |
|
5842 |
! |
|
5843 |
||
13967 | 5844 |
usedCompilerForBuild |
5845 |
^ self at:#usedCompilerForBuild ifAbsent:nil |
|
5846 |
||
5847 |
" |
|
5848 |
UserPreferences current usedCompilerForBuild |
|
5849 |
" |
|
5850 |
||
5851 |
"Created: / 22-01-2012 / 10:52:47 / cg" |
|
5852 |
! |
|
5853 |
||
5854 |
usedCompilerForBuild:aString |
|
5855 |
^ self at:#usedCompilerForBuild put:aString |
|
5856 |
||
5857 |
" |
|
5858 |
UserPreferences current usedCompilerForBuild |
|
5859 |
UserPreferences current usedCompilerForBuild:'bcc' |
|
5860 |
" |
|
5861 |
||
5862 |
"Created: / 22-01-2012 / 10:52:59 / cg" |
|
5863 |
! ! |
|
5864 |
||
13941 | 5865 |
!UserPreferences methodsFor:'accessing-scm'! |
13596 | 5866 |
|
5867 |
showBadRevisionStringDialogs |
|
5868 |
"show a dialog when a bad revision string is encountered, or silently fix it" |
|
5869 |
||
5870 |
^ self at: #'showBadRevisionStringDialogs' ifAbsent:true |
|
5871 |
||
5872 |
"Created: / 19-08-2011 / 12:51:25 / cg" |
|
5873 |
! |
|
5874 |
||
5875 |
showBadRevisionStringDialogs:aBoolean |
|
5876 |
"show a dialog when a bad revision string is encountered, or silently fix it" |
|
5877 |
||
5878 |
^ self at: #'showBadRevisionStringDialogs' put:aBoolean |
|
5879 |
||
5880 |
"Created: / 19-08-2011 / 12:51:58 / cg" |
|
5881 |
! ! |
|
5882 |
||
15960 | 5883 |
|
13943 | 5884 |
!UserPreferences methodsFor:'default settings-syntax colors'! |
4342
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5885 |
|
6169 | 5886 |
listOfPredefinedSyntaxColoringSchemes |
6171 | 5887 |
"return a list of pre-defined syntax highlightning styles |
5888 |
(as shown in the Launchers 'source and debugger settings' dialog." |
|
5889 |
||
5890 |
^ #( |
|
18262 | 5891 |
(#resetSyntaxColors 'default [ST/X style]') |
5892 |
(#resetSyntaxColorsWithSideEffectHighlighting 'default with side effect highlighting [new ST/X style]') |
|
5893 |
(#resetSyntaxColorsToVCStyle 'green comments; blue controlFlow, red constants [VISUAL-C style]') |
|
5894 |
(#resetSyntaxColorsBlueControlFlowSelectors 'blue controlFlow') |
|
5895 |
(#resetSyntaxColorsGreenComments 'green comments') |
|
5896 |
(#resetSyntaxColorsGreenCommentsBlueControlFlowSelectors 'green comments; blue controlFlow') |
|
5897 |
(#resetSyntaxColorsBlueSelectorsGreenComments 'blue selectors; green comments [DOLPHIN style]') |
|
5898 |
(#resetSyntaxColorsBlueSelectorsGreyComments 'blue selectors; grey comments') |
|
5899 |
(#resetSyntaxColorsToSqueakStyle1 'blue selectors; green comments [SQUEAK style]') |
|
5900 |
(#resetSyntaxColorsToSqueakStyle2 'blue selectors; green comments; brown self [new SQUEAK style]') |
|
5901 |
(#resetSyntaxColorsAllBlackExceptBadIDs 'no colors, but highlight errors') |
|
5902 |
(#resetSyntaxColorsToVAgeStyle 'blue globals; green comments [V''Age style]') |
|
5903 |
(#resetSyntaxColorsToVW7Style 'light blue comments [VW7 style]') |
|
6171 | 5904 |
) |
9834 | 5905 |
|
14063
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
5906 |
"Modified: / 17-03-2012 / 10:40:18 / cg" |
6169 | 5907 |
! |
5908 |
||
4342
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5909 |
resetSyntaxColors |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5910 |
"resets the colors in the CurrentPreferences to their default values" |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5911 |
|
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5912 |
self class syntaxColorKeys do:[:k | self removeKey:k ifAbsent:nil]. |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5913 |
|
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5914 |
|
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5915 |
! |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5916 |
|
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5917 |
resetSyntaxColorsAllBlackExceptBadIDs |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5918 |
"resets the colors in the CurrentPreferences to no-color mode, |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5919 |
except for bad identifiers, which are underwaved." |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5920 |
|
14062 | 5921 |
self resetSyntaxColors. |
8551 | 5922 |
self at:#badIdentifierEmphasis put:(Array with:#underwave with:(#underlineColor->Color red)). |
5923 |
self at:#errorColor put:Color black. |
|
5924 |
self at:#commentColor put:Color black. |
|
5925 |
self at:#constantColor put:Color black. |
|
4342
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5926 |
self at:#methodSelectorEmphasis put:#normal. |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5927 |
self at:#selectorEmphasis put:#normal. |
14062 | 5928 |
|
5929 |
"Modified: / 16-03-2012 / 10:35:02 / cg" |
|
4342
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5930 |
! |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5931 |
|
9834 | 5932 |
resetSyntaxColorsBlueControlFlowSelectors |
5933 |
"resets the colors in the CurrentPreferences to alternative default values |
|
5934 |
(with blue control flow selectors)" |
|
5935 |
||
14062 | 5936 |
self resetSyntaxColors. |
9834 | 5937 |
self at:#controlFlowSelectorColor put:(Color blue). |
5938 |
||
5939 |
"Created: / 08-09-2006 / 16:11:52 / cg" |
|
5940 |
! |
|
5941 |
||
6171 | 5942 |
resetSyntaxColorsBlueSelectorsGreenComments |
5943 |
"resets the colors in the CurrentPreferences to alternative default values |
|
5944 |
(with blue selectors and green comments)" |
|
5945 |
||
14062 | 5946 |
self resetSyntaxColors. |
8551 | 5947 |
self at:#commentColor put:(Color green darkened). |
5948 |
self at:#commentEmphasis put:#italic. |
|
5949 |
self at:#selectorColor put:(Color blue). |
|
5950 |
self at:#selectorEmphasis put:#normal. |
|
5951 |
self at:#methodSelectorColor put:(Color blue). |
|
6171 | 5952 |
self at:#methodSelectorEmphasis put:#bold. |
14062 | 5953 |
|
21845 | 5954 |
"Modified: / 20-06-2017 / 08:35:49 / cg" |
6171 | 5955 |
! |
5956 |
||
5957 |
resetSyntaxColorsBlueSelectorsGreyComments |
|
6169 | 5958 |
"resets the colors in the CurrentPreferences to alternative default values |
5959 |
(with blue selectors and grey comments)" |
|
5960 |
||
6171 | 5961 |
self resetSyntaxColorsBlueSelectorsGreenComments. |
5962 |
self at:#commentColor put:(Color gray). |
|
6169 | 5963 |
! |
5964 |
||
4342
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5965 |
resetSyntaxColorsGreenComments |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5966 |
"resets the colors in the CurrentPreferences to alternative default values |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5967 |
(with green comments)" |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5968 |
|
14062 | 5969 |
self resetSyntaxColors. |
4342
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5970 |
self at:#commentColor put:(Color green darkened). |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
5971 |
|
14062 | 5972 |
"Modified: / 16-03-2012 / 10:34:50 / cg" |
9144 | 5973 |
! |
5974 |
||
9834 | 5975 |
resetSyntaxColorsGreenCommentsBlueControlFlowSelectors |
5976 |
"resets the colors in the CurrentPreferences to alternative default values |
|
5977 |
(with green comments, blue control flow)" |
|
5978 |
||
14062 | 5979 |
self resetSyntaxColors. |
9834 | 5980 |
self at:#commentColor put:(Color green darkened). |
5981 |
self at:#controlFlowSelectorColor put:(Color blue). |
|
5982 |
||
5983 |
"Created: / 08-09-2006 / 16:10:38 / cg" |
|
5984 |
! |
|
5985 |
||
9144 | 5986 |
resetSyntaxColorsToSqueakStyle |
14063
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
5987 |
"resets the colors in the CurrentPreferences to alternative default values" |
9144 | 5988 |
|
12281 | 5989 |
self resetSyntaxColorsToSqueakStyle2 |
14063
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
5990 |
|
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
5991 |
"Modified (comment): / 17-03-2012 / 10:38:07 / cg" |
12281 | 5992 |
! |
5993 |
||
5994 |
resetSyntaxColorsToSqueakStyle1 |
|
5995 |
"resets the colors in the CurrentPreferences to alternative default values |
|
5996 |
(with blue selectors and green comments)" |
|
5997 |
||
14062 | 5998 |
self resetSyntaxColors. |
9144 | 5999 |
self at:#commentColor put:(Color green darkened). |
6000 |
self at:#commentEmphasis put:#italic. |
|
6001 |
self at:#selectorColor put:(Color blue:80). |
|
6002 |
self at:#selectorEmphasis put:#normal. |
|
6003 |
self at:#methodSelectorColor put:(Color black). |
|
6004 |
self at:#methodSelectorEmphasis put:#bold. |
|
6005 |
self at:#globalIdentifierEmphasis put:#bold. |
|
6006 |
self at:#localIdentifierColor put:(Color grey:40). |
|
6007 |
self at:#instVarIdentifierEmphasis put:#bold. |
|
6008 |
self at:#constantColor put:(Color red:67). |
|
14062 | 6009 |
|
6010 |
"Modified: / 16-03-2012 / 10:34:40 / cg" |
|
14063
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6011 |
"Modified (comment): / 17-03-2012 / 10:38:47 / cg" |
9184 | 6012 |
! |
6013 |
||
12281 | 6014 |
resetSyntaxColorsToSqueakStyle2 |
6015 |
"resets the colors in the CurrentPreferences to alternative default values |
|
6016 |
(with blue selectors and green comments)" |
|
6017 |
||
14062 | 6018 |
self resetSyntaxColors. |
12281 | 6019 |
self at:#commentColor put:(Color green darkened). |
6020 |
self at:#commentEmphasis put:#italic. |
|
6021 |
self at:#selectorColor put:(Color blue:80). |
|
6022 |
self at:#selectorEmphasis put:#normal. |
|
12391
35ee0cb7fd56
changed: #resetSyntaxColorsToSqueakStyle2
Claus Gittinger <cg@exept.de>
parents:
12348
diff
changeset
|
6023 |
self at:#controlFlowSelectorEmphasis put:#bold. |
12281 | 6024 |
self at:#methodSelectorColor put:(Color black). |
6025 |
self at:#methodSelectorEmphasis put:#bold. |
|
6026 |
self at:#globalIdentifierEmphasis put:#bold. |
|
6027 |
self at:#localIdentifierColor put:(Color grey:40). |
|
6028 |
self at:#instVarIdentifierEmphasis put:#bold. |
|
6029 |
self at:#constantColor put:(Color red:67). |
|
6030 |
self at:#selfColor put:(Color red:50 ). |
|
6031 |
self at:#selfEmphasis put:#bold. |
|
12282
03a6891e3ca5
changed: #resetSyntaxColorsToSqueakStyle2
Claus Gittinger <cg@exept.de>
parents:
12281
diff
changeset
|
6032 |
self at:#localIdentifierColor put:(Color grey:50 ). |
03a6891e3ca5
changed: #resetSyntaxColorsToSqueakStyle2
Claus Gittinger <cg@exept.de>
parents:
12281
diff
changeset
|
6033 |
self at:#localIdentifierEmphasis put:#normal. |
14062 | 6034 |
|
6035 |
"Modified: / 16-03-2012 / 10:34:35 / cg" |
|
14063
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6036 |
"Modified (comment): / 17-03-2012 / 10:38:57 / cg" |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6037 |
! |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6038 |
|
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6039 |
resetSyntaxColorsToVAgeStyle |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6040 |
"resets the colors in the CurrentPreferences to alternative default values |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6041 |
(green comments, blue globals)" |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6042 |
|
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6043 |
self resetSyntaxColors. |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6044 |
self at:#identifierColor put:(Color rgbValue:16r00007F). |
14064
c80388807776
changed: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14063
diff
changeset
|
6045 |
self at:#argumentColor put:(Color rgbValue:16r00007F). |
14063
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6046 |
self at:#identifierEmphasis put:#normal. |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6047 |
self at:#commentColor put:(Color rgbValue:16r007F00). |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6048 |
self at:#selfColor put:(Color rgbValue:16r7F007F). |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6049 |
self at:#constantColor put:(Color rgbValue:16r7F0000). |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6050 |
self at:#selectorColor put:(Color black). |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6051 |
self at:#selectorEmphasis put:#bold. |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6052 |
self at:#globalIdentifierColor put:(Color blue). |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6053 |
self at:#methodSelectorColor put:(Color black). |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6054 |
self at:#methodSelectorEmphasis put:#bold. |
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6055 |
|
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6056 |
"Created: / 17-03-2012 / 10:37:42 / cg" |
12281 | 6057 |
! |
6058 |
||
11672 | 6059 |
resetSyntaxColorsToVCStyle |
6060 |
"resets the colors in the CurrentPreferences to visual C default style |
|
6061 |
(green comments, blue keywords, redish string constants)" |
|
6062 |
||
14062 | 6063 |
self resetSyntaxColors. |
11672 | 6064 |
self at:#controlFlowSelectorColor put:(Color blue). |
6065 |
self at:#commentColor put:(Color green darkened). |
|
6066 |
self at:#constantColor put:(Color red:64 green:8 blue:8). |
|
14062 | 6067 |
|
6068 |
"Modified: / 16-03-2012 / 10:34:30 / cg" |
|
14063
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6069 |
"Modified (comment): / 17-03-2012 / 10:39:11 / cg" |
11672 | 6070 |
! |
6071 |
||
9184 | 6072 |
resetSyntaxColorsToVW7Style |
6073 |
"resets the colors in the CurrentPreferences to alternative default values |
|
6074 |
(with light blue comments, green variables)" |
|
6075 |
||
14062 | 6076 |
self resetSyntaxColors. |
9184 | 6077 |
self at:#commentColor put:(Color blue lightened). |
6078 |
self at:#selectorColor put:(Color black). |
|
6079 |
self at:#selectorEmphasis put:#normal. |
|
6080 |
self at:#methodSelectorColor put:(Color black). |
|
6081 |
self at:#methodSelectorEmphasis put:#bold. |
|
6082 |
self at:#identifierEmphasis put:#normal. |
|
6083 |
self at:#identifierColor put:(Color green darkened). |
|
14062 | 6084 |
|
6085 |
"Modified: / 16-03-2012 / 10:34:26 / cg" |
|
14063
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6086 |
"Modified (comment): / 17-03-2012 / 10:39:18 / cg" |
14005
7d4c58528d0e
added: #resetSyntaxColorsWithSideEffectHighlighting
Claus Gittinger <cg@exept.de>
parents:
14004
diff
changeset
|
6087 |
! |
7d4c58528d0e
added: #resetSyntaxColorsWithSideEffectHighlighting
Claus Gittinger <cg@exept.de>
parents:
14004
diff
changeset
|
6088 |
|
7d4c58528d0e
added: #resetSyntaxColorsWithSideEffectHighlighting
Claus Gittinger <cg@exept.de>
parents:
14004
diff
changeset
|
6089 |
resetSyntaxColorsWithSideEffectHighlighting |
7d4c58528d0e
added: #resetSyntaxColorsWithSideEffectHighlighting
Claus Gittinger <cg@exept.de>
parents:
14004
diff
changeset
|
6090 |
"resets the colors in the CurrentPreferences to their default values |
14063
3601e2191b9d
added: #resetSyntaxColorsToVAgeStyle
Claus Gittinger <cg@exept.de>
parents:
14062
diff
changeset
|
6091 |
plus side effect highlighting (assignments to instvars and globals are marked)" |
14005
7d4c58528d0e
added: #resetSyntaxColorsWithSideEffectHighlighting
Claus Gittinger <cg@exept.de>
parents:
14004
diff
changeset
|
6092 |
|
14062 | 6093 |
self resetSyntaxColors. |
14005
7d4c58528d0e
added: #resetSyntaxColorsWithSideEffectHighlighting
Claus Gittinger <cg@exept.de>
parents:
14004
diff
changeset
|
6094 |
self at:#sideEffectAssignmentBackgroundColor put:(Color rgbValue:16rFFDBDB). |
7d4c58528d0e
added: #resetSyntaxColorsWithSideEffectHighlighting
Claus Gittinger <cg@exept.de>
parents:
14004
diff
changeset
|
6095 |
|
7d4c58528d0e
added: #resetSyntaxColorsWithSideEffectHighlighting
Claus Gittinger <cg@exept.de>
parents:
14004
diff
changeset
|
6096 |
"Created: / 13-02-2012 / 12:12:56 / cg" |
4342
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
6097 |
! ! |
f2bbfcd2f072
added some default color settings
Claus Gittinger <cg@exept.de>
parents:
4341
diff
changeset
|
6098 |
|
7266 | 6099 |
!UserPreferences methodsFor:'default values'! |
4582
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
6100 |
|
4583 | 6101 |
defaultValue |
6102 |
"the defaultValue for non-existing keys" |
|
6103 |
||
16652 | 6104 |
^ nil |
4583 | 6105 |
! |
6106 |
||
4582
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
6107 |
errorKeyNotFound:aKey |
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
6108 |
"for any non-existing key, false is returned" |
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
6109 |
|
4583 | 6110 |
^ self defaultValue |
4582
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
6111 |
! ! |
31cbce168a1d
return false for nonexisting keys
Claus Gittinger <cg@exept.de>
parents:
4580
diff
changeset
|
6112 |
|
10789 | 6113 |
!UserPreferences methodsFor:'misc'! |
6114 |
||
20872 | 6115 |
doesNotUnderstand:aMessage |
6116 |
|k def numArgs| |
|
6117 |
||
6118 |
k := aMessage selector. |
|
6119 |
(numArgs := aMessage numArgs) == 0 ifTrue:[ |
|
6120 |
(self includesKey:k) ifTrue:[ |
|
6121 |
^ self at:k |
|
6122 |
]. |
|
6123 |
((def := self class default) includesKey:k) ifTrue:[ |
|
6124 |
^ def at:k |
|
6125 |
]. |
|
6126 |
^ self defaultValue |
|
6127 |
]. |
|
6128 |
||
6129 |
"/ this is needed, if a setting is loaded (via the settings.stx) at a time |
|
6130 |
"/ when the corresponding package which uses that setting is not yet loaded; |
|
6131 |
"/ for example: libsvn settings, with no libsvn being present. |
|
6132 |
"/ if obsolete keys accumulate over time, we might need a settings cleanup GUI to |
|
6133 |
"/ care for that. |
|
6134 |
||
6135 |
(numArgs == 1 and:[k endsWith:$:]) ifTrue:[ |
|
6136 |
k := k copyButLast asSymbol. |
|
6137 |
^ self at:k put:(aMessage arg1) |
|
6138 |
]. |
|
6139 |
||
6140 |
numArgs == 1 ifTrue:[ |
|
6141 |
Logger info:'obsolete settings key ignored: %1' with:aMessage selector. |
|
6142 |
^ nil |
|
6143 |
]. |
|
6144 |
||
6145 |
^ super doesNotUnderstand:aMessage |
|
6146 |
||
6147 |
"Modified (comment): / 19-08-2011 / 14:01:56 / cg" |
|
6148 |
! |
|
6149 |
||
10789 | 6150 |
flyByHelpSettingChanged |
6151 |
FlyByHelp notNil ifTrue:[ |
|
18262 | 6152 |
(self at:#flyByHelpActive ifAbsent:true) ifTrue:[ |
6153 |
FlyByHelp start. |
|
6154 |
] ifFalse:[ |
|
6155 |
FlyByHelp stop. |
|
6156 |
]. |
|
10789 | 6157 |
]. |
6158 |
! ! |
|
6159 |
||
6937 | 6160 |
!UserPreferences methodsFor:'obsolete'! |
6161 |
||
6162 |
useNewSettinsApplication |
|
11598 | 6163 |
<resource: #obsolete> |
8545 | 6164 |
"obsolete - will be removed in next release. |
6165 |
(this is kept for a while, as it may have found its way into some |
|
6166 |
saved user preference files)" |
|
6937 | 6167 |
|
6941
1700d0c53837
make old to settings changed settins methods obsolete
penk
parents:
6937
diff
changeset
|
6168 |
self obsoleteMethodWarning. |
7029 | 6169 |
^ self useNewSettingsApplication |
6937 | 6170 |
! |
6171 |
||
6172 |
useNewSettinsApplication:aBoolean |
|
11598 | 6173 |
<resource: #obsolete> |
7030 | 6174 |
"obsolete - will be removed in next release" |
6937 | 6175 |
|
6941
1700d0c53837
make old to settings changed settins methods obsolete
penk
parents:
6937
diff
changeset
|
6176 |
self obsoleteMethodWarning. |
7029 | 6177 |
self useNewSettingsApplication:aBoolean. |
6937 | 6178 |
! ! |
6179 |
||
7028 | 6180 |
!UserPreferences methodsFor:'saving'! |
6181 |
||
6182 |
saveIn:fileName |
|
6183 |
self class saveSettings:self in:fileName |
|
17569 | 6184 |
|
6185 |
" |
|
6186 |
UserPreferences current saveIn:'test.settings' |
|
6187 |
" |
|
7028 | 6188 |
! ! |
6189 |
||
3347 | 6190 |
!UserPreferences class methodsFor:'documentation'! |
6191 |
||
13885 | 6192 |
version |
18489 | 6193 |
^ '$Header$' |
13885 | 6194 |
! |
6195 |
||
13399 | 6196 |
version_CVS |
18489 | 6197 |
^ '$Header$' |
12096 | 6198 |
! |
6199 |
||
13399 | 6200 |
version_SVN |
15290 | 6201 |
^ '$ Id: UserPreferences.st 10648 2011-06-23 15:55:10Z vranyj1 $' |
3347 | 6202 |
! ! |
18419 | 6203 |