'From Squeak3.1alpha of 5 February 2001 [latest update: #3652] on 19 February 2001 at 10:02:15 am'! "Change Set: navUndo Date: 19 February 2001 Author: Bob Arning - added an undo button to the navigator and moved share to the other end - also commented out a walkback in new preference code."! !Preferences class methodsFor: 'pref buttons' stamp: 'RAA 2/19/2001 09:58'! buttonRepresenting: prefSymbol wording: aString color: aColor inPanel: aPreferencesPanel "Return a button that controls the setting of prefSymbol. It will keep up to date even if the preference value is changed in a different place" | outerButton aButton str aHelp miniWrapper | ((FlagDictionary includesKey: prefSymbol) or: [self flagsHeldByProjects includesKey: prefSymbol]) ifFalse: [self error: 'Unknown preference: ', prefSymbol printString]. outerButton _ AlignmentMorph newRow height: 24. outerButton color: (aColor ifNil: [Color r: 0.645 g: 1.0 b: 1.0]). outerButton hResizing: (aPreferencesPanel ifNil: [#shrinkWrap] ifNotNil: [#spaceFill]). outerButton vResizing: #shrinkWrap. outerButton addMorph: (aButton _ UpdatingThreePhaseButtonMorph checkBox). aButton target: self; actionSelector: #togglePreference:; arguments: (Array with: prefSymbol); target: Preferences; getSelector: prefSymbol. outerButton addTransparentSpacerOfSize: (2 @ 0). str _ StringMorph contents: aString font: (StrikeFont familyName: 'NewYork' size: 12). "(self isProjectPreference: prefSymbol) ifTrue: [str emphasis: 1]." "<<< this caused a walkback so I commented it out" miniWrapper _ AlignmentMorph newRow hResizing: #shrinkWrap; vResizing: #shrinkWrap. miniWrapper beTransparent addMorphBack: str lock. aPreferencesPanel ifNotNil: [miniWrapper on: #mouseDown send: #prefMenu:rcvr:pref: to: aPreferencesPanel withValue: prefSymbol]. outerButton addMorphBack: miniWrapper. aButton setBalloonText: (aHelp _ Preferences helpMessageForPreference: prefSymbol). miniWrapper setBalloonText: aHelp; setProperty: #balloonTarget toValue: aButton. ^ outerButton "self currentHand attachMorph: (Preferences buttonRepresenting: #balloonHelpEnabled wording: 'Balloon Help' color: Color red muchLighter inPanel: nil) " ! ! !ProjectNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 2/19/2001 09:53'! currentNavigatorVersion ^22 "since these guys get saved, we fix them up if they are older versions"! ! !ProjectNavigationMorph methodsFor: 'as yet unclassified' stamp: 'RAA 2/19/2001 09:53'! makeTheButtons ^{ self buttonShare. self buttonPrev. self buttonNext. self buttonPublish. self buttonNewer. self buttonTell. self buttonFind. self buttonFullScreen. self buttonFlaps. self buttonPaint. self buttonUndo. } ! ! !ProjectNavigationMorph methodsFor: 'the buttons' stamp: 'RAA 2/19/2001 09:51'! buttonUndo ^self makeButton: 'Undo' balloonText: 'Undo the last command' for: #undoLastCommand ! ! !ProjectNavigationMorph methodsFor: 'the actions' stamp: 'RAA 2/19/2001 09:52'! undoLastCommand self world commandHistory undoLastCommand! !