> I tried passing SHCNE_UPDATEDIR to the parent dir of the icons, but
> the icons were not refreshed. Win32traceutil also didn't record any
> overlay icons requests. Here's how it was done:
> 
>     dir = os.path.dirname(path)
>     pidl, ignore = shell.SHILCreateFromPath(dir, 0)
>     print "notify: ", shell.SHGetPathFromIDList(pidl)
>     shell.SHChangeNotify(shellcon.SHCNE_UPDATEDIR,
>                          shellcon.SHCNF_IDLIST | shellcon.SHCNF_FLUSH,
>                          pidl,
>                          None)
> 
> Any thing I did wrong?

Not that I can see - but you are relying on the behaviour of Explorer's 
SHChangeNotify handler, and I've no idea how that is implemented - but I 
wouldn't be surprised to find that an SHCNE_UPDATEDIR is *not* treated as a 
full refresh, even if that does leave the possibility that icons or other 
attributes will be slightly out of date - they will correct themselves after a 
refresh after all.

In other words, just because the shell may collapse many SHCNE_UPDATEITEM calls 
into a single SHCNE_UPDATEDIR notification, there is no requirement that 
notification handlers treat SHCNE_UPDATEDIR as performing a complete 
SHCNE_UPDATEITEM for every item in the directory.

Cheers,

Mark

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to