- dont show same wallpaper twice

- bug report + patch by Vytis Girdzijauskas, "CMan", cman[at]cman[dot]us
See issue #2601 for more details.

svn path=/trunk/; revision=28747
This commit is contained in:
Johannes Anderwald 2007-09-01 17:18:00 +00:00
parent ab1415d99c
commit d0bc8873a1

View file

@ -165,16 +165,16 @@ AddListViewItems(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
hFind = FindFirstFile(szSearchPath, &fd); hFind = FindFirstFile(szSearchPath, &fd);
while (hFind != INVALID_HANDLE_VALUE) while (hFind != INVALID_HANDLE_VALUE)
{ {
/* Don't add any hidden bitmaps */ TCHAR filename[MAX_PATH];
if ((fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) == 0)
GetWindowsDirectory(filename, MAX_PATH);
_tcscat(filename, TEXT("\\"));
_tcscat(filename, fd.cFileName);
/* Don't add any hidden bitmaps. Also don't add current wallpaper once more. */
if (((fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) == 0) && (_tcscmp(wallpaperFilename, filename) != 0))
{ {
TCHAR filename[MAX_PATH];
GetWindowsDirectory(filename, MAX_PATH);
_tcscat(filename, TEXT("\\"));
_tcscat(filename, fd.cFileName);
himl = (HIMAGELIST)SHGetFileInfo(filename, himl = (HIMAGELIST)SHGetFileInfo(filename,
0, 0,
&sfi, &sfi,
@ -780,3 +780,4 @@ BackgroundPageProc(HWND hwndDlg,
return FALSE; return FALSE;
} }