From d41a10aafa58e0ae70efa685bdcbf80d68264870 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 5 Mar 2015 20:54:42 +0000 Subject: Tox: - translation fixes - resource cosmetics git-svn-id: http://svn.miranda-ng.org/main/trunk@12341 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_options.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'protocols/Tox/src') diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 764d3d9469..f282c0cbd0 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -74,15 +74,9 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l case IDC_IMPORT_PROFILE: { - TCHAR *pFilter, filter[MAX_PATH] = { 0 }; - pFilter = &filter[0]; - mir_tstrcat(pFilter, TranslateT("Tox profile(*.tox)")); - pFilter += mir_tstrlen(pFilter) + 1; - mir_tstrcat(pFilter, _T("*.tox")); - pFilter += mir_tstrlen(pFilter) + 1; - mir_tstrcat(pFilter, TranslateT("All files(*.*)")); - pFilter += mir_tstrlen(pFilter) + 1; - mir_tstrcat(pFilter, _T("*.*")); + TCHAR filter[MAX_PATH]; + mir_sntprintf(filter, SIZEOF(filter), _T("%s(*.tox)%c*.tox%c%s(*.*)%c*.*%c%c"), + TranslateT("Tox profile"), 0, 0, TranslateT("All files"), 0, 0, 0); TCHAR profilePath[MAX_PATH] = { 0 }; @@ -241,7 +235,7 @@ INT_PTR CALLBACK EditNodeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l itemInfo = (ItemInfo*)lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); - SendDlgItemMessage(hwndDlg, IDC_IPV4, EM_SETLIMITTEXT, 15, 0); + SendDlgItemMessage(hwndDlg, IDC_IPV4, EM_SETLIMITTEXT, MAX_PATH, 0); SendDlgItemMessage(hwndDlg, IDC_IPV6, EM_SETLIMITTEXT, 39, 0); SendDlgItemMessage(hwndDlg, IDC_PORT, EM_SETLIMITTEXT, 5, 0); SendDlgItemMessage(hwndDlg, IDC_PKEY, EM_SETLIMITTEXT, TOX_PUBLIC_KEY_SIZE * 2, 0); -- cgit v1.2.3