The Trunk: System-dtl.160.mcz

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

The Trunk: System-dtl.160.mcz

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

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

Name: System-dtl.160
Author: dtl
Time: 31 October 2009, 3:30:47 am
UUID: d705035f-648c-41cc-b196-76a6532ea36b
Ancestors: System-dtl.159

Move flaps support from Project to MorphicProject.

=============== Diff against System-dtl.159 ===============

Item was removed:
- ----- Method: Project>>showSharedFlaps (in category 'flaps support') -----
- showSharedFlaps
- "Answer whether shared flaps are shown or suppressed in this project"
-
- | result |
- result := Preferences showSharedFlaps.
- ^ self == Project current
- ifTrue:
- [result]
- ifFalse:
- [self projectPreferenceAt: #showSharedFlaps ifAbsent: [result]]!

Item was removed:
- ----- Method: Project>>suppressFlapsString (in category 'flaps support') -----
- suppressFlapsString
- ^ (self flapsSuppressed
- ifTrue: ['<no>']
- ifFalse: ['<yes>']), 'show shared tabs (F)' translated!

Item was removed:
- ----- Method: Project>>globalFlapWithIDEnabledString: (in category 'flaps support') -----
- globalFlapWithIDEnabledString: aFlapID
- "Answer the string to be shown in a menu to represent the status of the given flap regarding whether it it should be shown in this project."
-
- | aFlapTab |
- aFlapTab := Flaps globalFlapTabWithID: aFlapID.
- ^ (self isFlapEnabled: aFlapTab)
- ifTrue:
- ['<on>', aFlapTab wording]
- ifFalse:
- ['<off>', aFlapTab wording]!

Item was removed:
- ----- Method: Project>>flapsSuppressed (in category 'flaps support') -----
- flapsSuppressed
- "Answer whether flaps are suppressed in this project"
-
- ^ self showSharedFlaps not!

Item was removed:
- ----- Method: Project>>assureFlapIntegrity (in category 'flaps support') -----
- assureFlapIntegrity
- "Make certain that the items on the disabled-global-flap list are actually global flaps, and if not, get rid of them.  Also, old (and damaging) parameters that held references to actual disabled flaps are cleansed"
-
- | disabledFlapIDs currentGlobalIDs oldList |
- Smalltalk isMorphic ifTrue:
- [disabledFlapIDs := self parameterAt: #disabledGlobalFlapIDs ifAbsent: [Set new].
- currentGlobalIDs := Flaps globalFlapTabsIfAny collect: [:f | f flapID].
- oldList := Project current projectParameterAt: #disabledGlobalFlaps ifAbsent: [nil].
- oldList ifNotNil:
- [disabledFlapIDs := oldList collect: [:aFlap | aFlap flapID].
- disabledFlapIDs addAll: {'Scripting' translated. 'Stack Tools' translated. 'Painting' translated}].
- disabledFlapIDs := disabledFlapIDs select: [:anID | currentGlobalIDs includes: anID].
- self projectParameterAt: #disabledGlobalFlapIDs put: disabledFlapIDs asSet.
- self assureNavigatorPresenceMatchesPreference].
-
- projectParameters ifNotNil:
- [projectParameters removeKey: #disabledGlobalFlaps ifAbsent: []]!

Item was removed:
- ----- Method: Project>>cleanseDisabledGlobalFlapIDsList (in category 'flaps support') -----
- cleanseDisabledGlobalFlapIDsList
- "Make certain that the items on the disabled-global-flap list are actually global flaps, and if not, get rid of them"
-
- | disabledFlapIDs currentGlobalIDs oldList |
- Smalltalk isMorphic ifTrue:
- [disabledFlapIDs := self parameterAt: #disabledGlobalFlapIDs ifAbsent: [Set new].
- currentGlobalIDs := Flaps globalFlapTabsIfAny collect: [:f | f flapID].
- oldList := Project current projectParameterAt: #disabledGlobalFlaps ifAbsent: [nil].
- oldList ifNotNil:
- [disabledFlapIDs := oldList select: [:aFlap | aFlap flapID]].
- disabledFlapIDs := disabledFlapIDs select: [:anID | currentGlobalIDs includes: anID].
- self projectParameterAt: #disabledGlobalFlapIDs put: disabledFlapIDs].
-
- projectParameters ifNotNil:
- [projectParameters removeKey: #disabledGlobalFlaps ifAbsent: []].
- !

Item was removed:
- ----- Method: Project>>enableDisableGlobalFlap: (in category 'flaps support') -----
- enableDisableGlobalFlap: aFlapTab
- "For the benefit of pre-existing which-global-flap buttons from a design now left behind."
-
- self flag: #toRemove.
- ^ self inform:
- 'Sorry, this is an obsolete menu; please
- dismiss it and get a fresh menu.  Thanks.'.!

Item was removed:
- ----- Method: Project>>toggleFlapsSuppressed (in category 'flaps support') -----
- toggleFlapsSuppressed
- "Project toggleFlapsSuppressed"
-
- ^self flapsSuppressed: self flapsSuppressed not.!

Item was removed:
- ----- Method: Project>>isFlapEnabled: (in category 'flaps support') -----
- isFlapEnabled:  aFlapTab
- "Answer whether the given flap tab is enabled in this project"
-
- ^ self isFlapIDEnabled: aFlapTab flapID!

Item was removed:
- ----- Method: Project>>isFlapIDEnabled: (in category 'flaps support') -----
- isFlapIDEnabled:  aFlapID
- "Answer whether a flap of the given ID is enabled in this project"
-
- | disabledFlapIDs  |
- disabledFlapIDs := self parameterAt: #disabledGlobalFlapIDs ifAbsent: [^ true].
- ^ (disabledFlapIDs includes: aFlapID) not!

Item was removed:
- ----- Method: Project>>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"
-
- self projectPreferenceFlagDictionary at: #showSharedFlaps put: aBoolean not.
- self == Project current  "Typical case"
- ifTrue:
- [Preferences setPreference: #showSharedFlaps toValue: aBoolean not]
- 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!

Item was removed:
- ----- Method: Project>>globalFlapEnabledString: (in category 'flaps support') -----
- globalFlapEnabledString: aFlapTab
- "Answer the string to be shown in a menu to represent the status of the givne flap regarding whether it it should be shown in this project."
-
- ^ (self isFlapEnabled: aFlapTab)
- ifTrue:
- ['<on>', aFlapTab wording]
- ifFalse:
- ['<off>', aFlapTab wording]!