[squeak-dev] The Trunk: ST80-mt.270.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Nov 29 17:39:08 UTC 2021
Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.270.mcz
==================== Summary ====================
Name: ST80-mt.270
Author: mt
Time: 29 November 2021, 6:39:04.147615 pm
UUID: 746975d8-ca24-46fc-8fa3-7dde8a3ac097
Ancestors: ST80-ct.269
Complements Tools-mt.1079
=============== Diff against ST80-ct.269 ===============
Item was removed:
- ----- Method: ParagraphEditor>>saveContentsInFile (in category 'menu messages') -----
- saveContentsInFile
- "Save the receiver's contents string to a file, prompting the user for a file-name. Suggest a reasonable file-name."
-
- | fileName stringToSave parentWindow labelToUse suggestedName |
- stringToSave := paragraph text string.
- stringToSave size = 0 ifTrue: [^ self inform: 'nothing to save.'].
- parentWindow := self model dependents
- detect: [:dep | dep isKindOf: SystemWindow orOf: StandardSystemView]
- ifNone: [nil].
- labelToUse := parentWindow
- ifNil: ['Untitled']
- ifNotNil: [parentWindow label].
- suggestedName := nil.
- #(('Decompressed contents of: ' '.gz')) do: "can add more here..."
- [:leaderTrailer | | lastIndex |
- (labelToUse beginsWith: leaderTrailer first) ifTrue:
- [suggestedName := labelToUse copyFrom: leaderTrailer first size + 1 to: labelToUse size.
- (labelToUse endsWith: leaderTrailer last)
- ifTrue:
- [suggestedName := suggestedName copyFrom: 1 to: suggestedName size - leaderTrailer last size]
- ifFalse:
- [lastIndex := suggestedName lastIndexOf: $..
- (lastIndex > 1) ifTrue:
- [suggestedName := suggestedName copyFrom: 1 to: lastIndex - 1]]]].
-
- suggestedName ifNil:
- [suggestedName := labelToUse, '.text'].
-
- fileName := UIManager default saveFilenameRequest: 'File name?' translated
- initialAnswer: suggestedName.
- fileName isEmptyOrNil ifFalse:
- [(FileStream newFileNamed: fileName) nextPutAll: stringToSave; close]!
More information about the Squeak-dev
mailing list
|