#REFACTORING by sr
authorsr
Tue, 03 Jul 2018 16:15:13 +0200
changeset 5824 04608830f559
parent 5823 dd019996a46d
child 5825 aa17c111154f
#REFACTORING by sr undo my changes because they are now in the KeyboardProcessor class: MenuPanel class definition added: #processShortcut: class: MenuPanel class changed: #version_CVS
MenuPanel.st
--- a/MenuPanel.st	Tue Jul 03 14:38:58 2018 +0200
+++ b/MenuPanel.st	Tue Jul 03 16:15:13 2018 +0200
@@ -30,7 +30,7 @@
 		buttonActiveBackgroundColor buttonEnteredBackgroundColor
 		buttonPassiveBackgroundColor sizeFixed extraMargin
 		buttonActiveLevel buttonPassiveLevel buttonEnteredLevel
-		pluggableHelpSpecProvider unusedShortCutsCache'
+		pluggableHelpSpecProvider'
 	classVariableNames:'DefaultBackgroundColor DefaultForegroundColor
 		IconDisabledIndicationOff IconDisabledIndicationOn
 		IconDisabledRadioOff IconDisabledRadioOn IconIndicationOff
@@ -5108,21 +5108,6 @@
     ].
 
     rawKey := aKeyEvent rawKey.
-
-    "sr: after discussion with cg,
-     we decided to cache shortcuts with no actions.
-     we also know about the fact that this will ignore short cuts 
-     from dynamic menus (but we dont care)"
-    unusedShortCutsCache isNil ifTrue:[
-        "sr: I dont care about sync here,
-         because in worst case some shortcuts are calculated twice"
-        unusedShortCutsCache := IdentitySet new.    
-    ].    
-
-    (unusedShortCutsCache includesIdentical:rawKey asSymbol) ifTrue:[
-        ^ false
-    ].    
-    
     item := nil.
     menu := self detectGrabMenu. "/ first lookup the current grabMenu before starting in the topMenu
 
@@ -5176,19 +5161,14 @@
                 ^ true
             ].
 
-            menu == self ifTrue:[ 
-                unusedShortCutsCache add:rawKey asSymbol.
-                ^ false 
-            ].
+            menu == self ifTrue:[ ^ false ].
             menu := self.
         ].
     ].
-
-    unusedShortCutsCache add:rawKey asSymbol.
     ^ false     "/ never reached
 
     "Modified: / 06-10-2011 / 16:19:27 / cg"
-    "Modified: / 03-07-2018 / 14:37:59 / sr"
+    "Modified (comment): / 11-04-2018 / 17:52:03 / sr"
 !
 
 selectItemIndicesFor:aOneArgBlock maxDepth:maxDepth from:aStart to:aStop ignoreSubmenuBlock:ignoreSubmenueBlock