Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1975.mcz
==================== Summary ====================
Name: Morphic-mt.1975
Author: mt
Time: 27 April 2022, 5:13:23.928228 pm
UUID: 0b03fc07-5c68-1f48-bbaf-c715871f608d
Ancestors: Morphic-mt.1974
Fixes font-change issue that occurred with FontChooserTools lasting longer than an instance of TextEditor.
Thanks to Nicolas (nice) for reporting this!
=============== Diff against Morphic-mt.1974 ===============
Item was changed:
----- Method: TextEditor>>changeTextFont (in category 'attributes') -----
changeTextFont
"Present a dialog which allows the user to select a font, and if one is chosen, apply it to the current selection. If there is no selection, or the selection is empty, apply it to the whole morph."
| curFont startIndex |
startIndex := self startIndex.
curFont := (paragraph text fontAt: startIndex withStyle: paragraph textStyle).
morph openModal: (
Cursor wait showWhile: [
(FontChooserTool default
withTitle: 'Change the selected text''s font to...' translated
+ for: [:newFont |
+ self flag: #fixme. "mt: This is a workaround because the lifetime/validity of the font-chooser window can be longer than the one of the receiver (i.e., the text editor)."
+ morph editor changeSelectionFontTo: newFont]
+ setSelector: #value:
- for: self
- setSelector: #changeSelectionFontTo:
getSelector: curFont)
"Do not allow changing the emphasis; we don't know how to deal with
a 'pre-emphasized' font here, so bail."
offerStyleList: false;
open])!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-lrnp.1972.mcz
==================== Summary ====================
Name: Morphic-lrnp.1972
Author: lrnp
Time: 25 April 2022, 2:12:21.194893 pm
UUID: f8603073-659d-41bd-bfc4-bd0062e8b45b
Ancestors: Morphic-mt.1971
fix size of text on high-dpi displays
Old code was requesting an unscaled 15 pixels tall font.
=============== Diff against Morphic-mt.1971 ===============
Item was changed:
----- Method: ProjectViewMorph>>fontForName (in category 'drawing') -----
fontForName
+ ^TextStyle defaultFont emphasized: 1
- ^(TextStyle default fontOfSize: 15) emphasized: 1
!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-lrnp.1346.mcz
==================== Summary ====================
Name: System-lrnp.1346
Author: lrnp
Time: 26 April 2022, 10:04:20.315377 pm
UUID: b1292e82-e7a2-4bd1-9b73-a3db6ccbbe42
Ancestors: System-mt.1345
fix order of operations error
Was passing boolean is64Bit to #* instead of result of branch.
Resolves an MNU on exporting a project.
=============== Diff against System-mt.1345 ===============
Item was changed:
----- Method: NativeImageSegment>>doSpaceAnalysis (in category 'statistics') -----
doSpaceAnalysis
"Capture statistics about the IS and print the number of instances per class and space usage"
| is64Bit index instCount instSpace |
state == #activeCopy ifFalse:[self errorWrongState].
instCount := Dictionary new.
instSpace := Dictionary new.
is64Bit := ((segment at: 1) bitAnd: 16rFFFFFF) >= 68000.
index := 3. "skip version word"
"The Spur image format (in little endian format) is (num bits:fieldName(s)))
msb: | 8: numSlots | (on a byte boundary)
| 2 bits | (msb,lsb = {isMarked,?})
| 22: identityHash | (on a word boundary)
| 3 bits | (msb <-> lsb = {isGrey,isPinned,isRemembered}
| 5: format | (on a byte boundary)
| 2 bits | (msb,lsb = {isImmutable,?})
| 22: classIndex | (on a word boundary) : LSB"
[index > segment size] whileFalse:
[| hiWord loWord numSlots bytes classIndex |
loWord := segment at: index.
hiWord := segment at: index + 1.
numSlots := hiWord bitShift: -24.
numSlots = 255
ifTrue: "word is an overflow header word. Slot count is in the least significant 56 bits."
[numSlots := hiWord = 0
ifTrue: [loWord]
ifFalse: [(hiWord bitShift: 32) + loWord bitAnd: 16rFFFFFFFFFFFFFF].
loWord := segment at: index + 2.
hiWord := segment at: index + 3.
bytes := 16] "two word header"
ifFalse:
[bytes := 8]. "one word header"
+ bytes := bytes + (8 * (is64Bit "objects are a multiple of 8 bytes in length, with at leats one slot"
- bytes := bytes + (8 * is64Bit "objects are a multiple of 8 bytes in length, with at leats one slot"
ifTrue: [numSlots max: 1]
+ ifFalse: [(numSlots max: 1) + 1 // 2])).
- ifFalse: [(numSlots max: 1) + 1 // 2]).
classIndex := loWord bitAnd: 16r3FFFFF.
(index > 3 or: [classIndex ~~ 33]) ifTrue: "Don't count the initial arrayOfRoots"
[instCount at: classIndex put: (instCount at: classIndex ifAbsent:[0]) + 1.
instSpace at: classIndex put: (instSpace at: classIndex ifAbsent:[0]) + bytes].
index := index + (bytes / 4)].
^{instCount. instSpace} collect: [:dict| self copyStatisticsDictionaryWithClassNames: dict]!
Marcel Taeumel uploaded a new version of Tools to project The Treated Inbox:
http://source.squeak.org/treated/Tools-lrnp.1144.mcz
==================== Summary ====================
Name: Tools-lrnp.1144
Author: lrnp
Time: 28 March 2022, 2:14:18.999919 pm
UUID: 93cebbab-cdc7-4e8d-97c7-f8e7a099c4da
Ancestors: Tools-mt.1143
remove unneeded method in PackagePaneBrowser
Browser>>selectedSystemCategory is defined to return nil when nothing is selected, so remove the test in PackagePaneBrowser's version. Removing the test lets us remove the other method entirely.
PackagePaneBrowser>>hasSystemCategorySelected was only needed to avoid infinite recursion.
=============== Diff against Tools-mt.1143 ===============
Item was removed:
- ----- Method: PackagePaneBrowser>>hasSystemCategorySelected (in category 'system category list') -----
- hasSystemCategorySelected
- ^ super selectedSystemCategory notNil.!
Item was changed:
----- Method: PackagePaneBrowser>>selectedSystemCategory (in category 'system category list') -----
selectedSystemCategory
"Answer the name of the selected system category or nil."
- self hasSystemCategorySelected
- ifFalse: [^nil].
packageListIndex = 0
ifTrue: [^ super selectedSystemCategory ].
^ self package , '-' , super selectedSystemCategory!