Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1329.mcz
==================== Summary ====================
Name: System-mt.1329
Author: mt
Time: 22 March 2022, 10:34:29.373003 am
UUID: df77d90e-a2a4-4afb-b1d9-c6c06322ff56
Ancestors: System-mt.1328
Fixes init bug when appending sth. to commmon-request strings that have not yet been initialized.
Also drop manual line breaks in set-author-initials dialog. Use default font size to make text composition look okay.
=============== Diff against System-mt.1328 ===============
Item was changed:
----- Method: Utilities class>>appendToCommonRequests: (in category 'common requests') -----
appendToCommonRequests: aString
+ self commonRequestStrings: (self commonRequestStrings contents, String cr, aString)
- self commonRequestStrings: (CommonRequestStrings contents, String cr, aString)
"Utilities appendToCommonRequests: 'self beep'"
!
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: {
- (self confirm: ('Hello, <b>{1}</b>!! :-)<br><br><font face="{4}" size="{5}">Our <a href="code://{3}">list of known contributors</{6}> associates the initials you<br>have entered with this name. If this is not you, please<br>consider alternative initials, preferably more than just <br>a few characters, to avoid collisions.<br></font><br>Do you want to use these author initials?<br><br> <b>{2}</b>' translated format: {
newName ifNil: [newInitials].
newInitials.
'SystemReporter open model categoryAt: 1 put: true'.
- Preferences standardButtonFont familyName.
- Preferences standardButtonFont pointSize.
"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].!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1144.mcz
==================== Summary ====================
Name: Tools-mt.1144
Author: mt
Time: 22 March 2022, 9:28:07.107628 am
UUID: e85d080a-8f62-4339-bfec-7cd741f0a623
Ancestors: Tools-mt.1143
Remove manual line breaks in dialog texts. Keep double-breaks (i.e., '\\' or '<br><br>') as visual gap.
=============== Diff against Tools-mt.1143 ===============
Item was changed:
----- Method: Workspace>>acceptContents: (in category 'accessing') -----
acceptContents: aString
(self class fileOutOnAccept and: [acceptAction isNil]) ifTrue: [
(Project uiManager
confirm: ('Do you want to append the contents to\\ {1}\\on accept so that you can safely close this window?\\{2}' translated withCRs asText format: {
+ self suggestedFileNameForSave asText allBold.
- (self suggestedFileNameForSave withNoLineLongerThan: 40) asText allBold.
'(You will not be asked again for this window. Use the window menu to revise your decision later. Disable this prompt via the system-wide #fileOutOnAccept preference.)' translated withCRs asText
addAttribute: (TextFontReference toFont: Preferences standardButtonFont)})
title: 'Accept Changes')
ifTrue: [self appendContentsToFileOnAccept]
ifFalse: [acceptAction := [:edits | true ]]].
^ (acceptAction ifNotNil: [acceptAction value: aString]) ~~ false
and: [super acceptContents: aString]!
Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-mt.138.mcz
==================== Summary ====================
Name: PreferenceBrowser-mt.138
Author: mt
Time: 22 March 2022, 9:21:37.875661 am
UUID: 9b7294f1-999a-2649-ba2f-40dc2c64bd39
Ancestors: PreferenceBrowser-mt.137
Minor layout tweaks in preference wizard.
=============== Diff against PreferenceBrowser-mt.137 ===============
Item was added:
+ ----- Method: PreferenceWizardMorph>>defaultTextStyle (in category 'initialization') -----
+ defaultTextStyle
+
+ ^ self defaultFont textStyle!
Item was changed:
----- Method: PreferenceWizardMorph>>initializePage99ExtraPackages (in category 'initialization - pages') -----
initializePage99ExtraPackages
"Let the user install extra packages."
| currentPage packagesList installButton |
currentPage := self createPage.
currentPage
cellPositioning: #topCenter;
addMorphBack: self createHorizontalSpacer;
+ addMorphBack: ((self createLabel: 'Do you want to install extra packages?' translated color: Color white)
- addMorphBack: ((self createLabel: 'Do you want to install extra packages?' color: Color white)
hResizing: #shrinkWrap;
+ numCharactersPerLine: 65;
yourself);
+ addMorphBack: ((self createLabel: 'Note that the installation process requires a network connection with Internet access and might take several minutes.' translated color: (Color gray: 0.9))
+ hResizing: #shrinkWrap;
+ numCharactersPerLine: 65;
- addMorphBack: ((self createLabel: 'Note that the installation process requires a network connection with Internet access and might take several minutes.' color: (Color gray: 0.9))
- hResizing: #rigid;
- vResizing: #shrinkWrap;
- width: (self defaultFont widthOf: $x) * 55;
yourself).
currentPage submorphs last text addAttribute: TextAlignment centered.
currentPage submorphs last layoutChanged.
currentPage addMorphBack: (self createVerticalSpace height: self layoutInset).
packagesList := self createScrollPane.
packagesList
+ width: (self defaultTextStyle compositionWidthFor: 65);
- width: (self defaultFont widthOf: $x) * 40;
hResizing: #rigid;
vResizing: #spaceFill.
packagesList scroller firstSubmorph addAllMorphsBack: {
self createCheckbox: 'Latest system updates' translated for: #InstallLatestUpdates help: 'Install the latest patches for ' translated, SystemVersion current version.
self createCheckbox: 'Refactoring support in code browsers' translated for: #InstallRefactoringTools help: 'Refactoring is a process of re-writing or re-organizing text or code. The purpose of a refactor is to make the code or text more understandable and readable while exactly preserving its meaning and behavior' translated.
self createCheckbox: 'Autocomplete in code editors' translated for: #InstallAutoComplete help: 'Package that provides interactive, context-sensitive auto-completion for Squeak' translated.
self createCheckbox: 'Git support and browser' translated for: #InstallGitInfrastructure help: 'From the Git Browser, you can create new commits, synchronize with remote repositories (fetch, pull, push), manage and merge branches, switch between them, and compare different versions' translated.
self createCheckbox: 'Foreign function interface (FFI)' translated for: #InstallFFI help: 'FFI, the Squeak Foreign Function Interface, is used to call functions located in shared libraries that are not part of the Squeak VM nor its plugins' translated.
self createCheckbox: 'Access OS functions' translated for: #InstallOSProcess help: 'OSProcess provides access to operating system functions, including pipes and child process creation' translated.
self createCheckbox: 'Integrate Squeak''s mailing lists' translated for: #InstallSqueakInboxTalk help: 'Through Squeak Inbox Talk, you can engage with our community from within Squeak using tools that integrate our mailing lists such as squeak-dev and vm-dev' translated.
}.
currentPage addMorphBack: packagesList.
currentPage addMorphBack: ((self createLabel: 'Find more on www.squeak.org/projects' color: (Color gray: 0.9))
hResizing: #shrinkWrap; yourself).
installButton := self createButton
action: #installExtraPackagesVia:;
label: 'Yes, install selected packages.' translated;
yourself.
installButton
setProperty: #label toValue: installButton label;
arguments: {installButton}.
currentPage addMorphBack: installButton.
currentPage addMorphBack: (self createButton action: #showSqueak; label: 'No, maybe later.' translated).
^ currentPage!
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.504.mcz
==================== Summary ====================
Name: Graphics-mt.504
Author: mt
Time: 21 March 2022, 2:04:26.215989 pm
UUID: aba8ae05-f74d-4a90-b05f-b6473921af1f
Ancestors: Graphics-mt.503
Fixes issue around fallback fonts where no fallback was configured. See setDefaultFallback:. In that case, good old FixedFaceFont will be used.
=============== Diff against Graphics-mt.503 ===============
Item was changed:
----- Method: TextStyle class>>defaultFallback (in category 'constants') -----
defaultFallback
+ ^ (TextConstants at: #DefaultFallbackTextStyle ifAbsent: [])
+ ifNil: [self default]!
- ^ TextConstants at: #DefaultFallbackTextStyle ifAbsent: [self default]!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1328.mcz
==================== Summary ====================
Name: System-mt.1328
Author: mt
Time: 21 March 2022, 1:45:27.211756 pm
UUID: d30bb7f3-ed41-0849-ac73-0f3abd2f38cb
Ancestors: System-mt.1327
Haha. Tweak the prior commit. We can of course use integer scale factors for 100%, 200%, 300%, etc.
=============== Diff against System-mt.1327 ===============
Item was changed:
----- Method: RealEstateAgent class>>scaleFactor (in category 'display scale') -----
scaleFactor
"Use the default font height to calculate some factor. Note that, in a distant future, we will be able to use a method that is not based on pixels once we only use TrueType fonts all over the image and have a rendering system other than BitBlt. Then, TextStyle class >> #pixelsPerInch will suffice, considering that 96 PPI represents a scale factor of 1.0. Until then, rendering is based on pixel geometry."
^ ScaleFactor ifNil: [
ScaleFactor := (TextStyle referenceHeight / StrikeFont referenceHeight) asFloat.
+ ScaleFactor = ScaleFactor truncated
+ ifTrue: [ScaleFactor := ScaleFactor truncated].
- ScaleFactor = 1.0 ifTrue: [ScaleFactor := 1].
ScaleFactor]!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1327.mcz
==================== Summary ====================
Name: System-mt.1327
Author: mt
Time: 21 March 2022, 1:39:51.888314 pm
UUID: d5878d63-3c5a-485d-aceb-904aebf1a0ee
Ancestors: System-mt.1326
When calculating the pixel-scale factor (which is used in all pixel-based measures such as window extent or border width), avoid fractions and normalize 1.0 to 1. Makes arithmetics with "RealEstateAgent scaleFactor" faster.
=============== Diff against System-mt.1326 ===============
Item was changed:
----- Method: RealEstateAgent class>>scaleFactor (in category 'display scale') -----
scaleFactor
"Use the default font height to calculate some factor. Note that, in a distant future, we will be able to use a method that is not based on pixels once we only use TrueType fonts all over the image and have a rendering system other than BitBlt. Then, TextStyle class >> #pixelsPerInch will suffice, considering that 96 PPI represents a scale factor of 1.0. Until then, rendering is based on pixel geometry."
+ ^ ScaleFactor ifNil: [
+ ScaleFactor := (TextStyle referenceHeight / StrikeFont referenceHeight) asFloat.
+ ScaleFactor = 1.0 ifTrue: [ScaleFactor := 1].
+ ScaleFactor]!
- ^ ScaleFactor ifNil: [ScaleFactor := (TextStyle referenceHeight / StrikeFont referenceHeight)]!
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.503.mcz
==================== Summary ====================
Name: Graphics-mt.503
Author: mt
Time: 21 March 2022, 1:36:28.202756 pm
UUID: cd3b5099-b03c-da45-8c5f-6490b7a36e39
Ancestors: Graphics-mt.502
Do not shrink mouse cursor below 100%
=============== Diff against Graphics-mt.502 ===============
Item was changed:
----- Method: Cursor class>>currentCursor: (in category 'current cursor') -----
currentCursor: aCursor
"Make the instance of cursor, aCursor, be the current cursor. Display it.
Create an error if the argument is not a Cursor."
(aCursor isKindOf: self)
ifTrue: [ | platformCursor |
CurrentCursor := aCursor. "unscaled"
+ platformCursor := aCursor enlargedBy: (RealEstateAgent scaleFactor max: 1).
- platformCursor := aCursor enlargedBy: RealEstateAgent scaleFactor.
self useBiggerCursors
ifTrue: [platformCursor := platformCursor enlargedBy: 2].
platformCursor beCursor]
ifFalse: [self error: 'The new cursor must be an instance of class Cursor']!
Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-mt.137.mcz
==================== Summary ====================
Name: PreferenceBrowser-mt.137
Author: mt
Time: 21 March 2022, 12:43:50.34283 pm
UUID: 68ab245a-8abb-2743-ada2-8cf5018e43eb
Ancestors: PreferenceBrowser-mt.136
In the preference wizard, avoid polling internet availability right away but wait for the user to explicitely show interest in installing any extra packages. So, any platform firewall tools will only complain *after* the user clicked on the "Yes, install" button.
=============== Diff against PreferenceBrowser-mt.136 ===============
Item was changed:
----- Method: PreferenceWizardMorph>>checkInternetOn: (in category 'updating') -----
checkInternetOn: button
self isInWorld ifFalse: [^ self].
(self hasProperty: #checkInternet) ifFalse: [^ self].
self hasInternetConnection
ifFalse: [button enabled: false; label: 'Please check your internet connection...' translated]
ifTrue: [^ self hasSecureInternetConnection
ifFalse: [button enabled: false; label: 'Secure https not available, possible virtual machine issue' translated]
+ ifTrue: [button enabled: true; label: (button valueOfProperty: #label)]].
- ifTrue: [button enabled: true; label: 'Yes, install selected packages.' translated]].
(self future: 1000) checkInternetOn: button.!
Item was changed:
----- Method: PreferenceWizardMorph>>initializePage99ExtraPackages (in category 'initialization - pages') -----
initializePage99ExtraPackages
"Let the user install extra packages."
| currentPage packagesList installButton |
currentPage := self createPage.
currentPage
cellPositioning: #topCenter;
addMorphBack: self createHorizontalSpacer;
addMorphBack: ((self createLabel: 'Do you want to install extra packages?' color: Color white)
hResizing: #shrinkWrap;
yourself);
addMorphBack: ((self createLabel: 'Note that the installation process requires a network connection with Internet access and might take several minutes.' color: (Color gray: 0.9))
hResizing: #rigid;
vResizing: #shrinkWrap;
width: (self defaultFont widthOf: $x) * 55;
yourself).
currentPage submorphs last text addAttribute: TextAlignment centered.
currentPage submorphs last layoutChanged.
currentPage addMorphBack: (self createVerticalSpace height: self layoutInset).
packagesList := self createScrollPane.
packagesList
width: (self defaultFont widthOf: $x) * 40;
hResizing: #rigid;
vResizing: #spaceFill.
packagesList scroller firstSubmorph addAllMorphsBack: {
self createCheckbox: 'Latest system updates' translated for: #InstallLatestUpdates help: 'Install the latest patches for ' translated, SystemVersion current version.
self createCheckbox: 'Refactoring support in code browsers' translated for: #InstallRefactoringTools help: 'Refactoring is a process of re-writing or re-organizing text or code. The purpose of a refactor is to make the code or text more understandable and readable while exactly preserving its meaning and behavior' translated.
self createCheckbox: 'Autocomplete in code editors' translated for: #InstallAutoComplete help: 'Package that provides interactive, context-sensitive auto-completion for Squeak' translated.
self createCheckbox: 'Git support and browser' translated for: #InstallGitInfrastructure help: 'From the Git Browser, you can create new commits, synchronize with remote repositories (fetch, pull, push), manage and merge branches, switch between them, and compare different versions' translated.
self createCheckbox: 'Foreign function interface (FFI)' translated for: #InstallFFI help: 'FFI, the Squeak Foreign Function Interface, is used to call functions located in shared libraries that are not part of the Squeak VM nor its plugins' translated.
self createCheckbox: 'Access OS functions' translated for: #InstallOSProcess help: 'OSProcess provides access to operating system functions, including pipes and child process creation' translated.
self createCheckbox: 'Integrate Squeak''s mailing lists' translated for: #InstallSqueakInboxTalk help: 'Through Squeak Inbox Talk, you can engage with our community from within Squeak using tools that integrate our mailing lists such as squeak-dev and vm-dev' translated.
}.
currentPage addMorphBack: packagesList.
currentPage addMorphBack: ((self createLabel: 'Find more on www.squeak.org/projects' color: (Color gray: 0.9))
hResizing: #shrinkWrap; yourself).
+ installButton := self createButton
+ action: #installExtraPackagesVia:;
+ label: 'Yes, install selected packages.' translated;
+ yourself.
+ installButton
+ setProperty: #label toValue: installButton label;
+ arguments: {installButton}.
+
- installButton := (self createButton action: #installExtraPackages).
currentPage addMorphBack: installButton.
currentPage addMorphBack: (self createButton action: #showSqueak; label: 'No, maybe later.' translated).
- self setProperty: #checkInternet toValue: true.
- self checkInternetOn: installButton.
-
^ currentPage!
Item was added:
+ ----- Method: PreferenceWizardMorph>>installExtraPackagesVia: (in category 'actions') -----
+ installExtraPackagesVia: installButton
+ "The user requested to install extra packages. Now we can check whether we have access to the internet. If so, install right away. If not, we start polling until it becomes available. Then the user can click again on that button. NOTE THAT we do this extra step so that users do not get annoyed by any platform's firewall tools complaining -- even if users do not want to install extra packages in the first place."
+
+ installButton
+ action: #installExtraPackages;
+ arguments: #().
+
+ self setProperty: #checkInternet toValue: true.
+ self checkInternetOn: installButton.
+
+ installButton enabled ifTrue: [installButton performAction].!
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.502.mcz
==================== Summary ====================
Name: Graphics-mt.502
Author: mt
Time: 16 March 2022, 3:13:16.655608 pm
UUID: d0d282d6-7707-5c46-9dcc-546f1b43f6c3
Ancestors: Graphics-mt.501
Activate the speed-up as promised via TrueType-mt.90.
=============== Diff against Graphics-mt.501 ===============
Item was changed:
----- Method: CharacterScanner>>basicScanByteCharactersFrom:to:in:rightX: (in category 'scanning') -----
basicScanByteCharactersFrom: startIndex to: stopIndex in: sourceString rightX: rightX
+ "This is a scanning method for single-byte characters in a ByteString
+ a font that does not do character-pair kerning."
+
+ | codePointPlusOne nextDestX char |
- "this is a scanning method for
- single byte characters in a ByteString
- a font that does not do character-pair kerning"
- | ascii nextDestX char |
lastIndex := startIndex.
[lastIndex <= stopIndex]
whileTrue: [
"get the character value"
char := sourceString at: lastIndex.
+ codePointPlusOne := char asInteger + 1.
- ascii := char asciiValue + 1.
"if there is an entry in 'stops' for this value, return it"
+ (stopConditions at: codePointPlusOne)
+ ifNotNil: [^ stopConditions at: codePointPlusOne].
- (stopConditions at: ascii)
- ifNotNil: [^ stopConditions at: ascii].
"bump nextDestX by the width of the current character"
+ nextDestX := destX + (font widthOfByteCharacter: char).
- nextDestX := destX + (font widthOf: char).
"if the next x is past the right edge, return crossedX"
nextDestX > rightX
ifTrue: [^#crossedX].
"update destX and incorporate thr kernDelta"
destX := nextDestX + kern.
lastIndex := lastIndex + 1].
^self handleEndOfRunAt: stopIndex
!