ignoreShortcutKeys also blocks individual items
authorClaus Gittinger <cg@exept.de>
Thu, 23 Feb 2006 22:22:16 +0100
changeset 2010 f5f5a961cfa8
parent 2009 b919406a99f8
child 2011 d323a2d0dbfc
ignoreShortcutKeys also blocks individual items
MenuEditor.st
--- a/MenuEditor.st	Mon Feb 20 22:30:50 2006 +0100
+++ b/MenuEditor.st	Thu Feb 23 22:22:16 2006 +0100
@@ -3203,6 +3203,16 @@
               acceptOnPointerLeave: false
             )
            (CheckBoxSpec
+              label: 'Ignore Accelerator (i.e. Display Only)'
+              name: 'ignoreShortcutKeysInItem'
+              layout: (AlignmentOrigin 42 0 204 0 0 0.5)
+              activeHelpKey: detailsIgnoreAcceleratorKeys
+              visibilityChannel: hasNoSubmenu
+              model: ignoreShortcutKeys
+              translateLabel: true
+              resizeForLabel: true
+            )
+           (CheckBoxSpec
               label: 'Ignore Accelerators in Submenu'
               name: 'ignoreShortcutKeys'
               layout: (AlignmentOrigin 42 0 204 0 0 0.5)
@@ -3257,6 +3267,9 @@
     aspects at:#hasSubmenu ifAbsentPut:[
         false asValue
     ].
+    aspects at:#hasNoSubmenu ifAbsentPut:[
+        true asValue
+    ].
 ! !
 
 !MenuEditor::Item class methodsFor:'testing'!
@@ -3369,6 +3382,7 @@
     ].
     (aspects at:#notDelayedMenu) value:(self isDelayedMenu not).
     (aspects at:#hasSubmenu)     value:(self isKindOfMenu or:[self children size ~~ 0]).
+    (aspects at:#hasNoSubmenu)   value:(self isKindOfMenu not ).
 ! !
 
 !MenuEditor::Item methodsFor:'displaying'!