diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-29 12:36:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-29 12:36:34 +0000 |
commit | 428bf0cbd77813a43094cb5c984436deff251936 (patch) | |
tree | d7dfa8971153d53a849e45c942be97fe5b90b7ec /protocols/Tlen | |
parent | 82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff) |
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen')
-rw-r--r-- | protocols/Tlen/src/tlen_advsearch.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_avatar.cpp | 12 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_file.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_iqid.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_opt.cpp | 14 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_p2p_new.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_svc.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_userinfo.cpp | 24 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_ws.cpp | 4 |
9 files changed, 32 insertions, 32 deletions
diff --git a/protocols/Tlen/src/tlen_advsearch.cpp b/protocols/Tlen/src/tlen_advsearch.cpp index b140736096..62ee5cde41 100644 --- a/protocols/Tlen/src/tlen_advsearch.cpp +++ b/protocols/Tlen/src/tlen_advsearch.cpp @@ -34,7 +34,7 @@ static void InitComboBox(HWND hwndCombo, TLEN_FIELD_MAP *fieldMap) for (i=0;;i++) {
if (fieldMap[i].name == NULL)
break;
- n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) TranslateTS(fieldMap[i].name));
+ n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) TranslateW(fieldMap[i].name));
SendMessage(hwndCombo, CB_SETITEMDATA, n, fieldMap[i].id);
}
}
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index 83bd751010..f82d450634 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -33,13 +33,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, wchar_t* ptszDest, int cbLen) { - int tPathLen = mir_snwprintf(ptszDest, cbLen, TEXT("%s\\%S"), VARST(TEXT("%miranda_avatarcache%")), proto->m_szModuleName); + int tPathLen = mir_snwprintf(ptszDest, cbLen, TEXT("%s\\%S"), VARSW(TEXT("%miranda_avatarcache%")), proto->m_szModuleName); if (_waccess(ptszDest, 0)) { - int ret = CreateDirectoryTreeT(ptszDest); + int ret = CreateDirectoryTreeW(ptszDest); if (ret == 0) - proto->debugLog(L"getAvatarFilename(): Created new directory for avatar cache: %s.", ptszDest); + proto->debugLogW(L"getAvatarFilename(): Created new directory for avatar cache: %s.", ptszDest); else { - proto->debugLog(L"getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s", ptszDest, errno, strerror(errno)); + proto->debugLogW(L"getAvatarFilename(): Can not create directory for avatar cache: %s. errno=%d: %s", ptszDest, errno, strerror(errno)); wchar_t buffer[512]; mir_snwprintf(buffer, TranslateT("Cannot create avatars cache directory. ERROR: %d: %s\n%s"), errno, _wcserror(errno), ptszDest); PUShowMessageT(buffer, SM_WARNING); @@ -108,7 +108,7 @@ static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *it if (out != NULL) { fwrite(data, len, 1, out); fclose(out); - db_set_ts(hContact, "ContactPhoto", "File", filename); + db_set_ws(hContact, "ContactPhoto", "File", filename); db_set_s(hContact, proto->m_szModuleName, "AvatarHash", md5); db_set_dw(hContact, proto->m_szModuleName, "AvatarFormat", format); } @@ -116,7 +116,7 @@ static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *it wchar_t buffer[128]; mir_snwprintf(buffer, TranslateT("Cannot save new avatar file \"%s\" Error:\n\t%s (Error: %d)"), filename, _wcserror(errno), errno); PUShowMessageT(buffer, SM_WARNING); - proto->debugLog(buffer); + proto->debugLogW(buffer); return; } ProtoBroadcastAck(proto->m_szModuleName, hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0); diff --git a/protocols/Tlen/src/tlen_file.cpp b/protocols/Tlen/src/tlen_file.cpp index dadf79e4b3..11a269f377 100644 --- a/protocols/Tlen/src/tlen_file.cpp +++ b/protocols/Tlen/src/tlen_file.cpp @@ -585,7 +585,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) if (szFilename[0] != '\0' && ft->iqId != NULL) {
wchar_t* filenameT = mir_utf8decodeW((char*)szFilename);
PROTORECVFILET pre = { 0 };
- pre.dwFlags = PRFF_TCHAR;
+ pre.dwFlags = PRFF_UNICODE;
pre.fileCount = 1;
pre.timestamp = time(NULL);
pre.descr.w = filenameT;
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp index 50d77a3c3b..4089af4a85 100644 --- a/protocols/Tlen/src/tlen_iqid.cpp +++ b/protocols/Tlen/src/tlen_iqid.cpp @@ -417,7 +417,7 @@ void TlenIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) if ((queryNode = TlenXmlGetChild(iqNode, "query")) == NULL) return;
if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
jsr.hdr.cbSize = sizeof(TLEN_SEARCH_RESULT);
- jsr.hdr.flags = PSR_TCHAR;
+ jsr.hdr.flags = PSR_UNICODE;
for (i = 0; i < queryNode->numChild; i++) {
itemNode = queryNode->child[i];
if (!mir_strcmp(itemNode->name, "item")) {
diff --git a/protocols/Tlen/src/tlen_opt.cpp b/protocols/Tlen/src/tlen_opt.cpp index 2a855116dd..c5ac79b364 100644 --- a/protocols/Tlen/src/tlen_opt.cpp +++ b/protocols/Tlen/src/tlen_opt.cpp @@ -88,7 +88,7 @@ int TlenProtocol::OptionsInit(WPARAM wParam, LPARAM) odp.hInstance = hInst; odp.pwszGroup = LPGENW("Network"); odp.pwszTitle = m_tszUserName; - odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; + odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE; odp.dwInitParam = (LPARAM)this; for (int i = 0; i < _countof(tabPages); i++) { odp.pszTemplate = MAKEINTRESOURCEA(tabPages[i].dlgId); @@ -122,7 +122,7 @@ INT_PTR CALLBACK TlenAccMgrUIDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR proto = (TlenProtocol *)lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)proto); TranslateDialogDefault(hwndDlg); - if (!db_get_ts(NULL, proto->m_szModuleName, "LoginName", &dbv)) { + if (!db_get_ws(NULL, proto->m_szModuleName, "LoginName", &dbv)) { SetDlgItemText(hwndDlg, IDC_EDIT_USERNAME, dbv.ptszVal); db_free(&dbv); } @@ -208,7 +208,7 @@ static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara proto = (TlenProtocol *)lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)proto); TranslateDialogDefault(hwndDlg); - if (!db_get_ts(NULL, proto->m_szModuleName, "LoginName", &dbv)) { + if (!db_get_ws(NULL, proto->m_szModuleName, "LoginName", &dbv)) { SetDlgItemText(hwndDlg, IDC_EDIT_USERNAME, dbv.ptszVal); db_free(&dbv); } @@ -412,7 +412,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, proto = (TlenProtocol *)lParam; SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)proto); TranslateDialogDefault(hwndDlg); - if (!db_get_ts(NULL, proto->m_szModuleName, "LoginServer", &dbv)) { + if (!db_get_ws(NULL, proto->m_szModuleName, "LoginServer", &dbv)) { SetDlgItemText(hwndDlg, IDC_EDIT_LOGIN_SERVER, dbv.ptszVal); db_free(&dbv); } @@ -421,7 +421,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, EnableWindow(GetDlgItem(hwndDlg, IDC_HOST), TRUE); EnableWindow(GetDlgItem(hwndDlg, IDC_HOSTPORT), TRUE); - if (!db_get_ts(NULL, proto->m_szModuleName, "ManualHost", &dbv)) { + if (!db_get_ws(NULL, proto->m_szModuleName, "ManualHost", &dbv)) { SetDlgItemText(hwndDlg, IDC_HOST, dbv.ptszVal); db_free(&dbv); } @@ -461,12 +461,12 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)L"SOCKS4"); SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)L"SOCKS5"); SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_SETCURSEL, db_get_w(NULL, proto->m_szModuleName, "FileProxyType", 0), 0); - if (!db_get_ts(NULL, proto->m_szModuleName, "FileProxyHost", &dbv)) { + if (!db_get_ws(NULL, proto->m_szModuleName, "FileProxyHost", &dbv)) { SetDlgItemText(hwndDlg, IDC_FILE_PROXY_HOST, dbv.ptszVal); db_free(&dbv); } SetDlgItemInt(hwndDlg, IDC_FILE_PROXY_PORT, db_get_w(NULL, proto->m_szModuleName, "FileProxyPort", 0), FALSE); - if (!db_get_ts(NULL, proto->m_szModuleName, "FileProxyUsername", &dbv)) { + if (!db_get_ws(NULL, proto->m_szModuleName, "FileProxyUsername", &dbv)) { SetDlgItemText(hwndDlg, IDC_FILE_PROXY_USER, dbv.ptszVal); db_free(&dbv); } diff --git a/protocols/Tlen/src/tlen_p2p_new.cpp b/protocols/Tlen/src/tlen_p2p_new.cpp index d091aaa825..43615e4316 100644 --- a/protocols/Tlen/src/tlen_p2p_new.cpp +++ b/protocols/Tlen/src/tlen_p2p_new.cpp @@ -262,7 +262,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { mir_snprintf(fileInfo, "%s file(s), %s bytes", c, s);
wchar_t* filenameT = mir_utf8decodeW((char*)fileInfo);
PROTORECVFILET pre = { 0 };
- pre.dwFlags = PRFF_TCHAR;
+ pre.dwFlags = PRFF_UNICODE;
pre.fileCount = 1;
pre.timestamp = time(NULL);
pre.descr.w = filenameT;
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index ee3759740c..dcc6395496 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -578,7 +578,7 @@ static void __cdecl TlenGetAwayMsgThread(void *ptr) ptrA ownJid(db_get_sa(NULL, data->proto->m_szModuleName, "jid"));
if (!mir_strcmp(ownJid, dbv.pszVal)) {
DBVARIANT dbv2;
- if (!db_get_s(data->hContact, "CList", "StatusMsg", &dbv2, DBVT_TCHAR)) {
+ if (!db_get_s(data->hContact, "CList", "StatusMsg", &dbv2, DBVT_WCHAR)) {
data->proto->ProtoBroadcastAck(data->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv2.ptszVal);
db_free(&dbv2);
}
diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp index c361120161..0742ccdf38 100644 --- a/protocols/Tlen/src/tlen_userinfo.cpp +++ b/protocols/Tlen/src/tlen_userinfo.cpp @@ -87,7 +87,7 @@ static void InitComboBox(HWND hwndCombo, TLEN_FIELD_MAP *fieldMap) for (i=0;;i++) {
if (fieldMap[i].name == NULL)
break;
- n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) TranslateTS(fieldMap[i].name));
+ n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) TranslateW(fieldMap[i].name));
SendMessage(hwndCombo, CB_SETITEMDATA, n, fieldMap[i].id);
}
}
@@ -135,7 +135,7 @@ int TlenProtocol::UserInfoInit(WPARAM wParam, LPARAM lParam) if ((szProto != NULL && !mir_strcmp(szProto, m_szModuleName)) || !lParam) {
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
- odp.flags = ODPF_TCHAR;
+ odp.flags = ODPF_UNICODE;
odp.pfnDlgProc = TlenUserInfoDlgProc;
odp.position = -2000000000;
odp.pszTemplate = ((HANDLE)lParam != NULL) ? MAKEINTRESOURCEA(IDD_USER_INFO):MAKEINTRESOURCEA(IDD_USER_VCARD);
@@ -184,19 +184,19 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SetDlgItemText(hwndDlg, IDC_SUBSCRIPTION, L"");
SetFocus(GetDlgItem(hwndDlg, IDC_STATIC));
- if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "FirstName", &dbv)) {
+ if (!db_get_ws(data->hContact, data->proto->m_szModuleName, "FirstName", &dbv)) {
SetDlgItemText(hwndDlg, IDC_FIRSTNAME, dbv.ptszVal);
db_free(&dbv);
} else SetDlgItemText(hwndDlg, IDC_FIRSTNAME, L"");
- if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "LastName", &dbv)) {
+ if (!db_get_ws(data->hContact, data->proto->m_szModuleName, "LastName", &dbv)) {
SetDlgItemText(hwndDlg, IDC_LASTNAME, dbv.ptszVal);
db_free(&dbv);
} else SetDlgItemText(hwndDlg, IDC_LASTNAME, L"");
- if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "Nick", &dbv)) {
+ if (!db_get_ws(data->hContact, data->proto->m_szModuleName, "Nick", &dbv)) {
SetDlgItemText(hwndDlg, IDC_NICKNAME, dbv.ptszVal);
db_free(&dbv);
} else SetDlgItemText(hwndDlg, IDC_NICKNAME, L"");
- if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "e-mail", &dbv)) {
+ if (!db_get_ws(data->hContact, data->proto->m_szModuleName, "e-mail", &dbv)) {
SetDlgItemText(hwndDlg, IDC_EMAIL, dbv.ptszVal);
db_free(&dbv);
} else SetDlgItemText(hwndDlg, IDC_EMAIL, L"");
@@ -204,22 +204,22 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SetDlgItemInt(hwndDlg, IDC_AGE, dbv.wVal, FALSE);
db_free(&dbv);
} else SetDlgItemText(hwndDlg, IDC_AGE, L"");
- if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "City", &dbv)) {
+ if (!db_get_ws(data->hContact, data->proto->m_szModuleName, "City", &dbv)) {
SetDlgItemText(hwndDlg, IDC_CITY, dbv.ptszVal);
db_free(&dbv);
} else SetDlgItemText(hwndDlg, IDC_CITY, L"");
- if (!db_get_ts(data->hContact, data->proto->m_szModuleName, "School", &dbv)) {
+ if (!db_get_ws(data->hContact, data->proto->m_szModuleName, "School", &dbv)) {
SetDlgItemText(hwndDlg, IDC_SCHOOL, dbv.ptszVal);
db_free(&dbv);
} else SetDlgItemText(hwndDlg, IDC_SCHOOL, L"");
switch (db_get_b(data->hContact, data->proto->m_szModuleName, "Gender", '?')) {
case 'M':
SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_SETCURSEL, 1, 0);
- SetDlgItemText(hwndDlg, IDC_GENDER_TEXT, TranslateTS(tlenFieldGender[0].name));
+ SetDlgItemText(hwndDlg, IDC_GENDER_TEXT, TranslateW(tlenFieldGender[0].name));
break;
case 'F':
SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_SETCURSEL, 2, 0);
- SetDlgItemText(hwndDlg, IDC_GENDER_TEXT, TranslateTS(tlenFieldGender[1].name));
+ SetDlgItemText(hwndDlg, IDC_GENDER_TEXT, TranslateW(tlenFieldGender[1].name));
break;
default:
SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_SETCURSEL, 0, 0);
@@ -228,7 +228,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara }
i = db_get_w(data->hContact, data->proto->m_szModuleName, "Occupation", 0);
if (i>0 && i<13) {
- SetDlgItemText(hwndDlg, IDC_OCCUPATION_TEXT, TranslateTS(tlenFieldOccupation[i-1].name));
+ SetDlgItemText(hwndDlg, IDC_OCCUPATION_TEXT, TranslateW(tlenFieldOccupation[i-1].name));
SendDlgItemMessage(hwndDlg, IDC_OCCUPATION, CB_SETCURSEL, i, 0);
} else {
SetDlgItemText(hwndDlg, IDC_OCCUPATION_TEXT, L"");
@@ -236,7 +236,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara }
i = db_get_w(data->hContact, data->proto->m_szModuleName, "LookingFor", 0);
if (i>0 && i<6) {
- SetDlgItemText(hwndDlg, IDC_LOOKFOR_TEXT, TranslateTS(tlenFieldLookfor[i-1].name));
+ SetDlgItemText(hwndDlg, IDC_LOOKFOR_TEXT, TranslateW(tlenFieldLookfor[i-1].name));
SendDlgItemMessage(hwndDlg, IDC_LOOKFOR, CB_SETCURSEL, i, 0);
} else {
SetDlgItemText(hwndDlg, IDC_LOOKFOR_TEXT, L"");
diff --git a/protocols/Tlen/src/tlen_ws.cpp b/protocols/Tlen/src/tlen_ws.cpp index ec0a691917..c9008cd2ee 100644 --- a/protocols/Tlen/src/tlen_ws.cpp +++ b/protocols/Tlen/src/tlen_ws.cpp @@ -31,13 +31,13 @@ BOOL TlenWsInit(TlenProtocol *proto) nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR; // | NUF_HTTPGATEWAY;
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY;
mir_snwprintf(name, TranslateT("%s connection"), proto->m_tszUserName);
nlu.ptszDescriptiveName = name;
nlu.szSettingsModule = proto->m_szModuleName;
proto->m_hNetlibUser = (HANDLE) CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM) &nlu);
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_NOOPTIONS | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_NOOPTIONS | NUF_UNICODE;
mir_snwprintf(name, TranslateT("%s SOCKS connection"), proto->m_tszUserName);
nlu.ptszDescriptiveName = name;
proto->hFileNetlibUser = (HANDLE) CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM) &nlu);
|