Frank Shearar uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-fbs.513.mcz
==================== Summary ====================
Name: Tools-fbs.513
Author: fbs
Time: 31 December 2013, 2:13:25.041 pm
UUID: ea54cdf6-af53-804c-a3e1-d4d4bccfbcad
Ancestors: Tools-fbs.512
* Turn #cpuWatcherEnabled into a pragma preference.
* Update the senders accordingly.
* Accidentally on purpose alphabetise the Tools categories.
=============== Diff against Tools-fbs.512 ===============
Item was changed:
SystemOrganization addCategory: #'Tools-ArchiveViewer'!
SystemOrganization addCategory: #'Tools-Base'!
SystemOrganization addCategory: #'Tools-Browser'!
SystemOrganization addCategory: #'Tools-Changes'!
SystemOrganization addCategory: #'Tools-Debugger'!
SystemOrganization addCategory: #'Tools-Explorer'!
SystemOrganization addCategory: #'Tools-File Contents Browser'!
SystemOrganization addCategory: #'Tools-FileList'!
SystemOrganization addCategory: #'Tools-Inspector'!
SystemOrganization addCategory: #'Tools-Menus'!
- SystemOrganization addCategory: #'Tools-Process Browser'!
SystemOrganization addCategory: #'Tools-MethodFinder'!
+ SystemOrganization addCategory: #'Tools-Process Browser'!
Item was changed:
Model subclass: #CPUWatcher
instanceVariableNames: 'tally watcher threshold'
+ classVariableNames: 'CpuWatcherEnabled CurrentCPUWatcher'
- classVariableNames: 'CurrentCPUWatcher'
poolDictionaries: ''
category: 'Tools-Process Browser'!
!CPUWatcher commentStamp: '<historical>' prior: 0!
CPUWatcher implements a simple runaway process monitoring tool
that will suspend a process that is taking up too much of Squeak's
time and allow user interaction. By default it watches for a Process that
is taking more than 80% of the time; this threshold can be changed.
CPUWatcher can also be used to show cpu percentages for each process
from within the ProcessBrowser.
CPUWatcher startMonitoring. "process period 20 seconds, sample rate 100 msec"
CPUWatcher current monitorProcessPeriod: 10 sampleRate: 20.
CPUWatcher current threshold: 0.5. "change from 80% to 50%"
CPUWatcher stopMonitoring.
!
Item was added:
+ ----- Method: CPUWatcher class>>cpuWatcherEnabled (in category 'preferences') -----
+ cpuWatcherEnabled
+ <preference: 'CPU Watcher enabled' category: #('debug' 'performance') description: 'If true, Squeak will monitor processes for CPU usage. If any uses too much CPU, you will get a notification menu that will allow you to debug, resume or terminate the process.' type: #Boolean>
+ ^ CpuWatcherEnabled ifNil: [false].!
Item was added:
+ ----- Method: CPUWatcher class>>cpuWatcherEnabled: (in category 'preferences') -----
+ cpuWatcherEnabled: aBoolean
+ CpuWatcherEnabled := aBoolean.
+ self monitorPreferenceChanged.!
Item was changed:
----- Method: CPUWatcher class>>monitorPreferenceChanged (in category 'as yet unclassified') -----
monitorPreferenceChanged
+ self cpuWatcherEnabled
- Preferences cpuWatcherEnabled
ifTrue: [ self startMonitoring ]
ifFalse: [ self stopMonitoring ]!
Item was changed:
----- Method: ProcessBrowser>>initialize (in category 'initialize-release') -----
initialize
methodText := ''.
stackListIndex := 0.
searchString := ''.
lastUpdate := 0.
+ startedCPUWatcher := CPUWatcher cpuWatcherEnabled and: [ self startCPUWatcher ].
- startedCPUWatcher := Preferences cpuWatcherEnabled and: [ self startCPUWatcher ].
self updateProcessList; processListIndex: 1.
Browsers add: self!
Item was changed:
+ (PackageInfo named: 'Tools') postscript: 'CPUWatcher cpuWatcherEnabled: Preferences cpuWatcherEnabled.
+ Preferences removePreference: #cpuWatcherEnabled.'!
- (PackageInfo named: 'Tools') postscript: 'SystemBrowser browseWithPrettyPrint: Preferences browseWithPrettyPrint.
- SystemBrowser browseWithDragNDrop: Preferences browseWithDragNDrop.
-
- Preferences removePreference: #browseWithPrettyPrint.
- Preferences removePreference: #browseWithDragNDrop.'!
Frank Shearar uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-fbs.513.mcz
==================== Summary ====================
Name: Tools-fbs.513
Author: fbs
Time: 31 December 2013, 2:13:25.041 pm
UUID: ea54cdf6-af53-804c-a3e1-d4d4bccfbcad
Ancestors: Tools-fbs.512
* Turn #cpuWatcherEnabled into a pragma preference.
* Update the senders accordingly.
* Accidentally on purpose alphabetise the Tools categories.
=============== Diff against Tools-fbs.512 ===============
Item was changed:
SystemOrganization addCategory: #'Tools-ArchiveViewer'!
SystemOrganization addCategory: #'Tools-Base'!
SystemOrganization addCategory: #'Tools-Browser'!
SystemOrganization addCategory: #'Tools-Changes'!
SystemOrganization addCategory: #'Tools-Debugger'!
SystemOrganization addCategory: #'Tools-Explorer'!
SystemOrganization addCategory: #'Tools-File Contents Browser'!
SystemOrganization addCategory: #'Tools-FileList'!
SystemOrganization addCategory: #'Tools-Inspector'!
SystemOrganization addCategory: #'Tools-Menus'!
- SystemOrganization addCategory: #'Tools-Process Browser'!
SystemOrganization addCategory: #'Tools-MethodFinder'!
+ SystemOrganization addCategory: #'Tools-Process Browser'!
Item was changed:
Model subclass: #CPUWatcher
instanceVariableNames: 'tally watcher threshold'
+ classVariableNames: 'CpuWatcherEnabled CurrentCPUWatcher'
- classVariableNames: 'CurrentCPUWatcher'
poolDictionaries: ''
category: 'Tools-Process Browser'!
!CPUWatcher commentStamp: '<historical>' prior: 0!
CPUWatcher implements a simple runaway process monitoring tool
that will suspend a process that is taking up too much of Squeak's
time and allow user interaction. By default it watches for a Process that
is taking more than 80% of the time; this threshold can be changed.
CPUWatcher can also be used to show cpu percentages for each process
from within the ProcessBrowser.
CPUWatcher startMonitoring. "process period 20 seconds, sample rate 100 msec"
CPUWatcher current monitorProcessPeriod: 10 sampleRate: 20.
CPUWatcher current threshold: 0.5. "change from 80% to 50%"
CPUWatcher stopMonitoring.
!
Item was added:
+ ----- Method: CPUWatcher class>>cpuWatcherEnabled (in category 'preferences') -----
+ cpuWatcherEnabled
+ <preference: 'CPU Watcher enabled' category: #('debug' 'performance') description: 'If true, Squeak will monitor processes for CPU usage. If any uses too much CPU, you will get a notification menu that will allow you to debug, resume or terminate the process.' type: #Boolean>
+ ^ CpuWatcherEnabled ifNil: [false].!
Item was added:
+ ----- Method: CPUWatcher class>>cpuWatcherEnabled: (in category 'preferences') -----
+ cpuWatcherEnabled: aBoolean
+ CpuWatcherEnabled := aBoolean.
+ self monitorPreferenceChanged.!
Item was changed:
----- Method: CPUWatcher class>>monitorPreferenceChanged (in category 'as yet unclassified') -----
monitorPreferenceChanged
+ self cpuWatcherEnabled
- Preferences cpuWatcherEnabled
ifTrue: [ self startMonitoring ]
ifFalse: [ self stopMonitoring ]!
Item was changed:
----- Method: ProcessBrowser>>initialize (in category 'initialize-release') -----
initialize
methodText := ''.
stackListIndex := 0.
searchString := ''.
lastUpdate := 0.
+ startedCPUWatcher := CPUWatcher cpuWatcherEnabled and: [ self startCPUWatcher ].
- startedCPUWatcher := Preferences cpuWatcherEnabled and: [ self startCPUWatcher ].
self updateProcessList; processListIndex: 1.
Browsers add: self!
Item was changed:
+ (PackageInfo named: 'Tools') postscript: 'CPUWatcher cpuWatcherEnabled: Preferences cpuWatcherEnabled.
+ Preferences removePreference: #cpuWatcherEnabled.'!
- (PackageInfo named: 'Tools') postscript: 'SystemBrowser browseWithPrettyPrint: Preferences browseWithPrettyPrint.
- SystemBrowser browseWithDragNDrop: Preferences browseWithDragNDrop.
-
- Preferences removePreference: #browseWithPrettyPrint.
- Preferences removePreference: #browseWithDragNDrop.'!
Frank Shearar uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-fbs.123.mcz
==================== Summary ====================
Name: MonticelloConfigurations-fbs.123
Author: fbs
Time: 31 December 2013, 2:11:41.532 pm
UUID: b9735d10-7cf4-a746-8a64-b50fa9cf273f
Ancestors: MonticelloConfigurations-fbs.122
These preferences used to be in the "updates" category, and that sounds nicer than "Monticello". We should keep things specific to Monticello in "Monticello", and things to do with updating the image in "updates".
=============== Diff against MonticelloConfigurations-fbs.122 ===============
Item was changed:
----- Method: MCConfiguration class>>upgradeIsMerge (in category 'preferences') -----
upgradeIsMerge
"Answer true if you wish to merge upstream changes whenever you upgrade."
<preference: 'Upgrade is merge'
+ category: 'updates'
- category: 'Monticello'
description: 'When upgrading packages, use merge instead of load'
type: #Boolean>
^UpgradeIsMerge ifNil: [true]!
Item was changed:
----- Method: MCMcmUpdater class>>defaultUpdateURL (in category 'preferences') -----
defaultUpdateURL
"The default update repository URL"
<preference: 'Update URL'
+ category: 'updates'
- category: 'Monticello'
description: 'The repository URL for loading updates'
type: #String>
^DefaultUpdateURL ifNil:['']!
Item was changed:
----- Method: MCMcmUpdater class>>updateMissingPackages (in category 'preferences') -----
updateMissingPackages
"Whether to update missing (unloaded) packages"
<preference: 'Update missing package'
+ category: 'updates'
- category: 'Monticello'
description: 'If true, missing (unloaded) packages will be loaded during the update process.'
type: #Boolean>
^UpdateMissingPackages ifNil:[true]!
Frank Shearar uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-fbs.123.mcz
==================== Summary ====================
Name: MonticelloConfigurations-fbs.123
Author: fbs
Time: 31 December 2013, 2:11:41.532 pm
UUID: b9735d10-7cf4-a746-8a64-b50fa9cf273f
Ancestors: MonticelloConfigurations-fbs.122
These preferences used to be in the "updates" category, and that sounds nicer than "Monticello". We should keep things specific to Monticello in "Monticello", and things to do with updating the image in "updates".
=============== Diff against MonticelloConfigurations-fbs.122 ===============
Item was changed:
----- Method: MCConfiguration class>>upgradeIsMerge (in category 'preferences') -----
upgradeIsMerge
"Answer true if you wish to merge upstream changes whenever you upgrade."
<preference: 'Upgrade is merge'
+ category: 'updates'
- category: 'Monticello'
description: 'When upgrading packages, use merge instead of load'
type: #Boolean>
^UpgradeIsMerge ifNil: [true]!
Item was changed:
----- Method: MCMcmUpdater class>>defaultUpdateURL (in category 'preferences') -----
defaultUpdateURL
"The default update repository URL"
<preference: 'Update URL'
+ category: 'updates'
- category: 'Monticello'
description: 'The repository URL for loading updates'
type: #String>
^DefaultUpdateURL ifNil:['']!
Item was changed:
----- Method: MCMcmUpdater class>>updateMissingPackages (in category 'preferences') -----
updateMissingPackages
"Whether to update missing (unloaded) packages"
<preference: 'Update missing package'
+ category: 'updates'
- category: 'Monticello'
description: 'If true, missing (unloaded) packages will be loaded during the update process.'
type: #Boolean>
^UpdateMissingPackages ifNil:[true]!
Frank Shearar uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-fbs.123.mcz
==================== Summary ====================
Name: MonticelloConfigurations-fbs.123
Author: fbs
Time: 31 December 2013, 2:11:41.532 pm
UUID: b9735d10-7cf4-a746-8a64-b50fa9cf273f
Ancestors: MonticelloConfigurations-fbs.122
These preferences used to be in the "updates" category, and that sounds nicer than "Monticello". We should keep things specific to Monticello in "Monticello", and things to do with updating the image in "updates".
=============== Diff against MonticelloConfigurations-fbs.122 ===============
Item was changed:
----- Method: MCConfiguration class>>upgradeIsMerge (in category 'preferences') -----
upgradeIsMerge
"Answer true if you wish to merge upstream changes whenever you upgrade."
<preference: 'Upgrade is merge'
+ category: 'updates'
- category: 'Monticello'
description: 'When upgrading packages, use merge instead of load'
type: #Boolean>
^UpgradeIsMerge ifNil: [true]!
Item was changed:
----- Method: MCMcmUpdater class>>defaultUpdateURL (in category 'preferences') -----
defaultUpdateURL
"The default update repository URL"
<preference: 'Update URL'
+ category: 'updates'
- category: 'Monticello'
description: 'The repository URL for loading updates'
type: #String>
^DefaultUpdateURL ifNil:['']!
Item was changed:
----- Method: MCMcmUpdater class>>updateMissingPackages (in category 'preferences') -----
updateMissingPackages
"Whether to update missing (unloaded) packages"
<preference: 'Update missing package'
+ category: 'updates'
- category: 'Monticello'
description: 'If true, missing (unloaded) packages will be loaded during the update process.'
type: #Boolean>
^UpdateMissingPackages ifNil:[true]!
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]]
- !
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]]
- !