'From etoys4.0 of 9 October 2008 [latest update: #2306] on 15 September 2009 at 2:47:33 pm'! "Change Set: fixBalloonHelp-bf Date: 15 September 2009 Author: Bert Freudenberg Replace non-undo-related uses of undoButton with paintButton. NOTE: Changeset has been modified manually. Postscript rebuilds tool bar"! !SugarNavigatorBar methodsFor: 'initialization' stamp: 'bf 9/15/2009 14:44'! putUpInitialBalloonHelp "NOTE: this removes a paintButton temp reference before adding it as an instance variable. Actual source follows below." ! ! ProjectNavigationMorph subclass: #SugarNavigatorBar instanceVariableNames: 'sugarLib highLightColor undoButton shareButton supplies listener suppliesFlap projectNameField isSugar paintButton ' classVariableNames: '' poolDictionaries: '' category: 'Sugar'! !SugarNavigatorBar methodsFor: 'initialization' stamp: 'bf 9/15/2009 14:44'! putUpInitialBalloonHelp " SugarNavigatorBar putUpInitialBalloonHelp " | suppliesButton b1 b2 p b | suppliesButton _ paintButton owner submorphs detect: [:e | e isButton and: [e actionSelector = #toggleSupplies]]. b1 _ BalloonMorph string: self paintButtonInitialExplanation for: paintButton corner: #topRight force: false. b2 _ BalloonMorph string: self suppliesButtonInitialExplanation for: suppliesButton corner: #topLeft force: true. p _ PasteUpMorph new. p clipSubmorphs: false. p color: Color transparent. p borderWidth: 0. p addMorph: b1. p addMorph: b2. b _ BalloonMorph string: p for: World corner: #bottomLeft. b color: Color transparent. b borderWidth: 0. [(Delay forSeconds: 1) wait. b popUpForHand: ActiveHand] fork. ! ! !SugarNavigatorBar methodsFor: 'buttons creation' stamp: 'bf 9/15/2009 14:44'! buttonPaint "Build and return a fresh Undo button for me." ^paintButton := self makeButton: 'paint' balloonText: 'Make a painting' translated for: #doNewPainting ! ! !SugarNavigatorBar methodsFor: 'accessing' stamp: 'bf 9/15/2009 14:44'! buttonHeight ^ paintButton ifNotNil: [paintButton height] ifNil: [75]. ! ! !SugarNavigatorBar methodsFor: 'accessing' stamp: 'bf 9/15/2009 14:45'! oldHeight ^ paintButton ifNotNil: [paintButton height] ifNil: [75]. ! ! !InteriorSugarNavBar methodsFor: 'morphic interaction' stamp: 'bf 9/15/2009 14:45'! resizeButtonsAndTabTo: newDim "The user has chosen a new height for the nav bar; make the buttons follow suit." | frame wantsSupplies | wantsSupplies := supplies notNil and: [supplies flapShowing]. wantsSupplies ifTrue: [supplies hideFlap]. frame _ paintButton owner. frame submorphs do: [:e | e naviHeight: newDim]. frame height: newDim. self height: newDim. wantsSupplies ifTrue: [supplies showFlap]! ! ProjectNavigationMorph subclass: #SugarNavigatorBar instanceVariableNames: 'sugarLib highLightColor paintButton undoButton shareButton supplies listener suppliesFlap projectNameField isSugar' classVariableNames: '' poolDictionaries: '' category: 'Sugar'! "Postscript:" Flaps disableGlobalFlaps: false. Flaps enableEToyFlaps. !