Index: tkcon.tcl
===================================================================
RCS file: /proj/rd/cvsroot/saods9/src/tkcon.tcl,v
retrieving revision 1.1
retrieving revision 1.4
diff -r1.1 -r1.4
70a71,73
> # namespace variable used by C conputs routine (saotk/util/conputs.c)
> set tkcon_showing unknown
> 
86a90
> 
189c193
< 	RCS		{RCS: @(#) $Id: tkcon.tcl,v 1.3 2008/03/27 12:40:11 eric Exp $}
---
> 	RCS		{RCS: @(#) $Id: tkcon.tcl,v 1.3 2008/03/27 12:40:11 eric Exp $}
809c813
< 	exit
---
> 
1382c1386,1388
< 	$m add command -label "Quit" -underline 0 -accel Ctrl-q -command exit
---
> # egm 3/20/08
> #	$m add command -label "Quit" -underline 0 -accel Ctrl-q -command exit
> 	$m add command -label "Close" -underline 0 -accel Ctrl-q -command {::tkcon::HideConsole}
1411c1417,1418
< 	$m add command -label "Close Console"	-underline 0 -accel Ctrl-w \
---
> # egm 3/20/08
> #	$m add command -label "Close Console"	-underline 0 -accel Ctrl-w \
1412a1420,1421
> 	$m add command -label "Close Console"	-underline 0 -accel Ctrl-w \
> 	    -command {::tkcon::HideConsole}
4886c4895,4897
<     bind $PRIV(root) <<TkCon_Exit>>	exit
---
> # egm 3/20/08
> #   bind $PRIV(root) <<TkCon_Exit>>	exit
>     bind $PRIV(root) <<TkCon_Exit>>	{ ::tkcon::HideConsole }
4891c4902,4904
<     bind $PRIV(root) <<TkCon_Close>>	{ ::tkcon::Destroy }
---
> # egm 3/20/08
> #   bind $PRIV(root) <<TkCon_Close>>	{ ::tkcon::Destroy }
>     bind $PRIV(root) <<TkCon_Close>>	{ ::tkcon::HideConsole }
6161a6175,6206
> proc ::tkcon::ShowConsole {} {
>     global tkcon_showing
>     switch $tkcon_showing {
> 	unknown {
> 	    set ::tkcon::OPT(exec) {}
> 	    tkcon::Init
> 	    set tkcon_showing true
> 	}
> 	false { 
>        	    interp alias {} ::puts {} ::tkcon_puts
> 	    tkcon show 
> 	    set tkcon_showing true
> 	}
> 	true { }
>     }
>     # invoke debug menu if not open
>     DebugMenu
> }
> 
> proc ::tkcon::HideConsole {} {
>     global tkcon_showing
>     switch $tkcon_showing {
> 	unknown { }
> 	false   { }
> 	true    { 
> 	    interp alias {} ::puts {} ::tkcon_tcl_puts
> 	    tkcon hide
> 	    set tkcon_showing false
> 	}
>     }
> }
> 
