contrib/hgk
changeset 7738 db366ec8d0a4
parent 7039 aafe12bd7174
child 7745 8bfe47e726fe
--- a/contrib/hgk	Wed Feb 04 20:55:44 2009 +0100
+++ b/contrib/hgk	Sat Feb 07 18:46:13 2009 +0100
@@ -439,7 +439,7 @@
     global entries sha1entry sha1string sha1but
     global maincursor textcursor curtextcursor
     global rowctxmenu gaudydiff mergemax
-    global hgvdiff
+    global hgvdiff bgcolor
 
     menu .bar
     .bar add cascade -label "File" -menu .bar.file
@@ -478,16 +478,16 @@
     .ctop add .ctop.top
     set canv .ctop.top.clist.canv
     canvas $canv -height $geometry(canvh) -width $geometry(canv1) \
-	-bg white -bd 0 \
+	-bg $bgcolor -bd 0 \
 	-yscrollincr $linespc -yscrollcommand "$cscroll set" -selectbackground grey
     .ctop.top.clist add $canv
     set canv2 .ctop.top.clist.canv2
     canvas $canv2 -height $geometry(canvh) -width $geometry(canv2) \
-	-bg white -bd 0 -yscrollincr $linespc -selectbackground grey
+	-bg $bgcolor -bd 0 -yscrollincr $linespc -selectbackground grey
     .ctop.top.clist add $canv2
     set canv3 .ctop.top.clist.canv3
     canvas $canv3 -height $geometry(canvh) -width $geometry(canv3) \
-	-bg white -bd 0 -yscrollincr $linespc -selectbackground grey
+	-bg $bgcolor -bd 0 -yscrollincr $linespc -selectbackground grey
     .ctop.top.clist add $canv3
     bind .ctop.top.clist <Configure> {resizeclistpanes %W %w}
 
@@ -547,7 +547,7 @@
     .ctop add .ctop.cdet
     frame .ctop.cdet.left
     set ctext .ctop.cdet.left.ctext
-    text $ctext -bg white -state disabled -font $textfont \
+    text $ctext -bg $bgcolor -state disabled -font $textfont \
 	-width $geometry(ctextw) -height $geometry(ctexth) \
 	-yscrollcommand ".ctop.cdet.left.sb set" \
 	-xscrollcommand ".ctop.cdet.left.hb set" -wrap none
@@ -581,7 +581,7 @@
 
     frame .ctop.cdet.right
     set cflist .ctop.cdet.right.cfiles
-    listbox $cflist -bg white -selectmode extended -width $geometry(cflistw) \
+    listbox $cflist -bg $bgcolor -selectmode extended -width $geometry(cflistw) \
 	-yscrollcommand ".ctop.cdet.right.sb set"
     scrollbar .ctop.cdet.right.sb -command "$cflist yview"
     pack .ctop.cdet.right.sb -side right -fill y
@@ -679,7 +679,7 @@
 proc savestuff {w} {
     global canv canv2 canv3 ctext cflist mainfont textfont
     global stuffsaved findmergefiles gaudydiff maxgraphpct
-    global maxwidth authorcolors curidfont
+    global maxwidth authorcolors curidfont bgcolor
 
     if {$stuffsaved} return
     if {![winfo viewable .]} return
@@ -721,6 +721,7 @@
 	puts $f "# the last entry will be reused."
 	puts $f "#"
 	puts $f "set authorcolors {$authorcolors}"
+	puts $f "set bgcolor $bgcolor"
 	close $f
 	file rename -force "~/.hgk-new" "~/.hgk"
     }
@@ -3891,6 +3892,7 @@
 set authorcolors {
     black blue deeppink mediumorchid blue burlywood4 goldenrod slateblue red2 navy dimgrey
 }
+set bgcolor white
 
 catch {source ~/.hgk}