Marcel Taeumel uploaded a new version of 61Deprecated to project The Trunk:
http://source.squeak.org/trunk/61Deprecated-mt.6.mcz
==================== Summary ====================
Name: 61Deprecated-mt.6
Author: mt
Time: 27 March 2023, 3:11:40.972363 pm
UUID: 6b404313-d56a-124b-af87-dcedf2d5f5e3
Ancestors: 61Deprecated-mt.5
Rescue #resumeProcess: as deprecated method because the Git Browser apparanetly needs it...
=============== Diff against 61Deprecated-mt.5 ===============
Item was added:
+ ----- Method: Project class>>resumeProcess: (in category '*61Deprecated-utilities') -----
+ resumeProcess: aProcess
+ "Adopt aProcess as the project process -- probably because of proceeding from a debugger"
+
+ self deprecated: 'Use #resumeProcessSafely: in Project current.'.
+ self current resumeProcessSafely: aProcess.!
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.1030.mcz
==================== Summary ====================
Name: Collections-mt.1030
Author: mt
Time: 27 March 2023, 10:01:33.549651 am
UUID: dcb95380-3401-c245-9f25-5038991a4950
Ancestors: Collections-eem.1029
Complement System-mt.1403
=============== Diff against Collections-eem.1029 ===============
Item was removed:
- ----- Method: String>>isPlainText (in category 'testing') -----
- isPlainText
- "For compatibility with Text"
- ^true!
Item was removed:
- ----- Method: Text>>isPlainText (in category 'testing') -----
- isPlainText
- "A Text with no emphasis has empty values."
- ^runs values = #(#())!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1403.mcz
==================== Summary ====================
Name: System-mt.1403
Author: mt
Time: 27 March 2023, 10:00:56.498651 am
UUID: 106cd43c-6be0-314c-ac46-e16bf55f8a89
Ancestors: System-eem.1402
As usual, move domain-specific string/text messages into extension protocol. Use *System-Support for now but it could be *Network as well or something that relates to the underlying MIME classification (here: text/plain).
=============== Diff against System-eem.1402 ===============
Item was added:
+ ----- Method: String>>isPlainText (in category '*System-Support') -----
+ isPlainText
+ "For compatibility with Text"
+ ^true!
Item was added:
+ ----- Method: Text>>isPlainText (in category '*System-Support') -----
+ isPlainText
+ "A Text with no emphasis has empty values."
+ ^runs values = #(#())!
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1402.mcz
==================== Summary ====================
Name: System-eem.1402
Author: eem
Time: 24 March 2023, 5:35:13.352983 pm
UUID: 46842e93-0131-498f-8233-2566b7594127
Ancestors: System-eem.1401
Don't waste effort pasting HTML for plain texts.
=============== Diff against System-eem.1401 ===============
Item was changed:
----- Method: ExtendedClipboardMacInterface>>clipboardText: (in category 'general-api-add') -----
clipboardText: aText
"Attempt to paste aText to the system clipboard in as many formats as makes sense on the platform.
Answer if the attempt succeeded. On the Mac we paste HTML and UTF8. But we can only paste more
than one thing at a time with the VMMaker.oscog-eem.3276 version of the plugin, or later."
| htmlPayload |
+ (aText isPlainText
+ or: [clipboard = 0
+ or: [self class pluginVersion < 3276]]) ifTrue:
- (aText isText
- and: [clipboard ~= 0
- and: [self class pluginVersion >= 3276]]) ifFalse:
[^false].
htmlPayload := String streamContents:
[:stream |
stream nextPutAll: '<meta charset="UTF-8">'.
aText printHtmlOn: stream].
self
clearClipboard;
addClipboardData: htmlPayload dataFormat: 'public.html';
addClipboardData: (UTF8TextConverter new encodeString: aText asString) dataFormat: 'public.utf8-plain-text'.
^true!
Item was changed:
----- Method: ExtendedClipboardWinInterface>>clipboardText: (in category 'private') -----
clipboardText: aText
"Attempt to paste aText to the system clipboard in as many formats as makes sense on the platform.
Answer if the attempt succeeded. On Windows we paste HTML and UTF8. But we can only paste more
than one thing at a time with the VMMaker.oscog-eem.3276 version of the plugin, or later. Note that
the funky HTML format (see packageAsHTML:) has been derived by observing Chrome and Edge."
| htmlPayload |
+ (aText isPlainText
+ or: [clipboard = 0
+ or: [self class pluginVersion < 3276]]) ifTrue:
- (aText isText
- and: [clipboard ~= 0
- and: [self class pluginVersion >= 3276]]) ifFalse:
[^false].
htmlPayload := self packageAsHTML: aText printHtmlString.
self clearClipboard.
"We don't understand why yet, but sometimes the plugin fails to copy HTML text."
^(self tryAddClipboardData: htmlPayload dataFormat: CF_HTMLTEXT)
and: [self tryAddClipboardData: (UTF8TextConverter new encodeString: aText asString) dataFormat: CF_UTF8TEXT]!
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.1029.mcz
==================== Summary ====================
Name: Collections-eem.1029
Author: eem
Time: 24 March 2023, 5:34:09.007646 pm
UUID: 6b4476ed-6be7-4944-9681-109724903e30
Ancestors: Collections-jar.1028
Add String/Text>>isPlainText for the benefit of the ExtendedClipboardInterface
=============== Diff against Collections-jar.1028 ===============
Item was added:
+ ----- Method: String>>isPlainText (in category 'testing') -----
+ isPlainText
+ "For compatibility with Text"
+ ^true!
Item was added:
+ ----- Method: Text>>isPlainText (in category 'testing') -----
+ isPlainText
+ "A Text with no emphasis has empty values."
+ ^runs values = #(#())!
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1401.mcz
==================== Summary ====================
Name: System-eem.1401
Author: eem
Time: 24 March 2023, 10:41:09.838366 am
UUID: 03250e8d-202c-472e-aacc-368adbbc9c84
Ancestors: System-eem.1400
SOmetimes the WIndows ClipboardExtendedPlugin fails to add HTML data. Make ExtendedClipboardWinInterface>>clipboardText: fail-safe.
=============== Diff against System-eem.1400 ===============
Item was added:
+ ----- Method: ExtendedClipboardInterface>>primNoFailAddClipboardData:data:dataFormat: (in category 'system primitives') -----
+ primNoFailAddClipboardData: clipboard data: data dataFormat: aFormat
+
+ <primitive:'ioAddClipboardData' module: 'ClipboardExtendedPlugin' error: ec>
+ ^ec!
Item was added:
+ ----- Method: ExtendedClipboardInterface>>tryAddClipboardData:dataFormat: (in category 'private') -----
+ tryAddClipboardData: data dataFormat: aFormat
+ "Attempt to add data to the clipboard in the given format.
+ Answer if the attempt succeeded."
+ ^(self primNoFailAddClipboardData: clipboard data: data dataFormat: aFormat) == self!
Item was changed:
----- Method: ExtendedClipboardWinInterface>>clipboardText: (in category 'private') -----
clipboardText: aText
"Attempt to paste aText to the system clipboard in as many formats as makes sense on the platform.
Answer if the attempt succeeded. On Windows we paste HTML and UTF8. But we can only paste more
than one thing at a time with the VMMaker.oscog-eem.3276 version of the plugin, or later. Note that
the funky HTML format (see packageAsHTML:) has been derived by observing Chrome and Edge."
| htmlPayload |
(aText isText
and: [clipboard ~= 0
and: [self class pluginVersion >= 3276]]) ifFalse:
[^false].
htmlPayload := self packageAsHTML: aText printHtmlString.
+ self clearClipboard.
+ "We don't understand why yet, but sometimes the plugin fails to copy HTML text."
+ ^(self tryAddClipboardData: htmlPayload dataFormat: CF_HTMLTEXT)
+ and: [self tryAddClipboardData: (UTF8TextConverter new encodeString: aText asString) dataFormat: CF_UTF8TEXT]!
- self
- clearClipboard;
- addClipboardData: htmlPayload dataFormat: CF_HTMLTEXT;
- addClipboardData: (UTF8TextConverter new encodeString: aText asString) dataFormat: CF_UTF8TEXT.
- ^true!
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1400.mcz
==================== Summary ====================
Name: System-eem.1400
Author: eem
Time: 24 March 2023, 10:32:09.838089 am
UUID: ebd792de-14b8-42e5-8443-aca3d03c4a4d
Ancestors: System-eem.1399
Oops! ExtendedClipboard[Mac|Win]Interface>>clipboardText: must clear the clipboard before pasting text!!
=============== Diff against System-eem.1399 ===============
Item was changed:
----- Method: ExtendedClipboardMacInterface>>clipboardText: (in category 'general-api-add') -----
clipboardText: aText
"Attempt to paste aText to the system clipboard in as many formats as makes sense on the platform.
Answer if the attempt succeeded. On the Mac we paste HTML and UTF8. But we can only paste more
than one thing at a time with the VMMaker.oscog-eem.3276 version of the plugin, or later."
| htmlPayload |
(aText isText
+ and: [clipboard ~= 0
+ and: [self class pluginVersion >= 3276]]) ifFalse:
- and: [self class pluginVersion >= 3276]) ifFalse:
[^false].
htmlPayload := String streamContents:
[:stream |
stream nextPutAll: '<meta charset="UTF-8">'.
aText printHtmlOn: stream].
self
+ clearClipboard;
addClipboardData: htmlPayload dataFormat: 'public.html';
addClipboardData: (UTF8TextConverter new encodeString: aText asString) dataFormat: 'public.utf8-plain-text'.
^true!
Item was changed:
----- Method: ExtendedClipboardWinInterface>>clipboardText: (in category 'private') -----
clipboardText: aText
"Attempt to paste aText to the system clipboard in as many formats as makes sense on the platform.
Answer if the attempt succeeded. On Windows we paste HTML and UTF8. But we can only paste more
than one thing at a time with the VMMaker.oscog-eem.3276 version of the plugin, or later. Note that
the funky HTML format (see packageAsHTML:) has been derived by observing Chrome and Edge."
| htmlPayload |
(aText isText
+ and: [clipboard ~= 0
+ and: [self class pluginVersion >= 3276]]) ifFalse:
- and: [self class pluginVersion >= 3276]) ifFalse:
[^false].
htmlPayload := self packageAsHTML: aText printHtmlString.
self
+ clearClipboard;
addClipboardData: htmlPayload dataFormat: CF_HTMLTEXT;
addClipboardData: (UTF8TextConverter new encodeString: aText asString) dataFormat: CF_UTF8TEXT.
^true!
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1399.mcz
==================== Summary ====================
Name: System-eem.1399
Author: eem
Time: 24 March 2023, 10:06:23.813457 am
UUID: 301b87c4-dafb-4ff3-9d14-7468fac48fa7
Ancestors: System-mt.1398
Have the Clipboard defer to ExtendedClipboardInterface current to paste text, and only fall back on the old default behaviour if ExtendedClipboardInterface current>>clipboardText: fails. On Mac and Windows paste both HTML and UTF-8. At time of writing, achieving the same on Unix/X11 depends on the ClipboardExtendedPlugin platform specifics being implemented, see this vm-dev thread: http://lists.squeakfoundation.org/pipermail/vm-dev/2023-March/038866.html
=============== Diff against System-mt.1398 ===============
Item was changed:
----- Method: Clipboard>>clipboardText: (in category 'accessing') -----
clipboardText: text
+ (ExtendedClipboardInterface current clipboardText: text) ifFalse:
+ [self clipboardText: text notifyWith: nil]!
-
- self clipboardText: text notifyWith: nil!
Item was changed:
Object subclass: #ExtendedClipboardInterface
instanceVariableNames: 'clipboard'
+ classVariableNames: 'Current PluginVersion'
- classVariableNames: 'Current WinClipboardTypes'
poolDictionaries: ''
category: 'System-Clipboard'!
ExtendedClipboardInterface class
instanceVariableNames: 'mimeTypeMap clipboardFormatMap'!
+
+ !ExtendedClipboardInterface commentStamp: 'eem 3/24/2023 09:53' prior: 0!
+ An ExtendedClipboardInterface is an interface to the ClipboardExtendedPlugin which provides broader access to the platform's clipboard than the old Clipboard>>#primitiveClipboardText: & Clipboard>>#primitiveClipboardText (primitive 141). ExtendedClipboardInterface is most fully realised on MacOS and Windows. COntributors are encouraged to provide Unix/Linux implementations. When fully implemented an ExtendedClipboardInterface can copy and paste UTF8 text, HTML Text, images in various formats, and filenames.
+
+ Instance Variables
+ clipboard: <Integer>
+
+ clipboard
+ - this is supposed to be a handle on the platform's clipboard, but in practice the plugin primitives don't access it.
+
+ N.B. When exploring the platform's clipboard capabilities, readAvailableRawFormats is very useful for seeing what formats are pasted onto the clipboard by various applications.
+ !
ExtendedClipboardInterface class
instanceVariableNames: 'mimeTypeMap clipboardFormatMap'!
Item was added:
+ ----- Method: ExtendedClipboardInterface class>>pluginName (in category 'private') -----
+ pluginName
+ "Answer the version string of the ClipboardExtendedPlugin plugin, or nil if none."
+ 1 to: SmallInteger maxVal do:
+ [:i|
+ (Smalltalk listLoadedModule: i)
+ ifNil: [^nil]
+ ifNotNil:
+ [:moduleName|
+ (moduleName beginsWith: 'ClipboardExtendedPlugin') ifTrue:
+ [^moduleName]]].
+ "NOTREACHED"!
Item was added:
+ ----- Method: ExtendedClipboardInterface class>>pluginVersion (in category 'private') -----
+ pluginVersion
+ ^PluginVersion ifNil:
+ [PluginVersion := self pluginName
+ ifNil: [0]
+ ifNotNil: [:pluginName| Integer readFrom: (pluginName subsequences: $.) last]]!
Item was changed:
----- Method: ExtendedClipboardInterface class>>startUp: (in category 'system startup') -----
startUp: resuming
"The image is either being newly started (resuming is true), or it's just been snapshotted"
+ resuming ifTrue:
+ [Current := nil.
+ PluginVersion := nil]!
- Current := nil!
Item was added:
+ ----- Method: ExtendedClipboardInterface>>clipboardText: (in category 'general-api-add') -----
+ clipboardText: aText
+ "Attempt to paste aText to the system clipboard in as many formats as makes sense on the platform.
+ Answer if the attempt succeeded. By default answer false. Subclasses override if they're able."
+ ^false!
Item was added:
+ ----- Method: ExtendedClipboardMacInterface>>clipboardText: (in category 'general-api-add') -----
+ clipboardText: aText
+ "Attempt to paste aText to the system clipboard in as many formats as makes sense on the platform.
+ Answer if the attempt succeeded. On the Mac we paste HTML and UTF8. But we can only paste more
+ than one thing at a time with the VMMaker.oscog-eem.3276 version of the plugin, or later."
+ | htmlPayload |
+ (aText isText
+ and: [self class pluginVersion >= 3276]) ifFalse:
+ [^false].
+ htmlPayload := String streamContents:
+ [:stream |
+ stream nextPutAll: '<meta charset="UTF-8">'.
+ aText printHtmlOn: stream].
+ self
+ addClipboardData: htmlPayload dataFormat: 'public.html';
+ addClipboardData: (UTF8TextConverter new encodeString: aText asString) dataFormat: 'public.utf8-plain-text'.
+ ^true!
Item was added:
+ ----- Method: ExtendedClipboardWinInterface>>clipboardText: (in category 'private') -----
+ clipboardText: aText
+ "Attempt to paste aText to the system clipboard in as many formats as makes sense on the platform.
+ Answer if the attempt succeeded. On Windows we paste HTML and UTF8. But we can only paste more
+ than one thing at a time with the VMMaker.oscog-eem.3276 version of the plugin, or later. Note that
+ the funky HTML format (see packageAsHTML:) has been derived by observing Chrome and Edge."
+ | htmlPayload |
+ (aText isText
+ and: [self class pluginVersion >= 3276]) ifFalse:
+ [^false].
+ htmlPayload := self packageAsHTML: aText printHtmlString.
+ self
+ addClipboardData: htmlPayload dataFormat: CF_HTMLTEXT;
+ addClipboardData: (UTF8TextConverter new encodeString: aText asString) dataFormat: CF_UTF8TEXT.
+ ^true!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1398.mcz
==================== Summary ====================
Name: System-mt.1398
Author: mt
Time: 24 March 2023, 1:37:14.001268 pm
UUID: 5c12e54e-f75e-c547-bcbb-704f9f0433d9
Ancestors: System-mt.1397
Make sure to clear the Transcript contents when cleaning up aggressively.
=============== Diff against System-mt.1397 ===============
Item was changed:
----- Method: Project class>>cleanUp: (in category 'class initialization') -----
cleanUp: agressive
"Remove all projects but only when cleaning aggressively"
agressive ifTrue:[
self removeAllButCurrent.
+ self current resourceManager reset.
+ self current resetTranscript].
- self current resourceManager reset].
self cleanUpProjectPreferences.!
Item was added:
+ ----- Method: Project>>resetTranscript (in category 'initialization') -----
+ resetTranscript
+
+ transcript := TranscriptStream new.
+ self isCurrentProject ifTrue: [
+ Smalltalk at: #Transcript put: transcript].!
Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.292.mcz
==================== Summary ====================
Name: ST80-mt.292
Author: mt
Time: 24 March 2023, 1:24:10.732707 pm
UUID: eb3f25f5-6b72-7e49-b789-78be7f567c5e
Ancestors: ST80-mt.291
Complement Kernel-mt.1510
=============== Diff against ST80-mt.291 ===============
Item was removed:
- ----- Method: EventSensor>>characterForKeycode: (in category '*ST80-Support-keyboard') -----
- characterForKeycode: keycode
- "Map the given keycode to a Smalltalk character object. Encoding:
- A keycode is 12 bits: <4 modifer bits><8 bit ISO character>
- Modifier bits are: <command><option><control><shift>"
-
- "NOTE: the command and option keys are specific to the Macintosh and may not have equivalents on other platforms."
-
- keycode = nil ifTrue: [ ^nil ].
- keycode class = Character ifTrue: [ ^keycode ]. "to smooth the transition!!"
- ^ Character value: (keycode bitAnd: 16rFF)!
Item was removed:
- ----- Method: EventSensor>>keyboard (in category '*ST80-Support-keyboard') -----
- keyboard
- "Answer the next (single-byte or multi-byte) character from the keyboard."
-
- | firstCharacter secondCharactor stream multiCharacter converter |
- "1) Consume next character from buffer."
- (firstCharacter := self characterForKeycode: keyboardBuffer next) ifNil: [^ nil].
-
- "2) Peek additional character and try to read multi-byte character."
- (secondCharactor := self characterForKeycode: keyboardBuffer peek) ifNil: [^ firstCharacter].
- (converter := Locale currentPlatform systemConverter) ifNil: [^ firstCharacter].
- stream := ReadStream on: (String with: firstCharacter with: secondCharactor).
- multiCharacter := [converter nextFromStream: stream] ifError: [firstCharacter].
-
- "3) Only consume that additional character if we got a multi-byte character."
- multiCharacter isOctetCharacter ifFalse: [keyboardBuffer next].
-
- "4) Answer either single-byte or multi-byte character."
- ^ multiCharacter
- !
Item was removed:
- ----- Method: EventSensor>>keyboardPressed (in category '*ST80-Support-keyboard') -----
- keyboardPressed
- "Answer true if keystrokes are available."
-
- ^self peekKeyboard notNil!
Item was removed:
- ----- Method: EventSensor>>peekKeyboard (in category '*ST80-Support-keyboard') -----
- peekKeyboard
- "Answer the next character in the keyboard buffer without removing it, or nil if it is empty."
-
- self fetchMoreEvents.
- self eventQueue ifNotNil: [:queue | queue flush].
- ^ self characterForKeycode: keyboardBuffer peek!