Nicolas Cellier uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-nice.543.mcz
==================== Summary ====================
Name: System-nice.543
Author: nice
Time: 2 June 2013, 10:44:36.921 pm
UUID: 19ac715d-ab64-4efb-8b9c-7c3937ead6f0
Ancestors: System-fbs.542
Correct utf8 everywhere bug: MczInstaller does not understand zip
=============== Diff against System-fbs.542 ===============
Item was changed:
----- Method: MczInstaller>>parseMember: (in category 'utilities') -----
parseMember: memberOrName
| member contents tokens |
+ member := zip member: memberOrName.
- member := self zip member: memberOrName.
contents := self contentsForMember: member.
tokens := (self scanner scanTokens: contents) first.
^ self associate: tokens!
Frank Shearar uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-fbs.98.mcz
==================== Summary ====================
Name: EToys-fbs.98
Author: fbs
Time: 2 June 2013, 7:06:04.768 pm
UUID: ebccf095-beeb-4f50-9f23-b6615cf30393
Ancestors: EToys-fbs.97
Form >> #stencil and Pen >> #putDotOfDiameter:at: are only called from EToys code, so they belong in EToys.
=============== Diff against EToys-fbs.97 ===============
Item was added:
+ ----- Method: Form>>stencil (in category '*EToys-Scripting') -----
+ stencil
+ "return a 1-bit deep, black-and-white stencil of myself"
+
+ | canvas |
+ canvas := FormCanvas extent: self extent depth: 1.
+ canvas fillColor: (Color white).
+
+ canvas stencil: self at: 0@0
+ sourceRect: (Rectangle origin: 0@0 corner: self extent) color: Color black.
+
+ ^ canvas form
+ !
Item was added:
+ ----- Method: Pen>>putDotOfDiameter:at: (in category '*EToys-operations') -----
+ putDotOfDiameter: aDiameter at: aPoint
+ "Put a dot of the given size at the given point, using my colot"
+
+ (FormCanvas on: destForm)
+ fillOval: (Rectangle center: aPoint extent: (aDiameter @ aDiameter))
+ color: self color!
Frank Shearar uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-fbs.211.mcz
==================== Summary ====================
Name: Graphics-fbs.211
Author: fbs
Time: 2 June 2013, 7:05:25.648 pm
UUID: 65a2ecea-af2e-42cd-b61e-aece057c0e7b
Ancestors: Graphics-fbs.210
Form >> #stencil and Pen >> #putDotOfDiameter:at: are only called from EToys code, so they belong in EToys.
=============== Diff against Graphics-fbs.210 ===============
Item was removed:
- ----- Method: Form>>stencil (in category 'image manipulation') -----
- stencil
- "return a 1-bit deep, black-and-white stencil of myself"
-
- | canvas |
- canvas := FormCanvas extent: self extent depth: 1.
- canvas fillColor: (Color white).
-
- canvas stencil: self at: 0@0
- sourceRect: (Rectangle origin: 0@0 corner: self extent) color: Color black.
-
- ^ canvas form
- !
Item was removed:
- ----- Method: Pen>>putDotOfDiameter:at: (in category 'operations') -----
- putDotOfDiameter: aDiameter at: aPoint
- "Put a dot of the given size at the given point, using my colot"
-
- (FormCanvas on: destForm)
- fillOval: (Rectangle center: aPoint extent: (aDiameter @ aDiameter))
- color: self color!
Frank Shearar uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-fbs.219.mcz
==================== Summary ====================
Name: Tests-fbs.219
Author: fbs
Time: 2 June 2013, 6:17:41.36 pm
UUID: 9869cc39-2749-455b-b43a-fe3f6038cc41
Ancestors: Tests-fbs.218
Network no longer depends on Tools.
=============== Diff against Tests-fbs.218 ===============
Item was changed:
----- Method: PackageDependencyTest>>testNetwork (in category 'tests') -----
testNetwork
self testPackage: 'Network' dependsExactlyOn: #(
Collections
Compiler
Compression
Exceptions
Files
Graphics
Kernel
Morphic
System
'ToolBuilder-Kernel'
- Tools
).!
Frank Shearar uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-fbs.763.mcz
==================== Summary ====================
Name: Kernel-fbs.763
Author: fbs
Time: 2 June 2013, 5:51:53.948 pm
UUID: 9f65f6b7-a199-40f1-8334-3564bfe3b063
Ancestors: Kernel-fbs.762
Object >> #localeChanged moved to System-Localization because it's a localisation thing, and because I'd rather have System depend on Kernel than Kernel depend on System.
=============== Diff against Kernel-fbs.762 ===============
Item was removed:
- ----- Method: Object>>localeChanged (in category 'locales') -----
- localeChanged
- self shouldBeImplemented!
Frank Shearar uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-fbs.542.mcz
==================== Summary ====================
Name: System-fbs.542
Author: fbs
Time: 2 June 2013, 5:51:01.516 pm
UUID: c48f768f-3538-4bd2-8589-017a8457aa72
Ancestors: System-nice.541
PartsBin and friends already have #localeChanged implementations.
I don't know if "self class environment" is the right thing here. I don't want to use Smalltalk globals. Perhaps the right thing is to say "self environment" where #environment may be set, or defaults to Smalltalk globals.
Object >> #localeChanged moved here because it's a localisation thing, and because I'd rather have System depend on Kernel than Kernel depend on System.
=============== Diff against System-nice.541 ===============
Item was changed:
----- Method: Locale class>>localeChanged (in category 'notification') -----
localeChanged
+ self class environment allBehaviorsDo: [:b | b localeChanged].!
-
- #(#ParagraphEditor #BitEditor #FormEditor #StandardSystemController )
- do: [:key | Smalltalk
- at: key
- ifPresent: [:class | class initialize]].
- PartsBin localeChanged.
- Project localeChanged.
- PaintBoxMorph localeChanged.
- ColorPickerMorph localeChanged.
- Preferences localeChanged!
Item was changed:
----- Method: Locale class>>localeChangedGently (in category 'notification') -----
localeChangedGently
+ self class environment allBehaviorsDo: [:b | b localeChangedGently].!
-
- #(#ParagraphEditor #BitEditor #FormEditor #StandardSystemController )
- do: [:key | Smalltalk
- at: key
- ifPresent: [:class | class initialize]].
- PartsBin localeChangedGently.
- Project localeChangedGently.
- PaintBoxMorph localeChangedGently.
- ColorPickerMorph localeChangedGently.
- Preferences localeChangedGently.
- !
Item was added:
+ ----- Method: Object>>localeChanged (in category '*System-Localization-locales') -----
+ localeChanged
+ self shouldBeImplemented!
Item was added:
+ ----- Method: Object>>localeChangedGently (in category '*System-Localization-locales') -----
+ localeChangedGently
+ self localeChanged.!
Nicolas Cellier uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-nice.541.mcz
==================== Summary ====================
Name: System-nice.541
Author: nice
Time: 2 June 2013, 6:46:07.394 pm
UUID: c37330b6-d436-4f84-880f-8b77f2c970e6
Ancestors: System-fbs.540
Let MczInstaller know that .mcz text files are encoded in utf8.
=============== Diff against System-fbs.540 ===============
Item was added:
+ ----- Method: MczInstaller>>contentsForMember: (in category 'private') -----
+ contentsForMember: member
+ ^[(member contentStreamFromEncoding: 'utf8') text contents] on: InvalidUTF8
+ do: [:exc |
+ "Case of legacy encoding, presumably it is latin-1.
+ But if contents starts with a null character, it might be a case of WideString encoded in UTF-32BE"
+ | str |
+ str := (member contentStreamFromEncoding: 'latin1') text..
+ exc return: ((str peek = Character null and: [ str size \\ 4 = 0 ])
+ ifTrue: [WideString fromByteArray: str contents asByteArray]
+ ifFalse: [str contents])]!
Item was changed:
----- Method: MczInstaller>>installMember: (in category 'installation') -----
installMember: member
self useNewChangeSetDuring:
+ [ | contents |
+ contents := self contentsForMember: member.
+ contents readStream fileInAnnouncing: 'loading ', member fileName.
+ ]!
- [ | str |
- str := member contentStream text readStream contents.
- str := [str utf8ToSqueak] on: InvalidUTF8 do: [:exc |
- "Case of legacy encoding, presumably it is latin-1 and we do not need to do anything
- But if contents starts with a null character, it might be a case of WideString encoded in UTF-32BE"
- exc return: (((str beginsWith: Character null asString) and: [ str size \\ 4 = 0 ])
- ifTrue: [WideString fromByteArray: str asByteArray]
- ifFalse: [str])].
- str readStream fileInAnnouncing: 'loading ', member fileName ]!
Item was changed:
----- Method: MczInstaller>>parseMember: (in category 'utilities') -----
+ parseMember: memberOrName
+ | member contents tokens |
+ member := self zip member: memberOrName.
+ contents := self contentsForMember: member.
+ tokens := (self scanner scanTokens: contents) first.
- parseMember: fileName
- | tokens |
- tokens := (self scanner scanTokens: (zip contentsOf: fileName)) first.
^ self associate: tokens!
Nicolas Cellier uploaded a new version of Compression to project The Trunk:
http://source.squeak.org/trunk/Compression-nice.32.mcz
==================== Summary ====================
Name: Compression-nice.32
Author: nice
Time: 2 June 2013, 3:15:05.134 pm
UUID: bce2a55c-891e-4fee-bce4-d8a12461b792
Ancestors: Compression-ul.31
Add a utility #contentStreamFromEncoding: to decode some ZipArchiveMember with prescribed encoding ('latin1', 'utf8' etc...)
=============== Diff against Compression-ul.31 ===============
Item was changed:
----- Method: ZipArchiveMember>>contentStream (in category 'accessing') -----
contentStream
"Answer my contents as a text stream.
Default is no conversion, since we don't know what the bytes mean."
+ ^self contentStreamFromEncoding: 'latin1'
- | s |
- s := MultiByteBinaryOrTextStream on: (String new: self uncompressedSize).
- s converter: Latin1TextConverter new.
- self extractTo: s.
- s reset.
- ^ s.
!
Item was added:
+ ----- Method: ZipArchiveMember>>contentStreamFromEncoding: (in category 'accessing') -----
+ contentStreamFromEncoding: encodingName
+ "Answer my contents as a text stream.
+ Interpret the raw bytes with given encodingName"
+
+ | s |
+ s := MultiByteBinaryOrTextStream on: (String new: self uncompressedSize).
+ s converter: (TextConverter newForEncoding: encodingName).
+ self extractTo: s.
+ s reset.
+ ^ s
+ !