[squeak-dev] The Trunk: Tools-edc.185.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Feb 18 10:56:54 UTC 2010


Edgar J. De Cleene uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-edc.185.mcz

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

Name: Tools-edc.185
Author: edc
Time: 18 February 2010, 8:01:09.498 am
UUID: 8295901b-f6ed-4b45-baf1-4ce489d3cf1b
Ancestors: Tools-cmm.184

Enhanced Filelist2 for populated disk.
You could navigate and the last dir you use is remembered.
See navigation for loading projects in dockingbar

=============== Diff against Tools-cmm.184 ===============

Item was changed:
  ----- Method: FileList2 class>>morphicViewFileSelectorForSuffixes: (in category 'morphic ui') -----
+ morphicViewFileSelectorForSuffixes: aList 
- morphicViewFileSelectorForSuffixes: aList
  	"Answer a morphic file-selector tool for the given suffix list."
+ 	^ self morphicViewFileSelectorForSuffixes: aList directory: self modalFolderSelector!
- 
- 	^self 
- 		morphicViewFileSelectorForSuffixes: aList 
- 		directory: FileDirectory default.!

Item was added:
+ ----- Method: PluggableFileList>>openAsMorphLabel:inWorld: (in category 'initialize-release') -----
+ openAsMorphLabel: aString inWorld: aWorld
+ 	"Open a view of an instance of me."
+ 	"PluggableFileList new openAsMorphLabel: 'foo' inWorld: World"
+ 	| windowMorph volListMorph templateMorph fileListMorph leftButtonMorph middleButtonMorph rightButtonMorph |
+ 	
+ 	self directory: directory.
+ 	windowMorph := (SystemWindow labelled: aString) model: self.
+ 
+ 	volListMorph := PluggableListMorph on: self
+ 		list: #volumeList
+ 		selected: #volumeListIndex
+ 		changeSelected: #volumeListIndex:
+ 		menu: #volumeMenu:.
+ 	volListMorph autoDeselect: false.
+ 	windowMorph addMorph: volListMorph frame: (0 at 0 corner: 0.4 at 0.5625).
+ 
+ 	templateMorph := PluggableTextMorph on: self
+ 		text: #pattern
+ 		accept: #pattern:.
+ 	templateMorph askBeforeDiscardingEdits: false.
+ 	windowMorph addMorph: templateMorph frame: (0 at 0.5625 corner: 0.4 at 0.75).
+ 
+ 	fileListMorph := PluggableListMorph on: self
+ 		list: #fileList
+ 		selected: #fileListIndex
+ 		changeSelected: #fileListIndex:
+ 		menu: #fileListMenu:.
+ 
+ 	windowMorph addMorph: fileListMorph frame: (0.4 at 0 corner: 1.0 at 0.75).
+ 
+ 	leftButtonMorph := PluggableButtonMorph 
+ 		on: self
+ 		getState: #leftButtonState
+ 		action: #leftButtonPressed.
+ 	leftButtonMorph
+ 		hResizing: #spaceFill;
+ 		vResizing: #spaceFill;
+ 		label: 'Cancel';
+ 		onColor: Color red offColor: Color red;
+ 		feedbackColor: Color orange;
+ 		borderWidth: 3.
+ 
+ 	middleButtonMorph := PluggableButtonMorph
+ 		on: self
+ 		getState: nil
+ 		action: nil.
+ 	middleButtonMorph
+ 		hResizing: #spaceFill;
+ 		vResizing: #spaceFill;
+ 		label: prompt;
+ 		onColor: Color lightYellow offColor: Color lightYellow;
+ 		feedbackColor: Color lightYellow;
+ 		borderWidth: 1.
+ 
+ 	rightButtonMorph := PluggableButtonMorph
+ 		on: self
+ 		getState: #rightButtonState
+ 		action: #rightButtonPressed.
+ 	rightButtonMorph
+ 		hResizing: #spaceFill;
+ 		vResizing: #spaceFill;
+ 		label: 'Accept';
+ 		onColor: Color green offColor: Color lightYellow;
+ 		feedbackColor: Color black;
+ 		borderWidth: (self canAccept ifTrue: [3] ifFalse: [1]).
+ 	"self canAccept ifFalse: [rightButtonMorph controller: NoController new]."
+ 
+ 	windowMorph
+ 		addMorph: leftButtonMorph frame: (0 at 0.75 corner: 0.25 at 1.0);
+ 		addMorph: middleButtonMorph frame: (0.25 at 0.75 corner: 0.75 at 1.0);
+ 		addMorph: rightButtonMorph frame: (0.75 at 0.75 corner: 1.0 at 1.0).
+ 
+ 	self changed: #getSelectionSel.
+ 
+     windowMorph openInWorld: aWorld.
+     [windowMorph model notNil]
+        whileTrue: [aWorld doOneCycle].
+     ^self result
+ !

