'From etoys2.1 of 30 August 2007 [latest update: #1638] on 14 September 2007 at 9:13:41 pm'! "Change Set: prjKeepFix-bf Date: 14 September 2007 Author: Bert Freudenberg We were creating too many journal entries"! !SugarLauncher methodsFor: 'running' stamp: 'bf 9/14/2007 21:04'! startUp self class allInstances do: [:ea | ea shutDown]. Current := self. parameters at: 'ACTIVITY_ID' ifPresent: [ :activityId | World windowEventHandler: self. process := [self runDBusService: 'org.laptop.Activity', activityId] forkAt: Processor userInterruptPriority named: 'Sugar DBus service'. ServerDirectory addServer: (SugarDatastoreDirectory mimetype: 'application/x-squeak-project' extension: '.pr') named: SugarLauncher defaultDatastoreDirName. parameters at: 'OBJECT_ID' ifPresent: [:id | ^self resumeJournalEntry: id]. Project current parameterAt: #sugarAutoSave put: true. self createJournalEntryFor: Project current filename: '' mimetype: ''. ^self welcome: (parameters at: 'URI' ifAbsent: [''])]. parameters at: 'SUGARPIPE' ifPresent: [ :sugarPipe | ^process := [self fetchCommandsFrom: sugarPipe] forkAt: Processor userInterruptPriority named: 'Sugar Pipe handler']. self welcome: '' ! ! !SugarLauncher methodsFor: 'datastore' stamp: 'bf 9/14/2007 21:07'! makeJournalEntryFor: aProject filename: aFilename mimetype: mimetypeString | id | "(id := aProject projectParameterAt: #sugarId)" (id := parameters at: 'OBJECT_ID' ifAbsent: [nil]) ifNil: [ id := self createJournalEntryFor: aProject filename: aFilename mimetype: mimetypeString. aProject projectParameterAt: #sugarId put: id] ifNotNil: [ (aProject projectParameterAt: #sugarAutoSave ifAbsent: [true]) ifTrue: [self updateJournalEntry: id for: aProject filename: aFilename mimetype: mimetypeString] ifFalse: [self createJournalEntryFor: aProject filename: aFilename mimetype: mimetypeString]]! !