patch for unclickable links in inline-displayed html

Alexander Zangerl <[email protected]> Wed, 12 Mar 2008 22:26:40 +1000
Newsgroups gmane.mail.exmh.devel
Message-ID <[email protected]>
for some ood reason the internal html renderer doesn't produce clickable
links (it identifies and colours links fine).

this is a bit inconsistent with other spots where links end up
clickable as expected (scan message for urls).

the following patch contains the (trivial) one-line-change
to handle html links properly; i'd appreciate it if somebody with
cvs commit rights could apply it there.

regards
az

-- 
+ Alexander Zangerl + DSA 42BD645D + (RSA 5B586291)
Zum schönsten, was zwischen Menschen entstehen kann, 
zählt zweifellos die Distanz. -- Gunkl

_______________________________________________
Exmh-workers mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/exmh-workers
11_htmllinks.dpatch (text/x-diff, 1.8 KB)
#! /bin/sh /usr/share/dpatch/dpatch-run
## 11_htmllinks.dpatch by  <[email protected]>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: make html links clickable, and consolidate status line handling

@DPATCH@
diff -urNad exmh-2.7.2~/lib/html_links.tcl exmh-2.7.2/lib/html_links.tcl
--- exmh-2.7.2~/lib/html_links.tcl	2001-05-15 03:51:38.000000000 +1000
+++ exmh-2.7.2/lib/html_links.tcl	2008-02-28 10:55:30.418871936 +1000
@@ -27,9 +27,11 @@
     regsub -all % $href %% href2
     $win tag configure $tag -foreground [Widget_ColorDefault $win c_link] -underline 1
     $win tag bind $tag <Enter> \
-	    [list HMlink_feedback $win hand2 $href2 $tag c_alink]
+	    [list HMlink_feedback $win hand2 "X-URL:\t$href2" $tag c_alink]
     $win tag bind $tag <Leave> \
 	    [list HMlink_feedback $win [option get $win cursor Text] "" $tag c_link]
+    # make the link clickable
+    $win tag bind $tag <ButtonRelease-1> [list URI_StartViewer $href2 ]
 
     # Add to history so it shows up in URL chooser dialog
     global History
diff -urNad exmh-2.7.2~/lib/uri.tcl exmh-2.7.2/lib/uri.tcl
--- exmh-2.7.2~/lib/uri.tcl	2008-02-28 10:55:00.986529972 +1000
+++ exmh-2.7.2/lib/uri.tcl	2008-02-28 10:55:47.259066540 +1000
@@ -285,7 +285,7 @@
         if $uri(logOnEnter) {
 	    regsub -all % $temp_uri %% temp_uri
 	    bind $but <Enter> [list Exmh_Status "X-URL:\t$temp_uri"]
-	    bind $but <Leave> [list Exmh_Status "\t$temp_uri"]
+	    bind $but <Leave> [list Exmh_Status ""]
 	}
     } else {
 	Uri_ClearCurrent
@@ -318,7 +318,7 @@
     set id [TextButtonRange $w $start $end [list URI_StartViewer $URI]]
     if $uri(logOnEnter) {
 	$w tag bind $id <Any-Enter> [list +Exmh_Status "X-URL:\t$URI"]
-	$w tag bind $id <Any-Leave> [list +Exmh_Status "\t$URI"]
+	$w tag bind $id <Any-Leave> [list +Exmh_Status ""]
     }
     update idletasks
     return $id
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH18wWpy/2bEK9ZF0RAiYMAJ0c6b2Vh/8RP5pk86fpnBNB0nr9IQCfZK6i
3xeaqjJhBFDjbsIRx4iTmTU=
=y1jS
-----END PGP SIGNATURE-----