Nicolas Cellier uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-nice.47.mcz==================== Summary ====================
Name: ToolBuilder-Morphic-nice.47
Author: nice
Time: 27 December 2009, 3:37:37 am
UUID: 19208487-3e96-482f-8cf3-523105dd7737
Ancestors: ToolBuilder-Morphic-ar.46
Cosmetic: move or remove a few temps inside closures
=============== Diff against ToolBuilder-Morphic-ar.46 ===============
Item was changed:
----- Method: ChooserTool>>buildWindowWith:specs: (in category 'toolbuilder') -----
buildWindowWith: builder specs: specs
+ | windowSpec |
- | windowSpec rect action widgetSpec |
windowSpec := self buildWindowWith: builder.
specs do:[:assoc|
+ | rect action widgetSpec |
rect := assoc key.
action := assoc value.
widgetSpec := action value.
widgetSpec ifNotNil:[
widgetSpec frame: rect.
windowSpec children add: widgetSpec]].
^windowSpec!
Item was changed:
----- Method: MorphicToolBuilder>>buildPluggablePanel: (in category 'pluggable widgets') -----
buildPluggablePanel: aSpec
+ | widget children |
- | widget children frame |
widget := PluggablePanelMorph new.
self register: widget id: aSpec name.
widget model: aSpec model.
widget color: Color transparent.
widget clipSubmorphs: true.
children := aSpec children.
children isSymbol ifTrue:[
widget getChildrenSelector: children.
widget update: children.
children := #().
].
self buildAll: children in: widget.
self setFrame: aSpec frame in: widget.
parent ifNotNil:[self add: widget to: parent].
self setLayout: aSpec layout in: widget.
widget layoutInset: 0.
widget borderWidth: 0.
+ widget submorphsDo:[:sm| | frame |
- widget submorphsDo:[:sm|
(frame := sm layoutFrame) ifNotNil:[
(frame rightFraction = 0 or:[frame rightFraction = 1])
ifFalse:[frame rightOffset:1].
(frame bottomFraction = 0 or:[frame bottomFraction = 1])
ifFalse:[frame bottomOffset: 1]]].
widget color: Color transparent.
^widget!
Item was changed:
----- Method: PluggableListMorphPlus>>startDrag: (in category 'drag and drop') -----
startDrag: evt
+
- | ddm draggedItem dragIndex |
dragItemSelector ifNil:[^self].
evt hand hasSubmorphs ifTrue: [^ self].
+ [ | dragIndex draggedItem ddm |
+ (self dragEnabled and: [model okToChange]) ifFalse: [^ self].
- [(self dragEnabled and: [model okToChange]) ifFalse: [^ self].
dragIndex := self rowAtLocation: evt position.
dragIndex = 0 ifTrue:[^self].
draggedItem := model perform: dragItemSelector with: dragIndex.
draggedItem ifNil:[^self].
ddm := TransferMorph withPassenger: draggedItem from: self.
ddm dragTransferType: #dragTransferPlus.
evt hand grabMorph: ddm]
ensure: [Cursor normal show.
evt hand releaseMouseFocus: self]!