code rewrite
authorca
Thu, 17 Oct 2002 19:01:45 +0200
changeset 1637 5745a22735c8
parent 1636 c9ed206b5d32
child 1638 67a340f6249f
code rewrite
KeyboardProcessor.st
--- a/KeyboardProcessor.st	Thu Oct 17 18:58:19 2002 +0200
+++ b/KeyboardProcessor.st	Thu Oct 17 19:01:45 2002 +0200
@@ -222,12 +222,12 @@
         ].
 
         topView isModal ifTrue:[
-            (wg notNil 
-            and:[(focusView := wg explicitFocusView) isNil
-                  or:[ focusView isKeyboardConsumer not 
-                      or:[ focusView isInputField ] ]
-            ])  ifTrue:[
-                ((returnIsOKInDialog ? true) and:[key == #Return]) ifTrue:[
+            (key == #Return and:[returnIsOKInDialog ? true]) ifTrue:[
+                (wg notNil 
+                and:[(focusView := wg explicitFocusView) isNil
+                      or:[ focusView isKeyboardConsumer not 
+                          or:[ focusView isInputField ] ]
+                ])  ifTrue:[
                     self requestGlobalAutoAccept ifFalse:[^ true].
 
                     "/ only care for RETURN and ESC if the window is the
@@ -241,8 +241,7 @@
                     ^ true
                 ].
             ].
-
-            ((escapeIsCancelInDialog ? true) and:[key == #Escape]) ifTrue:[
+            (key == #Escape and:[escapeIsCancelInDialog ? true]) ifTrue:[
                 "/ only care for RETURN and ESC if the window is the
                 "/ apps topView (not if its a popup or dialog of it)
                 (app notNil and:[app window == topView]) ifTrue:[
@@ -318,5 +317,5 @@
 !KeyboardProcessor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/KeyboardProcessor.st,v 1.29 2002-10-17 16:58:19 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/KeyboardProcessor.st,v 1.30 2002-10-17 17:01:45 ca Exp $'
 ! !