'From Squeak5.1 of 23 August 2016 [latest update: #16548] on 3 November 2017 at 5:48:24 am'! !MenuMorph methodsFor: 'control' stamp: 'raa 11/3/2017 05:46'! popUpAt: aPoint forHand: hand in: aWorld allowKeyboard: aBoolean "Present this menu at the given point under control of the given hand." | evt deletions | aWorld submorphs select: [:each | (each isKindOf: MenuMorph) and: [each stayUp not]] thenCollect: [:menu | menu delete]. self items isEmpty ifTrue: [^ self]. MenuIcons decorateMenu: self. (self submorphs select: [:m | m isKindOf: UpdatingMenuItemMorph]) do: [:m | m updateContents]. Preferences menuItemsMayBeOmitted ifTrue: [ Preferences menuItemStringsToBeOmitted do: [: e | deletions _ submorphs select: [ :sm | (sm asString findString: e) > 0]. self removeAllMorphsIn: deletions ]. ]. "precompute width" self positionAt: aPoint relativeTo: (selectedItem ifNil: [self items first]) inWorld: aWorld. aWorld addMorphFront: self. "Acquire focus for valid pop up behavior" hand newMouseFocus: self. aBoolean ifTrue: [ originalFocusHolder := hand keyboardFocus. hand newKeyboardFocus: self. self showKeyboardHelp]. evt := hand lastEvent. (evt isKeyboard or: [evt isMouse and: [evt anyButtonPressed not]]) ifTrue: ["Select first item if button not down" self moveSelectionDown: 1 event: evt "Select first item if button not down"]. self updateColor. self changed! ! !Preferences class methodsFor: 'standard queries'! menuItemStringsToBeOmitted ^ self valueOfFlag: #menuItemStringsToBeOmitted ifAbsent: [#('Create new service' 'browse mc history' 'toggle break on entry' 'browse protocol (p)' 'find test case' 'copy reference (C)' 'copy selector (c)' )]! ! !Preferences class methodsFor: 'standard queries' stamp: 'raa 11/3/2017 05:48'! menuItemsMayBeOmitted " Preferences setPreference: #menuItemsMayBeOmitted toValue: true. Preferences setPreference: #menuItemStringsToBeOmitted toValue: #('Create new service' 'browse mc history' 'toggle break on entry' 'browse protocol (p)' 'find test case' 'copy reference (C)' 'copy selector (c)') Preferences setPreference: #menuItemStringsToBeOmitted toValue: #() " ^ self valueOfFlag: #menuItemsMayBeOmitted ifAbsent: [ true ]! !