[squeak-dev] The Trunk: Tools-nice.180.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Feb 11 13:40:36 UTC 2010


Nicolas Cellier uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-nice.180.mcz

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

Name: Tools-nice.180
Author: nice
Time: 11 February 2010, 2:40:23.152 pm
UUID: 4ee5ec0d-e52e-e94b-bf4b-139fb9acf2df
Ancestors: Tools-dtl.179

remove now useless fixTemps

=============== Diff against Tools-dtl.179 ===============

Item was changed:
  ----- Method: FileList2>>initialize (in category 'initialize-release') -----
  initialize
  
  	showDirsInFileList := false.
  	fileSelectionBlock := [ :entry :myPattern |
  		entry isDirectory ifTrue: [
  			showDirsInFileList
  		] ifFalse: [
  			myPattern = '*' or: [myPattern match: entry name]
  		]
+ 	].
- 	] fixTemps.
  	dirSelectionBlock := [ :dirName | true].!

Item was changed:
  ----- Method: FileList2 class>>morphicViewGeneralLoaderInWorld: (in category 'blue ui') -----
  morphicViewGeneralLoaderInWorld: aWorld
  "
  FileList2 morphicViewGeneralLoaderInWorld: self currentWorld
  "
  	| window aFileList buttons treePane textColor1 fileListPane pane2a pane2b fileTypeInfo fileTypeButtons fileTypeRow actionRow |
  
  	fileTypeInfo := self endingSpecs.
  	window := AlignmentMorphBob1 newColumn.
  	window hResizing: #shrinkWrap; vResizing: #shrinkWrap.
  	textColor1 := Color r: 0.742 g: 0.839 b: 1.0.
  	aFileList := self new directory: FileDirectory default.
  	aFileList 
  		fileSelectionBlock: self projectOnlySelectionBlock;
  		modalView: window.
  	window
  		setProperty: #FileList toValue: aFileList;
  		wrapCentering: #center; cellPositioning: #topCenter;
  		borderWidth: ColorTheme current dialogBorderWidth;
  		borderColor: ColorTheme current dialogBorderColor;
  		useRoundedCorners.
  
  	fileTypeButtons := fileTypeInfo collect: [ :each |
  		(self blueButtonText: each first textColor: Color gray inWindow: window)
  			setProperty: #enabled toValue: true;
  			hResizing: #shrinkWrap;
  			useSquareCorners
  	].
  	buttons := {{'OK'. ColorTheme current okColor}. {'Cancel'. ColorTheme current cancelColor}} collect: [ :each |
  		self blueButtonText: each first textColor: textColor1 color: each second inWindow: window
  	].
  
  	treePane := aFileList morphicDirectoryTreePane 
  		extent: 250 at 300; 
  		retractable: false;
  		borderWidth: 0.
  	fileListPane := aFileList morphicFileListPane 
  		extent: 350 at 300; 
  		retractable: false;
  		borderWidth: 0.
  	window addARow: {window fancyText: 'Find...' translated font: Preferences standardEToysTitleFont color: textColor1}.
  	fileTypeRow := window addARowCentered: fileTypeButtons cellInset: 2.
  	actionRow := window addARowCentered: {
  		buttons first. 
  		(Morph new extent: 30 at 5) color: Color transparent. 
  		buttons second
  	} cellInset: 2.
  	window
  		addARow: {
  				(window inAColumn: {(pane2a := window inARow: {window inAColumn: {treePane}}) 
  					useRoundedCorners;
  					layoutInset: 0;
  					borderWidth: ColorTheme current dialogPaneBorderWidth;
  					borderColor: ColorTheme current dialogPaneBorderColor
  				}) layoutInset: 10.
  				(window inAColumn: {(pane2b := window inARow: {window inAColumn: {fileListPane}}) 
  					useRoundedCorners;
  					layoutInset: 0;
  					borderWidth: ColorTheme current dialogPaneBorderWidth;
  					borderColor: ColorTheme current dialogPaneBorderColor
  				}) layoutInset: 10.
  		}.
  	window fullBounds.
  	window fillWithRamp: ColorTheme current dialogRampOrColor oriented: 0.65.
  	pane2a fillWithRamp: ColorTheme current dialogPaneRampOrColor oriented: (0.7 @ 0.35).
  	pane2b fillWithRamp: ColorTheme current dialogPaneRampOrColor oriented: (0.7 @ 0.35).
  "
  	buttons do: [ :each |
  		each fillWithRamp: ColorTheme current dialogButtonsRampOrColor oriented: (0.75 @ 0).
  	].
  "
  	fileTypeButtons do: [ :each | 
  		each 
  			on: #mouseUp 
  			send: #value:value: 
  			to: [ :evt :morph | 
  				self update: actionRow in: window fileTypeRow: fileTypeRow morphUp: morph.
+ 			]
- 			] fixTemps
  	].
  	buttons first on: #mouseUp send: #okHit to: aFileList.
  	buttons second on: #mouseUp send: #cancelHit to: aFileList.
  	aFileList postOpen.
  	window position: aWorld topLeft + (aWorld extent - window extent // 2).
  	aFileList directoryChangeBlock: [ :newDir |
  		self update: actionRow in: window fileTypeRow: fileTypeRow morphUp: nil.
  		self enableTypeButtons: fileTypeButtons info: fileTypeInfo forDir: newDir.
+ 	].
- 	] fixTemps.
  	aFileList directory: aFileList directory.
  	window adoptPaneColor: (Color r: 0.548 g: 0.677 b: 1.0).
  	window becomeModal.
  	^ window openInWorld: aWorld.!

