The Trunk: Morphic-dtl.228.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-dtl.228.mcz

commits-2
David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.228.mcz

==================== Summary ====================

Name: Morphic-dtl.228
Author: dtl
Time: 13 November 2009, 10:11:15 am
UUID: d129d8ef-e747-4eb1-b978-d6698d2007db
Ancestors: Morphic-ar.227

Finish moving flaps support from Project to MVCProject and MorphicProjec

=============== Diff against Morphic-ar.227 ===============

Item was added:
+ ----- Method: MorphicProject>>setFlaps (in category 'flaps support') -----
+ setFlaps
+
+ | flapTabs flapIDs sharedFlapTabs navigationMorph |
+ self flag: #toRemove. "check if this method still used by Etoys"
+
+ flapTabs := ActiveWorld flapTabs.
+ flapIDs := flapTabs collect: [:tab | tab knownName].
+ flapTabs
+ do: [:tab | (tab isMemberOf: ViewerFlapTab)
+ ifFalse: [tab isGlobalFlap
+ ifTrue: [Flaps removeFlapTab: tab keepInList: false.
+ tab currentWorld reformulateUpdatingMenus]
+ ifFalse: [| referent |
+ referent := tab referent.
+ referent isInWorld
+ ifTrue: [referent delete].
+ tab delete]]].
+ sharedFlapTabs := Flaps classPool at: #SharedFlapTabs.
+ flapIDs
+ do: [:id |
+ id = 'Navigator' translated
+ ifTrue: [sharedFlapTabs add: Flaps newNavigatorFlap].
+ id = 'Widgets' translated
+ ifTrue: [sharedFlapTabs add: Flaps newWidgetsFlap].
+ id = 'Tools' translated
+ ifTrue: [sharedFlapTabs add: Flaps newToolsFlap].
+ id = 'Squeak' translated
+ ifTrue: [sharedFlapTabs add: Flaps newSqueakFlap].
+ id = 'Supplies' translated
+ ifTrue: [sharedFlapTabs add: Flaps newSuppliesFlap].
+ id = 'Stack Tools' translated
+ ifTrue: [sharedFlapTabs add: Flaps newStackToolsFlap].
+ id = 'Painting' translated
+ ifTrue: [sharedFlapTabs add: Flaps newPaintingFlap].
+ id = 'Objects' translated
+ ifTrue: [sharedFlapTabs add: Flaps newObjectsFlap ]].
+ 2 timesRepeat: [flapIDs do: [:id | Flaps enableDisableGlobalFlapWithID: id]].
+ ActiveWorld flapTabs
+ do: [:flapTab | flapTab isCurrentlyTextual
+ ifTrue: [flapTab changeTabText: flapTab knownName]].
+ Flaps positionNavigatorAndOtherFlapsAccordingToPreference.
+ navigationMorph := World findDeeplyA: ProjectNavigationMorph preferredNavigator.
+ navigationMorph isNil
+ ifTrue: [^ self].
+ navigationMorph allMorphs
+ do: [:morph | morph class == SimpleButtonDelayedMenuMorph
+ ifTrue: [(morph findA: ImageMorph) isNil
+ ifTrue: [| label |
+ label := morph label.
+ label isNil
+ ifFalse: [| name |
+ name := morph knownName.
+ name isNil
+ ifTrue: [morph name: label.
+ name := label].
+ morph label: name translated]]]]!

Item was added:
+ ----- Method: MorphicProject>>flapsSuppressed: (in category 'flaps support') -----
+ flapsSuppressed: aBoolean
+ "Make the setting of the flag that governs whether global flaps are suppressed in the project be as indicated and add or remove the actual flaps"
+
+ super flapsSuppressed: aBoolean.
+ self == Project current
+ ifFalse:   "Anomalous case where this project is not the current one."
+ [aBoolean
+ ifTrue:
+ [Flaps globalFlapTabsIfAny do:
+ [:aFlapTab | Flaps removeFlapTab: aFlapTab keepInList: true]]
+
+ ifFalse:
+ [Smalltalk isMorphic  ifTrue:
+ [self currentWorld addGlobalFlaps]]].
+ Project current assureNavigatorPresenceMatchesPreference!