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]] }