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