* wl-summary.el (wl-summary-setup-mouse)[non-xemacs]: Bind mouse-wheel1
authorteranisi <teranisi>
Thu, 29 Jan 2004 04:06:20 +0000 (04:06 +0000)
committerteranisi <teranisi>
Thu, 29 Jan 2004 04:06:20 +0000 (04:06 +0000)
to wl-summary-wheel-dispatcher.

* wl-e21.el (wl-message-define-keymap): Bind mouse-wheel1 to
wl-message-wheel-dispatcher.
(wl-message-wheel-dispatcher): New function.
(wl-summary-wheel-dispatcher): Ditto.

wl/ChangeLog
wl/wl-e21.el
wl/wl-summary.el

index 7ef680e..b9cfce4 100644 (file)
@@ -1,3 +1,13 @@
+2004-01-29  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-summary.el (wl-summary-setup-mouse)[non-xemacs]: Bind mouse-wheel1
+       to wl-summary-wheel-dispatcher.
+
+       * wl-e21.el (wl-message-define-keymap): Bind mouse-wheel1 to
+       wl-message-wheel-dispatcher.
+       (wl-message-wheel-dispatcher): New function.
+       (wl-summary-wheel-dispatcher): Ditto.
+
 2004-01-28  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-action.el (wl-summary-target-mark-all): List messages which are
index e71b290..eee3264 100644 (file)
     (define-key keymap [mouse-5] 'wl-message-wheel-up)
     (define-key keymap [S-mouse-4] 'wl-message-wheel-down)
     (define-key keymap [S-mouse-5] 'wl-message-wheel-up)
+    ;; Meadow2
+    (define-key keymap [mouse-wheel1] 'wl-message-wheel-dispatcher)
+    (define-key keymap [S-mouse-wheel1] 'wl-message-wheel-dispatcher)
     (set-keymap-parent wl-message-button-map keymap)
     (define-key wl-message-button-map
       [mouse-2] 'wl-message-button-dispatcher)
 
 (defalias 'wl-setup-message 'wl-e21-setup-message-toolbar)
 
+;; Wheel handling for Meadow2
+(defun wl-message-wheel-dispatcher (event)
+  (interactive "e")
+  (if (< (nth 4 (nth 1 event)) 0)
+      (wl-message-wheel-up event)
+    (wl-message-wheel-down event)))
+
+(defun wl-summary-wheel-dispatcher (event)
+  (interactive "e")
+  (if (< (nth 4 (nth 1 event)) 0)
+      (if (memq 'shift (event-modifiers event))
+         (wl-summary-down)
+       (wl-summary-next))
+    (if (memq 'shift (event-modifiers event))
+       (wl-summary-up)
+      (wl-summary-prev))))
+
 (defun wl-message-wheel-up (event)
   (interactive "e")
   (if (string-match (regexp-quote wl-message-buffer-name)
index 741d99f..fd8cdf8 100644 (file)
@@ -379,6 +379,11 @@ See also variable `wl-use-petname'."
     (define-key wl-summary-mode-map [mouse-5] 'wl-summary-next)
     (define-key wl-summary-mode-map [S-mouse-4] 'wl-summary-up)
     (define-key wl-summary-mode-map [S-mouse-5] 'wl-summary-down)
+    ;; For Meadow2
+    (define-key wl-summary-mode-map [mouse-wheel1]
+      'wl-summary-wheel-dispatcher)
+    (define-key wl-summary-mode-map [S-mouse-wheel1]
+      'wl-summary-wheel-dispatcher)
     (define-key wl-summary-mode-map [mouse-2] 'wl-summary-click)))
 
 (if wl-summary-mode-map