[etoys-dev] Etoys: System-kfr.54.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Mar 9 05:36:24 EST 2012


Karl Ramberg uploaded a new version of System to project Etoys:
http://source.squeak.org/etoys/System-kfr.54.mcz

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

Name: System-kfr.54
Author: kfr
Time: 9 March 2012, 11:34:58 am
UUID: 04626c73-a586-4256-9ddd-bb6189e51e81
Ancestors: System-bf.53

Fix for animated gif

=============== Diff against System-bf.53 ===============

Item was changed:
  ----- Method: ExternalDropHandler class>>defaultImageHandler (in category 'private') -----
  defaultImageHandler
  	| image sketch |
  	^ExternalDropHandler
  		type: 'image/'
  		extension: nil
  		action: [:stream :pasteUp :event |
  			stream binary.
+ 			image := Form fromBinaryStream: ((RWBinaryOrTextStream with: stream contents) reset).
- 			image _ Form fromBinaryStream: ((RWBinaryOrTextStream with: stream contents) reset).
  			Project current resourceManager 
  				addResource: image 
  				url: (FileDirectory urlForFileNamed: stream name) asString.
+ 				((stream name copyAfterLast:$.) = 'gif')
+ 				ifTrue:[sketch := (AnimatedImageMorph new fromArray: image) ]
+ 				ifFalse:[sketch := World drawingClass withForm: image].
- 			sketch _ World drawingClass withForm: image.
  			sketch setNamePropertyTo: (FileDirectory baseNameFor: (FileDirectory localNameFor: stream fullName)).
  			sketch setProperty: #originalEncoding toValue: (FileDirectory extensionFor: stream fullName).
  			pasteUp addMorph: sketch centeredNear: event position.
+ 			image := sketch := nil] fixTemps!
- 			image _ sketch _ nil] fixTemps!



More information about the etoys-dev mailing list