David T. Lewis uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-kfr.374.mcz
==================== Summary ====================
Name: EToys-kfr.374
Author: kfr
Time: 2 January 2020, 7:49:35.08325 pm
UUID: 710cb093-a31e-7f40-96a4-01adcaf3aa3a
Ancestors: EToys-nice.373
Fix spelling of symbol. I guess someone smart could make a nice joke about #shrinkWarp :-)
=============== Diff against EToys-nice.373 ===============
Item was changed:
----- Method: WeekMorph>>title (in category 'all') -----
title
"Answer a title with the names of the days."
| title extent days |
title := AlignmentMorph new
layoutInset: 0;
color: Color red;
listDirection: #leftToRight;
+ vResizing: #shrinkWrap;
- vResizing: #shrinkWarp;
height: tileRect height.
extent := self tile extent.
days := (Week startDay = #Monday)
ifTrue: [ #(2 3 4 5 6 7 1) ]
ifFalse: [ 1 to: 7 ].
(days reverse collect: [:each | Date nameOfDay: each]) do:
[:each |
title addMorph:
((self tileLabeled: (each copyFrom: 1 to: 2))
extent: extent)].
^ title
!
tim Rowledge uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-tpr.1128.mcz
==================== Summary ====================
Name: System-tpr.1128
Author: tpr
Time: 10 January 2020, 12:51:58.425909 pm
UUID: fe1ee0d3-7fe8-468a-91ab-ecbfecdd5cda
Ancestors: System-mt.1127
Remove reference to a deprecated preference; avoids an annyoing and possibly problematic notifier during a theme change
=============== Diff against System-mt.1127 ===============
Item was changed:
----- Method: Preferences class>>outOfTheBox (in category 'themes') -----
outOfTheBox
"The default out-of-the-box preference settings for Squeak 3.2. The 'alternative' window-look and scrollbar-look are used. Button panes are used but not annotation panes. Scrollbars are on the right and do not flop out."
self setPreferencesFrom: self defaultValueTableForCurrentRelease.
+ "SystemNavigation thoroughSenders: true. <- deprecated since all sender searching is now very thorough"
- SystemNavigation thoroughSenders: true.
SystemWindow clickOnLabelToEdit: true.
Text ignoreStyleIfOnlyBold: true.
MenuMorph roundedMenuCorners: true.
ScrollBar scrollBarsWithoutMenuButton: true.
SoundPlayer soundQuickStart: false.
SoundPlayer stopSoundWhenDone: false.
SoundService soundEnabled: true.
SoundRecorder canRecordWhilePlaying:false.!
tim Rowledge uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tpr.1616.mcz
==================== Summary ====================
Name: Morphic-tpr.1616
Author: tpr
Time: 10 January 2020, 12:48:57.601883 pm
UUID: 610759f5-a2a6-4e6b-beac-726336b039c8
Ancestors: Morphic-mt.1615
Simplest practical solution to bouncing progressbar morphs. If there are any active slots we ignore requests to change the 'requestedPosition'.
=============== Diff against Morphic-mt.1615 ===============
Item was changed:
----- Method: SystemProgressMorph>>requestedPosition: (in category 'accessing') -----
requestedPosition: anObject
+ "only change the progress bar position if this is an occasion when the progress bar is opening with a single active bar. After that we don't want to change the position and leap around the screen"
+ activeSlots < 1 ifTrue:[ requestedPosition := anObject]!
-
- requestedPosition := anObject!
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.870.mcz
==================== Summary ====================
Name: Collections-nice.870
Author: nice
Time: 6 January 2020, 5:12:04.309788 pm
UUID: 1dd850f8-5ca9-4444-833f-fd10805c0e43
Ancestors: Collections-fn.869
Fix sendersOfIt for searching senders of an expression including a literal (byte) array
If you select following text
preference: 'Send Mouse Wheel Events to Keyboard Focus'
categoryList: #(Morphic keyboard mouse)
description: 'If enabled, follow the behavior known from Microsoft Windows, where the mouse wheel works for the widget that has the keyboard focus. If disabled, follow the Mac OS style, where the mouse wheel is send to the widget under the mouse position'
type: #Boolean
and browse senders, then if search for senders of #preference: instead of the whole keyword
This is because '#(Morphic keyboard mouse)' was replaced with '#aSymbol keyboard mouse)'
Also handle the nasty character literals like $: or those that create imbalanced enclosing $( $[ ${
=============== Diff against Collections-fn.869 ===============
Item was changed:
----- Method: String>>findSelector (in category 'converting') -----
findSelector
"Dan's code for hunting down selectors with keyword parts; while this doesn't give a true parse, in most cases it does what we want, in where it doesn't, we're none the worse for it."
| sel possibleParens |
sel := self withBlanksTrimmed.
(sel includes: $:)
ifTrue:
[sel := sel copyWithRegex: '''[^'']*''' matchesReplacedWith: '''a string'''.
+ sel := sel copyWithRegex: '#[^\[\(\s\.$]*' matchesReplacedWith: '#aSymbol'.
+ sel := sel copyWithRegex: '\$.' matchesReplacedWith: '$x'. "handle $( $[ and $:"
- sel := sel copyWithRegex: '#[^\s\.$]*' matchesReplacedWith: '#aSymbol'.
sel := sel copyReplaceAll: ':' with: ': '. "for the style (aa max:bb) with no space"
sel := sel copyReplaceAll: '[:' with: '[ :'. "for the style ([:a) with no space"
possibleParens := sel substrings.
sel := self class streamContents:
[:s | | level |
level := 0.
possibleParens do:
[:token |
(level = 0 and: [token endsWith: ':'])
ifTrue: [s nextPutAll: token]
ifFalse: [level := level
+ (token occurrencesOf: $() - (token occurrencesOf: $))
+ (token occurrencesOf: $[) - (token occurrencesOf: $])
+ (token occurrencesOf: ${) - (token occurrencesOf: $})]]]]
ifFalse:
[sel := self substrings ifNotEmpty: [:tokens | tokens last]].
sel ifEmpty: [^ nil].
sel first = $# ifTrue:
[sel := sel allButFirst.
sel ifEmpty: [^ nil]].
sel isOctetString ifTrue: [sel := sel asOctetString].
^ Symbol lookup: sel!
Nicolas Cellier uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-nice.375.mcz
==================== Summary ====================
Name: EToys-nice.375
Author: nice
Time: 29 December 2019, 10:54:09.519527 am
UUID: 8b148b65-ad89-4ce1-8059-c051f7227b7e
Ancestors: EToys-nice.374
Forgot to commit Etoys along with removal of keyValueIndex in Multilingual-nice.250
=============== Diff against EToys-nice.374 ===============
Item was removed:
- ----- Method: MacUnicodeInputInterpreter>>keyValueIndex (in category '*Etoys-Squeakland-accessing') -----
- keyValueIndex
- ^ keyValueIndex!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1292.mcz
==================== Summary ====================
Name: Kernel-nice.1292
Author: nice
Time: 28 December 2019, 10:15:37.810563 pm
UUID: 8cce1ea4-5e21-46f5-858f-0732cf2e33d5
Ancestors: Kernel-nice.1291
Assuming that patched VM will produce ASCII control characters (code 1 to 26) again when pressing ctrl+letter, revert some of the recent keyboard event mapping changes (See https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/460).
Those recent changes have unexpected consequences and implications that we might better postpone post release. We should never have to say that, but it's easier to fix the VM than the image in this case ;)
One example of consequences is that cmd+7 is captured by DockingBarMorph as menu #7 rather than passed to theTextEditor if Preferences duplicateAllControlAndAltKeys.
I guess that we have this preference enabled to make windows user experience not to werid wrt native feel (ctrl+key is the shortcut of choice)...
=============== Diff against Kernel-nice.1291 ===============
Item was removed:
- ----- Method: EventSensor class>>installControlKeyEntryFor: (in category 'key decode table') -----
- installControlKeyEntryFor: aPrintableCharacter
-
- | upper lower |
- self assert: (aPrintableCharacter asInteger between: 64 and: 95).
-
- upper := aPrintableCharacter asInteger.
- lower := aPrintableCharacter asInteger bitOr: 16r20.
-
- "For Unix/Linux VMs as of version 201911282316, no control characters will be sent from the VM. Avoid check for #platformName because the extra mapping will not affect others anyway."
- self flag: #unixOnly.
- KeyDecodeTable at: { lower . 2 "ctrl" } put: { lower bitAnd: 16r9F . 2 "ctrl" }.
- KeyDecodeTable at: { upper . 2 bitOr: 1 "ctrl+shift" } put: { upper bitAnd: 16r9F . 2 bitOr: 1 "ctrl+shift" }.!
Item was changed:
----- Method: EventSensor class>>installDuplicateKeyEntryFor: (in category 'key decode table') -----
installDuplicateKeyEntryFor: aPrintableCharacter
+ "Updates the key-decode table, which maps between pairs of {character code . modifier code}.
+ See the class comment for more information.
+ The purpose of this change is to let ctrl+key act like cmd+key (Mac) or alt+key (linux/windows).
+ It is especially usefull on windows VM where default feel is to use ctrl as shortcut (ctrl+C = copy, etc...).
+ Note that the bitmask 16r9F removes the high bits, which subtracts 64 from the key code for (upper) $A to $Z and 96 for (lower) $a to $z. The VM sends non-printable control characters for [ctrl]+[A-Za-Z] in ASCII < 32, but the given character is expected to be ASCII >= 32 and thus printable. So we have to convert control characters to printable characters in this mapping table."
- "Updates the key-decode table, which maps between pairs of {character code . modifier code}. See the class comment for more information.
- Note that the bitmask 16r9F removes the high bits, which subtracts 64 from the key code for (upper) $A to $Z and 96 for (lower) $a to $z. The VM sends non-printable control characters for [ctrl]+[A-Za-Z] in ASCII < 32, but the given character is expected to be ASCII >= 32 and thus printable. So we have to convert printable characters to control characters in this mapping table."
| upper lower |
upper := aPrintableCharacter asUppercase asInteger.
lower := aPrintableCharacter asLowercase asInteger.
+ KeyDecodeTable at: { lower bitAnd: 16r9F . 2 "ctrl" } put: { lower . 8 "cmd/alt" }.
+ KeyDecodeTable at: { upper bitAnd: 16r9F . 2 bitOr: 1 "ctrl + shift" } put: { upper . 8 bitOr: 1 "cmd/alt + shift" }.!
- KeyDecodeTable at: { lower bitAnd: 16r9F . 2 "ctrl" } put: { lower . 2 bitOr: 8 "ctrl + cmd/alt" }.
- KeyDecodeTable at: { upper bitAnd: 16r9F . 2 bitOr: 1 "ctrl + shift" } put: { upper . (2 bitOr: 8) bitOr: 1 "ctrl + cmd/alt + shift" }.
- KeyDecodeTable at: { lower . 8 "cmd/alt" } put: { lower . 8 bitOr: 2 "cmd/alt + ctrl" }.
- KeyDecodeTable at: { upper . 8 bitOr: 1 "cmd/alt + shift" } put: { upper . (8 bitOr: 2) bitOr: 1 "cmd/alt + ctrl + shift" }.
-
- "For Unix/Linux VMs as of version 201911282316, no control characters will be sent from the VM. Avoid check for #platformName because the extra mapping will not affect others anyway."
- self flag: #unixOnly.
- KeyDecodeTable at: { lower . 2 "ctrl" } put: { lower . 2 bitOr: 8 "ctrl + cmd/alt" }.
- KeyDecodeTable at: { upper . 2 bitOr: 1 "ctrl + shift" } put: { upper . (2 bitOr: 8) bitOr: 1 "ctrl + cmd/alt + shift" }.!
Item was changed:
----- Method: EventSensor class>>installKeyDecodeTable (in category 'class initialization') -----
installKeyDecodeTable
"Create a decode table that swaps or duplicates some keys if the respective preference is set."
KeyDecodeTable := Dictionary new.
- "In any case, ensure that control keys are mapped correctly."
- self flag: #toRemove. "mt: If all VMs send the correct control keys on all platforms, we will remove this mapping."
- 64 "$@" to: 95 "$_"do: [:keyCode | self installControlKeyEntryFor: keyCode asCharacter].
-
Preferences swapControlAndAltKeys
ifTrue: [ (Character allByteCharacters select: [:ea | ea isAlphaNumeric]) do:
[ :c | self installSwappedKeyEntryFor: c ] ].
Preferences duplicateAllControlAndAltKeys
ifTrue: [ (Character allByteCharacters select: [:ea | ea isAlphaNumeric]) do:
[ :c | self installDuplicateKeyEntryFor: c ] ].
self flag: #toDeprecate. "mt: This mapping should be deprecated in the future."
Preferences duplicateControlAndAltKeys
ifTrue: [ self defaultCrossPlatformKeys do:
[ :c | self installDuplicateKeyEntryFor: c ] ].
!
Item was changed:
----- Method: EventSensor class>>installSwappedKeyEntryFor: (in category 'key decode table') -----
installSwappedKeyEntryFor: aPrintableCharacter
"Updates the key-decode table, which maps between pairs of {character code . modifier code}. See the class comment for more information.
Note that the bitmask 16r9F removes the high bits, which subtracts 64 from the key code for (upper) $A to $Z and 96 for (lower) $a to $z. The VM sends non-printable control characters for [ctrl]+[A-Za-Z] in ASCII < 32, but the given character is expected to be ASCII >= 32 and thus printable. So we have to convert printable characters to control characters in this mapping table."
| upper lower |
upper := aPrintableCharacter asUppercase asInteger.
lower := aPrintableCharacter asLowercase asInteger.
KeyDecodeTable at: { lower bitAnd: 16r9F . 2 "ctrl" } put: { lower . 8 "cmd/alt" }.
KeyDecodeTable at: { lower . 8 "cmd/alt" } put: { lower bitAnd: 16r9F . 2 "ctrl" }.
KeyDecodeTable at: { upper bitAnd: 16r9F . 2 bitOr: 1 "ctrl+shift" } put: { upper . 8 bitOr: 1 "cmd/alt+shift" }.
+ KeyDecodeTable at: { upper . 8 bitOr: 1 "cmd/alt+shift" } put: { upper bitAnd: 16r9F . 2 bitOr: 1 "ctrl+shift" }.!
- KeyDecodeTable at: { upper . 8 bitOr: 1 "cmd/alt+shift" } put: { upper bitAnd: 16r9F . 2 bitOr: 1 "ctrl+shift" }.
-
- "For Unix/Linux VMs as of version 201911282316, no control characters will be sent from the VM. Avoid check for #platformName because the extra mapping will not affect others anyway."
- self flag: #unixOnly.
- KeyDecodeTable at: { lower . 2 "ctrl" } put: { lower . 8 "cmd/alt" }.
- KeyDecodeTable at: { upper . 2 bitOr: 1 "ctrl+shift" } put: { upper . 8 bitOr: 1 "cmd/alt+shift" }.!