[pywin32-checkins] pywin32/win32/Demos SystemParametersInfo.py, 1.1, 1.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-11 06:56:11
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv901/win32/Demos Modified Files: SystemParametersInfo.py Log Message: On Vista, setting some params seems to be ignored, so don't fail in that case Index: SystemParametersInfo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/SystemParametersInfo.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SystemParametersInfo.py 16 Oct 2005 17:17:10 -0000 1.1 --- SystemParametersInfo.py 11 Dec 2008 06:56:05 -0000 1.2 *************** *** 8,12 **** ## Set actions all take an unsigned int in uiParam "SPI_GETWHEELSCROLLLINES", "SPI_GETKEYBOARDDELAY", ! "SPI_GETKEYBOARDSPEED", "SPI_GETMOUSEHOVERHEIGHT", "SPI_GETMOUSEHOVERWIDTH", "SPI_GETMOUSEHOVERTIME", "SPI_GETSCREENSAVETIMEOUT", "SPI_GETMENUSHOWDELAY", "SPI_GETLOWPOWERTIMEOUT", "SPI_GETPOWEROFFTIMEOUT", "SPI_GETBORDER", --- 8,13 ---- ## Set actions all take an unsigned int in uiParam "SPI_GETWHEELSCROLLLINES", "SPI_GETKEYBOARDDELAY", ! "SPI_GETKEYBOARDSPEED", ! "SPI_GETMOUSEHOVERHEIGHT", "SPI_GETMOUSEHOVERWIDTH", "SPI_GETMOUSEHOVERTIME", "SPI_GETSCREENSAVETIMEOUT", "SPI_GETMENUSHOWDELAY", "SPI_GETLOWPOWERTIMEOUT", "SPI_GETPOWEROFFTIMEOUT", "SPI_GETBORDER", *************** *** 22,26 **** new_value=win32gui.SystemParametersInfo(cget) print '\tnew value:',new_value ! assert new_value==orig_value+1 win32gui.SystemParametersInfo(cset, orig_value) assert win32gui.SystemParametersInfo(cget)==orig_value --- 23,31 ---- new_value=win32gui.SystemParametersInfo(cget) print '\tnew value:',new_value ! # On Vista, some of these values seem to be ignored. So only "fail" if ! # the new value isn't what we set or the original ! if new_value!=orig_value+1: ! assert new_value == orig_value ! print "Strange - setting %s seems to have been ignored" % (pname,) win32gui.SystemParametersInfo(cset, orig_value) assert win32gui.SystemParametersInfo(cget)==orig_value |