OSDN Git Service

* library/console.ith (insert): Add tag parameter.
authorkseitz <kseitz>
Wed, 2 Jan 2002 23:42:49 +0000 (23:42 +0000)
committerkseitz <kseitz>
Wed, 2 Jan 2002 23:42:49 +0000 (23:42 +0000)
(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
gdb/gdbtk/library/console.itb
gdb/gdbtk/library/console.ith
gdb/gdbtk/library/interface.tcl

index 09d1ee3..f7d3c4f 100644 (file)
@@ -1,3 +1,15 @@
+2002-01-02  Keith Seitz  <keiths@redhat.com>
+
+       * 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  <irox@redhat.com>
 
        * library/managedwin.itb (ManagedWin::_create):  When
index 663e19a..f6c4c92 100644 (file)
@@ -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
index cf4711b..7d97314 100644 (file)
@@ -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 {}
index a69e532..280005f 100644 (file)
@@ -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
 # ------------------------------------------------------------------
 #