tim Rowledge uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-tpr.216.mcz==================== Summary ====================
Name: Network-tpr.216
Author: tpr
Time: 28 December 2017, 12:52:19.880669 pm
UUID: aee9a26f-18fe-4929-98d3-ac8ae27f70c3
Ancestors: Network-tpr.215
Connect mail saving to the new file dialogs
=============== Diff against Network-tpr.215 ===============
Item was changed:
----- Method: MailMessage>>save (in category 'multipart') -----
save
"save the part to a file"
+ | fileName |
+ fileName := self name ifNil: ['attachment' , Utilities dateTimeSuffix].
+ (fileName includes: $.)
+ ifFalse: [#(#isJpeg 'jpg' #isGif 'gif' #isPng 'png' #isPnm 'pnm')
+ pairsDo: [:s :e | (self body perform: s)
+ ifTrue: [fileName := fileName , FileDirectory dot , e]]].
+
+ fileName := UIManager default saveFilenameRequest: 'File name for save?' initialAnswer: fileName.
+ fileName ifNil: [^ nil].
+
+ FileStream newFileNamed: fileName
+ do: [:file | file nextPutAll: self bodyText]!
- | fileName file |
- fileName := self name
- ifNil: ['attachment' , Utilities dateTimeSuffix].
- (fileName includes: $.) ifFalse: [
- #(isJpeg 'jpg' isGif 'gif' isPng 'png' isPnm 'pnm') pairsDo: [ :s :e |
- (self body perform: s) ifTrue: [fileName := fileName, '.', e]
- ]
- ].
- fileName := UIManager default request: 'File name for save?' initialAnswer: fileName.
- fileName isEmpty
- ifTrue: [^ nil].
- file := FileStream newFileNamed: fileName.
- file nextPutAll: self bodyText.
- file close!