diff --git a/lib/console.tcl b/lib/console.tcl index cde9a092686..c0e6fb3cc2f 100644 --- a/lib/console.tcl +++ b/lib/console.tcl @@ -179,23 +179,26 @@ method insert {txt} { method done {ok} { if {$ok} { if {[winfo exists $w.m.s]} { + bind $w.m.s [list delete_this $this] $w.m.s conf -background green -text [mc "Success"] if {$is_toplevel} { $w.ok conf -state normal focus $w.ok } + } else { + delete_this } } else { if {![winfo exists $w.m.s]} { _init $this } + bind $w.m.s [list delete_this $this] $w.m.s conf -background red -text [mc "Error: Command Failed"] if {$is_toplevel} { $w.ok conf -state normal focus $w.ok } } - delete_this } method _sb_set {sb orient first last} {