[etoys-dev] Etoys: Tools-bf.4.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 24 20:50:41 EDT 2010


Bert Freudenberg uploaded a new version of Tools to project Etoys:
http://source.squeak.org/etoys/Tools-bf.4.mcz

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

Name: Tools-bf.4
Author: bf
Time: 25 August 2010, 2:50:22 am
UUID: 997bba87-5ad0-47ee-8349-bc56ba8aeb6e
Ancestors: Tools-kfr.3

- in the project load/save dialog under Sugar, hide the user directory
- instead, pre-select the [Journal] target

=============== Diff against Tools-kfr.3 ===============

Item was changed:
  ----- Method: FileList2>>limitedSuperSwikiDirectoryList (in category 'initialization') -----
  limitedSuperSwikiDirectoryList
  
  	| dir nameToShow dirList localDirName localDir localList |
  
  	dirList _ OrderedCollection new.
  	localList _ OrderedCollection new.
  	ServerDirectory serverNames do: [ :n | 
  		dir _ ServerDirectory serverNamed: n.
  		dir isProjectSwiki ifTrue: [
  			nameToShow _ n.
  			dirList add: ((dir directoryWrapperClass with: dir name: nameToShow model: self)
  				balloonText: dir realUrl)
  		].
  	].
  	ServerDirectory localProjectDirectories do: [ :each |
  		localList add: (dirList add: (FileDirectoryWrapper with: each name: each localName model: self))
  	].
+ 	(dirList anySatisfy: [:e | e withoutListWrapper pathName beginsWith: 'sugar://']) ifFalse: [
+ 		"Make sure the following are always shown, but not twice"
+ 		localDirName := SecurityManager default untrustedUserDirectory.
+ 		localDir := FileDirectory on: localDirName.
+ 		((ServerDirectory localProjectDirectories collect: [:each | each pathName]) includes: localDirName)
+ 				ifFalse: [localList add: (dirList add: (FileDirectoryWrapper with: localDir name: localDir localName model: self))].
+ 		FileDirectory default pathName = localDirName
+ 				ifFalse: [localList add: (dirList add: (FileDirectoryWrapper with: FileDirectory default name: FileDirectory default localName model: self))].
+ 		(dirList anySatisfy: [:each | each withoutListWrapper acceptsUploads])
- 	"Make sure the following are always shown, but not twice"
- 	localDirName := SecurityManager default untrustedUserDirectory.
- 	localDir := FileDirectory on: localDirName.
- 	((ServerDirectory localProjectDirectories collect: [:each | each pathName]) includes: localDirName)
- 			ifFalse: [localList add: (dirList add: (FileDirectoryWrapper with: localDir name: localDir localName model: self))].
- 	FileDirectory default pathName = localDirName
  			ifFalse: [localList add: (dirList add: (FileDirectoryWrapper with: FileDirectory default name: FileDirectory default localName model: self))].
+ 	].
- 	(dirList anySatisfy: [:each | each withoutListWrapper acceptsUploads])
- 		ifFalse: [localList add: (dirList add: (FileDirectoryWrapper with: FileDirectory default name: FileDirectory default localName model: self))].
  	localList do: [:e | e balloonText: e withoutListWrapper pathName].
  	^dirList!

Item was changed:
  ----- Method: FileList2 class>>morphicViewProjectSaverFor: (in category 'blue ui') -----
  morphicViewProjectSaverFor: aProject
  "
  (FileList2 morphicViewProjectSaverFor: Project current) openInWorld
  "
