Author: ekohl
Date: Sun Feb 24 08:58:05 2013
New Revision: 58360
URL:
http://svn.reactos.org/svn/reactos?rev=58360&view=rev
Log:
[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.
Modified:
trunk/reactos/boot/bootdata/hivedef.inf
trunk/reactos/dll/cpl/desk/screensaver.c
Modified: trunk/reactos/boot/bootdata/hivedef.inf
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivedef.inf?…
==============================================================================
--- trunk/reactos/boot/bootdata/hivedef.inf [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/hivedef.inf [iso-8859-1] Sun Feb 24 08:58:05 2013
@@ -91,8 +91,7 @@
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"
Modified: trunk/reactos/dll/cpl/desk/screensaver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/screensaver.c…
==============================================================================
--- trunk/reactos/dll/cpl/desk/screensaver.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/screensaver.c [iso-8859-1] Sun Feb 24 08:58:05 2013
@@ -473,7 +473,7 @@
{
INT Time;
BOOL bRet;
- TCHAR szTime[256], Sec;
+ TCHAR Sec;
UINT Ret;
/* Set the screensaver */
@@ -485,35 +485,17 @@
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;
- }
-
- /* 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);
+
+ SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, 0, SPIF_UPDATEINIFILE);
+ }
/* Set the secure value */
Ret = SendDlgItemMessage(hwndDlg,
@@ -529,6 +511,18 @@
(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 @@
{
if (command == BN_CLICKED)
{
- MessageBox(NULL, TEXT("Feature not yet implemented"),
TEXT("Sorry"), MB_OK);
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
}
break;