From fee0e24cd986d9d72445d0475b8113b38d073a1f5692cc92100153b5e8896911 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 12 Jul 2018 10:40:52 +0000 Subject: [PATCH] - Update tkcon.tcl to CVS revision 1.124: * Use -underline clearly to disambiguate from new 8.6.6 option -underlinefg * prevent file edit from undoing loading of file OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tk?expand=0&rev=67 --- tk.changes | 8 ++++++++ tk.spec | 2 +- tkcon.tcl | 24 +++++++++++++----------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/tk.changes b/tk.changes index 1cb8e31..ab5eb7a 100644 --- a/tk.changes +++ b/tk.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jul 12 10:39:06 UTC 2018 - max@suse.com + +- Update tkcon.tcl to CVS revision 1.124: + * Use -underline clearly to disambiguate from new 8.6.6 option + -underlinefg + * prevent file edit from undoing loading of file + ------------------------------------------------------------------- Fri Dec 29 20:01:34 UTC 2017 - max@suse.com diff --git a/tk.spec b/tk.spec index a5ddf47..02cfcd0 100644 --- a/tk.spec +++ b/tk.spec @@ -1,7 +1,7 @@ # # spec file for package tk # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/tkcon.tcl b/tkcon.tcl index 957c26a..b006cdd 100644 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -186,7 +186,7 @@ proc ::tkcon::Init {args} { alias clear dir dump echo idebug lremove tkcon_puts tkcon_gets observe observe_var unalias which what } - RCS {RCS: @(#) $Id: tkcon.tcl,v 1.122 2014/09/09 10:46:15 hobbs Exp $} + RCS {RCS: @(#) $Id: tkcon.tcl,v 1.124 2016/09/14 21:14:43 hobbs Exp $} HEADURL {http://tkcon.cvs.sourceforge.net/viewvc/tkcon/tkcon/tkcon.tcl} docs "http://tkcon.sourceforge.net/" @@ -1069,9 +1069,9 @@ proc ::tkcon::EvalCmd {w cmd} { set tag [UniqueTag $w] $w insert output $res [list stderr $tag] \n$trailer stderr $w tag bind $tag \ - [list $w tag configure $tag -under 1] + [list $w tag configure $tag -underline 1] $w tag bind $tag \ - [list $w tag configure $tag -under 0] + [list $w tag configure $tag -underline 0] $w tag bind $tag \ "if {!\[info exists tk::Priv(mouseMoved)\] || !\$tk::Priv(mouseMoved)} \ {[list $OPT(edit) -attach [Attach] -type error -- $PRIV(errorInfo)]}" @@ -3070,8 +3070,8 @@ proc ::tkcon::HighlightError w { set tag [UniqueTag $w] $w tag add $tag $start+${c0}c $start+1c+${c1}c $w tag configure $tag -foreground $COLOR(stdout) - $w tag bind $tag [list $w tag configure $tag -under 1] - $w tag bind $tag [list $w tag configure $tag -under 0] + $w tag bind $tag [list $w tag configure $tag -underline 1] + $w tag bind $tag [list $w tag configure $tag -underline 0] $w tag bind $tag "if {!\$tk::Priv(mouseMoved)} \ {[list $OPT(edit) -attach $app -type proc -find $what -- $cmd]}" } @@ -3099,8 +3099,8 @@ proc ::tkcon::HighlightError w { set tag [UniqueTag $w] $w tag add $tag $ix+1c $start $w tag configure $tag -foreground $COLOR(proc) - $w tag bind $tag [list $w tag configure $tag -under 1] - $w tag bind $tag [list $w tag configure $tag -under 0] + $w tag bind $tag [list $w tag configure $tag -underline 1] + $w tag bind $tag [list $w tag configure $tag -underline 0] $w tag bind $tag "if {!\$tk::Priv(mouseMoved)} \ {[list $OPT(edit) -attach $app -type proc -- $cmd]}" } @@ -3935,14 +3935,14 @@ proc edit {args} { ## set text $w.text set m [menu [::tkcon::MenuButton $menu Edit edit]] - $m add command -label "Cut" -under 2 \ + $m add command -label "Cut" -underline 2 \ -command [list tk_textCut $text] - $m add command -label "Copy" -under 0 \ + $m add command -label "Copy" -underline 0 \ -command [list tk_textCopy $text] - $m add command -label "Paste" -under 0 \ + $m add command -label "Paste" -underline 0 \ -command [list tk_textPaste $text] $m add separator - $m add command -label "Find" -under 0 \ + $m add command -label "Find" -underline 0 \ -command [list ::tkcon::FindBox $text] ## Send To Menu @@ -3996,6 +3996,8 @@ proc edit {args} { $w.text insert 1.0 [join $args \n] } } + # prevent stuff above being "undoable" in newer Tk + catch { $w.text edit reset ; $w.text edit modified 0 } wm deiconify $w focus $w.text if {[string compare $opts(-find) {}]} {