summaryrefslogtreecommitdiffstats
path: root/library/print.tcl
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2021-07-03 22:01:11 (GMT)
committerKevin Walzer <kw@codebykevin.com>2021-07-03 22:01:11 (GMT)
commit83e47456f9fcc95c5c7e42da2a94bbcf45b0d4d7 (patch)
tree89ba1c55243cf9c9a1739866326c6c709c954785 /library/print.tcl
parentf8d8b14443463897e316ca7955796dcaef1823b5 (diff)
downloadtk-83e47456f9fcc95c5c7e42da2a94bbcf45b0d4d7.zip
tk-83e47456f9fcc95c5c7e42da2a94bbcf45b0d4d7.tar.gz
tk-83e47456f9fcc95c5c7e42da2a94bbcf45b0d4d7.tar.bz2
Mac printing works
Diffstat (limited to 'library/print.tcl')
-rw-r--r--library/print.tcl16
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