'From etoys2.2 of 21 September 2007 [latest update: #1790] on 22 November 2007 at 5:18:40 pm'! "Change Set: joinActivity-yo-bf Date: 22 November 2007 Author: Yoshiki Ohshima, Bert Freudenberg when joining, go into shared mode"! !SugarLauncher methodsFor: 'running' stamp: 'bf 11/22/2007 17:15'! 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'. Utilities authorName: self ownerBuddy nick. ServerDirectory addServer: (SugarDatastoreDirectory mimetype: 'application/x-squeak-project' extension: '.pr') named: SugarLauncher defaultDatastoreDirName. sharedActivity := self getSharedActivityById: activityId. sharedActivity ifNotNil: [self join]. parameters at: 'OBJECT_ID' ifPresent: [:id | ^self resumeJournalEntry: id]. Project current projectParameterAt: #sugarAutoSave put: true. self createJournalEntryFor: Project current filename: '' mimetype: ''. sharedActivity ifNotNil: [^self]. ^self welcome: (parameters at: 'URI' ifAbsent: [''])]. self welcome: '' ! ! !SugarLauncher methodsFor: 'commands' stamp: 'bf 11/22/2007 17:12'! join "join a shared activity on startup" self joinSharedActivity. SugarNavigatorBar current ifNotNilDo: [:bar | bar joinSharedActivity]! ! !SugarNavigatorBar methodsFor: 'button actions' stamp: 'bf 11/22/2007 17:08'! joinSharedActivity listener ifNotNil: [listener stopListening]. listener ifNil: [listener _ SugarListenerMorph new]. listener position: -200@-200. ActiveWorld addMorphBack: listener. listener startListening. SugarLibrary default recolorButton: shareButton for: 'share' baseColor: self color highLightColor: self highlightColor. ! ! !SugarNavigatorBar class methodsFor: 'instance creation' stamp: 'yo 11/21/2007 13:49'! current | flap | flap _ Flaps globalFlapTabWithID: 'Sugar Navigator Flap' translated. flap ifNil: [^ nil]. (flap referent isMemberOf: SugarNavigatorBar) ifFalse: [^ nil]. ^ flap referent. ! !