[squeak-dev] The Trunk: Morphic-laza.541.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon May 16 11:29:37 UTC 2011
Alexander Lazarević uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-laza.541.mcz
==================== Summary ====================
Name: Morphic-laza.541
Author: laza
Time: 16 May 2011, 1:28:29.285 pm
UUID: d70c5467-259b-934d-9c3b-3215c3e51f45
Ancestors: Morphic-cmm.540
Make the update of the menu item wording independent of the update of the menu item enablement. As a result this
MenuMorph>>addWithLabel: aLabel enablement: anEnablementSelector action: aSymbol
works as intended
=============== Diff against Morphic-cmm.540 ===============
Item was changed:
----- Method: UpdatingMenuItemMorph>>updateContents (in category 'world') -----
updateContents
"Update the receiver's contents"
| newString enablement nArgs |
+ ((wordingProvider isNil) or: [wordingSelector isNil]) ifFalse: [
+ nArgs := wordingSelector numArgs.
+ newString := nArgs = 0
+ ifTrue:
+ [wordingProvider perform: wordingSelector]
+ ifFalse:
+ [(nArgs = 1 and: [wordingArgument notNil])
+ ifTrue:
+ [wordingProvider perform: wordingSelector with: wordingArgument]
+ ifFalse:
+ [nArgs == arguments size ifTrue:
+ [wordingProvider perform: wordingSelector withArguments: arguments]]].
+ newString = (self contentString ifNil: [ contents ])
+ ifFalse: [self contents: newString.
+ MenuIcons decorateMenu: owner ]].
- ((wordingProvider isNil) or: [wordingSelector isNil]) ifTrue: [^ self].
- nArgs := wordingSelector numArgs.
- newString := nArgs = 0
- ifTrue:
- [wordingProvider perform: wordingSelector]
- ifFalse:
- [(nArgs = 1 and: [wordingArgument notNil])
- ifTrue:
- [wordingProvider perform: wordingSelector with: wordingArgument]
- ifFalse:
- [nArgs == arguments size ifTrue:
- [wordingProvider perform: wordingSelector withArguments: arguments]]].
- newString = (self contentString ifNil: [ contents ])
- ifFalse: [self contents: newString.
- MenuIcons decorateMenu: owner ].
enablementSelector ifNotNil:
[(enablement := self enablement) == isEnabled
ifFalse: [self isEnabled: enablement]]!
More information about the Squeak-dev
mailing list
|