summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-02-15 16:29:11 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-02-15 16:29:11 +0000
commit66b931a4ffd6bf081e0363708f6482756beb86eb (patch)
tree15b4667a69f03e9690dd2393890bacf488492542 /protocols
parentacf80f676b629849e5a920f1cd07df463e741d4b (diff)
Tox: removed unneeded checks
git-svn-id: http://svn.miranda-ng.org/main/trunk@12129 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Tox/src/tox_options.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp
index 518f87afde..a44af9024d 100644
--- a/protocols/Tox/src/tox_options.cpp
+++ b/protocols/Tox/src/tox_options.cpp
@@ -198,6 +198,7 @@ INT_PTR CALLBACK AddNodeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
SetWindowText(hwndDlg, TranslateT("Add node"));
+ SetDlgItemInt(hwndDlg, IDC_PORT, 33445, TRUE);
Utils_RestoreWindowPositionNoSize(hwndDlg, NULL, MODULE, "AddNodeDlg");
return TRUE;
@@ -211,14 +212,6 @@ INT_PTR CALLBACK AddNodeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
MessageBox(hwndDlg, TranslateT("Enter IPv4"), TranslateT("Error"), MB_OK);
break;
}
- /*if (!GetDlgItemTextA(hwndDlg, IDC_IPV6, str, SIZEOF(str))) {
- MessageBox(hwndDlg, TranslateT("Enter IPv6"), TranslateT("Error"), MB_OK);
- break;
- }*/
- if (!GetDlgItemInt(hwndDlg, IDC_PORT, NULL, false)) {
- MessageBox(hwndDlg, TranslateT("Enter port"), TranslateT("Error"), MB_OK);
- break;
- }
if (!GetDlgItemTextA(hwndDlg, IDC_CLIENTID, value, SIZEOF(value))) {
MessageBox(hwndDlg, TranslateT("Enter public key"), TranslateT("Error"), MB_OK);
break;
@@ -240,7 +233,7 @@ INT_PTR CALLBACK AddNodeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
db_set_s(NULL, "TOX", setting, value);
mir_snprintf(setting, SIZEOF(setting), TOX_SETTINGS_NODE_PORT, nodeCount + 1);
- db_set_w(NULL, "TOX", setting, (DWORD)GetDlgItemInt(hwndDlg, IDC_PORT, NULL, false));
+ db_set_w(NULL, "TOX", setting, GetDlgItemInt(hwndDlg, IDC_PORT, NULL, false));
db_set_w(NULL, "TOX", TOX_SETTINGS_NODE_COUNT, nodeCount + 1);
@@ -283,8 +276,6 @@ INT_PTR CALLBACK ChangeNodeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
char setting[MAX_PATH];
mir_snprintf(setting, SIZEOF(setting), TOX_SETTINGS_NODE_IPV4, SelItem.SelNumber + 1);
ptrA addressIPv4(db_get_sa(NULL, "TOX", setting));
- if (addressIPv4 == NULL)
- break;
mir_snprintf(setting, SIZEOF(setting), TOX_SETTINGS_NODE_IPV6, SelItem.SelNumber + 1);
ptrA addressIPv6(db_get_sa(NULL, "TOX", setting));
@@ -294,8 +285,6 @@ INT_PTR CALLBACK ChangeNodeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
mir_snprintf(setting, SIZEOF(setting), TOX_SETTINGS_NODE_PKEY, SelItem.SelNumber + 1);
ptrA pubKey(db_get_sa(NULL, "TOX", setting));
- if (pubKey == NULL)
- break;
SetDlgItemTextA(hwndDlg, IDC_IPV4, addressIPv4);
SetDlgItemTextA(hwndDlg, IDC_IPV6, addressIPv6);
@@ -317,14 +306,6 @@ INT_PTR CALLBACK ChangeNodeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
MessageBox(hwndDlg, TranslateT("Enter IPv4"), TranslateT("Error"), MB_OK);
break;
}
- /*if (!GetDlgItemText(hwndDlg, IDC_IPV6, str, SIZEOF(str))) {
- MessageBox(hwndDlg, TranslateT("Enter IPv6"), TranslateT("Error"), MB_OK);
- break;
- }*/
- if (!GetDlgItemInt(hwndDlg, IDC_PORT, NULL, false)) {
- MessageBox(hwndDlg, TranslateT("Enter port"), TranslateT("Error"), MB_OK);
- break;
- }
if (!GetDlgItemText(hwndDlg, IDC_CLIENTID, str, SIZEOF(str))) {
MessageBox(hwndDlg, TranslateT("Enter public key"), TranslateT("Error"), MB_OK);
break;