'From etoys4.0 of 23 November 2009 [latest update: #2337] on 25 November 2009 at 11:33:50 pm'! "Change Set: otherActivities-bf Date: 25 November 2009 Author: Bert Freudenberg Prevent automatic saving of projects of non-Etoys activities. Also, when resuming such an activity with an explicitly saved project, do not load both from the bundle and from the journal, but just the latter."! !SugarLauncher methodsFor: 'running' stamp: 'bf 11/25/2009 19:26'! parameters: aDictionary super parameters: aDictionary. "prevent reading bundled project at startup on resuming a journal object. This is for Etoys-based Sugar activities (e.g. made using #bundle:)." ((parameters includesKey: 'OBJECT_ID') and: [(Smalltalk getSystemAttribute: 2) isEmptyOrNil not]) ifTrue: [Preferences disable: #readDocumentAtStartup]! ! !SugarLauncher methodsFor: 'commands' stamp: 'bf 11/25/2009 19:27'! quit self leaveSharedActivity. self shouldAutoSave ifFalse: [^Smalltalk quitPrimitive]. Project current projectParameterAt: #sugarAutoSave put: true; storeOnServerWithNoInteractionThenQuit.! ! !SugarLauncher methodsFor: 'testing' stamp: 'bf 11/25/2009 19:10'! shouldAutoSave "Don't auto-save the home project to avoid confusion. Also, don't auto-save if something was loaded from the XO bundle - this is for Etoys-based Sugar activities (e.g. made using #bundle:)." ^Project current ~~ Project home and: [(Smalltalk getSystemAttribute: 2) isEmptyOrNil]! !