Etoys: Morphic-kfr.104.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Etoys: Morphic-kfr.104.mcz

commits-2
Spam detection software, running on the system "europa.mgmt.inetu.net", has
identified this incoming email as possible spam.  The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email.  If you have any questions, see
the administrator of that system for details.

Content preview:  Karl Ramberg uploaded a new version of Morphic to project
  Etoys: http://source.squeak.org/etoys/Morphic-kfr.104.mcz ====================
   Summary ==================== Name: Morphic-kfr.104 Author: kfr Time: 28 February
   2013, 10:50:29 pm UUID: c3a59563-6ad7-2b46-ba1f-44e684440de7 Ancestors: Morphic-kfr.103
   [...]

Content analysis details:   (4.4 points, 4.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 0.4 INVALID_DATE           Invalid Date: header (not RFC 2822)
 0.8 DATE_IN_PAST_12_24     Date: is 12 to 24 hours before Received: date
 0.1 MISSING_MID            Missing Message-Id: header
 1.3 RDNS_NONE              Delivered to internal network by a host with no rDNS
 1.7 TO_NO_BRKTS_NORDNS     To: misformatted and no rDNS



Karl Ramberg uploaded a new version of Morphic to project Etoys:
http://source.squeak.org/etoys/Morphic-kfr.104.mcz

==================== Summary ====================

Name: Morphic-kfr.104
Author: kfr
Time: 28 February 2013, 10:50:29 pm
UUID: c3a59563-6ad7-2b46-ba1f-44e684440de7
Ancestors: Morphic-kfr.103

Fix for SelectionMorph dropping behaviour.

=============== Diff against Morphic-kfr.103 ===============

Item was changed:
  ----- Method: MorphicEventDispatcher>>dispatchDropEvent:with: (in category 'dispatching') -----
+ dispatchDropEvent: anEvent with: aMorph
+ "Find the appropriate receiver for the event and
+ let it handle it. The dispatch is similar to the
+ default dispatch with one difference: Morphs are
+ given the chance to reject an entire drop
+ operation. If the operation is rejected, no drop
+ will be executed."
- dispatchDropEvent: anEvent with: aMorph
- "Find the appropriate receiver for the event and let it handle it. The dispatch is similar to the default dispatch with one difference: Morphs are given the chance to reject an entire drop operation. If the operation is rejected, no drop will be executed."
- | inside index morphs child localEvt |
  "Try to get out quickly"
+ | inside index morphs child localEvt selection |
+ aMorph isWorldMorph
+ ifFalse: [(aMorph fullBounds containsPoint: anEvent cursorPoint)
+ ifFalse: [^ #rejected]].
+ "Give aMorph a chance to repel the dropping
+ morph "
-
- aMorph isWorldMorph ifFalse: [
- (aMorph fullBounds containsPoint: anEvent cursorPoint)
- ifFalse:[^#rejected].
- ].
- "Give aMorph a chance to repel the dropping morph"
  aMorph rejectDropEvent: anEvent.
+ anEvent wasHandled
+ ifTrue: [^ self].
- anEvent wasHandled ifTrue:[^self].
-
  "Go looking if any of our submorphs wants it"
+ index := 1.
+ inside := false.
+ morphs := aMorph submorphs.
+ (selection := anEvent contents) isSelectionMorph
+ ifTrue: [morphs := morphs copyWithoutAll: selection selectedItems].
+
+ [index <= morphs size]
+ whileTrue: [child := morphs at: index.
+ localEvt := anEvent
+ transformedBy: (child transformedFrom: aMorph).
+ (child processEvent: localEvt using: self)
+ == #rejected
+ ifFalse: [localEvt wasHandled
+ ifTrue: [^ anEvent wasHandled: true].
+ "done"
+ inside := true.
+ index := morphs size].
+ "break"
+ index := index + 1].
+ inside
+ ifFalse: [aMorph isWorldMorph
+ ifTrue: [self relocateMorphIfnecessary: anEvent contents within: aMorph.
+ inside := true]
+ ifFalse: [inside := aMorph containsPoint: anEvent cursorPoint event: anEvent]].
+ inside
+ ifTrue: [^ aMorph handleEvent: anEvent].
+ ^ #rejected!
- index _ 1.
- inside _ false.
- morphs _ aMorph submorphs.
- [index <= morphs size] whileTrue:[
- child _ morphs at: index.
- localEvt _ anEvent transformedBy: (child transformedFrom: aMorph).
- (child processEvent: localEvt using: self) == #rejected ifFalse:[
- localEvt wasHandled ifTrue:[^anEvent wasHandled: true]. "done"
- inside _ true.
- index _ morphs size]. "break"
- index _ index + 1.
- ].
-
- inside ifFalse:[
- aMorph isWorldMorph ifFalse: [
- inside _ aMorph containsPoint: anEvent cursorPoint event: anEvent]
- ifTrue: [self relocateMorphIfnecessary: anEvent contents within: aMorph. inside _ true]].
- inside ifTrue:[^aMorph handleEvent: anEvent].
- ^#rejected!

Item was changed:
  ----- Method: PasteUpMorph>>morphToDropFrom: (in category 'dropping/grabbing') -----
  morphToDropFrom: aMorph
  "Given a morph being carried by the hand, which the hand is about to drop, answer the actual morph to be deposited.  Normally this would be just the morph itself, but several unusual cases arise, which this method is designed to service."
 
  | aNail representee posBlock tempPos scale tempOffsetScaled |
  posBlock :=
  [:z |
  scale := (z extent / aMorph extent).
  tempOffsetScaled := ActiveHand targetOffset * scale.
  tempPos := ActiveHand position + tempOffsetScaled.
  self pointFromWorld: tempPos rounded.
  ].
  self alwaysShowThumbnail
  ifTrue:
+ ["aMorph isSelectionMorph
+ ifTrue:[ ^self world abandonAllHalos.]."
+ aNail := aMorph
- [aNail := aMorph
  representativeNoTallerThan: self maxHeightToAvoidThumbnailing
  norWiderThan: self maximumThumbnailWidth
  thumbnailHeight: self heightForThumbnails.
  aNail == aMorph
  ifFalse:
  [aMorph formerPosition: aMorph position.
  aNail position: (posBlock value: aNail). ].
  ^aNail].
  ((aMorph isKindOf: MorphThumbnail)
  and: [(representee := aMorph morphRepresented) owner isNil])
  ifTrue:
  [representee position:(posBlock value: representee).
  ^representee].
  self showingListView
  ifTrue:
  [^aMorph
  listViewLineForFieldList: (self valueOfProperty: #fieldListSelectors)].
  (aMorph hasProperty: #newPermanentScript)
  ifTrue: [^aMorph asEmptyPermanentScriptor].
 
  ^ aMorph morphToDropInPasteUp: self!


_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev