Bert Freudenberg uploaded a new version of Sugar to project Etoys: http://source.squeak.org/etoys/Sugar-bf.13.mcz
==================== Summary ====================
Name: Sugar-bf.13 Author: bf Time: 4 June 2012, 2:51:32 pm UUID: 35e1b47f-1154-4c58-ae86-4b91f94a8a47 Ancestors: Sugar-kfr.12
Handle object chooser response from external media instead of Journal (absolute file path instead of object id)
=============== Diff against Sugar-kfr.12 ===============
Item was changed: ----- Method: SugarLauncher>>chooser:response: (in category 'chooser') ----- + chooser: chooserId response: objectIdOrPath - chooser: chooserId response: objectId self chooserDone: chooserId. WorldState addDeferredUIMessage: [ + (objectIdOrPath beginsWith: '/') + ifTrue: [ + | file title | + file := FileStream readOnlyFileNamed: objectIdOrPath. + title := FileDirectory localNameFor: objectIdOrPath. + self handleStream: file mimetype: nil titled: title] + ifFalse: [ + | props title mimetype | + props := self getProperties: objectIdOrPath. + title := props at: 'title' ifAbsent: ['untitled' translated]. + mimetype := props at: 'mime_type' ifAbsent: ['']. + [self open: objectIdOrPath title: title mimetype: mimetype] + on: SugarPropertiesNotification do: [:ex | ex resume: props]]].! - | props title mimetype | - props := self getProperties: objectId. - title := props at: 'title' ifAbsent: ['untitled' translated]. - mimetype := props at: 'mime_type' ifAbsent: ['']. - [self open: objectId title: title mimetype: mimetype] - on: SugarPropertiesNotification do: [:ex | ex resume: props]].!
Item was changed: ----- Method: SugarLauncher>>handleStream:mimetype:titled: (in category 'datastore') ----- + handleStream: tmpStream mimetype: mimetypeOrNil titled: title - handleStream: tmpStream mimetype: mimetype titled: title "tmpStream was loaded from journal, is not a project, do something sensible" "this ignores the mimetype, we really should do better ..."
[ [(ExternalDropHandler lookupExternalDropHandler: tmpStream) handle: tmpStream in: World dropEvent: ActiveHand lastEvent] ifError: [self inform: ('Cannot open {1}' translated withCRs format: {title})] ] ensure: [tmpStream ifNotNil: [tmpStream close]].!
etoys-dev@lists.squeakfoundation.org