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