OSDN Git Service

2002-12-04 Martin M. Hunt <hunt@redhat.com>
authorhunt <hunt>
Wed, 4 Dec 2002 20:46:02 +0000 (20:46 +0000)
committerhunt <hunt>
Wed, 4 Dec 2002 20:46:02 +0000 (20:46 +0000)
* library/regwin.itb (update): Remove some old code
that marked registers as changed when the target started.
(_build_win): Make changed registers more visible by
changing their bg to Colors(change).

* library/prefs.tcl (pref_set_option_db): Create a new
Color(change) which is the color of text indicating a change.
Current default is green.

* library/vartree.itb (_init_data): Make changed values
Color(change). Can't change bg, so we change fill color.

gdb/gdbtk/ChangeLog
gdb/gdbtk/library/prefs.tcl
gdb/gdbtk/library/regwin.itb
gdb/gdbtk/library/vartree.itb

index 565c92b..2dffc03 100644 (file)
@@ -1,3 +1,17 @@
+2002-12-04  Martin M. Hunt  <hunt@redhat.com>
+
+       * library/regwin.itb (update): Remove some old code
+       that marked registers as changed when the target started.
+       (_build_win): Make changed registers more visible by
+       changing their bg to Colors(change).
+
+       * library/prefs.tcl (pref_set_option_db): Create a new
+       Color(change) which is the color of text indicating a change.
+       Current default is green.
+
+       * library/vartree.itb (_init_data): Make changed values
+       Color(change). Can't change bg, so we change fill color.
+
 2002-12-04  Keith Seitz  <keiths@redhat.com>
 
        * generic/gdbtk-hooks.c: Include tcl.h and tk.h to pull
index dbfd3da..7d6371c 100644 (file)
@@ -663,6 +663,11 @@ proc load_gnome_file {fd} {
 proc pref_set_option_db {makebg} {
   global Colors
 
+  # The color of text that indicates changed items
+  # We standardize on one color here so that changed
+  # items don't blend into any OS color scheme
+  set Colors(change) "green"
+
   option add *background $Colors(bg)
   option add *Text*background $Colors(textbg)
   option add *Entry*background $Colors(textbg)
index afa2ead..3099ec4 100644 (file)
@@ -223,7 +223,7 @@ itcl::body RegWin::_build_win {} {
   $itk_component(table) tag configure normal  \
     -state disabled -bg $::Colors(textbg) -fg $::Colors(textfg)
   $itk_component(table) tag configure sel -bg $::Colors(sbg) -fg $::Colors(sfg)
-  $itk_component(table) tag configure highlight -bg $::Colors(bg)
+  $itk_component(table) tag configure highlight -bg $::Colors(change) -fg black
   $itk_component(table) tag raise highlight
   $itk_component(table) tag configure header \
     -anchor w -state disabled -relief raised
@@ -1107,8 +1107,7 @@ itcl::body RegWin::set_variable {event} {
 #  RETURNS:      Nothing
 # ------------------------------------------------------------------
 itcl::body RegWin::update {event} {
-
-  dbug I "START REGISTER UPDATE CALLBACK"
+  debug
 
   # Change anything on the old change list back to normal
   foreach r $_change_list {
@@ -1123,17 +1122,6 @@ itcl::body RegWin::update {event} {
     set _change_list $changed
   }
 
-  # Problem: if the register was invalid (i.e, we were not running),
-  # its old value will probably be "0x0". Now if we run and its real
-  # value is "0x0", then it will appear as a blank in the register
-  # window. Safegaurd against that here by adding any such register
-  # which is not already in the change list.
-  foreach r $_reg_display_list {
-    if {$_data($_cell($r)) == "" && [lsearch $_change_list $r] == -1} {
-      lappend _change_list $r
-    }
-  }
-
   # Tag the changed cells and resize the columns
   set cols {}
   foreach r $_change_list {
@@ -1150,6 +1138,5 @@ itcl::body RegWin::update {event} {
     _size_column $col 0
   }
 
-
-  dbug I "END REGISTER UPDATE CALLBACK" 
+  debug "END REGISTER UPDATE CALLBACK" 
 }
index 2c1dc30..57d0c32 100644 (file)
@@ -396,7 +396,7 @@ itcl::body  VarTree::_init_data {} {
   set colors(type) "red"
   set colors(error) "red"
   set colors(value) "black"
-  set colors(change) "green"
+  set colors(change) $::Colors(change)
   set colors(disabled) "gray50"
   set colors(line) "gray50"