Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.2148.mcz
==================== Summary ====================
Name: Morphic-ct.2148
Author: ct
Time: 7 December 2023, 7:31:26.443108 pm
UUID: b74139ee-af71-b64d-9b8d-0950fd862bbd
Ancestors: Morphic-mt.2147
Fixes a remarkable slip that (1) prevented collapsed windows from applying a new UI theme and (2) introduced a possibly significant memory leak*. Note that #userInterfaceTheme answer a UserInterfaceThemeRequest which forwards all one-argument selectors as setters to the actual theme.
*To reproduce this in an older image, open a workspace, evaluate o := Array new: 100000000, collapse the window, change the UI theme, expand the window, close it, purge all undos and run GC, and the workspace with its large binding will still be referenced in the UI theme.
=============== Diff against Morphic-mt.2147 ===============
Item was changed:
----- Method: SystemWindow>>collapseOrExpand (in category 'resize/collapse') -----
collapseOrExpand
"Collapse or expand the window, depending on existing state"
| cf |
isCollapsed
ifTrue:
["Expand -- restore panes to morphics structure"
isCollapsed := false.
self beKeyWindow. "Bring to frint first"
Preferences collapseWindowsInPlace
ifTrue:
[fullFrame := fullFrame align: fullFrame topLeft with: self getBoundsWithFlex topLeft]
ifFalse:
[collapsedFrame := self getBoundsWithFlex].
collapseBox ifNotNil: [collapseBox setBalloonText: 'collapse this window' translated].
self setBoundsWithFlex: fullFrame.
paneMorphs reverseDo:
[:m | self addMorph: m unlock.
self world startSteppingSubmorphsOf: m].
self addPaneSplitters.
(self hasProperty: #applyTheme) ifTrue: [
self removeProperty: #applyTheme.
+ UserInterfaceTheme current applyTo: self allMorphs]]
- self userInterfaceTheme applyTo: self allMorphs]]
ifFalse:
["Collapse -- remove panes from morphics structure"
isCollapsed := true.
fullFrame := self getBoundsWithFlex.
"First save latest fullFrame"
paneMorphs do: [:m | m delete; releaseCachedState].
self removePaneSplitters.
self removeCornerGrips.
model modelSleep.
cf := self getCollapsedFrame.
(collapsedFrame isNil and: [Preferences collapseWindowsInPlace not]) ifTrue:
[collapsedFrame := cf].
self setBoundsWithFlex: cf.
collapseBox ifNotNil: [collapseBox setBalloonText: 'expand this window' translated ].
expandBox ifNotNil: [expandBox setBalloonText: 'expand this window' translated ].
self isInWorld ifTrue: [self sendToBack]].
self layoutChanged.!
Christoph Thiede uploaded a new version of PreferenceBrowser to project The Inbox:
http://source.squeak.org/inbox/PreferenceBrowser-ct.160.mcz
==================== Summary ====================
Name: PreferenceBrowser-ct.160
Author: ct
Time: 21 December 2023, 7:37:19.742632 pm
UUID: e1f740cd-fd42-7540-9189-9c34140810cf
Ancestors: PreferenceBrowser-codefrau.159
Makes non-pragma preferences findable through its readable name (i.e., "higher perf" instead of "higherperf").
=============== Diff against PreferenceBrowser-codefrau.159 ===============
Item was changed:
----- Method: PreferenceBrowser>>searchPreferencesFor: (in category 'preferences search') -----
searchPreferencesFor: pattern
| result |
result := pattern asString asLowercase withBlanksTrimmed.
result ifEmpty: [^self].
searchResults := self allPreferences select: [:aPreference |
((aPreference name includesSubstring: result caseSensitive: false)
or: [aPreference helpString includesSubstring: result caseSensitive: false])
+ or: [aPreference codeString includesSubstring: result caseSensitive: false]
+ "for non-pragma preferences, #readableName is different from #name"
+ or: [aPreference readableName includesSubstring: result caseSensitive: false] ].
- or: [aPreference codeString includesSubstring: result caseSensitive: false] ].
self updateSearchResultsLabel.
self selectSearchResultsCategory.
self lastExecutedSearch: pattern.
!
Christoph Thiede uploaded a new version of Collections to project The Inbox:
http://source.squeak.org/inbox/Collections-ct.1060.mcz
==================== Summary ====================
Name: Collections-ct.1060
Author: ct
Time: 27 December 2023, 11:59:34.927399 pm
UUID: 97958301-3160-e74c-9b2f-46c22493a381
Ancestors: Collections-mt.1058
Speeds up printing of large sets. Analogously to dictionaries, do not sort and enumerate all their items beyond a threshold.
=============== Diff against Collections-mt.1058 ===============
Item was changed:
----- Method: Set>>printElementsOn: (in category 'printing') -----
printElementsOn: aStream
"Like dictionaries, indicate some human-readable sort order."
+ self size > 100 ifTrue:
+ [aStream
+ nextPutAll: '(size ';
+ print: self size;
+ nextPut: $).
+ ^ self].
+
self sortedSafely printElementsOn: aStream.!
A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-ct.1061.mcz
==================== Summary ====================
Name: Collections-ct.1061
Author: ct
Time: 2 January 2024, 5:18:37.636112 pm
UUID: 93dafbe2-e958-8f4b-b1ce-70cf12d7c4e2
Ancestors: Collections-mt.1058
Implements #sameAs: on Text.
This fixes a bug in IndentingListItemMorph>>#openPath: when some nodes in the tree have formatted text labels. Not sure whether there should be more string casts around PluggableTreeItemNodes instead, though. See: https://lists.squeakfoundation.org/archives/list/squeak-dev@lists.squeakfou… Thanks to Jaromir (jar) for the bug report!
=============== Diff against Collections-mt.1058 ===============
Item was added:
+ ----- Method: Text>>sameAs: (in category 'comparing') -----
+ sameAs: aStringOrText
+ "Answer whether the receiver sorts equal to aString. The collation sequence is ascii with case differences ignored."
+
+ ^ self string sameAs: aStringOrText asString!
Christoph Thiede uploaded a new version of Graphics to project The Inbox:
http://source.squeak.org/inbox/Graphics-ct.550.mcz
==================== Summary ====================
Name: Graphics-ct.550
Author: ct
Time: 2 January 2024, 10:01:10.078985 pm
UUID: 07e886e9-269a-ed43-b18b-673d84020d97
Ancestors: Graphics-mt.549
Speeds up Form>>#magnifyBy: for scale = 1. #copy is faster by >75% using primitiveWarpBits and faster by >250% using the fallback code. In absolute numbers, this saves me 18ms for "magnifying" a screenshot of my world in full HD.
=============== Diff against Graphics-mt.549 ===============
Item was changed:
----- Method: Form>>magnifyBy: (in category 'scaling, rotation') -----
magnifyBy: scale
"Answer a Form created as a scaling of the receiver.
Scale may be a Float or even a Point, and may be greater or less than 1.0."
| effectiveScale |
effectiveScale := scale isPoint ifTrue: [scale r] ifFalse: [scale].
+ effectiveScale = 1 ifTrue: [^ self copy].
^ self magnify: self boundingBox by: scale
smoothing: (effectiveScale < 1 ifTrue: [2] ifFalse: [1])!