'From Squeak3.3alpha of 28 January 2002 [latest update: #4851] on 1 May 2002 at 7:58:39 pm'! "Change Set: collabTweaks Date: 1 May 2002 Author: Bob Arning requests from the kids via Michael Rueger: - when things arrive in the communication panel (ears thingy), the choice between grab and delte is rather confusing and not really needed. Just grabbing and thereby removing it from the panel would be the more intuitive choice (confirmed by the kids). - chat the replies text morph has a redraw problem. The incoming text is only fully shown after the cursor is moved into that view from Kim: - a new on/off icon for the EToyListenerMorph === EToyListenerMorph addToGlobalIncomingQueue: { ((Form extent: 32@32 depth: 16) fillColor: Color red). RectangleMorph new. 'bob'. '1.2.3.4' }. === "! !EToyListenerMorph methodsFor: 'as yet unclassified' stamp: 'RAA 5/1/2002 17:57'! addNewObject: newObject thumbForm: aForm sentBy: senderName ipAddress: ipAddressString | thumb row | thumb _ aForm asMorph. thumb setProperty: #depictedObject toValue: newObject. row _ self addARow: { thumb. self inAColumn: { StringMorph new contents: senderName; lock. StringMorph new contents: ipAddressString; lock. } }. true ifTrue: [ "simpler protocol" row on: #mouseUp send: #mouseUpEvent:for: to: self. ] ifFalse: [ row on: #mouseDown send: #mouseDownEvent:for: to: self. ]. ! ! !EToyListenerMorph methodsFor: 'as yet unclassified' stamp: 'RAA 5/1/2002 17:58'! mouseUpEvent: event for: aMorph | depictedObject | depictedObject _ aMorph firstSubmorph valueOfProperty: #depictedObject. event hand attachMorph: depictedObject. self class removeFromGlobalIncomingQueue: depictedObject. self rebuild. ! ! !EToyListenerMorph methodsFor: 'as yet unclassified' stamp: 'RAA 5/1/2002 19:28'! rebuild | earMorph | updateCounter _ UpdateCounter. self removeAllMorphs. self addGateKeeperMorphs. GlobalListener ifNil: [ earMorph _ (self class makeListeningToggleNew: false) asMorph. earMorph setBalloonText: 'Click to START listening for messages'. earMorph on: #mouseUp send: #startListening to: self. ] ifNotNil: [ earMorph _ (self class makeListeningToggleNew: true) asMorph. earMorph setBalloonText: 'Click to STOP listening for messages'. earMorph on: #mouseUp send: #stopListening to: self. ]. self addARow: {self inAColumn: {earMorph}}. self addARow: { self inAColumn: {(StringMorph contents: 'Incoming communications') lock}. self indicatorFieldNamed: #working color: Color blue help: 'working'. self indicatorFieldNamed: #communicating color: Color green help: 'receiving'. }. "{thumbForm. newObject. senderName. ipAddressString}" self class globalIncomingQueueCopy do: [ :each | self addNewObject: each second thumbForm: each first sentBy: each third ipAddress: each fourth. ].! ! !EToyListenerMorph class methodsFor: 'as yet unclassified' stamp: 'RAA 5/1/2002 19:29'! makeListeningToggleNew: activeMode | background c baseExtent bgExtent botCent factor len endPts base | factor _ 2. bgExtent _ (50@25) * factor. baseExtent _ (15@15) * factor. background _ Form extent: bgExtent depth: 8. botCent _ background boundingBox bottomCenter. c _ background getCanvas. "c fillColor: Color white." base _ (botCent - (baseExtent // 2)) extent: baseExtent. c fillOval: base color: Color black borderWidth: 0 borderColor: Color black. activeMode ifTrue: [ len _ background boundingBox height - 15. endPts _ {botCent - (len@len). botCent - (len negated@len)}. endPts do: [ :each | c line: botCent to: each width: 2 color: Color black. ]. endPts do: [ :each | #(4 8 12) do: [ :offset | c frameOval: (each - offset corner: each + offset) color: Color red ]. ]. ]. "background asMorph openInWorld." ^background ! ! !PluggableTextMorph methodsFor: 'transcript' stamp: 'RAA 5/1/2002 18:17'! appendTextEtoy: moreText "Append the text in the model's writeStream to the editable text. " self handleEdit: [ self selectInvisiblyFrom: textMorph asText size + 1 to: textMorph asText size; replaceSelectionWith: moreText; selectFrom: textMorph asText size + 1 to: textMorph asText size; hasUnacceptedEdits: false; scrollSelectionIntoView; changed ]! !