Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.354.mcz
==================== Summary ====================
Name: MorphicExtras-mt.354 Author: mt Time: 13 May 2024, 9:18:27.481237 am UUID: 5cbce2f1-18ca-b848-b8ed-78b3cacf9b1e Ancestors: MorphicExtras-dtl.353
Complement Collections-ct.1067 and Collections-mt.1068
=============== Diff against MorphicExtras-dtl.353 ===============
Item was changed: ----- Method: CommandHistory>>redoMenuWording (in category 'menu') ----- redoMenuWording "Answer the wording to be used in a menu offering the current Redo command" | nextCommand |
((nextCommand := self nextCommand) isNil or: [Preferences useUndo not]) ifTrue: [^ 'can''t redo' translated].
^ String streamContents: [:aStream | aStream nextPutAll: 'redo' translated. aStream nextPutAll: ' "'. + aStream nextPutAll: (nextCommand cmdWording truncateWithEllipsisTo: 20). - aStream nextPutAll: (nextCommand cmdWording truncateWithElipsisTo: 20). aStream nextPut: $". lastCommand phase == #done ifFalse: [aStream nextPutAll: ' (z)']]!
Item was changed: ----- Method: CommandHistory>>undoMenuWording (in category 'menu') ----- undoMenuWording "Answer the wording to be used in an 'undo' menu item"
(lastCommand isNil or: [Preferences useUndo not or: [(Preferences infiniteUndo not and: [lastCommand phase == #undone]) or: [self nextCommandToUndo isNil]]]) ifTrue: [^ 'can''t undo' translated].
^ String streamContents: [:aStream | aStream nextPutAll: 'undo' translated. aStream nextPutAll: ' "'. + aStream nextPutAll: (self nextCommandToUndo cmdWording truncateWithEllipsisTo: 20). - aStream nextPutAll: (self nextCommandToUndo cmdWording truncateWithElipsisTo: 20). aStream nextPut: $". lastCommand phase == #done ifTrue: [aStream nextPutAll: ' (z)']].!
Item was changed: ----- Method: CommandHistory>>undoOrRedoMenuWording (in category 'menu') ----- undoOrRedoMenuWording "Answer the wording to be used in a menu item offering undo/redo (i.e., the form used when the #infiniteUndo preference is false)"
| pre | self assureLastCommandStillValid. lastCommand ifNil: [^ 'can''t undo' translated]. pre := lastCommand phase == #done ifTrue: ['undo' translated] ifFalse: ['redo' translated]. + ^ pre, ' "', (lastCommand cmdWording truncateWithEllipsisTo: 20), '" (z)'! - ^ pre, ' "', (lastCommand cmdWording truncateWithElipsisTo: 20), '" (z)'!
Item was changed: ----- Method: CommandHistory>>undoTo (in category 'called from the ui') ----- undoTo "Not yet functional, and not yet sent. Allow the user to choose a point somewhere in the undo/redo tape, and undo his way to there. Applicable only if infiniteUndo is set. "
| anIndex commandList reply | (anIndex := self historyIndexOfLastCommand) = 0 ifTrue: [^ Beeper beep]. commandList := history copyFrom: ((anIndex - 10) max: 1) to: ((anIndex + 10) min: history size). + reply := UIManager default chooseFrom: (commandList collect: [:cmd | cmd cmdWording truncateWithEllipsisTo: 20]) values: commandList title: 'undo or redo to...'. - reply := UIManager default chooseFrom: (commandList collect: [:cmd | cmd cmdWording truncateWithElipsisTo: 20]) values: commandList title: 'undo or redo to...'. reply ifNotNil: [self inform: #deferred]
"ActiveWorld commandHistory undoTo" !
packages@lists.squeakfoundation.org