This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] fix colors for GNOME


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.
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]