From: Roger U. <ru...@us...> - 2007-02-19 20:29:19
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/demos/servers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27330/com/win32comext/shell/demos/servers Modified Files: shell_view.py Log Message: Allow Scintilla view to be displayed Index: shell_view.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/demos/servers/shell_view.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** shell_view.py 12 Feb 2007 03:21:56 -0000 1.7 --- shell_view.py 19 Feb 2007 20:29:18 -0000 1.8 *************** *** 191,195 **** extras = shellcon.SFGAO_HASSUBFOLDER | \ shellcon.SFGAO_FOLDER | \ ! shellcon.SFGAO_FILESYSANCESTOR ret_flags &= (dwAttr | extras) return ret_flags --- 191,196 ---- extras = shellcon.SFGAO_HASSUBFOLDER | \ shellcon.SFGAO_FOLDER | \ ! shellcon.SFGAO_FILESYSANCESTOR | \ ! shellcon.SFGAO_BROWSABLE ret_flags &= (dwAttr | extras) return ret_flags *************** *** 220,224 **** return NewEnum(pidls, iid=shell.IID_IEnumIDList, useDispatcher=(debug>0)) ! # As per comments above, even though this manages a file, it is *not* a # ShellFolderFileSystem, as the children are not on the file system. --- 221,233 ---- return NewEnum(pidls, iid=shell.IID_IEnumIDList, useDispatcher=(debug>0)) ! ! def GetDisplayNameOf(self, pidl, flags): ! final_pidl=pidl[-1] ! full_fname=final_pidl.split('\0')[-1] ! return os.path.split(full_fname)[-1] ! ! def GetAttributesOf(self, pidls, attrFlags): ! return shellcon.SFGAO_HASSUBFOLDER|shellcon.SFGAO_FOLDER|shellcon.SFGAO_FILESYSANCESTOR|shellcon.SFGAO_BROWSABLE ! # As per comments above, even though this manages a file, it is *not* a # ShellFolderFileSystem, as the children are not on the file system. *************** *** 334,337 **** --- 343,351 ---- return NewEnum(items, iid=shell.IID_IEnumIDList, useDispatcher=(debug>0)) + def GetDisplayNameOf(self, pidl, flags): + ## return full path for sys.path dirs, since they don't appear under a parent folder + final_pidl=pidl[-1] + display_name=final_pidl.split('\0')[-1] + return display_name # Simple shell view implementations *************** *** 398,401 **** --- 412,416 ---- win32gui.SetWindowLong(self.hwnd, win32con.GWL_WNDPROC, message_map) print "View 's hwnd is", self.hwnd + return self.hwnd def _CreateChildWindow(self, prev): |