Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.4rc1, 0.4rc2, and 0.4rc3

overlay: add global option for disabling overlay icons

[tortoisehg]
overlayicons = [enabled | disabled] # default: enabled

restart Explorer for new setting to take effect.

[based on original patch by Adrian Buehlmann]

Changeset b20b8e834566

Parent bb6d31bc8c5a

by TK Soh

Changes to one file · Browse files at b20b8e834566 Showing diff from parent bb6d31bc8c5a Diff from another changeset...

 
37
38
39
 
 
 
 
 
 
 
 
 
40
41
42
 
88
89
90
 
 
 
91
92
93
 
240
241
242
 
 
 
 
 
243
244
245
 
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
 
97
98
99
100
101
102
103
104
105
 
252
253
254
255
256
257
258
259
260
261
262
@@ -37,6 +37,15 @@
 S_OK = 0  S_FALSE = 1   +# overlay icons display setting +show_overlay_icons = False + +def get_show_icons(): + global show_overlay_icons + val = ui.ui().config('tortoisehg', 'overlayicons', "enabled") + show_overlay_icons = val == 'enabled' + print "show_icons = ", show_overlay_icons +  def subdirs(p):   oldp = ""   if os.path.isdir(p): @@ -88,6 +97,9 @@
  ]     def GetOverlayInfo(self): + # retrieve overlay icons display settting + get_show_icons() +   icon = thgutil.get_icon_path("status", self.icon)   print "icon = ", icon   @@ -240,6 +252,11 @@
  return status     def IsMemberOf(self, path, attrib): + global show_overlay_icons + + if not show_overlay_icons: + return S_FALSE +   if self._get_state(path) == self.state:   return S_OK   return S_FALSE