[etoys-dev] Etoys: Sugar-bf.5.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Aug 20 04:55:57 EDT 2010
Bert Freudenberg uploaded a new version of Sugar to project Etoys:
http://source.squeak.org/etoys/Sugar-bf.5.mcz
==================== Summary ====================
Name: Sugar-bf.5
Author: bf
Time: 20 August 2010, 10:55:46 am
UUID: 77e6dd5b-b9e1-4058-9f6c-9f75243048c7
Ancestors: Sugar-bf.4
- adjust navbar for Sugarness only at startup, not while stepping
- rebuild navbar when toggling showAdvancedNavigatorButtons preference
=============== Diff against Sugar-bf.4 ===============
Item was added:
+ ----- Method: SugarNavigatorBar>>startUp (in category 'initialization') -----
+ startUp
+ self checkSugarButtons
+ !
Item was changed:
----- Method: SugarLauncher>>startUp (in category 'running') -----
startUp
self class allInstances do: [:ea | ea shutDown].
Current := self.
+ SugarNavigatorBar current
+ ifNotNilDo: [:bar | bar startUp].
+
parameters at: 'ACTIVITY_ID' ifPresent: [ :activityId |
OLPCVirtualScreen setupIfNeeded.
World windowEventHandler: self.
DBus sessionBus
export: SugarEtoysActivity new
on: 'org.laptop.Activity', activityId
at: '/org/laptop/Activity/', activityId.
Utilities authorName: self presence getOwner nick.
ServerDirectory
addServer: (SugarDatastoreDirectory mimetype: 'application/x-squeak-project' extension: '.pr')
named: SugarLauncher defaultDatastoreDirName.
self joinSharedActivity.
self isShared ifFalse: [
parameters at: 'OBJECT_ID' ifPresent: [:id |
^self resumeJournalEntry: id]].
self isShared ifTrue: [^self].
^self welcome: (parameters at: 'URI' ifAbsent: [''])].
self welcome: ''
!
Item was changed:
----- Method: SugarNavTab>>showNavBar (in category 'initialization') -----
showNavBar
"Show the full nav-bar across the top of the screen."
self removeProperty: #collapsedMode.
referent delete.
+ referent rebuildButtons; hResizing: #spaceFill.
- referent removeAllMorphs; addButtons; hResizing: #spaceFill.
Preferences useArtificialSweetenerBar ifTrue: [referent configureForSqueakland].
self hResizing: #spaceFill.
self edgeToAdhereTo: #top.
self position: 0 at 0.
self addMorph: referent!
Item was changed:
----- Method: SugarNavigatorBar>>naviHeightWithFullUpdate: (in category 'morphic interaction') -----
naviHeightWithFullUpdate: anInteger
submorphs isEmpty ifTrue: [^ super extent: self width at anInteger].
+ self rebuildButtons.
- self removeAllMorphs.
- self addButtons.
self resizeButtonsAndTabTo: anInteger.
!
Item was changed:
----- Method: SugarNavigatorBar>>checkSugarButtons (in category 'initialization') -----
checkSugarButtons
| wasSugar |
(owner hasProperty: #collapsedMode) ifTrue: [^self].
wasSugar := isSugar == true.
isSugar := SugarLauncher isRunningInSugar.
+ wasSugar = isSugar ifFalse: [self rebuildButtons].
+ !
- wasSugar = isSugar ifFalse: [
- submorphs do: [:e | e delete].
- self addButtons]!
Item was changed:
----- Method: SugarNavigatorBar>>color:highLightColor: (in category 'accessing') -----
color: baseColor highLightColor: hColor
| oldHeight |
oldHeight _ self buttonHeight.
(color = baseColor and: [highLightColor = hColor]) ifTrue: [^ self].
super color: baseColor.
highLightColor _ hColor.
+ self rebuildButtons.
- submorphs ifNotEmpty: [submorphs do: [:e | e delete]. self addButtons].
self buttonHeight ~= oldHeight ifTrue: [
self naviHeight: oldHeight.
].
!
Item was added:
+ ----- Method: SugarNavigatorBar>>rebuildButtons (in category 'initialization') -----
+ rebuildButtons
+ (owner hasProperty: #collapsedMode)
+ ifFalse: [
+ submorphs do: [:e | e delete].
+ self addButtons]!
Item was added:
+ ----- Method: SugarNavigatorBar classSide>>rebuildButtons (in category 'utilitity') -----
+ rebuildButtons
+ self current ifNotNilDo: [:bar | bar rebuildButtons]!
Item was changed:
----- Method: SugarNavigatorBar>>step (in category 'morphic interaction') -----
step
- self checkSugarButtons.
self checkForResize.
self undoButtonAppearance.
!
Item was added:
+ ----- Method: SugarNavigatorBar classSide>>initialize (in category 'class initialization') -----
+ initialize
+ "self initialize"
+ Preferences addPreference: #showAdvancedNavigatorButtons
+ categories: #(morphic)
+ default: false
+ balloonHelp: 'If true, an advanced version of the navigator is shown, otherwise a simplified version.'
+ projectLocal: false
+ changeInformee: self
+ changeSelector: #rebuildButtons.
+ !
Item was changed:
----- Method: SugarNavigatorBar>>highLightColor: (in category 'accessing') -----
highLightColor: aColor
| oldHeight |
highLightColor = aColor ifTrue: [^ self].
highLightColor _ aColor.
oldHeight _ self buttonHeight.
+ self rebuildButtons.
- submorphs ifNotEmpty: [submorphs do: [:e | e delete]. self addButtons].
self buttonHeight ~= oldHeight ifTrue: [
self naviHeight: oldHeight.
].
!
Item was changed:
----- Method: SugarNavigatorBar>>color: (in category 'accessing') -----
color: aColor
| oldHeight |
color = aColor ifTrue: [^ self].
oldHeight _ self buttonHeight.
super color: aColor.
+ self rebuildButtons.
- submorphs ifNotEmpty: [submorphs do: [:e | e delete]. self addButtons].
self buttonHeight ~= oldHeight ifTrue: [
self naviHeight: oldHeight.
].
!
More information about the etoys-dev
mailing list