[NETCFGX]

- Improve the DNS data exchange between the basic IP settings and the advanced DNS panel
- Simplify LaunchAdvancedTcpipSettings

svn path=/trunk/; revision=47009
This commit is contained in:
Gregor Schneider 2010-04-25 10:45:06 +00:00
parent 740cd5ef90
commit 8ba6c78a50

View file

@ -1762,6 +1762,7 @@ StoreDNSSettings(
pLast = pCur; pLast = pCur;
pCur = pCur->Next; pCur = pCur->Next;
} }
This->pCurrentConfig->AutoconfigActive = FALSE;
} }
INT_PTR INT_PTR
@ -2046,7 +2047,6 @@ TcpipAdvancedDnsDlg(
VOID VOID
LaunchAdvancedTcpipSettings( LaunchAdvancedTcpipSettings(
HWND hDlg,
HWND hwndDlg, HWND hwndDlg,
TcpipConfNotifyImpl * This) TcpipConfNotifyImpl * This)
{ {
@ -2069,14 +2069,14 @@ LaunchAdvancedTcpipSettings(
pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW; pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE | PSH_NOAPPLYNOW;
pinfo.u3.phpage = hppages; pinfo.u3.phpage = hppages;
pinfo.nPages = 3; pinfo.nPages = 3;
pinfo.hwndParent = hDlg; pinfo.hwndParent = hwndDlg;
pinfo.pszCaption = szBuffer; pinfo.pszCaption = szBuffer;
StoreTcpipBasicSettings(hwndDlg, This, FALSE); StoreTcpipBasicSettings(hwndDlg, This, FALSE);
PropertySheetW(&pinfo); PropertySheetW(&pinfo);
InitializeTcpipBasicDlgCtrls(hwndDlg, This->pCurrentConfig); InitializeTcpipBasicDlgCtrls(hwndDlg, This->pCurrentConfig);
PropSheet_Changed(hDlg, hwndDlg); PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
} }
INT_PTR INT_PTR
@ -2328,6 +2328,8 @@ InitializeTcpipBasicDlgCtrls(
else else
{ {
SendDlgItemMessageW(hwndDlg, IDC_FIXEDDNS, BM_SETCHECK, BST_CHECKED, 0); SendDlgItemMessageW(hwndDlg, IDC_FIXEDDNS, BM_SETCHECK, BST_CHECKED, 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_DNS1), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_DNS2), TRUE);
if (pCurSettings->Ns) if (pCurSettings->Ns)
{ {
SendDlgItemMessageW(hwndDlg, IDC_DNS1, IPM_SETADDRESS, 0, (LPARAM)pCurSettings->Ns->IpAddress); SendDlgItemMessageW(hwndDlg, IDC_DNS1, IPM_SETADDRESS, 0, (LPARAM)pCurSettings->Ns->IpAddress);
@ -2521,7 +2523,7 @@ TcpipBasicDlg(
} }
break; break;
case IDC_ADVANCED: case IDC_ADVANCED:
LaunchAdvancedTcpipSettings(GetParent(hwndDlg), hwndDlg, (TcpipConfNotifyImpl*)GetWindowLongPtr(hwndDlg, DWLP_USER)); LaunchAdvancedTcpipSettings(hwndDlg, (TcpipConfNotifyImpl*)GetWindowLongPtr(hwndDlg, DWLP_USER));
break; break;
} }
break; break;