mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[DESK]
- Remove the SCRNSAVE.EXE value from the registry and set ScreenSaveActive to "0" as this is the setting for "None" screen saver. - Change screen saver settings the way Windows XP does it. svn path=/trunk/; revision=58360
This commit is contained in:
parent
d09a5ff14a
commit
d21e3a1d25
2 changed files with 18 additions and 26 deletions
|
@ -91,8 +91,7 @@ HKCU,"Control Panel\Desktop","DragHeight",0x00000000,"4"
|
|||
HKCU,"Control Panel\Desktop","DragWidth",0x00000000,"4"
|
||||
HKCU,"Control Panel\Desktop","PaintDesktopVersion",0x00010001,"0"
|
||||
HKCU,"Control Panel\Desktop","HungAppTimeout",2,"5000"
|
||||
HKCU,"Control Panel\Desktop","SCRNSAVE.EXE",0,""
|
||||
HKCU,"Control Panel\Desktop","ScreenSaveActive",2,"1"
|
||||
HKCU,"Control Panel\Desktop","ScreenSaveActive",2,"0"
|
||||
HKCU,"Control Panel\Desktop","ScreenSaverIsSecure",2,"1"
|
||||
HKCU,"Control Panel\Desktop","ScreenSaveTimeOut",0,"600"
|
||||
HKCU,"Control Panel\Desktop","WaitToKillAppTimeout",2,"20000"
|
||||
|
|
|
@ -473,7 +473,7 @@ SetScreenSaver(HWND hwndDlg, PDATA pData)
|
|||
{
|
||||
INT Time;
|
||||
BOOL bRet;
|
||||
TCHAR szTime[256], Sec;
|
||||
TCHAR Sec;
|
||||
UINT Ret;
|
||||
|
||||
/* Set the screensaver */
|
||||
|
@ -485,36 +485,18 @@ SetScreenSaver(HWND hwndDlg, PDATA pData)
|
|||
REG_SZ,
|
||||
(PBYTE)pData->ScreenSaverItems[pData->Selection].szFilename,
|
||||
_tcslen(pData->ScreenSaverItems[pData->Selection].szFilename) * sizeof(TCHAR));
|
||||
|
||||
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, TRUE, 0, SPIF_UPDATEINIFILE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Windows deletes the value if no screensaver is set */
|
||||
RegDeleteValue(regKey, _T("SCRNSAVE.EXE"));
|
||||
DeleteMode = TRUE;
|
||||
|
||||
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, 0, SPIF_UPDATEINIFILE);
|
||||
}
|
||||
|
||||
/* set the screensaver time delay */
|
||||
Time = GetDlgItemInt(hwndDlg,
|
||||
IDC_SCREENS_TIMEDELAY,
|
||||
&bRet,
|
||||
FALSE);
|
||||
if (Time == 0)
|
||||
Time = 60;
|
||||
else
|
||||
Time *= 60;
|
||||
|
||||
_itot(Time, szTime, 10);
|
||||
RegSetValueEx(regKey,
|
||||
_T("ScreenSaveTimeOut"),
|
||||
0,
|
||||
REG_SZ,
|
||||
(PBYTE)szTime,
|
||||
_tcslen(szTime) * sizeof(TCHAR));
|
||||
|
||||
if (DeleteMode) Time = 0;
|
||||
|
||||
SystemParametersInfoW(SPI_SETSCREENSAVETIMEOUT, Time, 0, SPIF_SENDCHANGE);
|
||||
|
||||
/* Set the secure value */
|
||||
Ret = SendDlgItemMessage(hwndDlg,
|
||||
IDC_SCREENS_USEPASSCHK,
|
||||
|
@ -529,6 +511,18 @@ SetScreenSaver(HWND hwndDlg, PDATA pData)
|
|||
(PBYTE)&Sec,
|
||||
sizeof(TCHAR));
|
||||
|
||||
/* Set the screensaver time delay */
|
||||
Time = GetDlgItemInt(hwndDlg,
|
||||
IDC_SCREENS_TIMEDELAY,
|
||||
&bRet,
|
||||
FALSE);
|
||||
if (Time == 0)
|
||||
Time = 60;
|
||||
else
|
||||
Time *= 60;
|
||||
|
||||
SystemParametersInfoW(SPI_SETSCREENSAVETIMEOUT, Time, 0, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE);
|
||||
|
||||
RegCloseKey(regKey);
|
||||
}
|
||||
}
|
||||
|
@ -735,7 +729,6 @@ ScreenSaverPageProc(HWND hwndDlg,
|
|||
{
|
||||
if (command == BN_CLICKED)
|
||||
{
|
||||
MessageBox(NULL, TEXT("Feature not yet implemented"), TEXT("Sorry"), MB_OK);
|
||||
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue