Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

status: respect 'tortoisehg.diffcolorstyle' option

Changeset 5eb69bceda70

Parent 7a7eda7adfc2

by Yuki KODAMA

Changes to one file · Browse files at 5eb69bceda70 Showing diff from parent 7a7eda7adfc2 Diff from another changeset...

 
90
91
92
 
93
94
95
 
1082
1083
1084
1085
1086
 
 
 
 
 
 
 
 
 
1087
1088
1089
 
90
91
92
93
94
95
96
 
1083
1084
1085
 
 
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
@@ -90,6 +90,7 @@
  self.status_error = None   self.preview_tab_name_label = None   self.subrepos = [] + self.colorstyle = self.repo.ui.config('tortoisehg', 'diffcolorstyle')     def auto_check(self):   # Only auto-check files once, and only if a pattern was given. @@ -1082,8 +1083,15 @@
    def diff_highlight_buffer(self, difftext):   buf = gtk.TextBuffer() - buf.create_tag('removed', foreground=gtklib.DRED) - buf.create_tag('added', foreground=gtklib.DGREEN) + if self.colorstyle == 'background': + buf.create_tag('removed', paragraph_background=gtklib.PRED) + buf.create_tag('added', paragraph_background=gtklib.PGREEN) + elif self.colorstyle == 'none': + buf.create_tag('removed') + buf.create_tag('added') + else: + buf.create_tag('removed', foreground=gtklib.DRED) + buf.create_tag('added', foreground=gtklib.DGREEN)   buf.create_tag('position', foreground='#FF8000')   buf.create_tag('header', foreground=gtklib.DBLUE)