--- a/MenuEditor.st Tue Sep 05 18:23:08 2006 +0200
+++ b/MenuEditor.st Tue Sep 05 18:44:20 2006 +0200
@@ -1536,7 +1536,12 @@
]
].
self updateChannels.
- self clearModified.
+"/ self clearModified.
+ self clearModifiedFlag.
+
+ self enablingCommitButtonsHolder value:false.
+
+ "Modified: / 05-09-2006 / 18:43:30 / cg"
!
cancel
@@ -1563,10 +1568,6 @@
!MenuEditor methodsFor:'aspects'!
-autoAcceptOnSelectionChange
- ^ builder valueAspectFor:#autoAcceptOnSelectionChange initialValue:true
-!
-
canCreateDelayedMenuChannel
"boolean holder, true if the current selected item accepts a delayed menu
"
@@ -2142,13 +2143,17 @@
closeRequest
"asks for permission before closing"
- self enablingCommitButtonsHolder value ifTrue:[
- self setModified.
- self askForListModification.
- modified ifTrue:[^ self].
- self clearModified.
- ].
+ self askForModification ifFalse:[^self].
+
+"/ self enablingCommitButtonsHolder value ifTrue:[
+"/ self setModified.
+"/ self askForListModification.
+"/ modified ifTrue:[^ self].
+"/ self clearModified.
+"/ ].
super closeRequest
+
+ "Modified: / 05-09-2006 / 18:44:15 / cg"
!
commonPostBuild
@@ -3362,11 +3367,13 @@
!MenuEditor::Item methodsFor:'aspects'!
aspectAt:aKey put:aValue
- "set a specific aspect named aKey to the aValue
- "
+ "set a specific aspect named aKey to the aValue"
+
aKey == #rawLabel ifTrue:[ ^ self rawLabel:aValue ].
aKey == #submenuChannel ifTrue:[ ^ self ].
menuItem perform:((aKey, ':') asSymbol) with:aValue.
+
+ "Modified: / 05-09-2006 / 17:47:19 / cg"
!
fromAspects:aspects
@@ -3911,29 +3918,30 @@
!MenuEditor::ActionItem methodsFor:'adding & removing'!
-add:anItem
+add:anItem
"add an item; test whether the item is a delayed menu and
- not already a delayed menu exists.
- "
- (anItem isKindOfMenu and:[self canAddDelayedMenu]) ifFalse:[
+ not already a delayed menu exists."
+
+ (anItem isKindOfMenu and:[ self canAddDelayedMenu ]) ifFalse:[
^ nil
].
- "/ reset values not setable if a delayed menu is configured
+
menuItem triggerOnDown:false.
- anItem argument:(menuItem argument).
-
+ anItem argument:(menuItem argument).
isExpanded := false.
anItem parent:self.
children := Array with:anItem.
self expand.
- ^ anItem
+ ^ anItem
+
+ "Modified: / 05-09-2006 / 17:49:57 / cg"
! !
!MenuEditor::ActionItem methodsFor:'aspects'!
aspectAt:aKey put:aValue
- "pass the argument to the delayed menu if existent
- "
+ "set a specific aspect named aKey to the aValue"
+
aKey == #argument ifTrue:[
self hasDelayedMenu ifTrue:[
children first argument:aValue
@@ -3943,16 +3951,19 @@
].
aKey == #triggerOnDown ifTrue:[
+ |triggerOnDown|
+
self hasDelayedMenu ifTrue:[
- menuItem triggerOnDown:false
+ triggerOnDown := false
] ifFalse:[
- menuItem triggerOnDown:aValue
+ triggerOnDown := aValue
].
+ menuItem triggerOnDown:triggerOnDown.
^ self.
].
super aspectAt:aKey put:aValue.
- "Modified: / 16-07-2006 / 10:18:51 / cg"
+ "Modified: / 05-09-2006 / 17:47:24 / cg"
!
toAspects:aspects
@@ -4236,10 +4247,12 @@
!MenuEditor::LinkedMenuItem methodsFor:'aspects'!
aspectAt:aKey put:aValue
- "set a specific aspect named aKey to the aValue
- "
+ "set a specific aspect named aKey to the aValue"
+
aKey == #submenuChannel ifTrue:[ ^ self submenuChannel:aValue ].
super aspectAt:aKey put:aValue.
+
+ "Modified: / 05-09-2006 / 17:47:39 / cg"
!
getDelayedAttributesFrom:anItem
@@ -4464,12 +4477,14 @@
!
aspectAt:aKey put:aValue
- "set a specific aspect named aKey to the aValue
- "
+ "set a specific aspect named aKey to the aValue"
+
aKey == #submenuChannel ifTrue:[ ^ self submenuChannel:aValue ].
aKey == #isSliceMenu ifTrue:[ ^ self ].
super aspectAt:aKey put:aValue.
+
+ "Modified: / 05-09-2006 / 17:47:42 / cg"
!
submenuChannel
@@ -5357,9 +5372,11 @@
!MenuEditor::RootItem methodsFor:'aspects'!
aspectAt:aKey put:aValue
- "discard all other than the rawLabel
- "
+ "ignore all aspects other than the rawLabel"
+
aKey == #rawLabel ifTrue:[ self rawLabel:aValue ].
+
+ "Modified: / 05-09-2006 / 17:48:01 / cg"
! !
!MenuEditor::RootItem methodsFor:'displaying'!