/[winpt]/trunk/Src/wptProxySettingsDlg.cpp
ViewVC logotype

Diff of /trunk/Src/wptProxySettingsDlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 272 by twoaday, Sun Nov 5 08:57:45 2006 UTC revision 273 by twoaday, Fri Dec 8 10:22:17 2006 UTC
# Line 89  static int Line 89  static int
89  read_proxy (HWND dlg, keyserver_proxy_t ctx)  read_proxy (HWND dlg, keyserver_proxy_t ctx)
90  {  {
91      char t[512];      char t[512];
92      int ncount = 0, pos = 0;      int ncount;
93        
94      ncount = GetDlgItemText (dlg, IDC_PROXY_PWD, t, DIM (t)-1);      ncount = GetDlgItemText (dlg, IDC_PROXY_PWD, t, DIM (t)-1);
95      if (ncount > 0)      if (ncount > 0)
96          ctx->pass = m_strdup (t);          ctx->pass = m_strdup (t);
# Line 99  read_proxy (HWND dlg, keyserver_proxy_t Line 99  read_proxy (HWND dlg, keyserver_proxy_t
99          ctx->user = m_strdup (t);          ctx->user = m_strdup (t);
100      ncount = GetDlgItemText (dlg, IDC_PROXY_HOST, t, DIM (t)-1);      ncount = GetDlgItemText (dlg, IDC_PROXY_HOST, t, DIM (t)-1);
101      if (ncount > 0) {      if (ncount > 0) {
102          if (check_IP_or_hostname (t)) {          int pos = 0;
103              msg_box (dlg, _("Invalid host/IP address."), _("Proxy Settings"), MB_ERR);  
104            if (check_inet_address (t)) {
105                msg_box (dlg, _("Invalid host or IP address."), _("Proxy Settings"), MB_ERR);
106              return -1;              return -1;
107          }          }
108          /* XXX: check prefix */          /* XXX: check prefix */
# Line 146  static void Line 148  static void
148  enable_proxy_auth (HWND dlg, int val)  enable_proxy_auth (HWND dlg, int val)
149  {  {
150      int mode = val? TRUE : FALSE;      int mode = val? TRUE : FALSE;
151    
152      EnableWindow (GetDlgItem (dlg, IDC_PROXY_PWD), mode);      EnableWindow (GetDlgItem (dlg, IDC_PROXY_PWD), mode);
153      EnableWindow (GetDlgItem (dlg, IDC_PROXY_USER), mode);      EnableWindow (GetDlgItem (dlg, IDC_PROXY_USER), mode);
154  }  }
# Line 156  static void Line 159  static void
159  init_proxy_protocols (HWND dlg)  init_proxy_protocols (HWND dlg)
160  {  {
161      HWND cb = GetDlgItem (dlg, IDC_PROXY_PROTO);      HWND cb = GetDlgItem (dlg, IDC_PROXY_PROTO);
162    
163      combox_add_string (cb, (char *)"NONE");      combox_add_string (cb, (char *)"NONE");
164      combox_add_string (cb, (char *)"HTTP");      combox_add_string (cb, (char *)"HTTP");
165      /*XXX: combox_add_string (cb, (char *)"SOCKS5");*/      /*XXX: combox_add_string (cb, (char *)"SOCKS5");*/

Legend:
Removed from v.272  
changed lines
  Added in v.273

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26