Author: janderwald
Date: Sat Sep 1 21:18:00 2007
New Revision: 28747
URL:
http://svn.reactos.org/svn/reactos?rev=28747&view=rev
Log:
- dont show same wallpaper twice
- bug report + patch by Vytis Girdzijauskas, "CMan", cman[at]cman[dot]us
See issue #2601 for more details.
Modified:
trunk/reactos/dll/cpl/desk/background.c
Modified: trunk/reactos/dll/cpl/desk/background.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/background.c?…
==============================================================================
--- trunk/reactos/dll/cpl/desk/background.c (original)
+++ trunk/reactos/dll/cpl/desk/background.c Sat Sep 1 21:18:00 2007
@@ -165,16 +165,16 @@
hFind = FindFirstFile(szSearchPath, &fd);
while (hFind != INVALID_HANDLE_VALUE)
{
- /* Don't add any hidden bitmaps */
- if ((fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) == 0)
+ TCHAR filename[MAX_PATH];
+
+ 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,
0,
&sfi,
@@ -780,3 +780,4 @@
return FALSE;
}
+