From 9fe3738e81fd0dab5f0b97a36e814518f401c55b Mon Sep 17 00:00:00 2001 From: kseitz Date: Wed, 2 Jan 2002 23:42:49 +0000 Subject: [PATCH] * library/console.ith (insert): Add tag parameter. (einsert): Delete. * library/console.itb: (insert): Add tag parameter. (einsert): Delete. * library/interface.tcl (gdbtk_tcl_fputs): Use Console::insert. (gdbtk_tcl_fputs_error): Likewise. (gdbtk_tcl_fputs_log): Likewise. (gdbtk_tcl_fputs_target): Likewise. (set_target): Likewise. --- gdb/gdbtk/ChangeLog | 12 ++++++++++++ gdb/gdbtk/library/console.itb | 17 ++--------------- gdb/gdbtk/library/console.ith | 3 +-- gdb/gdbtk/library/interface.tcl | 10 +++++----- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog index 09d1ee3003..f7d3c4fa3f 100644 --- a/gdb/gdbtk/ChangeLog +++ b/gdb/gdbtk/ChangeLog @@ -1,3 +1,15 @@ +2002-01-02 Keith Seitz + + * library/console.ith (insert): Add tag parameter. + (einsert): Delete. + * library/console.itb: (insert): Add tag parameter. + (einsert): Delete. + * library/interface.tcl (gdbtk_tcl_fputs): Use Console::insert. + (gdbtk_tcl_fputs_error): Likewise. + (gdbtk_tcl_fputs_log): Likewise. + (gdbtk_tcl_fputs_target): Likewise. + (set_target): Likewise. + 2002-01-02 Ian Roxborough * library/managedwin.itb (ManagedWin::_create): When diff --git a/gdb/gdbtk/library/console.itb b/gdb/gdbtk/library/console.itb index 663e19a4fb..f6c4c920d6 100644 --- a/gdb/gdbtk/library/console.itb +++ b/gdb/gdbtk/library/console.itb @@ -219,13 +219,13 @@ body Console::busy {event} { # ------------------------------------------------------------------ # METHOD: insert - insert new text in the text widget # ------------------------------------------------------------------ -body Console::insert {line} { +body Console::insert {line {tag ""}} { if {$_needNL} { $_twin insert {insert linestart} "\n" } # Remove all \r characters from line. set line [join [split $line \r] {}] - $_twin insert {insert -1 line lineend} $line + $_twin insert {insert -1 line lineend} $line $tag set nlines [lindex [split [$_twin index end] .] 0] if {$nlines > $throttle} { @@ -238,19 +238,6 @@ body Console::insert {line} { ::update idletasks } -#------------------------------------------------------------------- -# METHOD: einsert - insert error text in the text widget -# ------------------------------------------------------------------ -body Console::einsert {line tag} { - debug $line - if {$_needNL} { - $_twin insert end "\n" - } - $_twin insert end $line $tag - $_twin see insert - set _needNL 0 -} - # ------------------------------------------------------------------ # NAME: ConsoleWin::_operate_and_get_next # DESCRIPTION: Invokes the current command and, if this diff --git a/gdb/gdbtk/library/console.ith b/gdb/gdbtk/library/console.ith index cf4711b742..7d97314d5f 100644 --- a/gdb/gdbtk/library/console.ith +++ b/gdb/gdbtk/library/console.ith @@ -26,8 +26,7 @@ class Console { method constructor {args} method destructor {} - method insert {line} - method einsert {line tag} + method insert {line {tag ""}} method invoke {} method _insertion {args} method get_text {} diff --git a/gdb/gdbtk/library/interface.tcl b/gdb/gdbtk/library/interface.tcl index a69e532367..280005f364 100644 --- a/gdb/gdbtk/library/interface.tcl +++ b/gdb/gdbtk/library/interface.tcl @@ -418,7 +418,7 @@ proc echo {args} { # ------------------------------------------------------------------ proc gdbtk_tcl_fputs_error {message} { if {$::gdbtk_state(console) != ""} { - $::gdbtk_state(console) einsert $message err_tag + $::gdbtk_state(console) insert $message err_tag update } } @@ -428,7 +428,7 @@ proc gdbtk_tcl_fputs_error {message} { # ------------------------------------------------------------------ proc gdbtk_tcl_fputs_log {message} { if {$::gdbtk_state(console) != ""} { - $::gdbtk_state(console) einsert $message log_tag + $::gdbtk_state(console) insert $message log_tag update } } @@ -438,7 +438,7 @@ proc gdbtk_tcl_fputs_log {message} { # ------------------------------------------------------------------ proc gdbtk_tcl_fputs_target {message} { if {$::gdbtk_state(console) != ""} { - $::gdbtk_state(console) einsert $message target_tag + $::gdbtk_state(console) insert $message target_tag update } } @@ -1106,7 +1106,7 @@ necessary,\nmodify the port setting with the debugger preferences." if {![catch {pref get gdb/load/$gdb_target_name-after_attaching} aa] && $aa != ""} { if {[catch {gdb_cmd $aa} err]} { - catch {[ManagedWin::find Console] einsert $err err_tag} + catch {[ManagedWin::find Console] insert $err err_tag} } } set gdb_target_changed 0 @@ -1429,7 +1429,7 @@ proc gdbtk_nexti {} { catch {gdb_immediate nexti} } - # ------------------------------------------------------------------ +# ------------------------------------------------------------------ # PROC: gdbtk_attached # ------------------------------------------------------------------ # -- 2.11.0