Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Oct 2014 12:54:46 +0000 (UTC)
From:      Pietro Cerutti <gahr@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r370330 - head/devel/tkcon/files
Message-ID:  <201410071254.s97CskSR071816@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gahr
Date: Tue Oct  7 12:54:46 2014
New Revision: 370330
URL: https://svnweb.freebsd.org/changeset/ports/370330
QAT: https://qat.redports.org/buildarchive/r370330/

Log:
  - Always ask confirmation before closing the console
  - Upstream: http://sourceforge.net/p/tkcon/feature-requests/8/

Modified:
  head/devel/tkcon/files/patch-tkcon.tcl

Modified: head/devel/tkcon/files/patch-tkcon.tcl
==============================================================================
--- head/devel/tkcon/files/patch-tkcon.tcl	Tue Oct  7 12:49:01 2014	(r370329)
+++ head/devel/tkcon/files/patch-tkcon.tcl	Tue Oct  7 12:54:46 2014	(r370330)
@@ -1,5 +1,5 @@
 --- tkcon.tcl.orig	2009-02-27 01:17:21.000000000 +0100
-+++ tkcon.tcl	2013-09-26 16:10:14.000000000 +0200
++++ tkcon.tcl	2013-10-01 11:43:39.000000000 +0200
 @@ -1,6 +1,6 @@
  #!/bin/sh
  # \
@@ -28,7 +28,30 @@
  	if {![catch {package require ActiveTcl} ver]} {
  	    set cmd ""
  	    if {$tcl_platform(platform) == "windows"} {
-@@ -5018,6 +5018,11 @@
+@@ -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> {}
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410071254.s97CskSR071816>