+ 	| window aFileList treePane pane2 option treeExtent row p |
- 	| window aFileList treePane pane2 option treeExtent row item |
  
  	aFileList _ self new directory: ServerDirectory projectDefaultDirectory.
  	aFileList dirSelectionBlock: self hideSqueakletDirectoryBlock.
  	window := self buildMorphicWindow: aFileList title: 'Publish This Project' translated. 
  	window setProperty: #morphicLayerNumber toValue: 11.
  
  	option _ aProject world 
  		valueOfProperty: #SuperSwikiPublishOptions 
  		ifAbsent: [#initialDirectoryListForProjects].
  	aProject world removeProperty: #SuperSwikiPublishOptions.
  
  	World height < 500 ifTrue: [
  		treeExtent _ 350 at 150.
  	] ifFalse: [
  		treeExtent _ 350 at 300.
  	].
  
  	(treePane _ aFileList morphicDirectoryTreePaneFiltered: option) 
  		extent: treeExtent; 
  		retractable: false;
  		borderWidth: 0.
  treePane color: Color transparent.
  
  	row := window addARow: {
  			window inAColumn: {(ProjectViewMorph on: aProject) lock}.
  			(
  				window inAColumn: {
  					(pane2 _ window inARow: {window inAColumn: {treePane}}) 
  						useRoundedCornersInEtoys; layoutInset: 3
  				}
  			) layoutInset: 3
  		}.
  	row color: ScriptingSystem paneColor.
  	pane2 borderColor: ScriptingSystem borderColor.
  	pane2 borderWidth: 1.
  	window addMorphBack: (self buildSaveButtons: window fileList: aFileList).
  	window fullBounds.
  	window beSticky.
  	"This crazy stuff I really cannot figure out how to get the directory selected by default other than this."
+ 	(treePane scroller submorphs detect: [:e |
+ 		p := e complexContents withoutListWrapper pathName.
+ 		(p beginsWith: 'sugar://') or: [p = SecurityManager default untrustedUserDirectory]] ifNone: [nil])
+ 			ifNotNilDo: [:item | WorldState addDeferredUIMessage: [aFileList setSelectedDirectoryTo: item complexContents]].
- 	(item := treePane scroller submorphs detect: [:e | e complexContents withoutListWrapper pathName = SecurityManager default untrustedUserDirectory] ifNone: [nil]) notNil ifTrue: [
- 		WorldState addDeferredUIMessage: [aFileList setSelectedDirectoryTo: item complexContents]].
  	aFileList postOpen.
  	^ window !

Item was changed:
  ----- Method: FileList2>>limitedSuperSwikiPublishDirectoryList (in category 'initialization') -----
  limitedSuperSwikiPublishDirectoryList
  
  	| dirList localDirName localDir localList |
  
  	dirList _ self publishingServers.
  	localList _ OrderedCollection new.
  	ServerDirectory localProjectDirectories do: [ :each |
  		localList add: (dirList add: (FileDirectoryWrapper with: each name: each localName model: self))].
  
+ 	(dirList anySatisfy: [:e | e withoutListWrapper pathName beginsWith: 'sugar://']) ifFalse: [
+ 		"Make sure the following are always shown, but not twice"
+ 		localDirName := SecurityManager default untrustedUserDirectory.
+ 		localDir := FileDirectory on: localDirName.
+ 		((ServerDirectory localProjectDirectories collect: [:each | each pathName]) includes: localDirName)
+ 				ifFalse: [localList add: (dirList add: (FileDirectoryWrapper with: localDir name: localDir localName model: self))].
+ 		FileDirectory default pathName = localDirName
+ 				ifFalse: [localList add: (dirList add: (FileDirectoryWrapper with: FileDirectory default name: FileDirectory default localName model: self))]].
- 	"Make sure the following are always shown, but not twice"
- 	localDirName := SecurityManager default untrustedUserDirectory.
- 	localDir := FileDirectory on: localDirName.
- 	((ServerDirectory localProjectDirectories collect: [:each | each pathName]) includes: localDirName)
- 			ifFalse: [localList add: (dirList add: (FileDirectoryWrapper with: localDir name: localDir localName model: self))].
- 	FileDirectory default pathName = localDirName
- 			ifFalse: [localList add: (dirList add: (FileDirectoryWrapper with: FileDirectory default name: FileDirectory default localName model: self))].
  	localList do: [:e | e balloonText: e withoutListWrapper pathName].
  	^dirList!

Item was changed:
  ----- Method: FileList2 class>>morphicViewProjectLoader2InWorld:title:reallyLoad:dirFilterType:isGeneral: (in category 'blue ui') -----
  morphicViewProjectLoader2InWorld: aWorld title: title reallyLoad: aBoolean dirFilterType: aSymbol isGeneral: isGeneral
  	"Put up a blue file-list for loading etoy projects."
  "
  FileList2 morphicViewProjectLoader2InWorld: self currentWorld reallyLoad: true dirFilterType: #limitedSuperSwikiDirectoryList
  "
  
+ 	| window aFileList actionRow treePane p |
- 	| window aFileList actionRow treePane item |
  
  	aFileList _ self buildFileListDirFilterType: aSymbol.
  	window := self buildMorphicWindow: aFileList title: title. 
  
  	actionRow _ self buildLoadButtons: window fileList: aFileList reallyLoad: aBoolean.
  
  	isGeneral
  		ifTrue: [self buildFileTypeButtons: window actionRow: actionRow fileList: aFileList].
  
  	treePane := self buildPane: aWorld fileList: aFileList window: window dirFilterType: aSymbol.
  	window addMorphBack: actionRow.
  
  	window fullBounds.
  	window position: aWorld topLeft + (aWorld extent - window extent // 2).
  	window beSticky.
  	aFileList sortByName.
  	"This crazy stuff I really cannot figure out how to get the directory selected by default other than this."
+ 	(treePane scroller submorphs detect: [:e |
+ 		p := e complexContents withoutListWrapper pathName.
+ 		(p beginsWith: 'sugar://') or: [p = SecurityManager default untrustedUserDirectory]] ifNone: [nil])
+ 			ifNotNilDo: [:item | WorldState addDeferredUIMessage: [aFileList setSelectedDirectoryTo: item complexContents]].
- 	(item := treePane scroller submorphs detect: [:e | e complexContents withoutListWrapper pathName = SecurityManager default untrustedUserDirectory] ifNone: [nil]) notNil ifTrue: [
- 		WorldState addDeferredUIMessage: [aFileList setSelectedDirectoryTo: item complexContents]].	
  	aFileList postOpen.
  	^ window!



More information about the etoys-dev mailing list