Item was changed:
  ----- Method: FileList2 class>>projectOnlySelectionBlock (in category 'as yet unclassified') -----
  projectOnlySelectionBlock
  
  	^[ :entry :myPattern |
  		entry isDirectory ifTrue: [
  			false
  		] ifFalse: [
  			#('*.pr' '*.pr.gz' '*.project') anySatisfy: [ :each | each match: entry name]
  		]
+ 	]!
- 	] fixTemps!

Item was changed:
  ----- Method: FileList2 class>>selectionBlockForSuffixes: (in category 'as yet unclassified') -----
  selectionBlockForSuffixes: anArray
  
  	^[ :entry :myPattern |
  		entry isDirectory ifTrue: [
  			false
  		] ifFalse: [
  			anArray anySatisfy: [ :each | each match: entry name]
  		]
+ 	]!
- 	] fixTemps!

Item was changed:
  ----- Method: FileList2 class>>morphicViewFileSelectorForSuffixes:directory: (in category 'morphic ui') -----
  morphicViewFileSelectorForSuffixes: aList directory: dir
  	"Answer a morphic file-selector tool for the given suffix list and the given directory."
  
  	| aFileList window fixedSize midLine gap |
  	aFileList := self new directory: dir.
  	aFileList optionalButtonSpecs: aFileList okayAndCancelServices.
  	aList ifNotNil:
  		[aFileList fileSelectionBlock: [:entry :myPattern |
  			entry isDirectory
  				ifTrue:
  					[false]
  				ifFalse:
+ 					[aList includes: (FileDirectory extensionFor: entry name asLowercase)]]].
- 					[aList includes: (FileDirectory extensionFor: entry name asLowercase)]] fixTemps].
  	window := BorderedMorph new
  		layoutPolicy: ProportionalLayout new;
  		color: Color lightBlue;
  		borderColor: Color blue;
  		borderWidth: 4;
  		layoutInset: 4;
  		extent: 600 at 400;
  		useRoundedCorners.
  	window setProperty: #fileListModel toValue: aFileList.
  	aFileList modalView: window.
  	midLine := 0.4.
  	fixedSize := 25.
  	gap := 5.
  	self addFullPanesTo: window from: {
  		{self textRow: 'Please select a file'. 0 @ 0 corner: 1 @ 0. 0 at 0 corner: 0 at fixedSize}.
  		{aFileList optionalButtonRow. 0 @ 0 corner: 1 @ 0. 0 at fixedSize corner: 0@(fixedSize * 2)}.
  		{aFileList morphicDirectoryTreePane. 0 at 0 corner: midLine at 1. 
  					gap @(fixedSize * 2) corner: gap negated at 0}.
  		{aFileList morphicFileListPane. midLine @ 0 corner: 1 at 1. 
  					gap@(fixedSize * 2) corner: gap negated at 0}.
  	}.
  
  	aFileList postOpen.
  
  	^ window !

Item was changed:
  ----- Method: FileList2 class>>morphicViewImageViewer (in category 'morphic ui') -----
  morphicViewImageViewer
  
  	| dir aFileList window midLine fixedSize |
  
  	dir := FileDirectory default.
  	aFileList := self new directory: dir.
  	aFileList optionalButtonSpecs: aFileList specsForImageViewer.
  	aFileList fileSelectionBlock: [ :entry :myPattern |
  		entry isDirectory ifTrue: [
  			false
  		] ifFalse: [
  			#('bmp' 'gif' 'jpg' 'form' 'png') includes: 
  					 (FileDirectory extensionFor: entry name asLowercase)
  		]
+ 	].
- 	] fixTemps.
  	window := (SystemWindow labelled: dir pathName) model: aFileList.
  
  	fixedSize := 25.
  	midLine := 0.4.
  	self addFullPanesTo: window from: {
  		{aFileList optionalButtonRow. 0 @ 0 corner: 1 @ 0.
  				0 at 0 corner: 0 at fixedSize}.
  		{aFileList morphicDirectoryTreePane. 0 at 0 corner: midLine at 1.
  				0 at fixedSize corner: 0 at 0}.
  		{aFileList morphicFileListPane. midLine @ 0 corner: 1 at 1.
  				0 at fixedSize corner: 0 at 0}.
  	}.
  	aFileList postOpen.
  	^ window !

Item was changed:
  ----- Method: FileList2>>blueButtonForService:textColor:inWindow: (in category 'user interface') -----
  blueButtonForService: aService textColor: textColor inWindow: window 
  	| block result |
  	block := [self fullName isNil
  				ifTrue: [self inform: 'Please select a file' translated]
+ 				ifFalse: [aService performServiceFor: self]].
- 				ifFalse: [aService performServiceFor: self]] copy fixTemps.
  	result := window
  				fancyText: aService buttonLabel capitalized translated
  				font: Preferences standardEToysFont
  				color: textColor.
  	result setProperty: #buttonText toValue: aService buttonLabel capitalized;
  		 hResizing: #rigid;
  		 extent: 100 @ 20;
  		 layoutInset: 4;
  		 borderWidth: ColorTheme current dialogButtonBorderWidth;
  		 useRoundedCorners;
  		 setBalloonText: aService label.
  	result
  		on: #mouseUp
  		send: #value
  		to: block.
  	^ result!




More information about the Squeak-dev mailing list