diff -r fbf082828db6 -r 32befdc61270 MenuEditor.st --- a/MenuEditor.st Mon Jan 12 09:31:50 2004 +0100 +++ b/MenuEditor.st Tue Jan 13 17:30:14 2004 +0100 @@ -215,6 +215,8 @@ activeHelpKey resourceRetriever sendToOriginator + ignoreMnemonicKeys + ignoreShortcutKeys ) ! ! @@ -320,6 +322,12 @@ #detailsAccelerator 'Accelerator key to select the menu item from the keyboard (Cmdx or Ctrlx).' +#detailsIgnoreAcceleratorKeys +'Ignore accelerator keys in submenu(s).' + +#detailsIgnoreMnemonicKeys +'Ignore mnemonic keys (access characters) in submenu(s).' + #detailsAccessCharaterPosition 'Index of the access character position of the textual label (obsolete, VW compatibility).' @@ -2908,7 +2916,7 @@ label: 'Details Edit' name: 'Details Edit' min: (Point 10 10) - bounds: (Rectangle 14 46 274 291) + bounds: (Rectangle 12 22 419 313) ) component: (SpecCollection @@ -3030,7 +3038,6 @@ label: 'Access Character Position:' name: 'accessCharLabel' layout: (AlignmentOrigin 217 0 170 0 1 0.5) - activeHelpKey: detailsAccessCharaterPosition resizeForLabel: true adjust: right ) @@ -3049,10 +3056,30 @@ modifiedChannel: modifiedChannel acceptOnPointerLeave: false ) + (CheckBoxSpec + label: 'Ignore Accelerators in Submenu' + name: 'ignoreShortcutKeys' + layout: (AlignmentOrigin 42 0 204 0 0 0.5) + activeHelpKey: detailsIgnoreAcceleratorKeys + visibilityChannel: hasSubmenu + model: ignoreShortcutKeys + translateLabel: true + resizeForLabel: true + ) + (CheckBoxSpec + label: 'Ignore Mnemonics in Submenu' + name: 'ignoreMnemonicKeys' + layout: (AlignmentOrigin 42 0 232 0 0 0.5) + activeHelpKey: detailsIgnoreMnemonicKeys + visibilityChannel: hasSubmenu + model: ignoreMnemonicKeys + translateLabel: true + resizeForLabel: true + ) (LabelSpec label: 'Font:' name: 'fontLabel' - layout: (AlignmentOrigin 75 0 219 0 1 0.5) + layout: (AlignmentOrigin 75 0 271 0 1 0.5) resizeForLabel: true adjust: right ) @@ -3062,7 +3089,7 @@ true ) name: 'fontMenu' - layout: (LayoutFrame 78 0 208 0 -5 1.0 230 0) + layout: (LayoutFrame 78 0 260 0 -5 1.0 282 0) activeHelpKey: fontMenu model: font ) @@ -3080,6 +3107,9 @@ aspects at:#notDelayedMenu ifAbsentPut:[ true asValue ]. + aspects at:#hasSubmenu ifAbsentPut:[ + false asValue + ]. ! ! !MenuEditor::Item class methodsFor:'testing'! @@ -3192,6 +3222,7 @@ (aspects at:aKey) value:(menuItem perform:aKey) ]. (aspects at:#notDelayedMenu) value:(self isDelayedMenu not). + (aspects at:#hasSubmenu) value:(self isKindOfMenu or:[self children size ~~ 0]). ! ! !MenuEditor::Item methodsFor:'displaying'! @@ -3738,6 +3769,7 @@ menuItem argument:aValue. ^ self ]. + aKey == #triggerOnDown ifTrue:[ self hasDelayedMenu ifTrue:[ menuItem triggerOnDown:false