Levente Uzonyi uploaded a new version of WebClient-Core to project The Trunk:
http://source.squeak.org/trunk/WebClient-Core-ul.115.mcz
==================== Summary ====================
Name: WebClient-Core-ul.115
Author: ul
Time: 19 May 2018, 11:24:01.219213 am
UUID: 64708317-dee5-446d-8a1f-f71335246095
Ancestors: WebClient-Core-topa.114
Decrease the priority of connection handler processes from 60 to 30, to avoid potential image lockups.
=============== Diff against WebClient-Core-topa.114 ===============
Item was changed:
----- Method: WebServer>>asyncHandleConnectionFrom: (in category 'handling') -----
asyncHandleConnectionFrom: aSocket
"Handle an incoming connection asynchronously to avoid blocking the listener."
| handlerProcess |
handlerProcess := [
[ [ self handleConnectionFrom: aSocket ]
on: Error do: [ :ex | aSocket destroy ] ]
ensure: [
aSocket destroy.
mutex critical: [
+ "At this point handlerProcess is initialized, so it is safe to use that variable. Using Processor activeProcess is not possible, because this unwind block may be evaluated by another process. Doing this outside the #ensure: block is not safe."
+ connections remove: handlerProcess ifAbsent: nil ] ] ] newProcess.
- "If we get here, then handlerProcess is initialized, so it's safe to use that variable. Using Processor activeProcess is not possible, because this block may be evaluated by another process. Doing this outside the #ensure: block is not safe."
- connections remove: handlerProcess ifAbsent: [ ] ] ] ] newProcess.
mutex critical:[connections add: handlerProcess].
+ "Process priority has to be set to a lower level here, else it'll have lowIOPriority (60), and will block many important processes (UI, WeakArrayFinalization, etc.)"
+ handlerProcess
+ priority: Processor userBackgroundPriority;
+ resume!
-
- handlerProcess resume.
- !
Levente Uzonyi uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ul.225.mcz
==================== Summary ====================
Name: Network-ul.225
Author: ul
Time: 18 May 2018, 12:52:04.236589 pm
UUID: 296fc64b-8ae0-44f7-8ff8-e7ab979be83e
Ancestors: Network-eem.224
Fixed MailAddressTokenizer class >> #nonAtomSet.
It returned 0 instead of a CharacterSet on first invocation.
It initialized CSNonAtom to a Set instead of a CharacterSet.
Added more comments too.
=============== Diff against Network-eem.224 ===============
Item was changed:
----- Method: MailAddressTokenizer class>>nonAtomSet (in category 'class initialization') -----
nonAtomSet
+ "Create a ByteCharacterSet to ensure quick parsing of the email address string, which must be a ByteString (UTF-8 encoded)"
- "(from RFC 6531)"
+ ^CSNonAtom ifNil: [
+ CSNonAtom := CharacterSet new
+ "Atom characters as defined in RFC 2822 3.2.4"
- ^CSNonAtom ifNil: [ | notAtoms |
- notAtoms := CharacterSet new
addAll: ($A to: $Z);
addAll: ($a to: $z);
addAll: ($0 to: $9);
addAll: '!!#$%&''*+-/=?^_`{|}~';
+ "RFC 6531 allows characters with value > 127 encoded as UTF-8, which means values between 128 and 255 may appear as part of atoms."
+ addAll: ((Character value: 128) to: (Character value: 255));
+ byteComplement ]!
- complement.
- CSNonAtom := Set new.
- 0 to: 127 do: [:v | | c |
- c := Character value: v.
- (notAtoms includes: c) ifTrue: [CSNonAtom add: c]]]!
Item was changed:
+ (PackageInfo named: 'Network') postscript: '"Rebuild CSNonAtom."
- (PackageInfo named: 'Network') postscript: '"below, add code to be run after the loading of this package"
MailAddressTokenizer cleanUp: false'!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1434.mcz
==================== Summary ====================
Name: Morphic-mt.1434
Author: mt
Time: 18 May 2018, 8:59:28.078917 am
UUID: 194e4181-5646-bb4c-b7cf-dcc237a99517
Ancestors: Morphic-kfr.1433
Further reduce the usage of #cmdGesturesEnabled. Adds two more specific preferences #haloForAll and #metaMenuForAll.
Why? Both dev tools, namely halo and meta menu, might interfere with some applications. So the user (or programmer) might want to disable, for example, the meta menu to free another user gesture. At the moment, the halo is invoked via BLUE click and the meta menu via CTRL+ANY click.
=============== Diff against Morphic-kfr.1433 ===============
Item was changed:
Object subclass: #Morph
instanceVariableNames: 'bounds owner submorphs fullBounds color extension'
+ classVariableNames: 'HaloForAll IndicateKeyboardFocus MetaMenuForAll PreferredCornerRadius UseSoftDropShadow'
- classVariableNames: 'IndicateKeyboardFocus PreferredCornerRadius UseSoftDropShadow'
poolDictionaries: ''
category: 'Morphic-Kernel'!
!Morph commentStamp: 'klc 3/14/2017 11:30' prior: 0!
A Morph (from the Greek "shape" or "form") is an interactive graphical object. General information on the Morphic system can be found at http://wiki.squeak.org/squeak/30.
Morphs exist in a tree, rooted at a World (generally a PasteUpMorph). The morphs owned by a morph are its submorphs. Morphs are drawn recursively; if a Morph has no owner it never gets drawn. To hide a Morph and its submorphs, set its #visible property to false using the #visible: method.
The World (screen) coordinate system is used for most coordinates, but can be changed if there is a TransformMorph somewhere in the owner chain.
My instance variables have accessor methods (e.g., #bounds, #bounds:). Most users should use the accessor methods instead of using the instance variables directly.
Structure:
instance var Type Description
bounds Rectangle A Rectangle indicating my position and a size that will enclose me.
owner Morph My parent Morph, or nil for the top-level Morph, which is a
or nil world, typically a PasteUpMorph.
submorphs Array My child Morphs.
fullBounds Rectangle A Rectangle minimally enclosing me and my submorphs.
color Color My primary color. Subclasses can use this in different ways.
extension MorphExtension Allows extra properties to be stored without adding a
or nil storage burden to all morphs.
By default, Morphs do not position their submorphs. Morphs may position their submorphs directly or use a LayoutPolicy to automatically control their submorph positioning.
Although Morph has some support for BorderStyle, most users should use BorderedMorph if they want borders.!
Item was added:
+ ----- Method: Morph class>>haloForAll (in category 'preferences') -----
+ haloForAll
+
+ <preference: 'Offer Halo for All Morphs'
+ categoryList: #(Morphic)
+ description: 'If enabled, there will be a halo provided for any morph after a certain input gesture is detected, which is usually a BLUE (middle) mouse click.'
+ type: #Boolean>
+ ^ HaloForAll ifNil: [true]!
Item was added:
+ ----- Method: Morph class>>haloForAll: (in category 'preferences') -----
+ haloForAll: aBoolean
+
+ HaloForAll := aBoolean.!
Item was added:
+ ----- Method: Morph class>>metaMenuForAll (in category 'preferences') -----
+ metaMenuForAll
+
+ <preference: 'Offer Meta Menu for All Morphs'
+ categoryList: #(Morphic)
+ description: 'If enabled, there will be a meta menu provided for any morph after a certain input gesture is detected, which is usually a CTRL+Any mouse click.'
+ type: #Boolean>
+ ^ MetaMenuForAll ifNil: [true]!
Item was added:
+ ----- Method: Morph class>>metaMenuForAll: (in category 'preferences') -----
+ metaMenuForAll: aBoolean
+
+ MetaMenuForAll := aBoolean.!
Item was changed:
----- Method: Morph>>addYellowButtonMenuItemsTo:event: (in category 'menu') -----
addYellowButtonMenuItemsTo: aMenu event: evt
"Populate aMenu with appropriate menu items for a
yellow-button (context menu) click."
aMenu defaultTarget: self.
""
Preferences noviceMode
ifFalse: [aMenu addStayUpItem].
""
self addModelYellowButtonItemsTo: aMenu event: evt.
""
Preferences generalizedYellowButtonMenu
ifFalse: [^ self].
""
+ aMenu addLine.
+ aMenu add: 'inspect' translated action: #inspect.
- Preferences cmdGesturesEnabled
- ifTrue: [""
- aMenu addLine.
- aMenu add: 'inspect' translated action: #inspect].
""
aMenu addLine.
self world selectedObject == self
ifTrue: [aMenu add: 'deselect' translated action: #removeHalo]
ifFalse: [aMenu add: 'select' translated action: #addHalo].
""
(self isWorldMorph
or: [self mustBeBackmost
or: [self wantsToBeTopmost]])
ifFalse: [""
aMenu addLine.
aMenu add: 'send to back' translated action: #goBehind.
aMenu add: 'bring to front' translated action: #comeToFront.
self addEmbeddingMenuItemsTo: aMenu hand: evt hand].
""
self isWorldMorph
ifFalse: [""
Smalltalk
at: #NCAAConnectorMorph
ifPresent: [:connectorClass |
aMenu addLine.
aMenu add: 'connect to' translated action: #startWiring.
aMenu addLine].
""
self isFullOnScreen
ifFalse: [aMenu add: 'move onscreen' translated action: #goHome]].
""
Preferences noviceMode
ifFalse: [""
self addLayoutMenuItems: aMenu hand: evt hand.
(owner notNil
and: [owner isTextMorph])
ifTrue: [self addTextAnchorMenuItems: aMenu hand: evt hand]].
""
self isWorldMorph
ifFalse: [""
aMenu addLine.
self addToggleItemsToHaloMenu: aMenu].
""
aMenu addLine.
self isWorldMorph
ifFalse: [aMenu add: 'copy to paste buffer' translated action: #copyToPasteBuffer:].
(self allStringsAfter: nil) isEmpty
ifFalse: [aMenu add: 'copy text' translated action: #clipText].
""
self addExportMenuItems: aMenu hand: evt hand.
""
(Preferences noviceMode not
and: [self isWorldMorph not])
ifTrue: [""
aMenu addLine.
aMenu add: 'adhere to edge...' translated action: #adhereToEdge].
""
self addCustomMenuItems: aMenu hand: evt hand!
Item was changed:
----- Method: PasteUpMorph>>tryInvokeHalo: (in category 'events-processing') -----
tryInvokeHalo: anEvent
| innerMost target |
anEvent hand halo ifNotNil: [^ self "No invocation needed. Halo will handle transfer itself."].
Preferences noviceMode ifTrue: [^ self "No halo in novice mode."].
+ Morph haloForAll ifFalse: [^ self].
- Preferences cmdGesturesEnabled ifFalse: [^ self].
innerMost := (self morphsAt: anEvent position unlocked: true) first.
"1) Try to use innermost morph but skip all the ones that do not want to show a halo along the owner chain."
target := innerMost.
[target isNil or: [target wantsHaloFromClick]]
whileFalse: [target := target owner].
target ifNil: [^ self].
"2) Without a modifier, which is normal, find the outermost container for that inner morph."
(innerMost == self or: [anEvent shiftPressed]) ifFalse: [
| previousTargets |
previousTargets := OrderedCollection new.
[target notNil and: [target owner ~~ self]] whileTrue: [
previousTargets add: target.
target := target owner].
target ifNil: [^ self].
[previousTargets isEmpty or: [target wantsHaloFromClick]] whileFalse: [
target := previousTargets removeLast].
target wantsHaloFromClick ifFalse: [^ self]].
"3) Now that we have the target, show the halo. Abort event dispatching, too, to avoid confusion."
anEvent hand newMouseFocus: target event: anEvent.
target invokeHaloOrMove: anEvent.
anEvent ignore.!
Item was changed:
----- Method: PasteUpMorph>>tryInvokeMetaMenu: (in category 'events-processing') -----
tryInvokeMetaMenu: anEvent
| innerMost target |
+ Morph metaMenuForAll ifFalse: [^ self].
- Preferences cmdGesturesEnabled ifFalse: [^ self].
Preferences eToyFriendly ifTrue: [^ self].
innerMost := (self morphsAt: anEvent position unlocked: true) first.
"Traverse the owner chain if some morph does not want to show its meta menu."
target := innerMost.
[target isNil or: [target wantsMetaMenu]] whileFalse: [target := target owner].
target ifNil: [^ self].
target invokeMetaMenu: anEvent.
anEvent ignore.!
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1169.mcz
==================== Summary ====================
Name: Kernel-mt.1169
Author: mt
Time: 18 May 2018, 8:55:01.039917 am
UUID: e5e24186-05f2-2849-adb0-b2b2572b0f79
Ancestors: Kernel-nice.1168
Reduces the use of #cmdGesturesEnabled, which is also quite Morphic-specific. In preparation of two new preferences #haloForAll and #metaMenuForAll.
=============== Diff against Kernel-nice.1168 ===============
Item was changed:
----- Method: Object>>addModelYellowButtonMenuItemsTo:forMorph:hand: (in category 'graph model') -----
addModelYellowButtonMenuItemsTo: aCustomMenu forMorph: aMorph hand: aHandMorph
"The receiver serves as the model for aMorph; a menu is being constructed for the morph, and here the receiver is able to add its own items"
+
+ aCustomMenu add: 'inspect model' translated target: self action: #inspect.
- Preferences cmdGesturesEnabled ifTrue: [ "build mode"
- aCustomMenu add: 'inspect model' translated target: self action: #inspect.
- ].
-
^aCustomMenu
!
Item was changed:
----- Method: Object>>hasModelYellowButtonMenuItems (in category 'graph model') -----
hasModelYellowButtonMenuItems
+ ^ true!
- ^Preferences cmdGesturesEnabled!
Karl Ramberg uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-kfr.50.mcz
==================== Summary ====================
Name: TrueType-kfr.50
Author: kfr
Time: 17 May 2018, 10:50:06.492357 am
UUID: a7702294-4ae6-c54e-b0c5-fbad5da801b6
Ancestors: TrueType-ul.49
Flush old cache on loading
=============== Diff against TrueType-ul.49 ===============
Item was changed:
----- Method: TTCFont>>convertToCurrentVersion:refStream: (in category 'objects from disk') -----
convertToCurrentVersion: varDict refStream: smartRefStrm
"If we're reading in an old version with a pixelSize instance variable, convert it to a point size."
"Deal with the change from pixelSize to pointSize, assuming the current monitor dpi."
varDict at: 'pixelSize' ifPresent: [ :x |
pointSize := (TextStyle pixelsToPoints: x) rounded.
].
+ self releaseCachedState.
^super convertToCurrentVersion: varDict refStream: smartRefStrm.!