summaryrefslogtreecommitdiff
path: root/devel/tkcon/files/patch-tkcon.tcl
blob: 94bbf9f8113c117d93f790a7c7b1d5faf73f2d52 (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--- tkcon.tcl.orig	2009-02-27 01:17:21.000000000 +0100
+++ tkcon.tcl	2013-10-01 11:43:39.000000000 +0200
@@ -1,6 +1,6 @@
 #!/bin/sh
 # \
-exec wish "$0" ${1+"$@"}
+exec %%WISH%% "$0" ${1+"$@"}
 
 #
 ## tkcon.tcl
@@ -194,7 +194,7 @@
 	RCS		{RCS: @(#) $Id: tkcon.tcl,v 1.102 2008/02/07 21:02:53 hobbs Exp $}
 	HEADURL		{http://tkcon.cvs.sourceforge.net/tkcon/tkcon/tkcon.tcl?rev=HEAD}
 
-	docs		"http://tkcon.sourceforge.net/"
+	docs		"file:%%DOCSDIR%%/index.html"
 	email		{jeff(a)hobbs(.)org}
 	root		.
 	uid		0
@@ -1586,8 +1586,8 @@
     foreach m [list [menu $w.help] [menu $w.pop.help]] {
 	$m add command -label "About " -underline 0 -accel Ctrl-A \
 		-command ::tkcon::About
-	$m add command -label "Retrieve Latest Version" -underline 0 \
-		-command ::tkcon::Retrieve
+	# $m add command -label "Retrieve Latest Version" -underline 0 \
+	# 	-command ::tkcon::Retrieve
 	if {![catch {package require ActiveTcl} ver]} {
 	    set cmd ""
 	    if {$tcl_platform(platform) == "windows"} {
@@ -2497,13 +2497,19 @@
     proc ::tkcon::Destroy {{slave {}}} {
 	variable PRIV
 
+	set confirmed 0
+	if {[tk_messageBox -parent $PRIV(root) -title "Close window?" \
+	    -message "Close the current window?" -default no \
+	    -icon question -type yesno] == "yes"} { set confirmed 1}
+
+	if {!$confirmed} {
+	    return
+	}
+
 	# Just close on the last one
 	if {[llength $PRIV(interps)] == 1} { exit }
 	if {"" == $slave} {
 	    ## Main interpreter close request
-	    if {[tk_messageBox -parent $PRIV(root) -title "Quit tkcon?" \
-		     -message "Close all windows and exit tkcon?" \
-		     -icon question -type yesno] == "yes"} { exit }
 	    return
 	} elseif {$slave == $::tkcon::OPT(exec)} {
 	    set name  [tk appname]
@@ -5018,6 +5024,11 @@
     ## We really didn't want the newline insertion
     bind TkConsole <Control-Key-o> {}
 
+    ## in 8.6b3, the virtual events <<NextLine>> and <<PrevLine>>
+    #  mess up our history feature
+    bind TkConsole <<NextLine>> {}
+    bind TkConsole <<PrevLine>> {}
+
     ## Now make all our virtual event bindings
     foreach {ev key} [subst -nocommand -noback {
 	<<TkCon_Exit>>		<Control-q>