Do not try to translate separators
authorStefan Vogel <sv@exept.de>
Wed, 09 Apr 2008 20:45:40 +0200
changeset 2412 3f11e716f802
parent 2411 9cec069b6442
child 2413 ceba27b5a30f
Do not try to translate separators
MenuItem.st
--- a/MenuItem.st	Fri Mar 28 14:11:12 2008 +0100
+++ b/MenuItem.st	Wed Apr 09 20:45:40 2008 +0200
@@ -89,7 +89,7 @@
 separator
     "create and return a new menuItem for a separator"
 
-    ^ self label:'-'
+    ^ self new label:'-'; translateLabel:false
 ! !
 
 !MenuItem class methodsFor:'constants'!
@@ -524,7 +524,7 @@
 translateLabel
     "returns true if the label is to be translated"
 
-    ^translateLabel ? true
+    ^ translateLabel ? true
 !
 
 translateLabel:aBoolean
@@ -633,7 +633,7 @@
         ^ self.
     ].
 
-    self translateLabel ifTrue:[
+    (self translateLabel and:[label ~= '-']) ifTrue:[
         label := ResourceRetriever 
                         findResourceLabel:label 
                         in:aResourceContainerOrApplication
@@ -907,5 +907,5 @@
 !MenuItem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.82 2007-03-27 09:20:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.83 2008-04-09 18:45:40 stefan Exp $'
 ! !