- Make version/winelook settings appdefault aware Only in programs/winecfg: drive_flymake.c diff -ur --exclude-from=diff-exclusions ../head/programs/winecfg/main.c programs/winecfg/main.c --- ../head/programs/winecfg/main.c 2003-10-17 19:39:12.000000000 +0100 +++ programs/winecfg/main.c 2003-10-17 19:37:40.000000000 +0100 @@ -36,6 +36,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(winecfg); + +#define versionSection (appSettings == EDITING_GLOBAL ? "Version" : (getSectionForApp("Version"))) +#define tweakSection (appSettings == EDITING_GLOBAL ? "Tweak.Layout" : (getSectionForApp("Tweak.Layout"))) + void CALLBACK PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam) { @@ -60,9 +64,9 @@ { int i; const VERSION_DESC *pVer = NULL; - char *curWinVer = getConfigValue("Version", "Windows", "win98"); - char *curDOSVer = getConfigValue("Version", "DOS", "6.22"); - char *curWineLook = getConfigValue("Tweak.Layout", "WineLook", "win95"); + char *curWinVer = getConfigValue(versionSection, "Windows", "win98"); + char *curDOSVer = getConfigValue(versionSection, "DOS", "6.22"); + char *curWineLook = getConfigValue(tweakSection, "WineLook", "win95"); /* normalize the version strings */ if (!strcmp(curWinVer, "win2000") || !strcmp(curWinVer, "nt2k") || !strcmp(curWinVer, "nt2000")) { @@ -118,7 +122,10 @@ GeneralDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { - + + case WM_NOTIFY: + if (((LPNMHDR)lParam)->code != PSN_SETACTIVE) break; + /* otherwise fall through, we want to refresh the page as well */ case WM_INITDIALOG: initGeneralDlg (hDlg); break; @@ -133,7 +140,7 @@ while (selection > 0) { desc++; selection--; } - addTransaction("Version", "Windows", ACTION_SET, desc->szVersion); + addTransaction(versionSection, "Windows", ACTION_SET, desc->szVersion); } break; @@ -145,7 +152,7 @@ while (selection > 0) { desc++; selection--; } - addTransaction("Tweak.Layout", "WineLook", ACTION_SET, desc->szVersion); + addTransaction(tweakSection, "WineLook", ACTION_SET, desc->szVersion); } break; @@ -157,7 +164,7 @@ while (selection > 0) { desc++; selection--; } - addTransaction("Version", "DOS", ACTION_SET, desc->szVersion); + addTransaction(versionSection, "DOS", ACTION_SET, desc->szVersion); } }