[squeak-dev] The Trunk: ST80Tools-mt.7.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 14 12:13:21 UTC 2015


Marcel Taeumel uploaded a new version of ST80Tools to project The Trunk:
http://source.squeak.org/trunk/ST80Tools-mt.7.mcz

==================== Summary ====================

Name: ST80Tools-mt.7
Author: mt
Time: 14 April 2015, 2:13:17.821 pm
UUID: 3d397bba-6398-da44-8a73-6c6c27ea5724
Ancestors: ST80Tools-topa.6

MVC compatibility for FileList button row

=============== Diff against ST80Tools-topa.6 ===============

Item was added:
+ ----- Method: FileList>>optionalButtonViewForMVC (in category '*ST80Tools-initialization') -----
+ optionalButtonViewForMVC
+ 	"Answer a view of optional buttons"
+ 
+ 	| aView bHeight windowWidth offset previousView aButtonView wid services sel allServices |
+ 	aView := View new model: self.
+ 	bHeight := self optionalButtonHeight.
+ 	windowWidth := 120.
+ 	aView window: (0 @ 0 extent: windowWidth @ bHeight).
+ 	offset := 0.
+ 	allServices := self universalButtonServices.
+ 	services := allServices copyFrom: 1 to: (allServices size min: 5).
+ 	previousView := nil.
+ 	services
+ 		do: [:service | sel := service selector.
+ 		aButtonView := sel asString numArgs = 0
+ 			ifTrue: [PluggableButtonView
+ 					on: service provider
+ 					getState: (service extraSelector == #none
+ 							ifFalse: [service extraSelector])
+ 					action: sel]
+ 			ifFalse: [PluggableButtonView
+ 					on: service provider
+ 					getState: (service extraSelector == #none
+ 							ifFalse: [service extraSelector])
+ 					action: sel
+ 					getArguments: #fullName
+ 					from: self].
+ 		service selector = services last selector
+ 			ifTrue: [wid := windowWidth - offset]
+ 			ifFalse: [aButtonView
+ 					borderWidthLeft: 0
+ 					right: 1
+ 					top: 0
+ 					bottom: 0.
+ 				wid := windowWidth // services size - 2].
+ 		aButtonView label: service buttonLabel asParagraph;
+ 			window: (offset @ 0 extent: wid @ bHeight).
+ 		offset := offset + wid.
+ 		service selector = services first selector
+ 			ifTrue: [aView addSubView: aButtonView]
+ 			ifFalse: [aView addSubView: aButtonView toRightOf: previousView].
+ 		previousView := aButtonView].
+ 	^ aView!



More information about the Squeak-dev mailing list