Overhaul plat_get_string()
Now takes constants with human-readable names instead of Win32 string table IDs, language.h is no longer needed ui_msgbox*() no longer accepts string IDs as arguments directly, plat_get_string() must be explicitly called to retrieve the string
This commit is contained in:
@@ -663,9 +663,9 @@ load_network(void)
|
||||
if (nc->net_type == NET_TYPE_PCAP) {
|
||||
if ((network_dev_to_id(p) == -1) || (network_ndev == 1)) {
|
||||
if (network_ndev == 1)
|
||||
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2095, (wchar_t *) IDS_2130);
|
||||
ui_msgbox_header(MBX_ERROR, plat_get_string(STRING_PCAP_ERROR_NO_DEVICES), plat_get_string(STRING_PCAP_ERROR_DESC));
|
||||
else if (network_dev_to_id(p) == -1)
|
||||
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2096, (wchar_t *) IDS_2130);
|
||||
ui_msgbox_header(MBX_ERROR, plat_get_string(STRING_PCAP_ERROR_INVALID_DEVICE), plat_get_string(STRING_PCAP_ERROR_DESC));
|
||||
strcpy(nc->host_dev_name, "none");
|
||||
} else
|
||||
strncpy(nc->host_dev_name, p, sizeof(nc->host_dev_name) - 1);
|
||||
@@ -710,9 +710,9 @@ load_network(void)
|
||||
if (nc->net_type == NET_TYPE_PCAP) {
|
||||
if ((network_dev_to_id(p) == -1) || (network_ndev == 1)) {
|
||||
if (network_ndev == 1)
|
||||
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2095, (wchar_t *) IDS_2130);
|
||||
ui_msgbox_header(MBX_ERROR, plat_get_string(STRING_PCAP_ERROR_NO_DEVICES), plat_get_string(STRING_PCAP_ERROR_DESC));
|
||||
else if (network_dev_to_id(p) == -1)
|
||||
ui_msgbox_header(MBX_ERROR, (wchar_t *) IDS_2096, (wchar_t *) IDS_2130);
|
||||
ui_msgbox_header(MBX_ERROR, plat_get_string(STRING_PCAP_ERROR_INVALID_DEVICE), plat_get_string(STRING_PCAP_ERROR_DESC));
|
||||
strcpy(nc->host_dev_name, "none");
|
||||
} else
|
||||
strncpy(nc->host_dev_name, p, sizeof(nc->host_dev_name) - 1);
|
||||
|
||||
Reference in New Issue
Block a user