mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[DESK]
- Fix duplicated entries in screensaver selector. Patch by Carlo Bramix <carlo dot bramix at libero dot it>. See issue #6533 for more details. svn path=/trunk/; revision=54098
This commit is contained in:
parent
d0d304b342
commit
43562431ef
1 changed files with 14 additions and 11 deletions
|
@ -410,6 +410,7 @@ AddScreenSavers(HWND hwndDlg, PDATA pData)
|
||||||
{
|
{
|
||||||
HWND hwndScreenSavers = GetDlgItem(hwndDlg, IDC_SCREENS_LIST);
|
HWND hwndScreenSavers = GetDlgItem(hwndDlg, IDC_SCREENS_LIST);
|
||||||
TCHAR szSearchPath[MAX_PATH];
|
TCHAR szSearchPath[MAX_PATH];
|
||||||
|
TCHAR szLocalPath[MAX_PATH];
|
||||||
INT i;
|
INT i;
|
||||||
ScreenSaverItem *ScreenSaverItem = NULL;
|
ScreenSaverItem *ScreenSaverItem = NULL;
|
||||||
LPTSTR lpBackSlash;
|
LPTSTR lpBackSlash;
|
||||||
|
@ -437,22 +438,24 @@ AddScreenSavers(HWND hwndDlg, PDATA pData)
|
||||||
// Initialize number of items into the list
|
// Initialize number of items into the list
|
||||||
pData->ScreenSaverCount = 1;
|
pData->ScreenSaverCount = 1;
|
||||||
|
|
||||||
// Add all the screensavers in the C:\ReactOS\System32 directory.
|
|
||||||
GetSystemDirectory(szSearchPath, MAX_PATH);
|
|
||||||
SearchScreenSavers(hwndScreenSavers, szSearchPath, pData);
|
|
||||||
|
|
||||||
// Add all the screensavers in the C:\ReactOS directory.
|
|
||||||
GetWindowsDirectory(szSearchPath, MAX_PATH);
|
|
||||||
SearchScreenSavers(hwndScreenSavers, szSearchPath, pData);
|
|
||||||
|
|
||||||
// Add all the screensavers where the applet is stored.
|
// Add all the screensavers where the applet is stored.
|
||||||
GetModuleFileName(hApplet, szSearchPath, MAX_PATH);
|
GetModuleFileName(hApplet, szLocalPath, MAX_PATH);
|
||||||
lpBackSlash = _tcsrchr(szSearchPath, _T('\\'));
|
lpBackSlash = _tcsrchr(szLocalPath, _T('\\'));
|
||||||
if (lpBackSlash != NULL)
|
if (lpBackSlash != NULL)
|
||||||
{
|
{
|
||||||
*lpBackSlash = '\0';
|
*lpBackSlash = '\0';
|
||||||
SearchScreenSavers(hwndScreenSavers, szSearchPath, pData);
|
SearchScreenSavers(hwndScreenSavers, szLocalPath, pData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add all the screensavers in the C:\ReactOS\System32 directory.
|
||||||
|
GetSystemDirectory(szSearchPath, MAX_PATH);
|
||||||
|
if (lpBackSlash != NULL && _tcsicmp(szSearchPath, szLocalPath) != 0)
|
||||||
|
SearchScreenSavers(hwndScreenSavers, szSearchPath, pData);
|
||||||
|
|
||||||
|
// Add all the screensavers in the C:\ReactOS directory.
|
||||||
|
GetWindowsDirectory(szSearchPath, MAX_PATH);
|
||||||
|
if (lpBackSlash != NULL && _tcsicmp(szSearchPath, szLocalPath) != 0)
|
||||||
|
SearchScreenSavers(hwndScreenSavers, szSearchPath, pData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue