'From etoys3.0 of 7 March 2008 [Letztes Update: #2119] on 2 September 2008 at 6:04:15 pm'! "Change Set: sugarClip-bf Date: 2 September 2008 Author: Bert Freudenberg Make open from clipboard work (#6262)"! !SugarLauncher methodsFor: 'datastore' stamp: 'bf 9/2/2008 18:03'! resumeJournalEntry: id | props file title project mimetype | props := self dataStore getProperties: id. title := (props at: 'title' ifAbsent: ['untitled' translated]) utf8ToSqueak. mimetype := props at: 'mime_type' ifAbsent: ['']. mimetype isEmpty ifTrue: [^self welcome: '']. mimetype = 'text/uri-list' ifTrue: [ file := self getFile: id. file := FileStream readOnlyFileNamed: file contentsOfEntireFile. (file name endsWith: '.pr') ifTrue: [mimetype := 'application/x-squeak-project']]. mimetype = 'application/x-squeak-project' ifFalse: [ "Do not modify original non-project journal entry when later saving this project" parameters removeKey: 'OBJECT_ID' ifAbsent: []. "reuse drop code" WorldState addDeferredUIMessage: [ ActiveHand lastEvent position: World center. Utilities informUser: 'Opening journal entry' translated, String cr, (title copyReplaceAll: String lf with: String cr) during: [file ifNil: [file := self getFile: id]]. self handleStream: file mimetype: mimetype titled: title]. ^Project enterNew]. ProjectLoading showProgressBarDuring: [ Display fillWhite;forceToScreen. file ifNil: [file := self getFile: id]. "load project and close temp file (which will thus be deleted)" project := ProjectLoading loadName: ((title copyReplaceAll: '/' with: '\') contractTo: 64) stream: file fromDirectory: nil withProjectView: nil. file close. project name: title. project projectParameterAt: #sugarAutoSave put: true. project enter]. ! !