Author: janderwald
Date: Mon May 3 21:26:12 2010
New Revision: 47097
URL:
http://svn.reactos.org/svn/reactos?rev=47097&view=rev
Log:
[SHELL32]
- Show icons / folders from AllUsers\Desktop directory
- Fixes bug 4289
Modified:
trunk/reactos/dll/win32/shell32/shfldr_desktop.c
Modified: trunk/reactos/dll/win32/shell32/shfldr_desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shfldr_d…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shfldr_desktop.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shfldr_desktop.c [iso-8859-1] Mon May 3 21:26:12
2010
@@ -387,6 +387,9 @@
ret = ret && SHGetSpecialFolderPathW(0, szPath, CSIDL_DESKTOPDIRECTORY,
FALSE);
ret = ret && CreateFolderEnumList(list, szPath, dwFlags);
+ ret = ret && SHGetSpecialFolderPathW(0, szPath,
CSIDL_COMMON_DESKTOPDIRECTORY, FALSE);
+ ret = ret && CreateFolderEnumList(list, szPath, dwFlags);
+
return ret;
}
@@ -739,6 +742,22 @@
_ILSimpleGetTextW(pidl, pszPath + cLen, MAX_PATH - cLen);
if (!_ILIsFolder(pidl))
SHELL_FS_ProcessDisplayFilename(pszPath, dwFlags);
+
+ if (GetFileAttributes(pszPath) == INVALID_FILE_ATTRIBUTES)
+ {
+ /* file system folder or file rooted at the AllUsers desktop */
+ if ((GET_SHGDN_FOR(dwFlags) == SHGDN_FORPARSING) &&
+ (GET_SHGDN_RELATION(dwFlags) != SHGDN_INFOLDER))
+ {
+ SHGetSpecialFolderPathW(0, pszPath, CSIDL_COMMON_DESKTOPDIRECTORY,
FALSE);
+ PathAddBackslashW(pszPath);
+ cLen = wcslen(pszPath);
+ }
+
+ _ILSimpleGetTextW(pidl, pszPath + cLen, MAX_PATH - cLen);
+ if (!_ILIsFolder(pidl))
+ SHELL_FS_ProcessDisplayFilename(pszPath, dwFlags);
+ }
}
}
else