Item was added:
+ ----- Method: FileList2 class>>lastSelDir (in category 'accessing') -----
+ lastSelDir
+ ^ lastSelDir!

Item was changed:
  ----- Method: FileList2 class>>modalFolderSelector (in category 'modal dialogs') -----
  modalFolderSelector
+ self lastSelDir  ifNil: [^self modalFolderSelector: FileDirectory default]
+ ifNotNil:[^self modalFolderSelector: self lastSelDir ]
+ 	!
- 
- 	^self modalFolderSelector: FileDirectory default!

Item was added:
+ ----- Method: PluggableFileList>>openLabel: (in category 'initialize-release') -----
+ openLabel: aString
+ 	"Open a view of an instance of me."
+ 	"StandardFileDialog new open"
+ 	| topView volListView templateView fileListView fileStringView leftButtonView middleButtonView rightButtonView |
+ 	
+ 	self directory: directory.
+ 	topView := (PluggableFileListView new)
+ 		model: self.
+ 
+ 	volListView := PluggableListView on: self
+ 		list: #volumeList
+ 		selected: #volumeListIndex
+ 		changeSelected: #volumeListIndex:
+ 		menu: #volumeMenu:.
+ 	volListView autoDeselect: false.
+ 	volListView window: (0 at 0 extent: 80 at 45).
+ 	topView addSubView: volListView.
+ 
+ 	templateView := PluggableTextView on: self
+ 		text: #pattern
+ 		accept: #pattern:.
+ 	templateView askBeforeDiscardingEdits: false.
+ 	templateView window: (0 at 0 extent: 80 at 15).
+ 	topView addSubView: templateView below: volListView.
+ 
+ 	fileListView := PluggableListView on: self
+ 		list: #fileList
+ 		selected: #fileListIndex
+ 		changeSelected: #fileListIndex:
+ 		menu: #fileListMenu:.
+ 	fileListView window: (0 at 0 extent: 120 at 60).
+ 
+ 	topView addSubView: fileListView toRightOf: volListView.
+ 
+ 	fileListView controller terminateDuringSelect: true.  "Pane to left may change under scrollbar"
+ 
+ 	"fileStringView := PluggableTextView on: self
+ 		text: #fileString
+ 		accept: #fileString:.
+ 	fileStringView askBeforeDiscardingEdits: false.
+ 	fileStringView window: (0 at 0 extent: 200 at 15).
+ 	topView addSubView: fileStringView below: templateView."
+ 	fileStringView := templateView.
+ 
+ 
+ 	leftButtonView := PluggableButtonView 
+ 		on: self
+ 		getState: nil
+ 		action: #leftButtonPressed.
+ 	leftButtonView
+ 		label: 'Cancel';
+ 		backgroundColor: Color red;
+ 		borderWidth: 3;
+ 		window: (0 at 0 extent: 50 at 15).
+ 
+ 	middleButtonView := PluggableButtonView
+ 		on: self
+ 		getState: nil
+ 		action: nil.
+ 	middleButtonView
+ 		label: prompt;
+ 		window: (0 at 0 extent: 100 at 15);
+ 		borderWidth: 1;
+ 		controller: NoController new.
+ 
+ 	rightButtonView := PluggableButtonView
+ 		on: self
+ 		getState: nil
+ 		action: #rightButtonPressed.
+ 	rightButtonView
+ 		label: 'Accept';
+ 		backgroundColor: (self canAccept ifTrue: [Color green] ifFalse: [Color lightYellow]);
+ 		borderWidth: (self canAccept ifTrue: [3] ifFalse: [1]);
+ 		window: (0 at 0 extent: 50 at 15).
+ 	self canAccept ifFalse: [rightButtonView controller: NoController new].
+ 
+ 	topView acceptButtonView: rightButtonView.
+ 
+ 	topView
+ 		addSubView: leftButtonView below: fileStringView;
+ 		addSubView: middleButtonView toRightOf: leftButtonView;
+ 		addSubView: rightButtonView toRightOf: middleButtonView.
+ 
+ 	self changed: #getSelectionSel.
+ 	topView doModalDialog.
+ 	
+ 	^self result
+ !

Item was changed:
  ----- Method: FileList2 class>>modalFolderSelector: (in category 'modal dialogs') -----
  modalFolderSelector: aDir
  
  	| window fileModel |
+ 	window _ self morphicViewFolderSelector: aDir.
+ 	fileModel _ window model.
- 	window := self morphicViewFolderSelector: aDir.
- 	fileModel := window model.
  	window openInWorld: self currentWorld extent: 300 at 400.
  	self modalLoopOn: window.
+ 	^self lastSelDir: fileModel getSelectedDirectory withoutListWrapper!
- 	^fileModel getSelectedDirectory withoutListWrapper!

Item was added:
+ ----- Method: FileList2 class>>lastSelDir: (in category 'accessing') -----
+ lastSelDir: aDir
+ ^ lastSelDir := aDir!




More information about the Squeak-dev mailing list