summaryrefslogtreecommitdiff
path: root/protocols/MRA/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MRA/src')
-rw-r--r--protocols/MRA/src/MraAdvancedSearch.cpp2
-rw-r--r--protocols/MRA/src/MraAvatars.cpp8
-rw-r--r--protocols/MRA/src/MraChat.cpp2
-rw-r--r--protocols/MRA/src/MraIcons.cpp2
-rw-r--r--protocols/MRA/src/MraPopUp.cpp6
-rw-r--r--protocols/MRA/src/MraProto.cpp2
-rw-r--r--protocols/MRA/src/MraSendCommand.cpp2
-rw-r--r--protocols/MRA/src/Mra_functions.cpp14
-rw-r--r--protocols/MRA/src/Mra_menus.cpp2
-rw-r--r--protocols/MRA/src/Mra_options.cpp8
-rw-r--r--protocols/MRA/src/Mra_proto.cpp8
-rw-r--r--protocols/MRA/src/Mra_svcs.cpp2
12 files changed, 29 insertions, 29 deletions
diff --git a/protocols/MRA/src/MraAdvancedSearch.cpp b/protocols/MRA/src/MraAdvancedSearch.cpp
index 5ea4500c69..cfcda90d31 100644
--- a/protocols/MRA/src/MraAdvancedSearch.cpp
+++ b/protocols/MRA/src/MraAdvancedSearch.cpp
@@ -65,7 +65,7 @@ void InitComboBox(HWND hWndCombo, FieldNames *lpNames)
ResetComboBox(hWndCombo);
for (size_t i = 0; lpNames[i].lpszText; i++) {
- DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)TranslateTS(lpNames[i].lpszText));
+ DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)TranslateW(lpNames[i].lpszText));
SendMessage(hWndCombo, CB_SETITEMDATA, dwItem, lpNames[i].dwCode);
}
}
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp
index ca412ee5dc..8986f6e781 100644
--- a/protocols/MRA/src/MraAvatars.cpp
+++ b/protocols/MRA/src/MraAvatars.cpp
@@ -59,7 +59,7 @@ DWORD CMraProto::MraAvatarsQueueInitialize(HANDLE *phAvatarsQueueHandle)
mir_snwprintf(szBuffer, L"%s %s", m_tszUserName, TranslateT("Avatars' plugin connections"));
NETLIBUSER nlu = { sizeof(nlu) };
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
+ nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = MRA_AVT_SECT_NAME;
nlu.ptszDescriptiveName = szBuffer;
pmraaqAvatarsQueue->hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
@@ -476,11 +476,11 @@ DWORD CMraProto::MraAvatarsGetFileName(HANDLE hQueue, MCONTACT hContact, DWORD d
return ERROR_NOT_SUPPORTED;
wchar_t tszBase[MAX_PATH];
- mir_snwprintf(tszBase, L"%s\\%s\\", VARST(L"%miranda_avatarcache%"), m_tszUserName);
+ mir_snwprintf(tszBase, L"%s\\%s\\", VARSW(L"%miranda_avatarcache%"), m_tszUserName);
res = tszBase;
// some path in buff and free space for file name is avaible
- CreateDirectoryTreeT(res);
+ CreateDirectoryTreeW(res);
if (dwFormat != PA_FORMAT_DEFAULT) {
CMStringW szEmail;
@@ -633,7 +633,7 @@ INT_PTR CALLBACK MraAvatarsQueueDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wPara
wchar_t szServer[MAX_PATH];
GetDlgItemText(hWndDlg, IDC_SERVER, szServer, _countof(szServer));
- db_set_ts(NULL, MRA_AVT_SECT_NAME, "Server", szServer);
+ db_set_ws(NULL, MRA_AVT_SECT_NAME, "Server", szServer);
return TRUE;
}
break;
diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp
index 58b17b39f8..9033968d25 100644
--- a/protocols/MRA/src/MraChat.cpp
+++ b/protocols/MRA/src/MraChat.cpp
@@ -45,7 +45,7 @@ INT_PTR CMraProto::MraChatSessionNew(MCONTACT hContact)
GCDEST gcd = { m_szModuleName, wszEMail.c_str(), GC_EVENT_ADDGROUP };
GCEVENT gce = { sizeof(gce), &gcd };
for (int i = 0; i < _countof(lpwszStatuses); i++) {
- gce.ptszStatus = TranslateTS(lpwszStatuses[i]);
+ gce.ptszStatus = TranslateW(lpwszStatuses[i]);
CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce);
}
diff --git a/protocols/MRA/src/MraIcons.cpp b/protocols/MRA/src/MraIcons.cpp
index 8b2c83a35d..ee5a2f35f5 100644
--- a/protocols/MRA/src/MraIcons.cpp
+++ b/protocols/MRA/src/MraIcons.cpp
@@ -103,7 +103,7 @@ void InitXStatusIcons()
SKINICONDESC sid = { 0 };
sid.section.w = LPGENW("Protocols")L"/" LPGENW("MRA") L"/" LPGENW("Custom Status");
sid.defaultFile.w = szBuff;
- sid.flags = SIDF_ALL_TCHAR;
+ sid.flags = SIDF_ALL_UNICODE;
hXStatusAdvancedStatusIcons[0] = NULL;
for (DWORD i = 1; i < MRA_XSTATUS_COUNT+1; i++) {
diff --git a/protocols/MRA/src/MraPopUp.cpp b/protocols/MRA/src/MraPopUp.cpp
index 2f5bc21800..14b780924c 100644
--- a/protocols/MRA/src/MraPopUp.cpp
+++ b/protocols/MRA/src/MraPopUp.cpp
@@ -28,7 +28,7 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
SendMessage(hWndCombo, CB_RESETCONTENT, 0, 0);
for (size_t i = 0; i < POPUPS_TYPES_COUNT; i++) {
- DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)TranslateTS(lpcwszPopupsTypes[i]));
+ DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)TranslateW(lpcwszPopupsTypes[i]));
SendMessage(hWndCombo, CB_SETITEMDATA, dwItem, i);
}
SendMessage(hWndCombo, CB_SETCURSEL, 0, 0);
@@ -68,7 +68,7 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
case IDC_PREVIEW:
for (int i = 0; i < POPUPS_TYPES_COUNT; i++)
- ppro->MraPopupShowFromAgentW(i, 0, TranslateTS(lpcwszPopupsTypes[i]));
+ ppro->MraPopupShowFromAgentW(i, 0, TranslateW(lpcwszPopupsTypes[i]));
break;
case IDC_CHK_ENABLE:
@@ -134,7 +134,7 @@ int CMraProto::OnPopupOptInit(WPARAM wParam, LPARAM)
odp.pwszTitle = m_tszUserName;
odp.pwszGroup = LPGENW("Popups");
odp.groupPosition = 900000000;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pfnDlgProc = MraPopupDlgProcOpts;
Options_AddPage(wParam, &odp);
}
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp
index 5ba003938d..a8daef4625 100644
--- a/protocols/MRA/src/MraProto.cpp
+++ b/protocols/MRA/src/MraProto.cpp
@@ -39,7 +39,7 @@ CMraProto::CMraProto(const char* _module, const wchar_t* _displayName) :
mir_snwprintf(name, TranslateT("%s connection"), m_tszUserName);
NETLIBUSER nlu = { sizeof(nlu) };
- nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_TCHAR;
+ nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = m_szModuleName;
nlu.ptszDescriptiveName = name;
m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp
index 0cb54e6522..f5c9849e9f 100644
--- a/protocols/MRA/src/MraSendCommand.cpp
+++ b/protocols/MRA/src/MraSendCommand.cpp
@@ -184,7 +184,7 @@ DWORD CMraProto::MraMessageRecv(const CMStringA &szFrom, DWORD dwMsgID)
}
// Adds new contact
-DWORD CMraProto::MraAddContact(MCONTACT hContact, DWORD dwContactFlag, DWORD dwGroupID, const CMStringA &szEmail, const CMStringW &wszCustomName, const CMStringA *szPhones, const CMString* wszAuthMessage)
+DWORD CMraProto::MraAddContact(MCONTACT hContact, DWORD dwContactFlag, DWORD dwGroupID, const CMStringA &szEmail, const CMStringW &wszCustomName, const CMStringA *szPhones, const CMStringW* wszAuthMessage)
{
if (szEmail.GetLength() <= 4 && !(dwContactFlag & CONTACT_FLAG_GROUP))
return 0;
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index 60d4784a14..92a44be899 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -458,9 +458,9 @@ DWORD CMraProto::SetContactBasicInfoW(MCONTACT hContact, DWORD dwSetInfoFlags, D
MraGroupItem *grp = m_groups.find((MraGroupItem*)&dwGroupID);
if (grp) {
- ptrW tszGroup(db_get_tsa(hContact, "CList", "Group"));
+ ptrW tszGroup(db_get_wsa(hContact, "CList", "Group"));
if (mir_wstrcmp(tszGroup, grp->m_name))
- db_set_ts(hContact, "CList", "Group", grp->m_name);
+ db_set_ws(hContact, "CList", "Group", grp->m_name);
}
}
@@ -874,11 +874,11 @@ void CMraProto::ShowFormattedErrorMessage(LPWSTR lpwszErrText, DWORD dwErrorCode
size_t dwErrDescriptionSize;
if (dwErrorCode == NO_ERROR)
- wcsncpy_s(szErrorText, TranslateTS(lpwszErrText), _TRUNCATE);
+ wcsncpy_s(szErrorText, TranslateW(lpwszErrText), _TRUNCATE);
else {
dwErrDescriptionSize = (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwErrorCode, 0, szErrDescription, (_countof(szErrDescription) - sizeof(WCHAR)), NULL) - 2);
szErrDescription[dwErrDescriptionSize] = 0;
- mir_snwprintf(szErrorText, L"%s %lu: %s", TranslateTS(lpwszErrText), dwErrorCode, szErrDescription);
+ mir_snwprintf(szErrorText, L"%s %lu: %s", TranslateW(lpwszErrText), dwErrorCode, szErrDescription);
}
MraPopupShowFromAgentW(MRA_POPUP_TYPE_ERROR, 0, szErrorText);
}
@@ -997,13 +997,13 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP
SendDlgItemMessage(hWndDlg, IDC_XTITLE, EM_LIMITTEXT, STATUS_TITLE_MAX, 0);
SendDlgItemMessage(hWndDlg, IDC_XMSG, EM_LIMITTEXT, STATUS_DESC_MAX, 0);
SendMessage(hWndDlg, WM_SETICON, ICON_BIG, (LPARAM)dat->hDlgIcon);
- SetWindowText(hWndDlg, TranslateTS(lpcszXStatusNameDef[dat->dwXStatus]));
+ SetWindowText(hWndDlg, TranslateW(lpcszXStatusNameDef[dat->dwXStatus]));
mir_snprintf(szValueName, "XStatus%ldName", dat->dwXStatus);
if (dat->ppro->mraGetStringW(NULL, szValueName, szBuff))
SetDlgItemText(hWndDlg, IDC_XTITLE, szBuff.c_str()); // custom xstatus name
else // default xstatus name
- SetDlgItemText(hWndDlg, IDC_XTITLE, TranslateTS(lpcszXStatusNameDef[dat->dwXStatus]));
+ SetDlgItemText(hWndDlg, IDC_XTITLE, TranslateW(lpcszXStatusNameDef[dat->dwXStatus]));
mir_snprintf(szValueName, "XStatus%ldMsg", dat->dwXStatus);
if (dat->ppro->mraGetStringW(NULL, szValueName, szBuff))
@@ -1056,7 +1056,7 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP
dwBuffSize = GetDlgItemText(hWndDlg, IDC_XTITLE, szBuff, (STATUS_TITLE_MAX + 1));
if (dwBuffSize == 0) { // user delete all text
- mir_wstrncpy(szBuff, TranslateTS(lpcszXStatusNameDef[dat->dwXStatus]), STATUS_TITLE_MAX + 1);
+ mir_wstrncpy(szBuff, TranslateW(lpcszXStatusNameDef[dat->dwXStatus]), STATUS_TITLE_MAX + 1);
dwBuffSize = (DWORD)mir_wstrlen(szBuff);
}
mir_snprintf(szValueName, "XStatus%dName", dat->dwXStatus);
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp
index f54ecfb595..e31dc66345 100644
--- a/protocols/MRA/src/Mra_menus.cpp
+++ b/protocols/MRA/src/Mra_menus.cpp
@@ -341,7 +341,7 @@ HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bI
hRootMenu = Menu_GetProtocolRoot(this);
if (hRootMenu == NULL) {
mi.name.w = m_tszUserName;
- mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_UNICODE | CMIF_KEEPUNTRANSLATED;
mi.hIcolibItem = g_hMainIcon;
hRootMenu = Menu_AddProtoMenuItem(&mi);
}
diff --git a/protocols/MRA/src/Mra_options.cpp b/protocols/MRA/src/Mra_options.cpp
index 1bd1a5694f..ac742a9f29 100644
--- a/protocols/MRA/src/Mra_options.cpp
+++ b/protocols/MRA/src/Mra_options.cpp
@@ -38,10 +38,10 @@ INT_PTR CALLBACK DlgProcOptsAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARA
case PSN_APPLY:
wchar_t szBuff[MAX_EMAIL_LEN];
GetDlgItemText(hWndDlg, IDC_LOGIN, szBuff, _countof(szBuff));
- ppro->setTString(NULL, "e-mail", szBuff);
+ ppro->setWString(NULL, "e-mail", szBuff);
if (GetDlgItemText(hWndDlg, IDC_PASSWORD, szBuff, _countof(szBuff))) {
- ppro->setTString("Password", szBuff);
+ ppro->setWString("Password", szBuff);
SecureZeroMemory(szBuff, sizeof(szBuff));
}
return TRUE;
@@ -91,7 +91,7 @@ INT_PTR CALLBACK DlgProcAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lP
ppro->mraSetStringW(NULL, "e-mail", szBuff);
if (GetDlgItemText(hWndDlg, IDC_PASSWORD, szBuff, _countof(szBuff))) {
- ppro->setTString("Password", szBuff);
+ ppro->setWString("Password", szBuff);
SecureZeroMemory(szBuff, sizeof(szBuff));
}
return TRUE;
@@ -218,7 +218,7 @@ int CMraProto::OnOptionsInit(WPARAM wParam, LPARAM lParam)
odp.hInstance = g_hInstance;
odp.pwszTitle = m_tszUserName;
odp.pwszGroup = LPGENW("Network");
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.pwszTab = LPGENW("Account");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ACCOUNT);
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp
index 19d568e54c..6dbe4220c4 100644
--- a/protocols/MRA/src/Mra_proto.cpp
+++ b/protocols/MRA/src/Mra_proto.cpp
@@ -357,7 +357,7 @@ bool CMraProto::CmdHelloAck(BinBuffer &buf)
if (IsXStatusValid(dwXStatusMir)) {// xstatuses
mir_snprintf(szValueName, "XStatus%ldName", dwXStatusMir);
if (!mraGetStringW(NULL, szValueName, wszStatusTitle))
- wszStatusTitle = TranslateTS(lpcszXStatusNameDef[dwXStatusMir]);
+ wszStatusTitle = TranslateW(lpcszXStatusNameDef[dwXStatusMir]);
mir_snprintf(szValueName, "XStatus%ldMsg", dwXStatusMir);
mraGetStringW(NULL, szValueName, wszStatusDesc);
@@ -721,7 +721,7 @@ bool CMraProto::CmdContactAck(int cmd, int seq, BinBuffer &buf)
case CONTACT_OPER_SUCCESS:// ## добавление произведено успешно
if (cmd == MRIM_CS_ADD_CONTACT_ACK) {
DWORD dwFlags = SCBIF_ID | SCBIF_SERVER_FLAG, dwGroupID = 0;
- ptrW grpName(db_get_tsa(hContact, "CList", "Group"));
+ ptrW grpName(db_get_wsa(hContact, "CList", "Group"));
if (grpName) {
dwFlags |= SCBIF_GROUP_ID;
dwGroupID = MraMoveContactToGroup(hContact, -1, grpName);
@@ -1259,7 +1259,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf)
}
else {
if (iGroupMode == 100) { // first start
- ptrW tszGroup(db_get_tsa(hContact, "CList", "Group"));
+ ptrW tszGroup(db_get_wsa(hContact, "CList", "Group"));
if (tszGroup)
dwGroupID = MraMoveContactToGroup(hContact, dwGroupID, tszGroup);
}
@@ -1788,7 +1788,7 @@ DWORD CMraProto::MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, CMStringA &
if (m_heNudgeReceived)
NotifyEventHooks(m_heNudgeReceived, hContact, NULL);
else {
- T2Utf szMsg(TranslateTS(MRA_ALARM_MESSAGE));
+ T2Utf szMsg(TranslateW(MRA_ALARM_MESSAGE));
pre.szMessage = szMsg;
ProtoChainRecvMsg(hContact, &pre);
}
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp
index c957ad89d5..67f0969a99 100644
--- a/protocols/MRA/src/Mra_svcs.cpp
+++ b/protocols/MRA/src/Mra_svcs.cpp
@@ -531,7 +531,7 @@ DWORD CMraProto::MraSendNewStatus(DWORD dwStatusMir, DWORD dwXStatusMir, const C
mir_snprintf(szValueName, "XStatus%ldName", dwXStatusMir);
// custom xstatus name
if (!mraGetStringW(NULL, szValueName, wszStatusTitle))
- wszStatusTitle = TranslateTS(lpcszXStatusNameDef[dwXStatusMir]);
+ wszStatusTitle = TranslateW(lpcszXStatusNameDef[dwXStatusMir]);
}
else wszStatusTitle = pwszStatusTitle;