]>
cygwin.com Git - cygwin-apps/setup.git/blob - net.cc
f497857675c94974131dca13be38ad21d4a03e8b
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. */
19 static char *cvsid
= "\n%%% $Id$\n";
30 static int rb
[] = { IDC_NET_IE5
, IDC_NET_DIRECT
, IDC_NET_PROXY
, 0 };
33 check_if_enable_next (HWND h
)
35 int e
= 0, p
= 0, pu
= 0;
36 if (net_method
== IDC_NET_IE5
)
38 if (net_method
== IDC_NET_IE5
|| net_method
== IDC_NET_DIRECT
)
40 else if (net_method
== IDC_NET_PROXY
)
43 if (net_proxy_host
&& net_proxy_port
)
46 EnableWindow (GetDlgItem (h
, IDOK
), e
);
47 EnableWindow (GetDlgItem (h
, IDC_PROXY_HOST
), p
);
48 EnableWindow (GetDlgItem (h
, IDC_PROXY_PORT
), p
);
54 rbset (h
, rb
, net_method
);
55 eset (h
, IDC_PROXY_HOST
, net_proxy_host
);
56 if (net_proxy_port
== 0)
58 eset (h
, IDC_PROXY_PORT
, net_proxy_port
);
59 check_if_enable_next (h
);
65 net_method
= rbget (h
, rb
);
66 net_proxy_host
= eget (h
, IDC_PROXY_HOST
, net_proxy_host
);
67 net_proxy_port
= eget (h
, IDC_PROXY_PORT
);
71 dialog_cmd (HWND h
, int id
, HWND hwndctl
, UINT code
)
82 check_if_enable_next (h
);
89 case IDC_SOURCE_NETINST
:
90 case IDC_SOURCE_DOWNLOAD
:
97 msg ("source is default? %d\n", source
);
106 case IDC_SOURCE_DOWNLOAD
:
107 NEXT (IDD_LOCAL_DIR
);
109 case IDC_SOURCE_NETINST
:
123 dialog_proc (HWND h
, UINT message
, WPARAM wParam
, LPARAM lParam
)
131 return HANDLE_WM_COMMAND (h
, wParam
, lParam
, dialog_cmd
);
141 rv
= DialogBox (h
, MAKEINTRESOURCE (IDD_NET
), 0, dialog_proc
);
143 fatal (IDS_DIALOG_FAILED
);
146 (net_method
== IDC_NET_IE5
) ? "IE5" :
147 (net_method
== IDC_NET_DIRECT
) ? "Direct" : "Proxy");
This page took 0.041771 seconds and 5 git commands to generate.