* [patch] fix colors for GNOME
@ 2003-06-13 19:33 Martin M. Hunt
0 siblings, 0 replies; only message in thread
From: Martin M. Hunt @ 2003-06-13 19:33 UTC (permalink / raw)
To: insight
[-- Attachment #1: Type: text/plain, Size: 331 bytes --]
I've checked in the attached patch which fixes the colors when using
GNOME with Red Hat 9 (and some others).
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.
--
Martin M. Hunt <hunt@redhat.com>
Red Hat Inc.
[-- Attachment #2: p --]
[-- Type: text/x-patch, Size: 1044 bytes --]
Index: library/prefs.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/prefs.tcl,v
retrieving revision 1.24
diff -u -u -r1.24 prefs.tcl
--- library/prefs.tcl 10 Feb 2003 09:47:52 -0000 1.24
+++ library/prefs.tcl 13 Jun 2003 19:30:16 -0000
@@ -579,12 +579,20 @@
} 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-06-13 19:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-13 19:33 [patch] fix colors for GNOME Martin M. Hunt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).