Vanessa Freudenberg uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-codefrau.1426.mcz
==================== Summary ====================
Name: System-codefrau.1426 Author: codefrau Time: 1 October 2023, 4:04:12.738176 pm UUID: f273b150-371e-4001-930f-282781df8d59 Ancestors: System-mt.1425
Make copy/paste work again on VMs without an ExtendedClipboardInterface.
=============== Diff against System-mt.1425 ===============
Item was changed: ----- Method: Clipboard>>clipboardText (in category 'accessing') ----- clipboardText + "Answer the text currently in the (system) clipboard. To preserve image-specific formatting, answer the text from an in-image buffer UNLESS that buffer differs from what is in the system clipboard. Also use that buffer if the system clipboard got cleared by some other application." - "Answer the text currently in the (system) clipboard. To preserve image-specifc formatting, simply answer the text from an in-image buffer UNLESS that buffer differs from what is in the system clipboard. Also use that buffer if the sytem clipboard got cleared by some other application."
| systemContents needsDecoding stringOrText | needsDecoding := false. + systemContents := (self extended ifNotNil: [:extClipboard | extClipboard readTextClipboardData]) - systemContents := ExtendedClipboardInterface current readTextClipboardData ifNil: [needsDecoding := true. self primitiveClipboardText "old primitive"]. stringOrText := systemContents withSqueakLineEndings. (stringOrText isEmpty or: [stringOrText asString = contents asString]) ifTrue: [^ contents]. ^ needsDecoding ifFalse: [stringOrText asText] ifTrue: [ | decodedString | "from old primitive" decodedString := self interpreter fromSystemClipboard: stringOrText asString. decodedString = contents asString ifTrue: [contents] ifFalse: [decodedString asText]].!
Item was changed: ----- Method: Clipboard>>clipboardText:notifyWith: (in category 'accessing') ----- clipboardText: stringOrText notifyWith: anObject "Set the contents of the (system) clipboard. anObject can be used as a marker for the source of the clipboard change, the default value is nil. Try to use the extended interface so that, e.g., rich text can be encoded and transported to other applications."
| newContents | newContents := stringOrText asText. self noteRecentClipping: newContents. contents := newContents. "Preserve in-image attributes. See #clipboardText." + (self extended ifNil: [false] ifNotNil: [:extClipboard | extClipboard clipboardText: newContents]) - (ExtendedClipboardInterface current clipboardText: newContents) ifFalse: [ | string | "Extended interface failed. Use old primitive and plain text with system-specific encoding." string := newContents asString. string := self interpreter toSystemClipboard: string. self primitiveClipboardText: string]. self triggerEvent: #contentChanged withArguments: { newContents. anObject }.!
squeak-dev@lists.squeakfoundation.org