inetcpl.cpl: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b45f948826
commit
8927706852
|
@ -273,13 +273,12 @@ static INT_PTR connections_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
|
||||||
}
|
}
|
||||||
TRACE("ProxyEnable set to %x\n", use_proxy);
|
TRACE("ProxyEnable set to %x\n", use_proxy);
|
||||||
|
|
||||||
proxy_len = GetDlgItemTextW(hwnd, IDC_EDIT_PROXY_SERVER,
|
proxy_len = GetDlgItemTextW(hwnd, IDC_EDIT_PROXY_SERVER, proxy, ARRAY_SIZE(proxy));
|
||||||
proxy, sizeof(proxy)/sizeof(proxy[0]));
|
|
||||||
if(proxy_len)
|
if(proxy_len)
|
||||||
{
|
{
|
||||||
proxy[proxy_len++] = ':';
|
proxy[proxy_len++] = ':';
|
||||||
port_len = GetDlgItemTextW(hwnd, IDC_EDIT_PROXY_PORT,
|
port_len = GetDlgItemTextW(hwnd, IDC_EDIT_PROXY_PORT, proxy+proxy_len,
|
||||||
proxy+proxy_len, sizeof(proxy)/sizeof(proxy[0])-proxy_len);
|
ARRAY_SIZE(proxy)-proxy_len);
|
||||||
if(!port_len)
|
if(!port_len)
|
||||||
{
|
{
|
||||||
proxy[proxy_len++] = '8';
|
proxy[proxy_len++] = '8';
|
||||||
|
@ -305,7 +304,7 @@ static INT_PTR connections_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
|
||||||
|
|
||||||
use_pac_script = IsDlgButtonChecked(hwnd, IDC_USE_PAC_SCRIPT);
|
use_pac_script = IsDlgButtonChecked(hwnd, IDC_USE_PAC_SCRIPT);
|
||||||
pac_script_len = GetDlgItemTextW(hwnd, IDC_EDIT_PAC_SCRIPT,
|
pac_script_len = GetDlgItemTextW(hwnd, IDC_EDIT_PAC_SCRIPT,
|
||||||
pac_script, sizeof(pac_script)/sizeof(pac_script[0]));
|
pac_script, ARRAY_SIZE(pac_script));
|
||||||
if(!pac_script_len) use_pac_script = FALSE;
|
if(!pac_script_len) use_pac_script = FALSE;
|
||||||
if(use_pac_script)
|
if(use_pac_script)
|
||||||
{
|
{
|
||||||
|
|
|
@ -263,10 +263,10 @@ static INT_PTR general_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
|
||||||
if (psn->hdr.code == PSN_APPLY)
|
if (psn->hdr.code == PSN_APPLY)
|
||||||
{
|
{
|
||||||
*buffer = 0;
|
*buffer = 0;
|
||||||
GetDlgItemTextW(hwnd, IDC_HOME_EDIT, buffer, sizeof(buffer)/sizeof(WCHAR));
|
GetDlgItemTextW(hwnd, IDC_HOME_EDIT, buffer, ARRAY_SIZE(buffer));
|
||||||
TRACE("EDITTEXT has %s\n", debugstr_w(buffer));
|
TRACE("EDITTEXT has %s\n", debugstr_w(buffer));
|
||||||
|
|
||||||
res = parse_url_from_outside(buffer, parsed, sizeof(parsed)/sizeof(WCHAR));
|
res = parse_url_from_outside(buffer, parsed, ARRAY_SIZE(parsed));
|
||||||
TRACE("got %d with %s\n", res, debugstr_w(parsed));
|
TRACE("got %d with %s\n", res, debugstr_w(parsed));
|
||||||
|
|
||||||
if (res)
|
if (res)
|
||||||
|
|
|
@ -73,7 +73,7 @@ static DWORD url_templates[] = {URLTEMPLATE_CUSTOM,
|
||||||
static DWORD index_from_urltemplate(URLTEMPLATE value)
|
static DWORD index_from_urltemplate(URLTEMPLATE value)
|
||||||
{
|
{
|
||||||
|
|
||||||
DWORD index = sizeof(url_templates) / sizeof(url_templates[0]);
|
DWORD index = ARRAY_SIZE(url_templates);
|
||||||
|
|
||||||
while((index > 0) && (url_templates[index-1] != value))
|
while((index > 0) && (url_templates[index-1] != value))
|
||||||
index--;
|
index--;
|
||||||
|
@ -105,12 +105,12 @@ static void update_security_level(secdlg_data *sd, DWORD lv_index, DWORD tb_inde
|
||||||
current_index = (tb_index > 0) ? tb_index : index_from_urltemplate(sd->levels[lv_index]);
|
current_index = (tb_index > 0) ? tb_index : index_from_urltemplate(sd->levels[lv_index]);
|
||||||
|
|
||||||
name[0] = 0;
|
name[0] = 0;
|
||||||
LoadStringW(hcpl, IDS_SEC_LEVEL0 + current_index, name, sizeof(name)/sizeof(name[0]));
|
LoadStringW(hcpl, IDS_SEC_LEVEL0 + current_index, name, ARRAY_SIZE(name));
|
||||||
TRACE("new level #%d: %s\n", current_index, debugstr_w(name));
|
TRACE("new level #%d: %s\n", current_index, debugstr_w(name));
|
||||||
SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_LEVEL), name);
|
SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_LEVEL), name);
|
||||||
|
|
||||||
name[0] = 0;
|
name[0] = 0;
|
||||||
LoadStringW(hcpl, IDS_SEC_LEVEL0_INFO + (current_index * 0x10), name, sizeof(name)/sizeof(name[0]));
|
LoadStringW(hcpl, IDS_SEC_LEVEL0_INFO + (current_index * 0x10), name, ARRAY_SIZE(name));
|
||||||
TRACE("new level info: %s\n", debugstr_w(name));
|
TRACE("new level info: %s\n", debugstr_w(name));
|
||||||
SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_LEVEL_INFO), name);
|
SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_LEVEL_INFO), name);
|
||||||
|
|
||||||
|
@ -134,8 +134,8 @@ static void update_zone_info(secdlg_data *sd, DWORD lv_index)
|
||||||
|
|
||||||
SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_ZONE_INFO), za->szDescription);
|
SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_ZONE_INFO), za->szDescription);
|
||||||
|
|
||||||
len = LoadStringW(hcpl, IDS_SEC_SETTINGS, name, sizeof(name)/sizeof(*name));
|
len = LoadStringW(hcpl, IDS_SEC_SETTINGS, name, ARRAY_SIZE(name));
|
||||||
lstrcpynW(&name[len], za->szDisplayName, sizeof(name)/sizeof(*name) - len - 1);
|
lstrcpynW(&name[len], za->szDisplayName, ARRAY_SIZE(name) - len - 1);
|
||||||
|
|
||||||
TRACE("new title: %s\n", debugstr_w(name));
|
TRACE("new title: %s\n", debugstr_w(name));
|
||||||
SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_GROUP), name);
|
SetWindowTextW(GetDlgItem(sd->hsec, IDC_SEC_GROUP), name);
|
||||||
|
|
Loading…
Reference in New Issue