Update to 2.0.3. Add another patch of mine, to allow copying a raw
message onto clipboard. Very useful for SpamCop.net users :)
This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= tkrat
|
||||
PORTVERSION= 2.0.2
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 2.0.3
|
||||
CATEGORIES= mail tk83
|
||||
MASTER_SITES= ftp://ftp.md.chalmers.se/pub/tkrat/ \
|
||||
ftp://ftp.sunet.se/pub/unix/mail/tkrat/ \
|
||||
|
||||
@@ -1 +1 @@
|
||||
MD5 (tkrat-2.0.2.tar.gz) = c2014bbf4ffe71253f58a799e99f540a
|
||||
MD5 (tkrat-2.0.3.tar.gz) = 484f46b21af62705cb8948c821c8bfdb
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
Add the ability to paste an entire message to clipboard -- raw,
|
||||
without any decodings...
|
||||
|
||||
-mi
|
||||
|
||||
--- tkrat/folder.tcl Mon Feb 12 11:41:02 2001
|
||||
+++ tkrat/folder.tcl Mon May 14 20:13:21 2001
|
||||
@@ -165,2 +165,7 @@
|
||||
menu $m.move -postcommand "PostMove $handler current $m.move"
|
||||
+ $m add command -label $t(copy_all) \
|
||||
+ -command "CopyToClipboard $handler"
|
||||
+ set fh(copy_menu) [list $m [$m index end]]
|
||||
+ lappend fh(menu_nokeep) [list $m [$m index end]]
|
||||
+ set b($m,[$m index end]) copy
|
||||
$m add command -label $t(delete) \
|
||||
@@ -2082,2 +2088,17 @@
|
||||
}
|
||||
+}
|
||||
+
|
||||
+proc CopyToClipboard handler {
|
||||
+ set msg [GetMsgSet $handler current]
|
||||
+ selection clear
|
||||
+ selection own .
|
||||
+ selection handle . "DoPasting $msg"
|
||||
+}
|
||||
+
|
||||
+proc DoPasting {msg offset maxChars} {
|
||||
+ if {[catch {$msg rawText} rawText]} {
|
||||
+ return ""
|
||||
+ }
|
||||
+ regsub -all \r\n $rawText \n rawText
|
||||
+ return [string range $rawText $offset [expr $offset+$maxChars]]
|
||||
}
|
||||
Reference in New Issue
Block a user