[squeak-dev] The Inbox: System-ct.1119.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Oct 26 20:01:05 UTC 2019
A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-ct.1119.mcz
==================== Summary ====================
Name: System-ct.1119
Author: ct
Time: 26 October 2019, 10:00:59.779469 pm
UUID: dc499ab1-dfe1-064c-a997-271a591d4b18
Ancestors: System-mt.1116
Adds convenience methods to change multiple preferences
Usage example:
Preferences
setPreferences: {
#(UIManager >> #openToolsAttachedToMouseCursor) join asSymbol -> false.
#(Model >> #useColorfulWindows) join asSymbol -> false }
during: [self notify: 'Carpe Squeak!']
=============== Diff against System-mt.1116 ===============
Item was added:
+ ----- Method: Preferences class>>setPreferences: (in category 'get/set') -----
+ setPreferences: associations
+
+ associations associationsDo: [:association |
+ self setPreference: association key toValue: association value].!
Item was added:
+ ----- Method: Preferences class>>setPreferences:during: (in category 'get/set') -----
+ setPreferences: associations during: aBlock
+ "Changes the given values for the duration of aBlock"
+
+ | values previousValues |
+ values := associations as: Dictionary.
+ previousValues := values associations collect: [:association |
+ association key -> (self valueOfFlag: association key)].
+ self setPreferences: values.
+ ^ aBlock ensure: [
+ self setPreferences: previousValues]!
More information about the Squeak-dev
mailing list
|