diff options
author | Kevin Walzer <kw@codebykevin.com> | 2021-07-03 22:01:11 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2021-07-03 22:01:11 (GMT) |
commit | 83e47456f9fcc95c5c7e42da2a94bbcf45b0d4d7 (patch) | |
tree | 89ba1c55243cf9c9a1739866326c6c709c954785 /library/print.tcl | |
parent | f8d8b14443463897e316ca7955796dcaef1823b5 (diff) | |
download | tk-83e47456f9fcc95c5c7e42da2a94bbcf45b0d4d7.zip tk-83e47456f9fcc95c5c7e42da2a94bbcf45b0d4d7.tar.gz tk-83e47456f9fcc95c5c7e42da2a94bbcf45b0d4d7.tar.bz2 |
Mac printing works
Diffstat (limited to 'library/print.tcl')
-rw-r--r-- | library/print.tcl | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/library/print.tcl b/library/print.tcl index 4c9e13e..bed0cd3 100644 --- a/library/print.tcl +++ b/library/print.tcl @@ -861,7 +861,6 @@ namespace eval ::tk::print { variable printcopies variable p - #First, generate print file. if {[winfo class $w] eq "Text"} { @@ -954,7 +953,6 @@ proc ::tk::print::canvas {w} { } - proc ::tk::print::text {w} { if {[tk windowingsystem] eq "win32"} { @@ -965,19 +963,19 @@ proc ::tk::print::text {w} { close $print_txt ::tk::print::_print_file $x 1 {Arial 12} } - if {[tk windowingsystem] eq "x11"} { + if {[tk windowingsystem] eq "x11"} { ::tk::print::_print $w - } + } if {[tk windowingsystem] eq "aqua"} { - set txt [$w get 1.0 end] - set file /tmp/tk_text.txt - set print_txt [open $file w] - puts $print_txt $txt + set txt [$w get 1.0 end] + set file /tmp/tk_text.txt + set print_txt [open $file w] + puts $print_txt $txt close $print_txt set printfile /tmp/tk_text.pdf catch {exec /usr/sbin/cupsfilter $file > $printfile} ::tk::print::_print $printfile - } + } } #Add this command to the tk command ensemble: tk print |