]>
cygwin.com Git - cygwin-apps/setup.git/blob - net.cc
2 * Copyright (c) 2000, Red Hat, Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
12 * Written by DJ Delorie <dj@cygnus.com>
16 /* The purpose of this file is to get the network configuration
17 information from the user. */
27 static int rb
[] = { IDC_NET_IE5
, IDC_NET_DIRECT
, IDC_NET_PROXY
, 0 };
30 check_if_enable_next (HWND h
)
32 int e
= 0, p
= 0, pu
= 0;
33 if (net_method
== IDC_NET_IE5
)
35 if (net_method
== IDC_NET_IE5
|| net_method
== IDC_NET_DIRECT
)
37 else if (net_method
== IDC_NET_PROXY
)
40 if (net_proxy_host
&& net_proxy_port
)
43 if (pu
&& (net_proxy_user
&& !net_proxy_passwd
44 || !net_proxy_user
&& net_proxy_passwd
))
46 EnableWindow (GetDlgItem (h
, IDOK
), e
);
47 EnableWindow (GetDlgItem (h
, IDC_PROXY_HOST
), p
);
48 EnableWindow (GetDlgItem (h
, IDC_PROXY_PORT
), p
);
49 EnableWindow (GetDlgItem (h
, IDC_PROXY_USER
), pu
);
50 EnableWindow (GetDlgItem (h
, IDC_PROXY_PASSWD
), pu
);
56 rbset (h
, rb
, net_method
);
57 eset (h
, IDC_PROXY_HOST
, net_proxy_host
);
58 if (net_proxy_port
== 0)
60 eset (h
, IDC_PROXY_PORT
, net_proxy_port
);
61 eset (h
, IDC_PROXY_USER
, net_proxy_user
);
62 eset (h
, IDC_PROXY_PASSWD
, net_proxy_passwd
);
63 check_if_enable_next (h
);
69 net_method
= rbget (h
, rb
);
70 net_proxy_host
= eget (h
, IDC_PROXY_HOST
, net_proxy_host
);
71 net_proxy_port
= eget (h
, IDC_PROXY_PORT
);
72 net_proxy_user
= eget (h
, IDC_PROXY_USER
, net_proxy_user
);
73 net_proxy_passwd
= eget (h
, IDC_PROXY_PASSWD
, net_proxy_passwd
);
77 dialog_cmd (HWND h
, int id
, HWND hwndctl
, UINT code
)
88 case IDC_PROXY_PASSWD
:
90 check_if_enable_next (h
);
97 case IDC_SOURCE_NETINST
:
98 case IDC_SOURCE_DOWNLOAD
:
105 msg("source is default? %d\n", source
);
114 case IDC_SOURCE_DOWNLOAD
:
117 case IDC_SOURCE_NETINST
:
131 dialog_proc (HWND h
, UINT message
, WPARAM wParam
, LPARAM lParam
)
139 return HANDLE_WM_COMMAND(h
, wParam
, lParam
, dialog_cmd
);
148 rv
= DialogBox (h
, MAKEINTRESOURCE (IDD_NET
), 0, dialog_proc
);
150 fatal (IDS_DIALOG_FAILED
);
This page took 0.03984 seconds and 5 git commands to generate.