'From etoys4.0 of 9 October 2008 [latest update: #2285] on 10 September 2009 at 8:06:57 pm'! "Change Set: toolBarHelpTweak-sw Date: 10 September 2009 Author: Scott Wallace SQ-257 When auto-hiding toolbar (when opening an 'old' project created in a version of the system before we had the tool bar at the top), initially show the balloon help for the show-tool-bar button"! !Project methodsFor: 'menu messages' stamp: 'sw 9/10/2009 19:55'! finalEnterActions "Perform the final actions necessary as the receiver project is entered" | navigator armsLengthCmd navType thingsToUnhibernate | self projectParameters at: #projectsToBeDeleted ifPresent: [ :projectsToBeDeleted | self removeParameter: #projectsToBeDeleted. projectsToBeDeleted do: [ :each | Project deletingProject: each. each removeChangeSetIfPossible]]. Preferences preserveProjectLocale ifTrue: [Locale switchAndInstallFontToID: self localeID gently: true] ifFalse: [self localeID = LocaleID current ifFalse: [self localeChanged]]. (self projectParameterAt: #oldProject ifAbsent: [false]) ifTrue: [(self isFlapIDEnabled: 'Sugar Navigator Flap' translated) ifTrue: [(world findA: SugarNavTab) ifNotNilDo: [:tab | tab hideNavBar. tab firstSubmorph putUpInitialBalloonHelpFor: {{#showNavBar. 'show the tool bar' translated. #bottomLeft. false}}]]] ifFalse: [(self isFlapIDEnabled: 'Sugar Navigator Flap' translated) ifFalse: [Flaps enableGlobalFlapWithID: 'Sugar Navigator Flap' translated]]. self removeParameter: #oldProject. thingsToUnhibernate _ world valueOfProperty: #thingsToUnhibernate ifAbsent: [#()]. thingsToUnhibernate do: [:each | each unhibernate]. world removeProperty: #thingsToUnhibernate. (self projectParameterAt: #substitutedFont) ifNotNil: [ self removeParameter: #substitutedFont. self world presenter allPlayersWithUniclasses do: [:uni | uni allScriptEditors do: [:scr | scr setProperty: #needsLayoutFixed toValue: true ]]. ]. navType _ ProjectNavigationMorph preferredNavigator. armsLengthCmd _ self parameterAt: #armsLengthCmd ifAbsent: [nil]. navigator _ world findA: navType. (Preferences classicNavigatorEnabled and: [Preferences showProjectNavigator and: [navigator isNil]]) ifTrue: [(navigator _ navType new addButtons) bottomLeft: world bottomLeft; openInWorld: world]. navigator notNil & armsLengthCmd notNil ifTrue: [navigator color: Color lightBlue]. armsLengthCmd ifNotNil: [armsLengthCmd openInWorld: world]. Smalltalk isMorphic ifTrue: [world reformulateUpdatingMenus. world hands do: [:h | h clearKeyboardInterpreter]. world presenter positionStandardPlayer]. WorldState addDeferredUIMessage: [self startResourceLoading].! ! !SugarNavigatorBar methodsFor: 'initialization' stamp: 'sw 9/10/2009 20:04'! putUpInitialBalloonHelpFor: quads "Given a list of quads of the form (see senders for examples), put up initial balloon help for them." " SugarNavigatorBar someInstance putUpInitialBalloonHelpFor: #((doNewPainting 'make a new painting' topRight false) (toggleSupplies 'open the supplies bin' topLeft true)) SugarNavigatorBar someInstance putUpInitialBalloonHelpFor: #((showNavBar 'show the tool bar' bottomLeft false) (hideNavBar 'hide the tool bar' bottomLeft false)) " | b1 p b | p _ PasteUpMorph new. p clipSubmorphs: false. p color: Color transparent. p borderWidth: 0. quads do: [:aQuad | (submorphs first submorphs detect: [:e | e isButton and: [e actionSelector = aQuad first]] ifNone: [nil]) ifNotNilDo: [:aButton | b1 := BalloonMorph string: aQuad second for: aButton corner: aQuad third force: aQuad fourth. p addMorph: b1]]. b _ BalloonMorph string: p for: World corner: #bottomLeft. b color: Color transparent. b borderWidth: 0. [(Delay forSeconds: 1) wait. b popUpForHand: ActiveHand] fork. ! !