# HG changeset patch
# User Simon Heimberg <[email protected]>
# Date 1238088459 -3600
# Node ID 1fb9c97bae63ff21f76f707c17e0b9814a732a82
# Parent  bdc9c7c821ee6456610f9250305716f5ad56cb8d
iconoverlay win: adapt to state changes of cachethg

diff -r bdc9c7c821ee -r 1fb9c97bae63 tortoise/iconoverlay.py
--- a/tortoise/iconoverlay.py   Fre Mär 20 06:39:13 2009 +0100
+++ b/tortoise/iconoverlay.py   Don Mär 26 18:27:39 2009 +0100
@@ -66,7 +66,7 @@
         try:
             cache_lock.acquire()
             tc = win32api.GetTickCount()
-            if cachethg.get_state(path) == self.state:
+            if cachethg.get_state(path) in self.state:
                 return S_OK
             return S_FALSE
         finally:
@@ -101,6 +101,9 @@
     globals()[classname] = cls
 
 _overlay_classes = []
-make_icon_overlay("Changed", "Modified", cachethg.MODIFIED, 
"{4D0F33E1-654C-4A1B-9BE8-E47A98752BAB}")
-make_icon_overlay("Unchanged", "Normal", cachethg.UNCHANGED, 
"{4D0F33E2-654C-4A1B-9BE8-E47A98752BAB}")
-make_icon_overlay("Added", "Added", cachethg.ADDED, 
"{4D0F33E3-654C-4A1B-9BE8-E47A98752BAB}")
+THG_CLSID = "{4D0F33E1-654C-4A1B-9BE8-E47A98752BAB}"
+modified = cachethg.REMOVED + cachethg.DELETED + cachethg.MODIFIED
+
+make_icon_overlay("Changed", "Modified", modified, THG_CLSID)
+make_icon_overlay("Unchanged", "Normal", cachethg.UNCHANGED, THG_CLSID)
+make_icon_overlay("Added", "Added", cachethg.ADDED, THG_CLSID)
------------------------------------------------------------------------------
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to