Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.749.mcz==================== Summary ====================
Name: System-eem.749
Author: eem
Time: 1 July 2015, 1:02:40.277 pm
UUID: e067c0b6-9b7b-49ca-ae4d-e5b2e9c0bc8e
Ancestors: System-ul.748
Revert storePreferencesIn: to work with a copy,
which accords with the old code. Go for brevity
in prefEvent:.
=============== Diff against System-ul.748 ===============
Item was changed:
----- Method: Preferences class>>prefEvent: (in category 'dynamic preferences') -----
prefEvent: anEvent
"Check if this system event defines or removes a preference.
TODO: Queue the event and handle in background process.
There is zero reason to be so eager here."
+ | aClass aSelector method |
-
- | aClass aSelector |
anEvent itemKind = SystemChangeNotifier classKind ifTrue:
[^anEvent isRemoved ifTrue:
[self removePreferencesFor: anEvent item]].
(anEvent itemKind = SystemChangeNotifier methodKind
and: [(aClass := anEvent itemClass) isMeta]) ifFalse: "ignore instance methods"
[^self].
aClass := aClass theNonMetaClass.
aSelector := anEvent itemSelector.
anEvent isRemoved
ifTrue:
[self atomicUpdatePreferences: [ :copyOfDictionaryOfPreferences |
copyOfDictionaryOfPreferences removeKey: (aClass name,'>>', aSelector) asSymbol ifAbsent: []]]
ifFalse:
[(anEvent isAdded or: [anEvent isModified]) ifTrue:
+ [method := anEvent item.
+ method pragmas do:
+ [:pragma|
+ self respondToPreferencePragmasInMethod: method class: aClass]]]!
- [self respondToPreferencePragmasInMethod: anEvent item class: aClass]]!
Item was changed:
----- Method: Preferences class>>storePreferencesIn: (in category 'personalization') -----
+ storePreferencesIn: aFileName
+ | stream prefsSnapshot |
- storePreferencesIn: aFileName
-
- | stream |
#(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].
+ stream nextPut: prefsSnapshot.
- preferencesDictionary keysAndValuesDo: [:key :pref | preferencesDictionary at: key put: pref asPreference].
- stream nextPut: preferencesDictionary.
stream nextPut: (Smalltalk isMorphic
ifTrue:[World fillStyle]
ifFalse:[DesktopColor]).
stream close!