Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.802.mcz
==================== Summary ====================
Name: Tools-mt.802
Author: mt
Time: 29 March 2018, 9:39:05.973053 am
UUID: 17d05dbc-cfba-5e40-9f1c-5d9c8e01723d
Ancestors: Tools-tcj.801
Pick color for class-comment nagging from UI theme.
=============== Diff against Tools-tcj.801 ===============
Item was changed:
----- Method: Browser>>noCommentNagString (in category 'class comment pane') -----
noCommentNagString
+ ^ Text
+ string: 'THIS CLASS HAS NO COMMENT!!' translated
+ attribute: (TextColor color: (self userInterfaceTheme noClassCommentColor ifNil: [Color red]))!
- ^ Text string: 'THIS CLASS HAS NO COMMENT!!' translated attribute: TextColor red.
- !
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1402.mcz
==================== Summary ====================
Name: Morphic-mt.1402
Author: mt
Time: 28 March 2018, 4:10:37.386604 pm
UUID: 2c70c8c0-1a1c-ca40-a286-6fd3527295d4
Ancestors: Morphic-mt.1401
Ask UI theme for border color modifier in scroll panes.
=============== Diff against Morphic-mt.1401 ===============
Item was changed:
----- Method: ScrollPane>>adoptPaneColor: (in category 'accessing') -----
adoptPaneColor: paneColor
super adoptPaneColor: paneColor.
"May not be in the hierarchy at the moment."
scrollBar adoptPaneColor: paneColor.
hScrollBar adoptPaneColor: paneColor.
+ paneColor ifNotNil: [:pc | self borderColor: ((self userInterfaceTheme borderColorModifier ifNil: [ [:c | c adjustBrightness: -0.3] ]) value: pc)].!
- paneColor ifNotNil: [:c | self borderColor: (c adjustBrightness: -0.3)].!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1164.mcz
==================== Summary ====================
Name: Kernel-eem.1164
Author: eem
Time: 27 March 2018, 11:44:42.020383 am
UUID: 1e50cd13-d194-479f-877a-eac64559142b
Ancestors: Kernel-cbc.1163
The selector of a method should never be found (unless it occurs as a literal or in a pragma) irrespective of thorough search.
=============== Diff against Kernel-cbc.1163 ===============
Item was changed:
----- Method: CompiledCode>>refersTo:bytecodeScanner:thorough: (in category 'literals') -----
refersTo: literal bytecodeScanner: scanBlockOrNil thorough: thorough
"Answer if the receiver refers to the literal. If the scan block is non-nil, then
use it to find the literal in bytecode. If thorough is true, dive down into
literal arrays and method properties to locate references to the literal there-in."
+ 2 to: (self isCompiledBlock
+ ifTrue: [self numLiterals] "exclude outerCode or methodClass"
+ ifFalse: [self numLiterals - 1]) "exclude selector/properties and methodClass"
- 2 to: ((self isCompiledBlock or: [thorough])
- ifTrue: [self numLiterals] "exclude outerCode or methodClass"
- ifFalse: [self numLiterals - 1]) "exclude selector/properties and methodClass"
do: [:i| | lit |
lit := self objectAt: i.
(literal == lit or: [literal literalEqual: lit]) ifTrue: [^true]. "== for Float bindingOf: #NaN since NaN ~= NaN"
lit isCompiledCode
ifTrue:
[(lit refersTo: literal bytecodeScanner: scanBlockOrNil thorough: thorough) ifTrue:
[^true]]
ifFalse:
[thorough ifTrue:
[lit isVariableBinding
ifTrue:
[literal == lit key ifTrue: [^true]]
ifFalse:
[(lit isArray
and: [(lit hasLiteral: literal)
or: [literal isVariableBinding
and: [literal key isSymbol
and: [lit hasLiteral: literal key]]]]) ifTrue:
[^true]]]]].
scanBlockOrNil ifNotNil:
[(self scanFor: scanBlockOrNil) ifTrue:
[^true]].
^false!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1401.mcz
==================== Summary ====================
Name: Morphic-mt.1401
Author: mt
Time: 27 March 2018, 4:50:25.366732 pm
UUID: 7db07362-382c-c94c-b78b-0c4181f5e2e6
Ancestors: Morphic-eem.1400
Fixes two regressions regarding Morphic halo invocation and event handling: 1) do not make halo-invoked morphs come to front, 2) support regular event dispatch while a halo is visible.
Note that I realized that we needed another kind of event dispatch for focused morphs. I called it "all-over dispatch" in addition to "full dispatch". If the full event dispatch around the focused morph was not successful, try regular dispatch to give, for example, sibling morphs a chance. The focused morph, however, will be locked during that attempt to not (unsuccessfully) handle the event again. Now, the global halo morph is an example for the use of this all-over dispatch. Maybe you can think of a better name for it. Let me know.
=============== Diff against Morphic-eem.1400 ===============
Item was added:
+ ----- Method: MorphicEventDispatcher>>dispatchFocusEventAllOver:with: (in category 'focus events') -----
+ dispatchFocusEventAllOver: evt with: focusMorph
+ "Like a full event dispatch BUT adds regular dispatch if the focus morph did nothing with the event. This is useful for letting the focusMorph's siblings handle the events instead. Take halo invocation as an example. See senders of me."
+
+ | result hand mouseFocus |
+ result := self dispatchFocusEventFully: evt with: focusMorph.
+
+ result == #rejected ifTrue: [^ result].
+ result wasIgnored ifTrue: [^ result].
+ result wasHandled ifTrue: [^ result].
+
+ hand := evt hand.
+ mouseFocus := hand mouseFocus.
+
+ [
+ "Avoid re-dispatching the event to the focus morph. See Morph >> #rejectsEvent:."
+ focusMorph lock.
+
+ "Handle side effect for mouse-enter and mouse-leave events."
+ self flag: #hacky. "mt: Maybe we find a better way to synthesize enter/leave events in the future."
+ hand newMouseFocus: nil.
+ hand mouseOverHandler processMouseOver: hand lastEvent.
+
+ "Give the morph's world a chance to normally dispatch the event."
+ ^ focusMorph world processEvent: evt using: self
+ ] ensure: [
+ focusMorph unlock.
+ evt hand newMouseFocus: mouseFocus].!
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."].
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."
-
- "3) Show the container of that nested structure, which is usually my direct submorph."
- target withAllOwnersDo: [:ea | ea owner == self ifTrue: [ea comeToFront]].
-
- "4) 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: SimpleHaloMorph>>processFocusEvent:using: (in category 'events') -----
processFocusEvent: evt using: dispatcher
+ ^ dispatcher dispatchFocusEventAllOver: evt with: self!
- ^ dispatcher dispatchFocusEventFully: evt with: self!