git: 31aad68e55df - main - mail/exmh2: Chase toolkits/tk87 8.7a5

Cy Schubert cy at FreeBSD.org
Tue Aug 31 04:45:47 UTC 2021


The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=31aad68e55df749fad73589b7cb251dea7cee768

commit 31aad68e55df749fad73589b7cb251dea7cee768
Author:     Cy Schubert <cy at FreeBSD.org>
AuthorDate: 2021-08-31 04:34:08 +0000
Commit:     Cy Schubert <cy at FreeBSD.org>
CommitDate: 2021-08-31 04:45:43 +0000

    mail/exmh2: Chase toolkits/tk87 8.7a5
    
    tk 8.7a5 introduced uniform mouse wheel event handling. Unfortunately this
    is incompatible with tcltk software written using Button-4 and Button-5
    events. This patch replaces the legacy bindings with the new MouseWheel
    binding, using the new tk::MouseWheel helper to move the scrollbar.
    This is documented at https://core.tcl-lang.org/tips/doc/trunk/tip/474.md.
    
    The old bindings are left should anyone wish to use exmh2 with the older
    tk86, also requiring a user to modify Makefile to alter the dependency.
---
 mail/exmh2/Makefile                  |  2 +-
 mail/exmh2/files/patch-lib_exwin.tcl | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/mail/exmh2/Makefile b/mail/exmh2/Makefile
index 4f7371286df0..a8533f5ef6c4 100644
--- a/mail/exmh2/Makefile
+++ b/mail/exmh2/Makefile
@@ -4,7 +4,7 @@
 
 PORTNAME=	exmh
 PORTVERSION=	2.9.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES+=	mail tk
 # XXX: Standard SF fails with a hung download
 MASTER_SITES=	https://sourceforge.net/projects/${PORTNAME}/files/${PORTNAME}/${PORTVERSION}/
diff --git a/mail/exmh2/files/patch-lib_exwin.tcl b/mail/exmh2/files/patch-lib_exwin.tcl
new file mode 100644
index 000000000000..cb6639714706
--- /dev/null
+++ b/mail/exmh2/files/patch-lib_exwin.tcl
@@ -0,0 +1,28 @@
+--- lib/exwin.tcl.orig	2017-11-09 20:42:24.000000000 -0800
++++ lib/exwin.tcl	2021-08-30 21:28:25.291533000 -0700
+@@ -101,12 +101,19 @@
+ }
+ 
+ proc mscroll {bindtag num} {
+-    bind $bindtag <Button-5> [list %W yview scroll $num units]
+-    bind $bindtag <Button-4> [list %W yview scroll -$num units]
+-    bind $bindtag <Shift-Button-5> [list %W yview scroll 1 units]
+-    bind $bindtag <Shift-Button-4> [list %W yview scroll -1 units]
+-    bind $bindtag <Control-Button-5> [list %W yview scroll 1 pages]
+-    bind $bindtag <Control-Button-4> [list %W yview scroll -1 pages]
++    # Prior to tcl 8.7a5:
++    # bind $bindtag <Button-5> [list %W yview scroll $num units]
++    # bind $bindtag <Button-4> [list %W yview scroll -$num units]
++    # bind $bindtag <Shift-Button-5> [list %W yview scroll 1 units]
++    # bind $bindtag <Shift-Button-4> [list %W yview scroll -1 units]
++    # bind $bindtag <Control-Button-5> [list %W yview scroll 1 pages]
++    # bind $bindtag <Control-Button-4> [list %W yview scroll -1 pages]
++
++    # tcl 8.7a5 and later (units can be pixels/units/pages). See
++    # https://core.tcl-lang.org/tips/doc/trunk/tip/474.md for more info:
++    bind $bindtag <MouseWheel> [ list tk::MouseWheel %W y %D -$num units ]
++    bind $bindtag <Shift-MouseWheel> { tk::MouseWheel %W y %D -1 units }
++    bind $bindtag <Shift-MouseWheel> { tk::MouseWheel %W y %D -1 pages }
+ }
+ 
+ 


More information about the dev-commits-ports-main mailing list