Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.966.mcz
==================== Summary ====================
Name: Collections-mt.966
Author: mt
Time: 2 December 2021, 4:06:07.345715 pm
UUID: e18db8cb-0b3c-1d48-95f3-f5955e1ea837
Ancestors: Collections-mt.965
New message on Text: add a text attribute to the entire text unless there is a conflict with an existing text attribute. So, automatically compute the ranges that fit.
=============== Diff against Collections-mt.965 ===============
Item was added:
+ ----- Method: Text>>addAttribute:unless: (in category 'emphasis') -----
+ addAttribute: anAttribute unless: aBlock
+ "Only add anAttribute when aBlock evaluates to false. Can be used to avoid overwriting existing attributes without knowing exactly where they are. Kind of complements the #dominates: protocol in TextAttribute."
+
+ | offset |
+ self flag: #performance. "mt: Can we do this faster?"
+ runs copy withIndexDo: [:attrs :index |
+ (aBlock cull: attrs cull: index)
+ ifFalse: [offset ifNil: [
+ offset := index]]
+ ifTrue: [offset ifNotNil: [
+ self addAttribute: anAttribute from: offset to: index - 1.
+ offset := nil]]].
+ offset ifNotNil: [
+ self addAttribute: anAttribute from: offset to: self size].!
Marcel Taeumel uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-mt.169.mcz
==================== Summary ====================
Name: MonticelloConfigurations-mt.169
Author: mt
Time: 2 December 2021, 2:56:24.480715 pm
UUID: 7c0fb674-93ba-2443-9c53-725956da9084
Ancestors: MonticelloConfigurations-ct.168
We have a few places in the sources, where we hard-code the literal '</a>' in one form or another. In this rather recent example, avoid that through a little indirection to fool the Windows Defender. Also to document the overall issue somewhere within the image.
See http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217346…
=============== Diff against MonticelloConfigurations-ct.168 ===============
Item was changed:
----- Method: MCMcmUpdater>>updateMessageFor: (in category 'private') -----
updateMessageFor: previousUpdateLevel
+ ^ ('Update completed.<br><br>Version: {1}<br>Update: {3}<b>{2}</b><br><br>Url: <a href="{4}">{4}</{10}><br>Map: ''{5}''<br>CI status: <a href="{8}"><img src="{7}" /> {9}</{10}>{6}' translated format: {
- ^ ('Update completed.<br><br>Version: {1}<br>Update: {3}<b>{2}</b><br><br>Url: <a href="{4}">{4}</a><br>Map: ''{5}''<br>CI status: <a href="{8}"><img src="{7}" /> {9}</a>{6}' translated format: {
SystemVersion current version.
SystemVersion current highestUpdate.
previousUpdateLevel = SystemVersion current highestUpdate
ifTrue: ['']
ifFalse: [previousUpdateLevel asString, ' -> '].
self repository.
MCMcmUpdater updateMapName.
SystemVersion current description ifEmpty: [''] ifNotEmpty: [:d |
'<br><br>', (d copyReplaceAll: String cr with: '<br>')].
SystemVersion current ciStatusBadgeUrl.
SystemVersion current ciStatusPageUrl.
SystemVersion current ciStatusTimestamp ifNil: ['(build inaccessible!!)' translated].
+ "mt: Avoid triggering the Windows Defender. See http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217346…"
+ 'a'.
}) asTextFromHtml!
Marcel Taeumel uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-mt.363.mcz
==================== Summary ====================
Name: CollectionsTests-mt.363
Author: mt
Time: 2 December 2021, 2:53:50.194715 pm
UUID: 2e5af8dd-1822-9c41-8cab-2ad1e733146c
Ancestors: CollectionsTests-ul.362
Complements Collections-mt.965
=============== Diff against CollectionsTests-ul.362 ===============
Item was changed:
----- Method: HtmlReadWriterTest>>test03FontTag (in category 'tests') -----
test03FontTag
{
'<font color="#FFFF00">Hello, World!!</font>'.
'Hello, World!!' asText
addAttribute: (TextColor color: Color yellow).
+
+ '<font face="Accula" size="12">Hello, World!!</font>'.
+ 'Hello, World!!' asText
+ addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Accula' pointSize: 12)).
+
+ "Note that we cannot directly use both face/size and color in the same font tag because of how #openHtmlOn: works in fonts. Works in general, but just not in this test setup."
+ '<font face="Accula" size="12"><font color="#FFFF00">Hello, World!!</font></font>'.
+ 'Hello, World!!' asText
+ addAttribute: (TextFontReference toFont: (StrikeFont familyName: 'Accula' pointSize: 12));
+ addAttribute: (TextColor color: Color yellow).
+
} pairsDo: [:expectedHtml :expectedText |
self convertHtml: expectedHtml.
self assert: expectedText string equals: text string.
self assert: expectedText runs equals: text runs.
self convertText: expectedText.
self assert: expectedHtml equals: html].!
David T. Lewis uploaded a new version of System to project The Treated Inbox:
http://source.squeak.org/treated/System-dtl.1254.mcz
==================== Summary ====================
Name: System-dtl.1254
Author: dtl
Time: 26 November 2021, 11:06:19.584405 am
UUID: 3856329c-1404-4bd5-9b94-d9c47f663d7c
Ancestors: System-mt.1253
Let vmParameterAt:ifAbsent: treat nil as an absent parameter. Previously only out of range parameter requests were treated as absent.
Handles the case of parameter 54 which is numeric for Spur VM, nil for Cog VM, and out of range for interpreter VM. Update bytesUsedString to use 0 as default for parameter 54.
=============== Diff against System-mt.1253 ===============
Item was changed:
----- Method: SmalltalkImage>>bytesUsedString (in category 'memory space') -----
bytesUsedString
"Answer a string describing the amount of memory in use."
"Smalltalk bytesUsedString"
| totalUsed |
totalUsed := (self vmParameterAt: 2 "used eden + used past space")
+ + ((self vmParameterAt: 1 "old space size")
+ - (self vmParameterAt: 54 ifAbsent: 0 "free old space")).
- + ((self vmParameterAt: 1 "old space size") - (self vmParameterAt: 54 "free old space")).
^totalUsed asStringWithCommas, ' bytes in use'!
Item was changed:
----- Method: SmalltalkImage>>vmParameterAt:ifAbsent: (in category 'vm parameters') -----
vmParameterAt: parameterIndex ifAbsent: defaultValueOrBlock
+ "Answer a VM parameter or defaultValueOrBlock value if out of range
+ or if the VM does not provide a value for this parameter. A VM parameter
+ is typically numeric or boolean, and if not implemented will be nil."
+ ^ [(self vmParameterAt: parameterIndex)
+ ifNil: defaultValueOrBlock value]
- "Answer a VM parameter or defaultValueOrBlock value if out of range."
- ^ [self vmParameterAt: parameterIndex]
on: Error
do: [defaultValueOrBlock value]!
David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.1261.mcz
==================== Summary ====================
Name: System-dtl.1261
Author: dtl
Time: 1 December 2021, 6:27:02.182458 pm
UUID: 9cead45b-ffbd-4606-ab13-fe1180a9c763
Ancestors: System-mt.1260
Let vmParameterAt:ifAbsent: treat nil as an absent parameter. Previously only out of range parameter requests were treated as absent.
Handles the case of parameter 54 which is numeric for Spur VM, nil for Cog VM, and out of range for interpreter VM. Update bytesUsedString to use 0 as default for parameter 54.
(Originally submitted as System-dtl.1254, moved to treated inbox)
=============== Diff against System-mt.1260 ===============
Item was changed:
----- Method: SmalltalkImage>>bytesUsedString (in category 'memory space') -----
bytesUsedString
"Answer a string describing the amount of memory in use."
"Smalltalk bytesUsedString"
| totalUsed |
totalUsed := (self vmParameterAt: 2 "used eden + used past space")
+ + ((self vmParameterAt: 1 "old space size")
+ - (self vmParameterAt: 54 ifAbsent: 0 "free old space")).
- + ((self vmParameterAt: 1 "old space size") - (self vmParameterAt: 54 "free old space")).
^totalUsed asStringWithCommas, ' bytes in use'!
Item was changed:
----- Method: SmalltalkImage>>vmParameterAt:ifAbsent: (in category 'vm parameters') -----
vmParameterAt: parameterIndex ifAbsent: defaultValueOrBlock
+ "Answer a VM parameter or defaultValueOrBlock value if out of range
+ or if the VM does not provide a value for this parameter. A VM parameter
+ is typically numeric or boolean, and if not implemented will be nil."
+ ^ [(self vmParameterAt: parameterIndex)
+ ifNil: defaultValueOrBlock value]
- "Answer a VM parameter or defaultValueOrBlock value if out of range."
- ^ [self vmParameterAt: parameterIndex]
on: Error
do: [defaultValueOrBlock value]!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.1681.mcz
==================== Summary ====================
Name: Morphic-ct.1681
Author: ct
Time: 8 September 2020, 1:48:12.211798 pm
UUID: 9e91205a-93e1-c143-ae8f-4aa3428bf197
Ancestors: Morphic-mt.1679
Fixes use of custom attributes in DialogWindows
Things like the following did NOT work properly before this patch:
self inform: 'normal ' asText
, ('red ' asText addAttribute: TextColor red; yourself)
, ('font ' asText addAttribute: (TextFontReference toFont: ((TextStyle named: 'BitstreamVeraSansMono') fontOfSize: 20)); yourself)
, ('url ' asText addAttribute: TextURL new; yourself)
This was because DialogWindow added its own styling attributes on top of all existing attributes. For color, this is not necessary because #textColor: is sufficient. For font size, in theory, TextFontChange should be sufficient, but currently it does not support relative changes to the font size.
=============== Diff against Morphic-mt.1679 ===============
Item was changed:
----- Method: DialogWindow>>setMessageParameters (in category 'initialization') -----
setMessageParameters
+
+ messageMorph ifNil: [^ self].
+ messageMorph
+ hResizing: #shrinkWrap;
+ vResizing: #shrinkWrap.
+
+ self userInterfaceTheme textColor ifNotNil: [:color |
+ messageMorph textColor: color].
+ self userInterfaceTheme font ifNotNil: [:font |
+ self flag: #todo. "ct: Develop a relative text font change attribute. At the moment, all prior font sizes will be overwritten."
+ messageMorph contents addAttribute: (
+ TextFontChange fontNumber: (font textStyle fontIndexOf: font))].!
- messageMorph ifNotNil: [
- | fontToUse colorToUse |
- fontToUse := self userInterfaceTheme font ifNil: [TextStyle defaultFont].
- colorToUse := self userInterfaceTheme textColor ifNil: [Color black].
-
- messageMorph
- hResizing: #shrinkWrap;
- vResizing: #shrinkWrap.
-
- messageMorph contents
- addAttribute: (TextFontReference toFont: fontToUse);
- addAttribute: (TextColor color: colorToUse).
- messageMorph textColor: colorToUse].!