Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tpr.1057.mcz
==================== Summary ====================
Name: Morphic-tpr.1057
Author: tpr
Time: 7 December 2015, 8:24:53.359 pm
UUID: c685257b-5ee7-49b3-a6b7-5255f28cd47f
Ancestors: Morphic-dtl.1056
Add the STWCPW version of cursor gridding to HandMorph.
It may very well be better to add two instance variables rather than use a couple of properties to hold the state.
There may well be other methods needing changes.
To use:
start by sending gridTo: grid origin: origin to the hand
any subsequent temporaryCursor... will be forced to screeen co-ordinates that are on grid sized steps with an offset of the origin.
gridPointRaw provides the frid limited position of the current hand. Older events are *not* gridded - this is one of the places where there may be more to do.
=============== Diff against Morphic-dtl.1056 ===============
Item was added:
+ ----- Method: HandMorph>>gridPointRaw (in category 'gridded cursor') -----
+ gridPointRaw
+ "return my latest position gridded"
+ ^self griddedPoint: self currentEvent position!
Item was added:
+ ----- Method: HandMorph>>gridTo:origin: (in category 'gridded cursor') -----
+ gridTo: grid origin: offset
+ "set a couple of properties to specify gridding for the temporaryCursor; instvars would be nicer"
+ self setProperty: #gridStep toValue: grid;
+ setProperty: #gridOffset toValue: offset!
Item was added:
+ ----- Method: HandMorph>>griddedPoint: (in category 'gridded cursor') -----
+ griddedPoint: aPoint
+ "return the equivalent point snapped to the grid, if indeed any gridding is set"
+ self valueOfProperty: #gridStep ifPresentDo: [:grid| |offset|
+ offset := self valueOfProperty: #gridOffset ifAbsent: [0@0].
+ ^ offset + (aPoint + (grid //2) - offset truncateTo: grid)].
+ ^aPoint!
Item was changed:
----- Method: HandMorph>>position: (in category 'geometry') -----
position: aPoint
"Overridden to align submorph origins to the grid if gridding is on."
| adjustedPosition delta box |
adjustedPosition := aPoint.
+ temporaryCursor ifNotNil: [adjustedPosition := (self griddedPoint: adjustedPosition) + temporaryCursorOffset].
- temporaryCursor ifNotNil: [adjustedPosition := adjustedPosition + temporaryCursorOffset].
"Copied from Morph to avoid owner layoutChanged"
"Change the position of this morph and and all of its submorphs."
delta := adjustedPosition - bounds topLeft.
delta isZero ifTrue: [^ self]. "Null change"
box := self fullBounds.
(delta dotProduct: delta) > 100 ifTrue:[
"e.g., more than 10 pixels moved"
self invalidRect: box.
self invalidRect: (box translateBy: delta).
] ifFalse:[
self invalidRect: (box merge: (box translateBy: delta)).
].
self privateFullMoveBy: delta.
!
Item was added:
+ ----- Method: HandMorph>>turnOffGridding (in category 'gridded cursor') -----
+ turnOffGridding
+ "remove the gridding properties to stop gridding"
+ self removeProperty: #gridStep; removeProperty: #gridOffset!
Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-pre.341.mcz
==================== Summary ====================
Name: Tests-pre.341
Author: pre
Time: 19 May 2016, 5:34:18.672168 pm
UUID: 0209ce70-2b8b-4d53-b743-ed1024d367ea
Ancestors: Tests-eem.340
By moving the PBColorPreferenceView from the EToys package to the PreferenceBrowser package, the PB package now depends on etyos through the UpdatingRectangleMorph. If this is intentional we should make the following modification to the PackageDependencyTests.
=============== Diff against Tests-eem.340 ===============
Item was changed:
----- Method: PackageDependencyTest>>testPreferenceBrowser (in category 'tests') -----
testPreferenceBrowser
self testPackage: #PreferenceBrowser dependsExactlyOn: #(
#'Chronology-Core'
Collections
Graphics
Kernel
Morphic
MorphicExtras
System
Tools
+ #'ToolBuilder-Morphic'
+ EToys
+ Balloon
).!
Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-pre.347.mcz
==================== Summary ====================
Name: Tests-pre.347
Author: pre
Time: 23 July 2016, 2:20:08.768962 pm
UUID: 8272055d-5600-c34b-aac4-9c29a9fda5e5
Ancestors: Tests-pre.346
Adds a Compiler test to the list of expected failures as it can not currently work in an image only using the V3PlusClosures encoder. The test is expected to be executable in an image which uses the V3Encoder.
=============== Diff against Tests-pre.346 ===============
Item was changed:
----- Method: ClosureCompilerTest>>expectedFailures (in category 'failures') -----
expectedFailures
+
+ ^#(testDebuggerTempAccess testInjectIntoDecompilations testInjectIntoDecompiledDebugs) ,
+ (({CompiledMethod classPool at: #SecondaryBytecodeSetEncoderClass .
+ CompiledMethod classPool at: #PrimaryBytecodeSetEncoderClass}
+ includes: EncoderForV3)
+ ifFalse: [#(testSourceRangeAccessForBlueBookInjectInto)]
+ ifTrue: [#()])
+ !
- ^#(testDebuggerTempAccess testInjectIntoDecompilations testInjectIntoDecompiledDebugs)!
Item was changed:
----- Method: ClosureCompilerTest>>testSourceRangeAccessForBlueBookInjectInto (in category 'tests') -----
testSourceRangeAccessForBlueBookInjectInto
"Test debugger source range selection for inject:into: for a version compiled with closures"
"self new testSourceRangeAccessForBlueBookInjectInto"
| source method |
+ [source := (Collection sourceCodeAt: #inject:into:) asString.
- source := (Collection sourceCodeAt: #inject:into:) asString.
method := (Parser new
encoderClass: EncoderForV3;
parse: source
class: Collection)
generate: (Collection compiledMethodAt: #inject:into:) trailer.
+ self supportTestSourceRangeAccessForInjectInto: method source: source.]
+ on: Error
+ do: [:e | self fail: e.]!
- self supportTestSourceRangeAccessForInjectInto: method source: source!
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-DS.916.mcz
==================== Summary ====================
Name: Morphic-DS.916
Author: DS
Time: 22 April 2015, 11:33:53.08 am
UUID: e58e8bbb-7a37-954a-87a0-5e71904b55c2
Ancestors: Morphic-cmm.915
Add basic support for borderStyles with non-uniform widths.
=============== Diff against Morphic-cmm.915 ===============
Item was added:
+ ----- Method: BorderStyle>>inset (in category 'accessing') -----
+ inset
+ "Possible inset when honoring this border style. The default implementation uses #width to return a uniform inset."
+ ^ self width!
Item was changed:
----- Method: Canvas>>fillRectangle:fillStyle:borderStyle: (in category 'drawing-rectangles') -----
fillRectangle: aRectangle fillStyle: aFillStyle borderStyle: aBorderStyle
"Fill the given rectangle."
aFillStyle isTransparent ifFalse:[
+ self fillRectangle: (aRectangle insetBy: aBorderStyle inset) fillStyle: aFillStyle].
- self fillRectangle: (aRectangle insetBy: aBorderStyle width) fillStyle: aFillStyle].
aBorderStyle ifNil:[^self].
aBorderStyle width <= 0 ifTrue:[^self].
+ aBorderStyle frameRectangle: aRectangle on: self.!
- aBorderStyle frameRectangle: aRectangle on: self
- !
Item was changed:
----- Method: Morph>>innerBounds (in category 'geometry') -----
innerBounds
"Return the inner rectangle enclosed by the bounds of this morph excluding the space taken by its borders. For an unbordered morph, this is just its bounds."
+ ^ self bounds insetBy: self borderStyle inset!
- ^ self bounds insetBy: self borderWidth!
Nicolas Cellier uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-cmm.601.mcz
==================== Summary ====================
Name: Monticello-cmm.601
Author: cmm
Time: 2 October 2014, 4:34:01.44 pm
UUID: 9031e0e5-b991-46fd-a8f0-20ead172757b
Ancestors: Monticello-topa.600
Recover quick keyboard access to the classic "install" and "revert" functions on the changed definitions list. Otherwise the new "Ignore (I)" function is selected whether "r" or "i" was pressed on the keyboard.
That function has a hot-key anyway, so move it below the the standard Monticello functions.
=============== Diff against Monticello-topa.600 ===============
Item was changed:
----- Method: MCSaveVersionDialog>>methodListMenu: (in category 'as yet unclassified') -----
methodListMenu: aMenu
- aMenu addList:#(
- ('ignore (I)' ignoreSelection 'Do not include this change when saving')
- -).
super methodListMenu: aMenu.
+ aMenu addList:#(-
+ ('ignore (I)' ignoreSelection 'Toggle inclusion of this change when saving')).
^aMenu!