Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2139.mcz
==================== Summary ====================
Name: Morphic-ct.2139
Author: ct
Time: 13 November 2023, 7:55:13.229583 pm
UUID: 4e1f443c-c598-1b4b-a2fa-8547999acea3
Ancestors: Morphic-ct.2138
Uses #printString instead of #asString for displaying the result of an evaluated expression.
See: https://lists.squeakfoundation.org/archives/list/squeak-dev@lists.squeakfou…
=============== Diff against Morphic-ct.2138 ===============
Item was changed:
----- Method: SearchBar>>printIt:result: (in category 'do-its') -----
printIt: code result: object
| focusedWidget |
focusedWidget := self currentHand keyboardFocus.
self removeResultsWidget.
ToolBuilder default in: [:builder |
resultsWidget := (builder build: (StringHolder new
+ contents: object printString;
- contents: object asString;
buildCodePaneWith: builder)).
"This might cause the widget disappear to early. Especially if the textMorph is to small but the container needs to maintain a larger size because of its scroll bars."
resultsWidget textMorph
on: #mouseLeave send: #delete to: resultsWidget.
resultsWidget
extent: 1000 px @ 1000 px; fullBounds; "give text a chance to layout good"
width: 250 px; fullBounds;
height: (resultsWidget extentToFit y min: 300 px);
position: (focusedWidget
ifNotNil: [:w | w owner boundsInWorld bottomLeft]
ifNil: [self currentHand position]);
color: (BalloonMorph balloonColor alpha: 1.0).
Preferences menuAppearance3d
ifTrue: [resultsWidget addDropShadow].
resultsWidget openInWorld].!
Christoph Thiede uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ct.1432.mcz
==================== Summary ====================
Name: System-ct.1432
Author: ct
Time: 13 November 2023, 6:36:57.388722 pm
UUID: 9bd805c2-1d3e-2c4a-acbc-0066cc40c712
Ancestors: System-dtl.1431
Fixes missing escaping in common senders of #asTextFromHtml and #format:. Note that also Texts respond to #format: since Squeak 5.3.
=============== Diff against System-dtl.1431 ===============
Item was changed:
----- Method: DeepCopier>>warnIverNotCopiedIn:sel: (in category 'like fullCopy') -----
warnIverNotCopiedIn: aClass sel: sel
"Warn the user to update veryDeepCopyWith: or veryDeepInner:"
+ self inform: ('An instance variable was added to to class <b>{1}</b> and it is not copied in the method <b>{2}</b>.<br><br>Please rewrite it to handle all instance variables. See DeepCopier class comment.' translated asTextFromHtml format: {aClass name . sel}).
- self inform: ('An instance variable was added to to class <b>{1}</b> and it is not copied in the method <b>{2}</b>.<br><br>Please rewrite it to handle all instance variables. See DeepCopier class comment.' translated format: { aClass name . sel}) asTextFromHtml.
ToolSet browse: aClass selector: sel!
Item was changed:
----- Method: SmalltalkImage>>openSourcesAndChanges:forImage: (in category 'image, changes names') -----
openSourcesAndChanges: changesName forImage: imageName
"Open the changes and sources files and install them in SourceFiles. Inform the user of problems regarding write permissions or CR/CRLF mixups."
"Note: SourcesName and imageName are full paths; changesName is a
local name."
| sources changes msg wmsg |
msg := 'Squeak cannot locate {1}.
+ Please check that the file is named properly and is in the same directory as this image.' translated.
- Please check that the file is named properly and is in the same directory as this image.'.
wmsg := 'Squeak cannot write to {1}.
Please check that you have write permission for this file.
+ You won''t be able to save this image correctly until you fix this.' translated.
+
- You won''t be able to save this image correctly until you fix this.'.
-
sources := Smalltalk openSources.
sources ifNotNil: [sources setConverterForCode].
changes := SourceFileArray cachedChanges
ifNil: [Smalltalk openChanges: changesName forImage: imageName].
changes ifNotNil: [changes setConverterForCode].
((sources == nil or: [sources atEnd])
and: [Preferences valueOfFlag: #warnIfNoSourcesFile])
ifTrue: [Smalltalk platformName = 'Mac OS'
ifTrue: [msg := msg , '
+ Make sure the sources file is not an Alias.' translated].
+ self inform: (msg format: { 'the sources file named ' translated , self sourcesName })].
+
- Make sure the sources file is not an Alias.'].
- self inform: (msg format: { 'the sources file named ' , self sourcesName })].
-
(changes == nil
and: [Preferences valueOfFlag: #warnIfNoChangesFile])
+ ifTrue: [self inform: (msg format: { 'the changes file named ' translated , changesName })].
+
- ifTrue: [self inform: (msg format: { 'the changes file named ' , changesName })].
-
((Preferences valueOfFlag: #warnIfNoChangesFile) and: [changes notNil])
ifTrue: [changes isReadOnly
+ ifTrue: [self inform: (wmsg format: { 'the changes file named ' translated , changesName })].
- ifTrue: [self inform: (wmsg format: { 'the changes file named ' , changesName })].
((changes next: 200)
includesSubstring: String crlf)
ifTrue: [self inform: ('The changes file named <b>{1}</b> has been injured by an unpacking utility. Line endings were changed from Cr to CrLf.<br><br>Please set the preferences in your decompressing program to
+ <b>do not convert text files</b> and unpack the system again.' translated asTextFromHtml format: { changesName })]].
+
- <b>do not convert text files</b> and unpack the system again.' translated format: { changesName }) asTextFromHtml]].
-
SourceFiles := Array with: sources with: changes!
Item was changed:
----- Method: Utilities class>>setAuthorInitials (in category 'identification') -----
setAuthorInitials
"Put up a dialog allowing the user to specify the author's initials. Inform the user about collisions with known contributors. See SystemNavigation class >> #authors. "
| newInitials newName |
newInitials := Project uiManager
request: 'Please type your initials:' translated
initialAnswer: AuthorInitials.
newInitials ifEmpty: [^ self "No Change"].
(SystemNavigation authorsInverted at: newInitials ifPresent: [:existingNames |
newName := existingNames sorted joinSeparatedBy: '/'.
(self confirm: ('Hello, <b>{1}!!</b> :-)<br><br>Our <a href="code://{3}">list of known contributors</{4}> associates the initials you have entered with this name. If this is not you, please consider alternative initials, preferably more than just a few characters, to avoid collisions.<br><br>Do you want to use these author initials?<br><br> <b>{2}</b>' translated format: {
+ (newName ifNil: [newInitials]) escapeEntities.
+ newInitials escapeEntities.
- newName ifNil: [newInitials].
- newInitials.
'SystemReporter open model categoryAt: 1 put: true'.
"mt: Avoid triggering the Windows Defender. See http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217346…"
'a' }) asTextFromHtml) ] ifAbsent: [true])
ifTrue: [self authorInitials: newInitials].!
Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2138.mcz
==================== Summary ====================
Name: Morphic-ct.2138
Author: ct
Time: 13 November 2023, 6:36:40.229722 pm
UUID: 8f5cf761-3423-1c45-8bcc-6fa5db72e299
Ancestors: Morphic-dtl.2137
Fixes missing escaping in common senders of #asTextFromHtml and #format:. Note that also Texts respond to #format: since Squeak 5.3.
=============== Diff against Morphic-dtl.2137 ===============
Item was changed:
----- Method: FontImporterTool>>pointSizeInputHelp (in category 'preview text - ui') -----
pointSizeInputHelp
self editModeEnabled ifFalse: [
^ 'Point size in the preview box' translated].
+ ^ '<b>Point size</b> in the preview box. The system''s default is currently <b>{1}</b> points. It is recommended to adjust the font''s <b>extra glyph scale</b> and <b>extra line gap</b> using the default point size. Look at other text in the system to assess whether this font would integrate nicely.<br><br>Make empty to reset to default value.' translated asTextFromHtml
+ format: {TextStyle defaultFont pointSize}!
- ^ ('<b>Point size</b> in the preview box. The system''s default is currently <b>{1}</b> points. It is recommended to adjust the font''s <b>extra glyph scale</b> and <b>extra line gap</b> using the default point size. Look at other text in the system to assess whether this font would integrate nicely.<br><br>Make empty to reset to default value.' translated
- format: {TextStyle defaultFont pointSize}) asTextFromHtml!
Item was changed:
----- Method: FontImporterTool>>ttExtraGapInputHelp (in category 'edit mode - ui') -----
ttExtraGapInputHelp
| tt |
tt := self selectedFont ifNotNil: [:f | f isTTCFont ifTrue: [ f ttcDescription ] ].
+ ^ '<b>Extra line gap</b> in font measures. This font''s own value is <b>{1}</b> with units-per-em (UPM) being <b>{2}</b>. Adjust to change the font''s line grid (or "height") to compensate for <b>extra glyph scale</b>. The value may be negative.<br><br>Note that there is also <b>line spacing</b>, which is not per font but per <b>text style</b> and thus application-specific.<br><br>Make empty to reset to default value.' translated asTextFromHtml
- ^ ('<b>Extra line gap</b> in font measures. This font''s own value is <b>{1}</b> with units-per-em (UPM) being <b>{2}</b>. Adjust to change the font''s line grid (or "height") to compensate for <b>extra glyph scale</b>. The value may be negative.<br><br>Note that there is also <b>line spacing</b>, which is not per font but per <b>text style</b> and thus application-specific.<br><br>Make empty to reset to default value.' translated
format: {
tt ifNil: ['?'] ifNotNil: [tt typographicLineGap].
tt ifNil: ['?'] ifNotNil: [tt unitsPerEm].
+ }!
- }) asTextFromHtml!
Item was changed:
----- Method: FontImporterTool>>ttExtraScaleInputHelp (in category 'edit mode - ui') -----
ttExtraScaleInputHelp
(self selectedFont isNil or: [self selectedFont isTTCFont not])
ifTrue: [ ^ ''].
+ ^ '<b>Extra glyph scale</b> to accommodate varying heights when using different fonts side-by-side. This font has a relative x-height of <b>{1}</b> while the system''s reference is <b>{2}</b>. You can only use values greater than 0.0.<br><br>Note that this does not change the font''s "pixel height" and is thus unrelated to the system''s overall <b>UI scale factor</b>. You may want to adjust <b>extra line gap</b> as well to retain the font''s aesthetics.<br><br>Make empty to reset to default value.' translated asTextFromHtml
- ^ ('<b>Extra glyph scale</b> to accommodate varying heights when using different fonts side-by-side. This font has a relative x-height of <b>{1}</b> while the system''s reference is <b>{2}</b>. You can only use values greater than 0.0.<br><br>Note that this does not change the font''s "pixel height" and is thus unrelated to the system''s overall <b>UI scale factor</b>. You may want to adjust <b>extra line gap</b> as well to retain the font''s aesthetics.<br><br>Make empty to reset to default value.' translated
format: {
self selectedFont xHeightFraction printShowingDecimalPlaces: 3.
+ TextStyle defaultTTFont xHeightFraction printShowingDecimalPlaces: 3 }!
- TextStyle defaultTTFont xHeightFraction printShowingDecimalPlaces: 3 }) asTextFromHtml!
Item was changed:
----- Method: SmalltalkEditor>>tallySelection (in category 'do-its') -----
tallySelection
"Treat the current selection as an expression; evaluate it and return the time took for this evaluation"
| code result rcvr ctxt v |
self lineSelectAndEmptyCheck: [^ self].
(model respondsTo: #doItReceiver)
ifTrue: [ rcvr := model doItReceiver.
ctxt := model doItContext]
ifFalse: [rcvr := ctxt := nil].
result := [ | cm |
code := self selectionAsStream.
cm := rcvr class evaluatorClass new
compiledMethodFor: code
in: ctxt
to: rcvr
notifying: self
ifFail: [morph flash. ^ self].
Time millisecondsToRun:
[v := cm valueWithReceiver: rcvr arguments: (ctxt ifNil: [#()] ifNotNil: [{ctxt}]) ].
]
on: OutOfScopeNotification
do: [ :ex | ex resume: true].
+ Project uiManager
+ inform: ('<b>Expression</b>{1}<br>{2}<br><br><b>Time</b> (compile and execute)<br>{3} ms<br><br><b>Result</b><br>{4}' translated asTextFromHtml format: {
- UIManager default
- inform: ('<b>Expression</b>{1}<br>{2}<br><br><b>Time</b> (compile and execute)<br>{3} ms<br><br><b>Result</b><br>{4}' translated format: {
rcvr ifNil: [''] ifNotNil: [' (', (rcvr printString truncateWithElipsisTo: 20), ')'].
(code contents truncateWithElipsisTo: 200) copyReplaceAll: String cr with: '<br>'.
result printString.
+ v printString truncateWithElipsisTo: 100}).!
- v printString truncateWithElipsisTo: 100}) asTextFromHtml.!
Item was changed:
----- Method: TheWorldMainDockingBar>>sendFeedback (in category 'menu actions') -----
sendFeedback
| url os vm hash image |
url := 'https://bugs.squeak.org/'.
([Smalltalk vm platformSourceVersion] on: Warning do: ["Ignore"])
ifNotNil: [:info | | tokens |
tokens := info findTokens.
vm := tokens at: 2.
hash := tokens atLast: 4].
os := Smalltalk platformName, ' ', Smalltalk osVersion, ' ', Smalltalk platformSubtype.
image := SystemVersion current version, ' #', SystemVersion current highestUpdate.
+ self inform: ('Please visit the following website to report on bugs, requests, and other issues:<br><br> <a href="{1}">{1}</a><br><br>Make sure that you always include information about your current environment such as:<br><br> OS: {2}<br> VM: {3} ({4})<br> SQ: {5} ({6} bit)<br><br>You can find more in the <a href="code://SystemReporter open">System Reporter</a>.' translated format: {url. os escapeEntities. vm escapeEntities. hash escapeEntities. image escapeEntities. Smalltalk image wordSize * 8}) asTextFromHtml.!
- self inform: ('Please visit the following website to report on bugs, requests, and other issues:<br><br> <a href="{1}">{1}</a><br><br>Make sure that you always include information about your current environment such as:<br><br> OS: {2}<br> VM: {3} ({4})<br> SQ: {5} ({6} bit)<br><br>You can find more in the <a href="code://SystemReporter open">System Reporter</a>.' translated format: {url. os. vm. hash. image. Smalltalk image wordSize * 8}) asTextFromHtml!
Christoph Thiede uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ct.804.mcz
==================== Summary ====================
Name: Monticello-ct.804
Author: ct
Time: 13 November 2023, 6:36:27.485722 pm
UUID: 8f7b9ab3-636d-884e-9607-aa9362b721fb
Ancestors: Monticello-eem.803
Fixes missing escaping in common senders of #asTextFromHtml and #format:. Note that also Texts respond to #format: since Squeak 5.3.
=============== Diff against Monticello-eem.803 ===============
Item was changed:
----- Method: MCWorkingCopyBrowser>>copyImageVersionsSafely (in category 'actions') -----
copyImageVersionsSafely
+ (Project uiManager confirm: ('Do you really want to copy the loaded version of each of <b>{1} packages</b> to <b>{2}</b>?' translated asTextFromHtml format: {MCWorkingCopy allManagers size. self repository description}) title: 'Copy Image Versions' translated) ifFalse: [^ self].
- (Project current uiManager confirm: ('Do you really want to copy the loaded version of each of <b>{1} packages</b> to <b>{2}</b>?' translated format: {MCWorkingCopy allManagers size. self repository description}) asTextFromHtml title: 'Copy Image Versions' translated) ifFalse: [^ self].
self copyImageVersions.!
Christoph Thiede uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-ct.547.mcz
==================== Summary ====================
Name: Graphics-ct.547
Author: ct
Time: 13 November 2023, 6:36:05.858722 pm
UUID: 2d4cc28d-cd67-2544-8c4e-687845589a7d
Ancestors: Graphics-dtl.546
Fixes missing escaping in common senders of #asTextFromHtml and #format:. Note that also Texts respond to #format: since Squeak 5.3.
=============== Diff against Graphics-dtl.546 ===============
Item was changed:
----- Method: DisplayScreen>>uiScaleFactor: (in category 'scale factor') -----
uiScaleFactor: aFloat
"Sets the effective scale factor for the user interface, i.e., all widgets, tools, and windows. Note that the user can override the #platformScaleFactor, which is just a hint recommended by the platform."
| oldPixelFactor newPixelFactor newScaleFactor |
newScaleFactor := aFloat max: 0.75.
(UserInterfaceTheme current canFakeScaleFactor: newScaleFactor) ifTrue: [
self flag: #isTTCBased.
^ UserInterfaceTheme current applyScaled: newScaleFactor].
newScaleFactor = 0.75 ifTrue: [(Project uiManager
+ confirm: ('You are currently using <b>TrueType fonts</b>. Your requested scale factor of <b>{1}%</b> looks better using pre-rendered <b>pixel fonts</b>.<br><br>Do you want to switch to pixel fonts now?' translated asTextFromHtml format: {(newScaleFactor * 100) rounded})
- confirm: ('You are currently using <b>TrueType fonts</b>. Your requested scale factor of <b>{1}%</b> looks better using pre-rendered <b>pixel fonts</b>.<br><br>Do you want to switch to pixel fonts now?' translated format: {(newScaleFactor * 100) rounded}) asTextFromHtml
title: 'Blurry Fonts Detected' translated) == true
ifTrue: [UserInterfaceTheme cleanUpAndReset. ^ self uiScaleFactor: newScaleFactor]].
"Do nothing if the factor is unchanged. For comparison, use actual pixel-based scale factor to account for rounding errors, instead of #uiScaleFactor."
oldPixelFactor := RealEstateAgent scaleFactor.
newScaleFactor = oldPixelFactor ifTrue: [^ self].
"Update system's PPI to then compute the new pixel-based scale factor."
TextStyle pixelsPerInch: 96.0 * newScaleFactor.
newPixelFactor := RealEstateAgent resetScaleFactor; scaleFactor.
"Let the current project (kind) decide how to update the system."
Project current ifNotNil: [:p | p displayScaleChangedFrom: oldPixelFactor to: newPixelFactor].!