Marcel Taeumel uploaded a new version of ST80Tools to project The Trunk:
http://source.squeak.org/trunk/ST80Tools-mt.12.mcz ==================== Summary ==================== Name: ST80Tools-mt.12 Author: mt Time: 5 March 2020, 9:05:58.968327 am UUID: 05db32d3-3285-2d4a-bb84-a2c466af4e01 Ancestors: ST80Tools-mt.11 Removes more deprecated message sends. =============== Diff against ST80Tools-mt.11 =============== Item was changed: ----- Method: FileList class>>openInMVC (in category '*ST80Tools-instance creation') ----- openInMVC "Open a view of an instance of me on the default directory." | dir aFileList topView volListView templateView fileListView fileContentsView underPane pHeight | dir := FileDirectory default. aFileList := self new directory: dir. topView := StandardSystemView new. topView model: aFileList; label: dir pathName; minimumSize: 200@200. topView borderWidth: 1. volListView := PluggableListView on: aFileList list: #volumeList selected: #volumeListIndex changeSelected: #volumeListIndex: menu: #volumeMenu:. volListView autoDeselect: false. volListView window: (0@0 extent: 80@45). topView addSubView: volListView. templateView := PluggableTextView on: aFileList text: #pattern accept: #pattern:. templateView askBeforeDiscardingEdits: false. templateView window: (0@0 extent: 80@15). topView addSubView: templateView below: volListView. aFileList wantsOptionalButtons ifTrue: [underPane := aFileList optionalButtonViewForMVC. underPane isNil ifTrue: [pHeight := 60] ifFalse: [ topView addSubView: underPane toRightOf: volListView. + pHeight := 60 - 10 "optionalButtonHeight"]] - pHeight := 60 - aFileList optionalButtonHeight]] ifFalse: [underPane := nil. pHeight := 60]. fileListView := PluggableListView on: aFileList list: #fileList selected: #fileListIndex changeSelected: #fileListIndex: menu: #fileListMenu:. fileListView window: (0@0 extent: 120@pHeight). underPane isNil ifTrue: [topView addSubView: fileListView toRightOf: volListView] ifFalse: [topView addSubView: fileListView below: underPane]. fileListView controller terminateDuringSelect: true. "Pane to left may change under scrollbar" fileContentsView := PluggableTextView on: aFileList text: #contents accept: #put: readSelection: #contentsSelection menu: #fileContentsMenu:shifted:. fileContentsView window: (0@0 extent: 200@140). topView addSubView: fileContentsView below: templateView. topView controller open! Item was changed: ----- 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 := 10. "optionalButtonHeight". - 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! |
Free forum by Nabble | Edit this page |