[Pkg] The Trunk: System-mt.1249.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Nov 22 10:46:49 UTC 2021
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1249.mcz
==================== Summary ====================
Name: System-mt.1249
Author: mt
Time: 22 November 2021, 11:46:41.391113 am
UUID: 5f40d463-3b0b-7844-9005-4ad9cb26264d
Ancestors: System-mt.1248
Avoid deprecation warnings when storing preferenes into my.prefs.
Avoid loading preferences that concern system updates. See http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-November/217057.html
=============== Diff against System-mt.1248 ===============
Item was changed:
----- Method: Preferences class>>loadPreferencesFrom: (in category 'initialization - save/load') -----
loadPreferencesFrom: aFile
+
+ | stream params dict desktopColor patternsToIgnore |
+ patternsToIgnore := #('*updateMapName' '*defaultUpdateURL').
- | stream params dict desktopColor |
stream := ReferenceStream fileNamed: aFile.
params := stream next.
self assert: (params isKindOf: IdentityDictionary).
params removeKey: #PersonalDictionaryOfPreferences.
dict := stream next.
self assert: (dict isKindOf: IdentityDictionary).
desktopColor := stream next.
stream close.
+ dict keys
+ reject: [:key | patternsToIgnore anySatisfy: [:pattern | pattern match: key]]
+ thenDo: [:key | | value |
+ value := dict at: key.
+ (self preferenceAt: key ifAbsent: [nil]) ifNotNil:
+ [:pref | [pref preferenceValue: value preferenceValue]
+ on: Deprecation do: [ : err | "Ignore preferences which may not be supported anymore."]]].
- dict keysAndValuesDo:
- [:key :value | (self preferenceAt: key ifAbsent: [nil]) ifNotNil:
- [:pref | [pref preferenceValue: value preferenceValue] on: Deprecation do: [ : err | "Ignore preferences which may not be supported anymore."]]].
params keysAndValuesDo: [ :key :value | self setParameter: key to: value ].
Smalltalk isMorphic
ifTrue: [ Project current world fillStyle: desktopColor ]
ifFalse: [ self desktopColor: desktopColor. ScheduledControllers updateGray ]!
Item was changed:
----- Method: Preferences class>>storePreferencesIn: (in category 'initialization - save/load') -----
storePreferencesIn: aFileName
| stream prefsSnapshot |
#(Prevailing PersonalPreferences) do:
[:ea |
Parameters removeKey: ea ifAbsent: []].
stream := ReferenceStream fileNamed: aFileName.
stream nextPut: Parameters.
prefsSnapshot := preferencesDictionary copy.
+ prefsSnapshot keysAndValuesDo: [:key :pref |
+ [prefsSnapshot at: key put: pref asPreference]
+ on: Deprecation do: [ : err | "Ignore preferences which may not be supported anymore."]].
- prefsSnapshot keysAndValuesDo: [:key :pref | prefsSnapshot at: key put: pref asPreference].
stream nextPut: prefsSnapshot.
stream nextPut: (Smalltalk isMorphic
ifTrue:[Project current world fillStyle]
ifFalse:[self desktopColor]).
stream close!
More information about the Packages
mailing list