Package: saods9 / 8.0.1+repack-2

ds9-Don-t-close-DS9-when-closing-the-unpatched-tkcon-cons.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Ole Streicher <olebole@debian.org>
Date: Fri, 16 Dec 2016 09:23:38 +0100
Subject: [ds9] Don't close DS9 when closing the unpatched tkcon console

The original saods9 code contains a patched tkcon which replaced the
exit with hide. In Debian, we are using the unpatched package.

This solution was taken from http://wiki.tcl.tk/17616
---
 ds9/library/util.tcl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ds9/library/util.tcl b/ds9/library/util.tcl
index ae01fc0..c2c51f3 100644
--- a/ds9/library/util.tcl
+++ b/ds9/library/util.tcl
@@ -916,9 +916,15 @@ proc OpenConsole {} {
     if {[winfo exists ".tkcon"]} {
 	tkcon show
     } else {
+	set ::tkcon::PRIV(showOnStartup) 0
+	set ::tkcon::PRIV(root) .tkcon
+	set ::tkcon::PRIV(protocol) {tkcon hide}
+	set ::tkcon::OPT(overrideexit) 0
 	set ::tkcon::OPT(exec) {}
 	set ::tkcon::OPT(font) [font actual TkFixedFont]
 	tkcon::Init
+	tkcon title "SAOImage ds9 console"
+	tkcon show
     }
 }