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