Show More
@@ -439,7 +439,8 b' proc makewindow {} {' | |||||
439 | global entries sha1entry sha1string sha1but |
|
439 | global entries sha1entry sha1string sha1but | |
440 | global maincursor textcursor curtextcursor |
|
440 | global maincursor textcursor curtextcursor | |
441 | global rowctxmenu gaudydiff mergemax |
|
441 | global rowctxmenu gaudydiff mergemax | |
442 | global hgvdiff bgcolor fgcolor |
|
442 | global hgvdiff bgcolor fgcolor diffremcolor diffaddcolor diffmerge1color | |
|
443 | global diffmerge2color hunksepcolor | |||
443 |
|
444 | |||
444 | menu .bar |
|
445 | menu .bar | |
445 | .bar add cascade -label "File" -menu .bar.file |
|
446 | .bar add cascade -label "File" -menu .bar.file | |
@@ -564,11 +565,16 b' proc makewindow {} {' | |||||
564 | $ctext tag conf d0 -back "#ff8080" |
|
565 | $ctext tag conf d0 -back "#ff8080" | |
565 | $ctext tag conf d1 -back green |
|
566 | $ctext tag conf d1 -back green | |
566 | } else { |
|
567 | } else { | |
567 |
$ctext tag conf hunksep -fore |
|
568 | $ctext tag conf hunksep -fore $hunksepcolor | |
568 |
$ctext tag conf d0 -fore |
|
569 | $ctext tag conf d0 -fore $diffremcolor | |
569 |
$ctext tag conf d1 -fore |
|
570 | $ctext tag conf d1 -fore $diffaddcolor | |
570 | $ctext tag conf m0 -fore red |
|
571 | ||
571 | $ctext tag conf m1 -fore blue |
|
572 | # The mX colours seem to be used in merge changesets, where m0 | |
|
573 | # is first parent, m1 is second parent and so on. Git can have | |||
|
574 | # several parents, Hg cannot, so I think the m2..mmax would be | |||
|
575 | # unused. | |||
|
576 | $ctext tag conf m0 -fore $diffmerge1color | |||
|
577 | $ctext tag conf m1 -fore $diffmerge2color | |||
572 | $ctext tag conf m2 -fore green |
|
578 | $ctext tag conf m2 -fore green | |
573 | $ctext tag conf m3 -fore purple |
|
579 | $ctext tag conf m3 -fore purple | |
574 | $ctext tag conf m4 -fore brown |
|
580 | $ctext tag conf m4 -fore brown | |
@@ -681,6 +687,8 b' proc savestuff {w} {' | |||||
681 | global canv canv2 canv3 ctext cflist mainfont textfont |
|
687 | global canv canv2 canv3 ctext cflist mainfont textfont | |
682 | global stuffsaved findmergefiles gaudydiff maxgraphpct |
|
688 | global stuffsaved findmergefiles gaudydiff maxgraphpct | |
683 | global maxwidth authorcolors curidfont bgcolor fgcolor |
|
689 | global maxwidth authorcolors curidfont bgcolor fgcolor | |
|
690 | global diffremcolor diffaddcolor hunksepcolor | |||
|
691 | global diffmerge1color diffmerge2color | |||
684 |
|
692 | |||
685 | if {$stuffsaved} return |
|
693 | if {$stuffsaved} return | |
686 | if {![winfo viewable .]} return |
|
694 | if {![winfo viewable .]} return | |
@@ -726,6 +734,21 b' proc savestuff {w} {' | |||||
726 | puts $f "#" |
|
734 | puts $f "#" | |
727 | puts $f "# The text color used in the diff and file list view" |
|
735 | puts $f "# The text color used in the diff and file list view" | |
728 | puts $f "set fgcolor $fgcolor" |
|
736 | puts $f "set fgcolor $fgcolor" | |
|
737 | puts $f "#" | |||
|
738 | puts $f "# Color to display + lines in diffs" | |||
|
739 | puts $f "set diffaddcolor $diffaddcolor" | |||
|
740 | puts $f "#" | |||
|
741 | puts $f "# Color to display - lines in diffs" | |||
|
742 | puts $f "set diffremcolor $diffremcolor" | |||
|
743 | puts $f "#" | |||
|
744 | puts $f "# Merge diffs: Color to signal lines from first parent" | |||
|
745 | puts $f "set diffmerge1color $diffmerge1color" | |||
|
746 | puts $f "#" | |||
|
747 | puts $f "# Merge diffs: Color to signal lines from second parent" | |||
|
748 | puts $f "set diffmerge2color $diffmerge2color" | |||
|
749 | puts $f "#" | |||
|
750 | puts $f "# Hunkseparator (@@ -lineno,lines +lineno,lines @@) color" | |||
|
751 | puts $f "set hunksepcolor $hunksepcolor" | |||
729 | close $f |
|
752 | close $f | |
730 | file rename -force "~/.hgk-new" "~/.hgk" |
|
753 | file rename -force "~/.hgk-new" "~/.hgk" | |
731 | } |
|
754 | } | |
@@ -3901,6 +3924,11 b' set bgcolor white' | |||||
3901 | # This color should probably be some system color (provided by tk), |
|
3924 | # This color should probably be some system color (provided by tk), | |
3902 | # but as the bgcolor has always been set to white, I choose to ignore |
|
3925 | # but as the bgcolor has always been set to white, I choose to ignore | |
3903 | set fgcolor black |
|
3926 | set fgcolor black | |
|
3927 | set diffaddcolor "#00a000" | |||
|
3928 | set diffremcolor red | |||
|
3929 | set diffmerge1color red | |||
|
3930 | set diffmerge2color blue | |||
|
3931 | set hunksepcolor blue | |||
3904 |
|
3932 | |||
3905 | catch {source ~/.hgk} |
|
3933 | catch {source ~/.hgk} | |
3906 |
|
3934 |
General Comments 0
You need to be logged in to leave comments.
Login now