AbstractSettingsApplication.st
changeset 8550 6cec78ceb9fd
parent 8502 b50e19c115d9
child 8553 0e83301fc922
--- a/AbstractSettingsApplication.st	Fri Feb 20 15:14:18 2009 +0100
+++ b/AbstractSettingsApplication.st	Wed Feb 25 17:53:55 2009 +0100
@@ -144,9 +144,9 @@
 !
 
 AbstractSettingsApplication subclass:#MiscDisplaySettingsAppl
-	instanceVariableNames:'returnFocus focusFollowsMouse beepEnabled takeFocus
-		activateOnClick nativeWidgets nativeDialogs shadows
-		opaqueVariablePanelResize formatHostNameinWindowLabels
+	instanceVariableNames:'returnFocus focusFollowsMouse mouseWheelFocusFollowsMouse
+		beepEnabled takeFocus activateOnClick nativeWidgets nativeDialogs
+		shadows opaqueVariablePanelResize formatHostNameinWindowLabels
 		opaqueTableColumnResize hostNameInLabelHolder showAccelerators
 		newWindowLabelFormat formatHostNameWindowLabel'
 	classVariableNames:''
@@ -6875,20 +6875,6 @@
                     extent: (Point 435 22)
                   )
                  (CheckBoxSpec
-                    label: 'Boxes Return Focus to Previously Active View'
-                    name: 'returnFocus'
-                    model: returnFocus
-                    translateLabel: true
-                    extent: (Point 435 22)
-                  )
-                 (CheckBoxSpec
-                    label: 'Views Catch Focus when Mapped'
-                    name: 'takeFocus'
-                    model: takeFocus
-                    translateLabel: true
-                    extent: (Point 435 22)
-                  )
-                 (CheckBoxSpec
                     label: 'Show Accelerator Keys in Menus'
                     name: 'showAccelerators'
                     model: showAccelerators
@@ -6896,20 +6882,6 @@
                     extent: (Point 435 22)
                   )
                  (CheckBoxSpec
-                    label: 'Raise & Activate Windows on Click'
-                    name: 'activateOnClick'
-                    model: activateOnClick
-                    translateLabel: true
-                    extent: (Point 435 22)
-                  )
-                 (CheckBoxSpec
-                    label: 'Focus Follows Mouse'
-                    name: 'focusFollowsMouse'
-                    model: focusFollowsMouse
-                    translateLabel: true
-                    extent: (Point 435 22)
-                  )
-                 (CheckBoxSpec
                     label: 'Opaque Variable Panel Resizing'
                     name: 'opaqueVariablePanelResize'
                     model: opaqueVariablePanelResizing
@@ -6928,13 +6900,61 @@
                     extent: (Point 435 4)
                   )
                  (DividerSpec
-                    name: 'Separator2'
-                    extent: (Point 435 4)
+                    name: 'Separator3'
+                    extent: (Point 435 3)
                   )
                  (ViewSpec
                     name: 'SeparatingSpace4'
                     extent: (Point 435 3)
                   )
+                 (CheckBoxSpec
+                    label: 'Keyboard Focus Follows Mouse'
+                    name: 'focusFollowsMouse'
+                    model: focusFollowsMouse
+                    translateLabel: true
+                    extent: (Point 435 22)
+                  )
+                 (CheckBoxSpec
+                    label: 'MouseWheel Focus Follows Mouse'
+                    name: 'mouseWheelFocusFollowsMouse'
+                    enableChannel: mouseWheelFocusFollowsMouseEnabled
+                    model: mouseWheelFocusFollowsMouse
+                    translateLabel: true
+                    extent: (Point 435 22)
+                  )
+                 (CheckBoxSpec
+                    label: 'Views Catch Focus when Mapped'
+                    name: 'takeFocus'
+                    model: takeFocus
+                    translateLabel: true
+                    extent: (Point 435 22)
+                  )
+                 (CheckBoxSpec
+                    label: 'Boxes Return Focus to Previously Active View'
+                    name: 'returnFocus'
+                    model: returnFocus
+                    translateLabel: true
+                    extent: (Point 435 22)
+                  )
+                 (CheckBoxSpec
+                    label: 'Raise & Activate Windows on Click'
+                    name: 'activateOnClick'
+                    model: activateOnClick
+                    translateLabel: true
+                    extent: (Point 435 22)
+                  )
+                 (ViewSpec
+                    name: 'SeparatingSpace5'
+                    extent: (Point 435 4)
+                  )
+                 (DividerSpec
+                    name: 'Separator2'
+                    extent: (Point 435 4)
+                  )
+                 (ViewSpec
+                    name: 'SeparatingSpace6'
+                    extent: (Point 435 4)
+                  )
                  (LabelSpec
                     label: 'Label'
                     name: 'Label1'
@@ -7007,6 +7027,7 @@
     self returnFocus value:StandardSystemView returnFocusWhenClosingModalBoxes.
     self takeFocus value:StandardSystemView takeFocusWhenMapped.
     self focusFollowsMouse value:(currentUserPrefs focusFollowsMouse ? true).
+    self mouseWheelFocusFollowsMouse value:(currentUserPrefs mouseWheelFocusFollowsMouse ? true).
     self activateOnClick value:(Display activateOnClick:nil).
     self showAccelerators value:MenuView showAcceleratorKeys.
 !
@@ -7053,6 +7074,7 @@
             #(
                 beepEnabled
                 focusFollowsMouse
+                mouseWheelFocusFollowsMouse 
                 opaqueVariablePanelResizing
                 opaqueTableColumnResizing
             )
@@ -7137,6 +7159,19 @@
     ^ hostNameInLabelHolder.
 !
 
+mouseWheelFocusFollowsMouse
+    mouseWheelFocusFollowsMouse isNil ifTrue:[
+        mouseWheelFocusFollowsMouse := true asValue.
+        mouseWheelFocusFollowsMouse onChangeSend:#updateModifiedChannel to:self
+    ].
+    ^ mouseWheelFocusFollowsMouse.
+!
+
+mouseWheelFocusFollowsMouseEnabled
+    ^ BlockValue
+        forLogicalNot:(self focusFollowsMouse).
+!
+
 nativeDialogs
     nativeDialogs isNil ifTrue:[
         nativeDialogs := Screen current nativeDialogs asValue.
@@ -7243,6 +7278,7 @@
     self returnFocus value ~= StandardSystemView returnFocusWhenClosingModalBoxes ifTrue:[^ true].
     self takeFocus value ~= StandardSystemView takeFocusWhenMapped ifTrue:[^ true].
     self focusFollowsMouse value ~= (currentUserPrefs focusFollowsMouse ? true) ifTrue:[^ true].
+    self mouseWheelFocusFollowsMouse value ~= (currentUserPrefs mouseWheelFocusFollowsMouse ? true) ifTrue:[^ true].
     self activateOnClick value ~= (Display activateOnClick:nil) ifTrue:[^ true].
     self showAccelerators value ~= MenuView showAcceleratorKeys ifTrue:[^ true].
     ^ false
@@ -15055,5 +15091,5 @@
 !AbstractSettingsApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.314 2008-12-18 14:39:52 cg Exp $'
-! !
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.315 2009-02-25 16:53:55 cg Exp $'
+! !