[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squeak-dev
Subject:    [squeak-dev] The Trunk: SMLoader-tpr.90.mcz
From:       commits () source ! squeak ! org
Date:       2017-12-28 21:06:21
Message-ID: E1eUfNf-00065P-Eo () andreas
[Download RAW message or body]

tim Rowledge uploaded a new version of SMLoader to project The Trunk:
http://source.squeak.org/trunk/SMLoader-tpr.90.mcz

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

Name: SMLoader-tpr.90
Author: tpr
Time: 28 December 2017, 1:06:13.538142 pm
UUID: 448b81e2-b783-4f7b-ab09-5a16a5ce6705
Ancestors: SMLoader-nice.89

Connect cache package coying to new file dialogs

=============== Diff against SMLoader-nice.89 ===============

Item was changed:
  ----- Method: SMLoader>>cachePackageReleaseAndOfferToCopy (in category 'actions') \
-----  cachePackageReleaseAndOfferToCopy
  	"Cache package release, then offer to copy it somewhere.
  	Answer the chosen file's location after copy,
  	or the cache location if no directory was chosen."
  
  	| release installer newDir newName newFile oldFile oldName |
  	release := self selectedPackageOrRelease.
  	release isPackageRelease ifFalse: [ self error: 'Should be a package release!!'].
  	installer := SMInstaller forPackageRelease: release.
  	[Cursor wait showWhile: [installer cache]] on: Error do: [:ex |
  		| msg |
  		msg := ex messageText ifNil: [ex asString].
  		self informException: ex msg: ('Error occurred during download:\', msg, '\') \
withCRs.  ^nil ].
  	installer isCached ifFalse: [self inform: 'Download failed, see transcript for \
details'. ^nil].  oldName := installer fullFileName.
+ 	newDir := UIManager default chooseDirectoryFrom: installer directory.
- 	newDir := FileList2 modalFolderSelector: installer directory.
  	newDir ifNil: [ ^oldName ].
  	newDir = installer directory ifTrue: [ ^oldName ].
  	newName := newDir fullNameFor: installer fileName.
  	newFile := FileStream newFileNamed: newName.
  	newFile ifNil: [ ^oldName ].
  	newFile binary.
  	oldFile := FileStream readOnlyFileNamed: oldName.
  	oldFile ifNil: [ ^nil ].
  	oldFile binary.
  	[[ newDir copyFile: oldFile toFile: newFile ] ensure: [ oldFile close. newFile \
close ]] on: Error do: [ :ex | ^oldName ].  ^newName!

Item was changed:
  ----- Method: SMLoaderPlus>>cachePackageReleaseAndOfferToCopy (in category \
'actions') -----  cachePackageReleaseAndOfferToCopy
  	"Cache package release, then offer to copy it somewhere.
  	Answer the chosen file's location after copy,
  	or the cache location if no directory was chosen."
  
  	| release installer newDir newName newFile oldFile oldName |
  	release := self selectedPackageOrRelease.
  	release isPackageRelease ifFalse: [ self error: 'Should be a package release!!'].
  	installer := SMInstaller forPackageRelease: release.
  	[UIManager default informUser: 'Caching ' , release asString during: [installer \
cache]] on: Error do: [:ex |  | msg |
  		msg := ex messageText ifNil: [ex asString].
  		self informException: ex msg: ('Error occurred during download:\', msg, '\') \
withCRs.  ^nil ].
  	installer isCached ifFalse: [self inform: 'Download failed, see transcript for \
details'. ^nil].  oldName := installer fullFileName.
+ 	newDir := UIManager default chooseDirectoryFrom: installer directory.
- 	newDir := FileList2 modalFolderSelector: installer directory.
  	newDir ifNil: [ ^oldName ].
  	newDir = installer directory ifTrue: [ ^oldName ].
  	newName := newDir fullNameFor: installer fileName.
  	newFile := FileStream newFileNamed: newName.
  	newFile ifNil: [ ^oldName ].
  	newFile binary.
  	oldFile := FileStream readOnlyFileNamed: oldName.
  	oldFile ifNil: [ ^nil ].
  	oldFile binary.
  	[[ newDir copyFile: oldFile toFile: newFile ] ensure: [ oldFile close. newFile \
close ]] on: Error do: [ :ex | ^oldName ].  ^newName!


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic