'From etoys3.0 of 7 March 2008 [Letztes Update: #2137] on 8 September 2008 at 4:39:40 pm'! "Change Set: enterWelcome-bf Date: 8 September 2008 Author: Bert Freudenberg Do not enter welcome project if DnD events are queued"! !EventSensor methodsFor: 'accessing' stamp: 'bf 9/8/2008 16:22'! hasDandDEvents | found | found := false. eventQueue nextOrNilSuchThat: [:buf | (self isDandDEvent: buf) ifTrue: [found := true]. false]. ^found! ! !SugarLauncher methodsFor: 'commands' stamp: 'bf 9/8/2008 16:39'! welcome: aUrl "Sent either when running from Sugar, or at regular startUp otherwise" aUrl isEmpty ifFalse: [ | url | url := (aUrl includes: $/) ifTrue: [aUrl] ifFalse: ['file:', (parameters at: 'BUNDLE_PATH'), '/', aUrl]. ^(url endsWith: '.pr') ifTrue: [Project fromUrl: url] ifFalse: [WorldState addDeferredUIMessage: [FileStream fileIn: (url copyAfter: $:)]]]. self shouldEnterWelcomeProject ifTrue: [ (Project named: self class welcomeProjectName) ifNotNilDo: [:p | p enter]].! ! !SugarLauncher methodsFor: 'testing' stamp: 'bf 9/8/2008 16:39'! shouldEnterWelcomeProject "only if no other content is about to be loaded" ^Preferences eToyFriendly and: [(SmalltalkImage current getSystemAttribute: 2) isEmptyOrNil and: [(self includesParameter: 'SRC') not and: [Sensor hasDandDEvents not]]] ! !