[NETCFGX]
authorGregor Schneider <grschneider@gmail.com>
Sun, 25 Apr 2010 10:45:06 +0000 (10:45 +0000)
committerGregor Schneider <grschneider@gmail.com>
Sun, 25 Apr 2010 10:45:06 +0000 (10:45 +0000)
- Improve the DNS data exchange between the basic IP settings and the advanced DNS panel
- Simplify LaunchAdvancedTcpipSettings

svn path=/trunk/; revision=47009

reactos/dll/win32/netcfgx/tcpipconf_notify.c

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