Frank Shearar uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-fbs.713.mcz ==================== Summary ==================== Name: Morphic-fbs.713 Author: fbs Time: 31 December 2013, 12:21:54.969 pm UUID: b46eb468-a54f-6548-8411-496814427b3d Ancestors: Morphic-dtl.712 Update #preserveTrash and #slideDismissalsToTrash senders to point to the new, pragma preference, location. Note that this _apparently_ strengthens the Morphic->MorphicExtras dependency. "Apparently", because the dependency was hidden by the fact that the dependency routed through Preferences. Now we're a bit more honest. =============== Diff against Morphic-dtl.712 =============== Item was changed: ----- Method: Morph>>balloonHelpTextForHandle: (in category 'halos and balloon help') ----- balloonHelpTextForHandle: aHandle "Answer a string providing balloon help for the given halo handle" | itsSelector | itsSelector := aHandle eventHandler firstMouseSelector. itsSelector == #doRecolor:with: ifTrue: [^ Preferences propertySheetFromHalo ifTrue: ['Open a property sheet.'] ifFalse: ['Change color']]. itsSelector == #mouseDownInDimissHandle:with: + ifTrue: [^ TrashCanMorph preserveTrash - ifTrue: [^ Preferences preserveTrash ifTrue: ['Move to trash'] ifFalse: ['Remove from screen']]. #(#(#addFullHandles 'More halo handles') #(#addSimpleHandles 'Fewer halo handles') #(#chooseEmphasisOrAlignment 'Emphasis & alignment') #(#chooseFont 'Change font') #(#chooseNewGraphicFromHalo 'Choose a new graphic') #(#chooseStyle 'Change style') #(#dismiss 'Remove') #(#doDebug:with: 'Debug') #(#doDirection:with: 'Choose forward direction') #(#doDup:with: 'Duplicate') #(#doMakeSibling:with: 'Make a sibling') #(#doMenu:with: 'Menu') #(#doGrab:with: 'Pick up') #(#editButtonsScript 'See the script for this button') #(#editDrawing 'Repaint') #(#doDupOrMakeSibling:with: 'Duplicate (press shift to make a sibling)') #(#doMakeSiblingOrDup:with: 'Make a sibling (press shift to make simple duplicate)') #(#makeNascentScript 'Make a scratch script') #(#makeNewDrawingWithin 'Paint new object') #(#mouseDownInCollapseHandle:with: 'Collapse') #(#mouseDownOnHelpHandle: 'Help') #(#openViewerForArgument 'Open a Viewer for me. Press shift for a snapshot.') #(#openViewerForTarget:with: 'Open a Viewer for me. Press shift for a snapshot.') #(#paintBackground 'Paint background') #(#prepareToTrackCenterOfRotation:with: 'Move object or set center of rotation') #(#presentViewMenu 'Present the Viewing menu') #(#startDrag:with: 'Move') #(#startGrow:with: 'Change size') #(#startRot:with: 'Rotate') #(#startScale:with: 'Change scale') #(#tearOffTile 'Make a tile representing this object') #(#tearOffTileForTarget:with: 'Make a tile representing this object') #(#trackCenterOfRotation:with: 'Set center of rotation') ) do: [:pair | itsSelector == pair first ifTrue: [^ pair last]]. ^ 'unknown halo handle'translated! Item was changed: ----- Method: Morph>>dismissViaHalo (in category 'submorphs-add/remove') ----- dismissViaHalo "The user has clicked in the delete halo-handle. This provides a hook in case some concomitant action should be taken, or if the particular morph is not one which should be put in the trash can, for example." | cmd | self setProperty: #lastPosition toValue: self positionInWorld. self dismissMorph. + TrashCanMorph preserveTrash ifTrue: [ + TrashCanMorph slideDismissalsToTrash - Preferences preserveTrash ifTrue: [ - Preferences slideDismissalsToTrash ifTrue:[self slideToTrash: nil] ifFalse:[TrashCanMorph moveToTrash: self]. ]. cmd := Command new cmdWording: 'dismiss ' translated, self externalName. cmd undoTarget: ActiveWorld selector: #reintroduceIntoWorld: argument: self. cmd redoTarget: ActiveWorld selector: #onceAgainDismiss: argument: self. ActiveWorld rememberCommand: cmd! Item was changed: ----- Method: Morph>>slideToTrash: (in category 'dropping/grabbing') ----- slideToTrash: evt "Perhaps slide the receiver across the screen to a trash can and make it disappear into it. In any case, remove the receiver from the screen." | aForm trash startPoint endPoint morphToSlide | ((self renderedMorph == ScrapBook default scrapBook) or: [self renderedMorph isKindOf: TrashCanMorph]) ifTrue: [self dismissMorph. ^ self]. + TrashCanMorph slideDismissalsToTrash ifTrue: - Preferences slideDismissalsToTrash ifTrue: [morphToSlide := self representativeNoTallerThan: 200 norWiderThan: 200 thumbnailHeight: 100. aForm := morphToSlide imageForm offset: (0@0). trash := ActiveWorld findDeepSubmorphThat: [:aMorph | (aMorph isKindOf: TrashCanMorph) and: [aMorph topRendererOrSelf owner == ActiveWorld]] ifAbsent: [trash := TrashCanMorph new. trash position: ActiveWorld bottomLeft - (0 @ (trash extent y + 26)). trash openInWorld. trash]. endPoint := trash fullBoundsInWorld center. startPoint := self topRendererOrSelf fullBoundsInWorld center - (aForm extent // 2)]. self dismissMorph. ActiveWorld displayWorld. + TrashCanMorph slideDismissalsToTrash ifTrue: - Preferences slideDismissalsToTrash ifTrue: [aForm slideFrom: startPoint to: endPoint nSteps: 12 delay: 15]. ScrapBook default addToTrash: self! Item was changed: ----- Method: PasteUpMorph>>onceAgainDismiss: (in category 'undo') ----- onceAgainDismiss: aMorph "Occasioned by a redo of a dismiss-via-halo" aMorph dismissMorph. + TrashCanMorph preserveTrash ifTrue: + [TrashCanMorph slideDismissalsToTrash - Preferences preserveTrash ifTrue: - [Preferences slideDismissalsToTrash ifTrue:[aMorph slideToTrash: nil] + ifFalse:[TrashCanMorph moveToTrash: aMorph]]! - ifFalse:[TrashCanMorph moveToTrash: aMorph]] - ! |
Free forum by Nabble | Edit this page |