[squeak-dev] The Trunk: System-mt.1276.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Dec 31 14:06:47 UTC 2021


Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1276.mcz

==================== Summary ====================

Name: System-mt.1276
Author: mt
Time: 31 December 2021, 3:06:43.907879 pm
UUID: 1a8c32b0-87e9-7748-b3a3-d6566d8c1d66
Ancestors: System-mt.1275

Quickfix for loading older pref dicts from file. See http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217817.html

=============== Diff against System-mt.1275 ===============

Item was changed:
  ----- Method: Preferences class>>loadPreferencesFrom: (in category 'initialization - save/load') -----
  loadPreferencesFrom: aFile
  
  	| stream params dict desktopColor patternsToIgnore |
  	patternsToIgnore := #('*updateMapName' '*defaultUpdateURL').
  	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 rehash. "See http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217817.html"
  	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."]]].
  	params keysAndValuesDo: [ :key :value | self setParameter: key to: value ].
  	Smalltalk isMorphic
  		ifTrue: [ Project current world fillStyle: desktopColor ]
  		ifFalse: [ self desktopColor: desktopColor. ScheduledControllers updateGray ]!



More information about the Squeak-dev mailing list