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