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