diff options
author | Martin Hunt <hunt@redhat.com> | 2003-06-13 19:30:49 +0000 |
---|---|---|
committer | Martin Hunt <hunt@redhat.com> | 2003-06-13 19:30:49 +0000 |
commit | fb058539f5395affa795189a91ba30c13870a2ab (patch) | |
tree | c3a0ef9c821e111a77bfc59cd276f9df122dee04 /gdb/gdbtk | |
parent | 1c709bcd28904a09675339ac006d50d45911352b (diff) | |
download | gdb-fb058539f5395affa795189a91ba30c13870a2ab.tar.gz |
2003-06-13 Martin Hunt <hunt@redhat.com>
* library/prefs.tcl (load_gnome_file): Fix parsing
of gtk theme files so Red Hat 9 (and others) GNOME colors
are correct.
Diffstat (limited to 'gdb/gdbtk')
-rw-r--r-- | gdb/gdbtk/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbtk/library/prefs.tcl | 20 |
2 files changed, 20 insertions, 6 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog index 489900fdc34..add51e4cc89 100644 --- a/gdb/gdbtk/ChangeLog +++ b/gdb/gdbtk/ChangeLog @@ -1,3 +1,9 @@ +2003-06-13 Martin Hunt <hunt@redhat.com> + + * library/prefs.tcl (load_gnome_file): Fix parsing + of gtk theme files so Red Hat 9 (and others) GNOME colors + are correct. + 2003-06-11 David Carlton <carlton@bactrian.org> * generic/gdbtk-stack.c: Include dictionary.h. diff --git a/gdb/gdbtk/library/prefs.tcl b/gdb/gdbtk/library/prefs.tcl index 7e70f560acd..528aadc8c73 100644 --- a/gdb/gdbtk/library/prefs.tcl +++ b/gdb/gdbtk/library/prefs.tcl @@ -579,12 +579,20 @@ proc load_gnome_file {fd} { } elseif {[regexp "\[ \t\n\]*\(.+\) = \(.+\)" $line a name val] == 0} { continue } - set res [scan $val "\{ %f, %f, %f \}" r g b] - if {$res != 3} {continue} - set r [expr int($r*255)] - set g [expr int($g*255)] - set b [expr int($b*255)] - set val [format "\#%02x%02x%02x" $r $g $b] + + if {[regexp "\"#......\"" $val a] == 1} { + set val [lindex $a 0] + } else { + set res [scan $val "\{ %f, %f, %f \}" r g b] + if {$res != 3} { + continue + } + set r [expr int($r*255)] + set g [expr int($g*255)] + set b [expr int($b*255)] + set val [format "\#%02x%02x%02x" $r $g $b] + } + debug "name=\"$name\" val=\"$val\"" # This is a bit of a hack and probably only |