Changelog: * windows/sysparams.c Extend the code to set both the Win9x and the NT registry keys Only the NT keys are authoritative (i.e. we set the Win9x keys but don't re-read them) Index: windows/sysparams.c =================================================================== RCS file: /home/wine/wine/windows/sysparams.c,v retrieving revision 1.47 diff -u -r1.47 sysparams.c --- windows/sysparams.c 13 Jan 2003 20:40:22 -0000 1.47 +++ windows/sysparams.c 17 Jan 2003 20:31:23 -0000 @@ -90,13 +90,17 @@ #define SPI_SETKEYBOARDDELAY_VALNAME "KeyboardDelay" #define SPI_ICONVERTICALSPACING_REGKEY "Control Panel\\Desktop\\WindowMetrics" #define SPI_ICONVERTICALSPACING_VALNAME "IconVerticalSpacing" -#define SPI_SETICONTITLEWRAP_REGKEY "Control Panel\\Desktop\\WindowMetrics" +#define SPI_SETICONTITLEWRAP_REGKEY1 "Control Panel\\Desktop\\WindowMetrics" +#define SPI_SETICONTITLEWRAP_REGKEY2 "Control Panel\\Desktop" #define SPI_SETICONTITLEWRAP_VALNAME "IconTitleWrap" -#define SPI_SETMENUDROPALIGNMENT_REGKEY "Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows" +#define SPI_SETMENUDROPALIGNMENT_REGKEY1 "Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows" +#define SPI_SETMENUDROPALIGNMENT_REGKEY2 "Control Panel\\Desktop" #define SPI_SETMENUDROPALIGNMENT_VALNAME "MenuDropAlignment" -#define SPI_SETDOUBLECLKWIDTH_REGKEY "Control Panel\\Mouse" +#define SPI_SETDOUBLECLKWIDTH_REGKEY1 "Control Panel\\Mouse" +#define SPI_SETDOUBLECLKWIDTH_REGKEY2 "Control Panel\\Desktop" #define SPI_SETDOUBLECLKWIDTH_VALNAME "DoubleClickWidth" -#define SPI_SETDOUBLECLKHEIGHT_REGKEY "Control Panel\\Mouse" +#define SPI_SETDOUBLECLKHEIGHT_REGKEY1 "Control Panel\\Mouse" +#define SPI_SETDOUBLECLKHEIGHT_REGKEY2 "Control Panel\\Desktop" #define SPI_SETDOUBLECLKHEIGHT_VALNAME "DoubleClickHeight" #define SPI_SETDOUBLECLICKTIME_REGKEY "Control Panel\\Mouse" #define SPI_SETDOUBLECLICKTIME_VALNAME "DoubleClickSpeed" @@ -438,7 +443,7 @@ { char buf[10]; - if (SYSPARAMS_Load( SPI_SETDOUBLECLKWIDTH_REGKEY, + if (SYSPARAMS_Load( SPI_SETDOUBLECLKWIDTH_REGKEY1, SPI_SETDOUBLECLKWIDTH_VALNAME, buf )) { SYSMETRICS_Set( SM_CXDOUBLECLK, atoi( buf ) ); @@ -447,7 +452,7 @@ } if (!spi_loaded[SPI_SETDOUBLECLKHEIGHT_IDX]) { - if (SYSPARAMS_Load( SPI_SETDOUBLECLKHEIGHT_REGKEY, + if (SYSPARAMS_Load( SPI_SETDOUBLECLKHEIGHT_REGKEY1, SPI_SETDOUBLECLKHEIGHT_VALNAME, buf )) { SYSMETRICS_Set( SM_CYDOUBLECLK, atoi( buf ) ); @@ -937,7 +942,7 @@ { char buf[5]; - if (SYSPARAMS_Load( SPI_SETICONTITLEWRAP_REGKEY, + if (SYSPARAMS_Load( SPI_SETICONTITLEWRAP_REGKEY1, SPI_SETICONTITLEWRAP_VALNAME, buf )) icon_title_wrap = atoi(buf); spi_loaded[spi_idx] = TRUE; @@ -952,10 +957,13 @@ spi_idx = SPI_SETICONTITLEWRAP_IDX; sprintf(buf, "%u", uiParam); - if (SYSPARAMS_Save( SPI_SETICONTITLEWRAP_REGKEY, + if (SYSPARAMS_Save( SPI_SETICONTITLEWRAP_REGKEY1, SPI_SETICONTITLEWRAP_VALNAME, buf, fWinIni )) { + SYSPARAMS_Save( SPI_SETICONTITLEWRAP_REGKEY2, + SPI_SETICONTITLEWRAP_VALNAME, + buf, fWinIni ); icon_title_wrap = uiParam; spi_loaded[spi_idx] = TRUE; } @@ -971,7 +979,7 @@ { char buf[5]; - if (SYSPARAMS_Load( SPI_SETMENUDROPALIGNMENT_REGKEY, + if (SYSPARAMS_Load( SPI_SETMENUDROPALIGNMENT_REGKEY1, SPI_SETMENUDROPALIGNMENT_VALNAME, buf )) { SYSMETRICS_Set( SM_MENUDROPALIGNMENT, atoi( buf ) ); @@ -989,10 +997,13 @@ spi_idx = SPI_SETMENUDROPALIGNMENT_IDX; sprintf(buf, "%u", uiParam); - if (SYSPARAMS_Save( SPI_SETMENUDROPALIGNMENT_REGKEY, + if (SYSPARAMS_Save( SPI_SETMENUDROPALIGNMENT_REGKEY1, SPI_SETMENUDROPALIGNMENT_VALNAME, buf, fWinIni )) { + SYSPARAMS_Save( SPI_SETMENUDROPALIGNMENT_REGKEY2, + SPI_SETMENUDROPALIGNMENT_VALNAME, + buf, fWinIni ); SYSMETRICS_Set( SM_MENUDROPALIGNMENT, uiParam ); spi_loaded[spi_idx] = TRUE; } @@ -1007,10 +1018,13 @@ spi_idx = SPI_SETDOUBLECLKWIDTH_IDX; sprintf(buf, "%u", uiParam); - if (SYSPARAMS_Save( SPI_SETDOUBLECLKWIDTH_REGKEY, + if (SYSPARAMS_Save( SPI_SETDOUBLECLKWIDTH_REGKEY1, SPI_SETDOUBLECLKWIDTH_VALNAME, buf, fWinIni )) { + SYSPARAMS_Save( SPI_SETDOUBLECLKWIDTH_REGKEY2, + SPI_SETDOUBLECLKWIDTH_VALNAME, + buf, fWinIni ); SYSMETRICS_Set( SM_CXDOUBLECLK, uiParam ); spi_loaded[spi_idx] = TRUE; } @@ -1025,10 +1039,13 @@ spi_idx = SPI_SETDOUBLECLKHEIGHT_IDX; sprintf(buf, "%u", uiParam); - if (SYSPARAMS_Save( SPI_SETDOUBLECLKHEIGHT_REGKEY, + if (SYSPARAMS_Save( SPI_SETDOUBLECLKHEIGHT_REGKEY1, SPI_SETDOUBLECLKHEIGHT_VALNAME, buf, fWinIni )) { + SYSPARAMS_Save( SPI_SETDOUBLECLKHEIGHT_REGKEY2, + SPI_SETDOUBLECLKHEIGHT_VALNAME, + buf, fWinIni ); SYSMETRICS_Set( SM_CYDOUBLECLK, uiParam ); spi_loaded[spi_idx] = TRUE; } -- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ "Lotto: A tax on people who are bad at math." -- unknown "Windows: Microsoft's tax on computer illiterates." -- WE7U