Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.897.mcz==================== Summary ====================
Name: System-mt.897
Author: mt
Time: 16 August 2016, 3:30:53.367602 pm
UUID: c9186462-378f-2c4b-88f7-5bb1c28617ad
Ancestors: System-mt.896
Significat speed-up in UI theme switching. (Thanks Tim F.!)
=============== Diff against System-mt.896 ===============
Item was removed:
- ----- Method: ClassDescription>>canApplyThemeToInstances (in category '*System-Support') -----
- canApplyThemeToInstances
- "Override this to ignore your instances."
-
- ^ true!
Item was removed:
- ----- Method: TextDiffBuilder class>>canApplyThemeToInstances (in category 'preferences') -----
- canApplyThemeToInstances
- ^ false!
Item was added:
+ ----- Method: TextDiffBuilder>>canApplyUserInterfaceTheme (in category 'updating') -----
+ canApplyUserInterfaceTheme
+
+ ^ false!
Item was changed:
----- Method: UserInterfaceTheme class>>clientClasses (in category 'private') -----
clientClasses
+ ^ IdentitySet new in: [:result |
- ^ Set new in: [:result |
self allThemePropertiesDo: [:cls :prop | result add: cls].
result]!
Item was changed:
----- Method: UserInterfaceTheme class>>clientClassesToReapply (in category 'private') -----
clientClassesToReapply
"All client classes plus their unique subclasses."
+ ^ IdentitySet new in: [:result | self clientClasses do: [:cc | cc withAllSubclassesDo: [:sc |
- ^ Set new in: [:result | self clientClasses do: [:cc | cc withAllSubclassesDo: [:sc |
result add: sc]]. result]
!
Item was changed:
----- Method: UserInterfaceTheme>>apply (in category 'actions') -----
apply
"Apply this theme to all affected objects. Let classes decide on how to iterate and call their instances."
ignoreApply == true ifTrue: [^ self].
UserInterfaceTheme current: self.
self class clientClassesToReapply in: [:cc |
cc do: [:eachClass | eachClass applyUserInterfaceTheme].
+ Cursor wait showWhile: [
+ SystemNavigation default allObjectsDo: [:o |
+ ((cc includes: o class)
+ and: [o canApplyUserInterfaceTheme])
+ ifTrue: [o applyUserInterfaceTheme]]]].
- (cc select: [:eachClass | eachClass canApplyThemeToInstances])
- do: [:eachClass | eachClass applyThemeToInstances]
- displayingProgress: [:eachClass | 'Applying {1} to instances of {2}' format: {self name. eachClass name}]
- every: 1000 ].
Project current restoreDisplay.!