new items have translateLabel on by default.
--- a/MenuEditor.st Sat Jun 06 17:02:07 1998 +0200
+++ b/MenuEditor.st Sat Jun 06 17:25:53 1998 +0200
@@ -2173,44 +2173,17 @@
"get the submenuChannel"
submenuChannel := aChannel
+!
+
+translateLabel:aBoolean
+ "set/clear the translate to national-language flag"
+
+ translateLabel := aBoolean
+
+ "Created: / 6.6.1998 / 17:23:33 / cg"
! !
-!MenuEditor::Item methodsFor:'conversion'!
-
-asMenuItem
- "converts self to a menu item"
-
- |item rcv|
-
- item := MenuItem labeled:label.
- item isVisible:isVisible.
-
- self isSeparator ifFalse:[
- item activeHelpKey:activeHelpKey.
- item enabled:enabled.
- item accessCharacterPosition:accessCharacterPos.
- item argument:argument.
- item submenuChannel:submenuChannel.
- item nameKey:nameKey.
- item shortcutKeyCharacter:shortcutKey.
- item startGroup:startGroup.
- item value:value.
- item indication:indication.
- item translateLabel: translateLabel.
- item isButton: isButton.
-
- icon notNil ifTrue:[
- rcv := ResourceRetriever new.
- rcv className:retriever.
- rcv selector:icon.
- iconAndLabel == true ifTrue:[
- rcv labelText:label
- ].
- item labelImage:rcv
- ]
- ].
- ^item
-!
+!MenuEditor::Item methodsFor:'building'!
buildFromAspects:aspects
"read the values of the aspects into my values"
@@ -2256,6 +2229,7 @@
].
isVisible := (aspects at:#isVisible) value.
+ "Modified: / 6.6.1998 / 17:20:59 / cg"
!
buildFromMenuItem:anItem
@@ -2299,6 +2273,43 @@
label := rtv labelText.
]
]
+! !
+
+!MenuEditor::Item methodsFor:'conversion'!
+
+asMenuItem
+ "converts self to a menu item"
+
+ |item rcv|
+
+ item := MenuItem labeled:label.
+ item isVisible:isVisible.
+
+ self isSeparator ifFalse:[
+ item activeHelpKey:activeHelpKey.
+ item enabled:enabled.
+ item accessCharacterPosition:accessCharacterPos.
+ item argument:argument.
+ item submenuChannel:submenuChannel.
+ item nameKey:nameKey.
+ item shortcutKeyCharacter:shortcutKey.
+ item startGroup:startGroup.
+ item value:value.
+ item indication:indication.
+ item translateLabel: translateLabel.
+ item isButton: isButton.
+
+ icon notNil ifTrue:[
+ rcv := ResourceRetriever new.
+ rcv className:retriever.
+ rcv selector:icon.
+ iconAndLabel == true ifTrue:[
+ rcv labelText:label
+ ].
+ item labelImage:rcv
+ ]
+ ].
+ ^item
!
toAspects:aspects
@@ -2738,7 +2749,9 @@
nodeLabel:aLabel
- ^TreeItem new contents: (MenuEditor::Item new label:aLabel)
+ ^TreeItem new contents: ((MenuEditor::Item new label:aLabel) translateLabel:true)
+
+ "Modified: / 6.6.1998 / 17:22:35 / cg"
!
selectedNodeAdd:something