David T. Lewis uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-dtl.811.mcz
==================== Summary ====================
Name: Tools-dtl.811
Author: dtl
Time: 5 May 2018, 10:41:00.811008 am
UUID: e5d09833-9847-4845-bd49-b0a7eef2cb81
Ancestors: Tools-dtl.810
Remove SequencableCollection>>canonicalArgumentName (introduced
in Tools-eem.788) because it produces unexpected results in DebuggerExtensionsTest>>testCollectionsGeneralise.
See discussion in [squeak-dev] Two tests failing in trunk but not 5.1
=============== Diff against Tools-dtl.810 ===============
Item was removed:
- ----- Method: SequenceableCollection>>canonicalArgumentName (in category '*Tools-Debugger') -----
- canonicalArgumentName
- ^ 'Sequence'!
David T. Lewis uploaded a new version of ToolsTests to project The Trunk:
http://source.squeak.org/trunk/ToolsTests-dtl.82.mcz
==================== Summary ====================
Name: ToolsTests-dtl.82
Author: dtl
Time: 5 May 2018, 10:39:38.472254 am
UUID: ec63abd1-1478-4ed0-b739-2f5119311e0d
Ancestors: ToolsTests-mt.81
Update DebuggerExtensionsTest>>testCollectionsGeneralise per Tools-eem.788
to expect 'Array' rather than 'Collection' for Array and its subclasses.
OrderedCollection and LinkedList should continue to answer 'Collection'.
=============== Diff against ToolsTests-mt.81 ===============
Item was changed:
----- Method: DebuggerExtensionsTest>>testCollectionsGeneralise (in category 'testing - canonical argument names') -----
testCollectionsGeneralise
+ "ArrayedCollection and subclasses answer 'Array' "
+ self assert: Array name equals: Array new canonicalArgumentName.
+ "Otherwise answer the more general 'Collection' "
- self assert: Collection name equals: Array new canonicalArgumentName.
self assert: Collection name equals: OrderedCollection new canonicalArgumentName.
self assert: Collection name equals: LinkedList new canonicalArgumentName!
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.397.mcz
==================== Summary ====================
Name: Graphics-mt.397
Author: mt
Time: 4 May 2018, 3:57:07.881404 pm
UUID: 3dce1413-6ad1-a249-8115-0bbb3bd2a241
Ancestors: Graphics-nice.396
Avoid the creation of strange-looking fonts. If that font already exhibits the requested emphasis, do not try to do further magic.
=============== Diff against Graphics-nice.396 ===============
Item was changed:
----- Method: StrikeFont>>emphasized: (in category 'emphasis') -----
emphasized: code
"Answer a copy of the receiver with emphasis set to include code."
| derivative addedEmphasis base safeCode |
code = 0 ifTrue: [^ self].
+ code = self emphasis ifTrue: [^ self].
(derivativeFonts == nil or: [derivativeFonts size = 0]) ifTrue: [^ self].
derivative := derivativeFonts at: (safeCode := code min: derivativeFonts size).
derivative == nil ifFalse: [^ derivative]. "Already have this style"
"Dont have it -- derive from another with one with less emphasis"
addedEmphasis := 1 bitShift: safeCode highBit - 1.
base := self emphasized: safeCode - addedEmphasis. "Order is Bold, Ital, Under, Narrow"
addedEmphasis = 1 ifTrue: "Compute synthetic bold version of the font"
[derivative := (base copy ensureCleanBold name: base name , 'B') makeBoldGlyphs].
addedEmphasis = 2 ifTrue: "Compute synthetic italic version of the font"
[ derivative := (base copy name: base name , 'I') makeItalicGlyphs].
addedEmphasis = 4 ifTrue: "Compute underlined version of the font"
[derivative := (base copy name: base name , 'U') makeUnderlinedGlyphs].
addedEmphasis = 8 ifTrue: "Compute narrow version of the font"
[derivative := (base copy name: base name , 'N') makeCondensedGlyphs].
addedEmphasis = 16 ifTrue: "Compute struck-out version of the font"
[derivative := (base copy name: base name , 'X') makeStruckOutGlyphs].
derivative emphasis: safeCode.
derivativeFonts at: safeCode put: derivative.
^ derivative!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1426.mcz
==================== Summary ====================
Name: Morphic-mt.1426
Author: mt
Time: 4 May 2018, 8:49:10.20407 am
UUID: 1f2d43f7-f891-4a45-a18c-306ae6fa4094
Ancestors: Morphic-mt.1425
Minor fix to reset mouse cursor for drag-drop operations. Got annoying because of the text cursor in workspaces. Try: "Morph new openInHand".
Needs further clean-up because #attachMorph:, #grabMorph:, and #grabMorph:from: exhibit much code duplication.
=============== Diff against Morphic-mt.1425 ===============
Item was changed:
----- Method: HandMorph>>attachMorph: (in category 'grabbing/dropping') -----
attachMorph: m
"Position the center of the given morph under this hand, then grab it.
This method is used to grab far away or newly created morphs."
| delta |
self releaseMouseFocus. "Break focus"
+ self showTemporaryCursor: nil.
delta := m bounds extent // 2.
m position: (self position - delta).
m formerPosition: m position.
targetOffset := m position - self position.
self addMorphBack: m.!
Item was changed:
----- Method: HandMorph>>grabMorph: (in category 'meta-actions') -----
grabMorph: aMorph
"Grab the given morph (i.e., add it to this hand and remove it from its current owner) without changing its position. This is used to pick up a morph under the hand's current position, versus attachMorph: which is used to pick up a morph that may not be near this hand."
| grabbed |
self releaseMouseFocus. "Break focus"
+ self showTemporaryCursor: nil.
grabbed := aMorph aboutToBeGrabbedBy: self.
grabbed ifNil:[^self].
grabbed := grabbed topRendererOrSelf.
^self grabMorph: grabbed from: grabbed owner!
Item was changed:
----- Method: HandMorph>>grabMorph:from: (in category 'grabbing/dropping') -----
grabMorph: aMorph from: formerOwner
"Grab the given morph (i.e., add it to this hand and remove it from its current owner) without changing its position. This is used to pick up a morph under the hand's current position, versus attachMorph: which is used to pick up a morph that may not be near this hand."
| grabbed offset targetPoint grabTransform fullTransform |
self releaseMouseFocus. "Break focus"
+ self showTemporaryCursor: nil.
grabbed := aMorph.
aMorph keepsTransform ifTrue:[
grabTransform := fullTransform := IdentityTransform new.
] ifFalse:[
"Compute the transform to apply to the grabbed morph"
grabTransform := formerOwner
ifNil: [IdentityTransform new]
ifNotNil: [formerOwner grabTransform].
"Compute the full transform for the grabbed morph"
fullTransform := formerOwner
ifNil: [IdentityTransform new]
ifNotNil: [formerOwner transformFrom: owner].
].
"targetPoint is point in aMorphs reference frame"
targetPoint := fullTransform globalPointToLocal: self position.
"but current position will be determined by grabTransform, so compute offset"
offset := targetPoint - (grabTransform globalPointToLocal: self position).
"apply the transform that should be used after grabbing"
grabbed := grabbed transformedBy: grabTransform.
grabbed == aMorph
ifFalse: [grabbed setProperty: #addedFlexAtGrab toValue: true].
"offset target to compensate for differences in transforms"
grabbed position: grabbed position - offset asIntegerPoint.
"And compute distance from hand's position"
targetOffset := grabbed position - self position.
self addMorphBack: grabbed.
grabbed justGrabbedFrom: formerOwner.!
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.217.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.217
Author: mt
Time: 4 May 2018, 8:00:07.49707 am
UUID: cd568389-663e-a647-9920-ff9ec82e9544
Ancestors: ToolBuilder-Morphic-pre.216
When adding a new item to the list via the ListChooser, allow for cancelling the (optional) confirmation step.
=============== Diff against ToolBuilder-Morphic-pre.216 ===============
Item was changed:
----- Method: ListChooser>>accept (in category 'actions') -----
accept
"if the user submits with no valid entry, make them start over"
| choice |
self canAccept ifFalse: [
self canAdd ifTrue: [^ self add].
^ self changed: #textSelection].
choice := self selectedItem.
self canAdd ifTrue: [
"Ask the user whether to add the new item or choose the list selection."
+ (UserDialogBoxMorph
+ confirm: 'You can either choose an existing item or add a new one.\What do you want?' translated withCRs
+ title: 'Choose or Add' translated
+ trueChoice: choice asString
+ falseChoice: self searchText asString at: ActiveHand position)
+ ifNil: ["Cancelled" self result: nil. ^ self]
+ ifNotNil: [:answer |
+ answer ifTrue: [self result: choice] ifFalse: [self result: self searchText asString]]
- (UserDialogBoxMorph confirm: 'You can either choose an existing item or add a new one.\What do you want?' translated withCRs title: 'Choose or Add' translated trueChoice: choice asString falseChoice: self searchText asString at: ActiveHand position)
- ifTrue: [self result: choice] ifFalse: [self result: self searchText asString]
] ifFalse: [self result: choice].
self changed: #close.!