summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/src/dialogs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirOTR/src/dialogs.cpp')
-rw-r--r--plugins/MirOTR/src/dialogs.cpp124
1 files changed, 62 insertions, 62 deletions
diff --git a/plugins/MirOTR/src/dialogs.cpp b/plugins/MirOTR/src/dialogs.cpp
index 0451367f84..cc3ab94d61 100644
--- a/plugins/MirOTR/src/dialogs.cpp
+++ b/plugins/MirOTR/src/dialogs.cpp
@@ -6,7 +6,7 @@ struct SmpData
TrustLevel oldlevel;
ConnContext *context;
bool responder;
- TCHAR *question;
+ wchar_t *question;
};
typedef std::map<HANDLE, SmpData> SmpForContactMap;
SmpForContactMap smp_for_contact;
@@ -40,11 +40,11 @@ static INT_PTR CALLBACK DlgSMPUpdateProc(HWND hwndDlg, UINT msg, WPARAM wParam,
smp_for_contact[context->app_data].responder = data->responder;
mir_free(data);
- TCHAR title[512], *proto = mir_a2t(GetContactProto(hContact));
- const TCHAR *name = contact_get_nameT(hContact);
- mir_sntprintf(title, TranslateT(LANG_SMP_PROGRESS_TITLE), name, proto);
+ wchar_t title[512], *proto = mir_a2t(GetContactProto(hContact));
+ const wchar_t *name = contact_get_nameT(hContact);
+ mir_sntprintf(title, TranslateW(LANG_SMP_PROGRESS_TITLE), name, proto);
SetWindowText(hwndDlg, title);
- mir_sntprintf(title, TranslateT(LANG_SMP_PROGRESS_DESC), name, proto);
+ mir_sntprintf(title, TranslateW(LANG_SMP_PROGRESS_DESC), name, proto);
mir_free(proto);
SetDlgItemText(hwndDlg, IDC_STC_SMP_HEADPRO, title);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)context);
@@ -97,7 +97,7 @@ static INT_PTR CALLBACK DlgSMPUpdateProc(HWND hwndDlg, UINT msg, WPARAM wParam,
case 0:
EnableWindow(GetDlgItem(hwndDlg, IDCANCEL), false);
EnableWindow(GetDlgItem(hwndDlg, IDOK), true);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, TranslateT(LANG_SMP_ERROR));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, TranslateW(LANG_SMP_ERROR));
smp_for_contact.erase(context->app_data);
break;
case 100:
@@ -107,14 +107,14 @@ static INT_PTR CALLBACK DlgSMPUpdateProc(HWND hwndDlg, UINT msg, WPARAM wParam,
smp_for_contact.erase(context->app_data);
if (context->smstate->sm_prog_state == OTRL_SMP_PROG_SUCCEEDED) {
if (context->active_fingerprint->trust && context->active_fingerprint->trust[0]) {
- SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, TranslateT(LANG_SMP_SUCCESS));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, TranslateW(LANG_SMP_SUCCESS));
}
else {
- SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, TranslateT(LANG_SMP_SUCCESS_VERIFY));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, TranslateW(LANG_SMP_SUCCESS_VERIFY));
}
}
else {
- SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, TranslateT(LANG_SMP_FAILED));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_PROGRESS, TranslateW(LANG_SMP_FAILED));
}
}
break;
@@ -183,25 +183,25 @@ static INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam
smp_for_contact[context->app_data].oldlevel = data->oldlevel;
smp_for_contact[context->app_data].responder = data->responder;
- TCHAR buff[512], *proto = mir_a2t(GetContactProto(hContact));
- mir_sntprintf(buff, TranslateT(LANG_SMP_VERIFY_TITLE), contact_get_nameT(hContact), proto);
+ wchar_t buff[512], *proto = mir_a2t(GetContactProto(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_SMP_VERIFY_TITLE), contact_get_nameT(hContact), proto);
mir_free(proto);
SetWindowText(hwndDlg, buff);
SetDlgItemText(hwndDlg, IDC_STC_SMP_HEAD, buff);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)context);
if (data->question) {
- mir_sntprintf(buff, TranslateT(LANG_OTR_SMPQUESTION_RESPOND_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_SMPQUESTION_RESPOND_DESC), contact_get_nameT(hContact));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, data->question);
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, TRUE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateT(LANG_SMP_QUESTION));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateW(LANG_SMP_QUESTION));
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_ANSWER));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateW(LANG_SMP_ANSWER));
ShowWindow(GetDlgItem(hwndDlg, IDOK), SW_SHOWNA);
@@ -211,7 +211,7 @@ static INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam
mir_free(data->question);
}
else {
- mir_sntprintf(buff, TranslateT(LANG_OTR_SMPPASSWORD_RESPOND_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_SMPPASSWORD_RESPOND_DESC), contact_get_nameT(hContact));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
@@ -221,7 +221,7 @@ static INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_PASSWORD));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateW(LANG_SMP_PASSWORD));
ShowWindow(GetDlgItem(hwndDlg, IDOK), SW_SHOWNA);
@@ -272,7 +272,7 @@ static INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam
SMPInitUpdateDialog(context, true);
{
int len = SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, WM_GETTEXTLENGTH, 0, 0);
- TCHAR *answer = new TCHAR[len + 1];
+ wchar_t *answer = new wchar_t[len + 1];
GetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, answer, len + 1);
T2Utf ans(answer);
@@ -297,7 +297,7 @@ static INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam
}
/*
-void SMPInitResponseDialog(ConnContext *context, const TCHAR *question) {
+void SMPInitResponseDialog(ConnContext *context, const wchar_t *question) {
if (!context) return;
SmpData *data = (SmpData*)mir_calloc(sizeof(SmpData));
data->context = context;
@@ -326,8 +326,8 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam
}
MCONTACT hContact = (UINT_PTR)context->app_data;
- TCHAR title[512], *proto = mir_a2t(GetContactProto(hContact));
- mir_sntprintf(title, TranslateT(LANG_SMP_VERIFY_TITLE), contact_get_nameT(hContact), proto);
+ wchar_t title[512], *proto = mir_a2t(GetContactProto(hContact));
+ mir_sntprintf(title, TranslateW(LANG_SMP_VERIFY_TITLE), contact_get_nameT(hContact), proto);
mir_free(proto);
SetWindowText(hwndDlg, title);
SetDlgItemText(hwndDlg, IDC_STC_SMP_HEAD, title);
@@ -366,10 +366,10 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam
HWND cmb = GetDlgItem(hwndDlg, IDC_CBO_SMP_CHOOSE);
- SendMessage(cmb, CB_ADDSTRING, 0, (WPARAM)TranslateT(LANG_SMPTYPE_QUESTION));
- SendMessage(cmb, CB_ADDSTRING, 0, (WPARAM)TranslateT(LANG_SMPTYPE_PASSWORD));
- SendMessage(cmb, CB_ADDSTRING, 0, (WPARAM)TranslateT(LANG_SMPTYPE_FINGERPRINT));
- SendMessage(cmb, CB_SELECTSTRING, -1, (WPARAM)TranslateT(LANG_SMPTYPE_QUESTION));
+ SendMessage(cmb, CB_ADDSTRING, 0, (WPARAM)TranslateW(LANG_SMPTYPE_QUESTION));
+ SendMessage(cmb, CB_ADDSTRING, 0, (WPARAM)TranslateW(LANG_SMPTYPE_PASSWORD));
+ SendMessage(cmb, CB_ADDSTRING, 0, (WPARAM)TranslateW(LANG_SMPTYPE_FINGERPRINT));
+ SendMessage(cmb, CB_SELECTSTRING, -1, (WPARAM)TranslateW(LANG_SMPTYPE_QUESTION));
EnableWindow(GetDlgItem(hwndDlg, IDC_CBO_SMP_CHOOSE), TRUE);
@@ -378,21 +378,21 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam
DestroyWindow(hwndDlg);
return FALSE;
}
- TCHAR buff[1024];
+ wchar_t buff[1024];
if (!fp->trust || fp->trust[0] == '\0')
- mir_sntprintf(buff, TranslateT(LANG_OTR_SMPQUESTION_VERIFY_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_SMPQUESTION_VERIFY_DESC), contact_get_nameT(hContact));
else
- mir_sntprintf(buff, TranslateT(LANG_OTR_SMPQUESTION_VERIFIED_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_SMPQUESTION_VERIFIED_DESC), contact_get_nameT(hContact));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, FALSE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateT(LANG_SMP_QUESTION));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateW(LANG_SMP_QUESTION));
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_ANSWER));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateW(LANG_SMP_ANSWER));
ShowWindow(GetDlgItem(hwndDlg, IDOK), SW_SHOWNA);
@@ -409,27 +409,27 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam
{
ConnContext *context = (ConnContext*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
MCONTACT hContact = (UINT_PTR)context->app_data;
- TCHAR szMsg[1024];
+ wchar_t szMsg[1024];
switch (LOWORD(wParam)) {
case IDCANCEL:
DestroyWindow(hwndDlg);
break;
case IDOK:
GetDlgItemText(hwndDlg, IDC_CBO_SMP_CHOOSE, szMsg, _countof(szMsg));
- if (_tcsncmp(szMsg, TranslateT(LANG_SMPTYPE_QUESTION), _countof(szMsg)) == 0) {
+ if (wcsncmp(szMsg, TranslateW(LANG_SMPTYPE_QUESTION), _countof(szMsg)) == 0) {
if (smp_for_contact.find(context->app_data) != smp_for_contact.end()) {
- mir_sntprintf(szMsg, TranslateT(LANG_SMP_IN_PROGRESS), contact_get_nameT(hContact));
+ mir_sntprintf(szMsg, TranslateW(LANG_SMP_IN_PROGRESS), contact_get_nameT(hContact));
ShowError(szMsg);
}
else {
int len = SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, WM_GETTEXTLENGTH, 0, 0);
- TCHAR *question = new TCHAR[len + 1];
+ wchar_t *question = new wchar_t[len + 1];
GetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, question, len + 1);
T2Utf quest(question);
delete[] question;
len = SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, WM_GETTEXTLENGTH, 0, 0);
- TCHAR *answer = new TCHAR[len + 1];
+ wchar_t *answer = new wchar_t[len + 1];
GetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, answer, len + 1);
T2Utf ans(answer);
delete[] answer;
@@ -439,14 +439,14 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam
}
}
- else if (_tcsncmp(szMsg, TranslateT(LANG_SMPTYPE_PASSWORD), _countof(szMsg)) == 0) {
+ else if (wcsncmp(szMsg, TranslateW(LANG_SMPTYPE_PASSWORD), _countof(szMsg)) == 0) {
if (smp_for_contact.find(context->app_data) != smp_for_contact.end()) {
- mir_sntprintf(szMsg, TranslateT(LANG_SMP_IN_PROGRESS), contact_get_nameT(hContact));
+ mir_sntprintf(szMsg, TranslateW(LANG_SMP_IN_PROGRESS), contact_get_nameT(hContact));
ShowError(szMsg);
}
else {
int len = SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, WM_GETTEXTLENGTH, 0, 0);
- TCHAR *answer = new TCHAR[len + 1];
+ wchar_t *answer = new wchar_t[len + 1];
GetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, answer, len + 1);
T2Utf ans(answer);
delete[] answer;
@@ -485,34 +485,34 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam
BOOL trusted = false;
if (fp->trust && fp->trust[0] != '\0') trusted = true;
- TCHAR buff[512];
+ wchar_t buff[512];
GetDlgItemText(hwndDlg, IDC_CBO_SMP_CHOOSE, buff, 255);
- if (_tcsncmp(buff, TranslateT(LANG_SMPTYPE_QUESTION), 255) == 0) {
+ if (wcsncmp(buff, TranslateW(LANG_SMPTYPE_QUESTION), 255) == 0) {
if (trusted)
- mir_sntprintf(buff, TranslateT(LANG_OTR_SMPQUESTION_VERIFIED_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_SMPQUESTION_VERIFIED_DESC), contact_get_nameT(hContact));
else
- mir_sntprintf(buff, TranslateT(LANG_OTR_SMPQUESTION_VERIFY_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_SMPQUESTION_VERIFY_DESC), contact_get_nameT(hContact));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, FALSE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateT(LANG_SMP_QUESTION));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateW(LANG_SMP_QUESTION));
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_ANSWER));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateW(LANG_SMP_ANSWER));
ShowWindow(GetDlgItem(hwndDlg, IDOK), SW_SHOWNA);
ShowWindow(GetDlgItem(hwndDlg, IDYES), SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDNO), SW_HIDE);
}
- else if (_tcsncmp(buff, TranslateT(LANG_SMPTYPE_PASSWORD), 255) == 0) {
+ else if (wcsncmp(buff, TranslateW(LANG_SMPTYPE_PASSWORD), 255) == 0) {
if (trusted)
- mir_sntprintf(buff, TranslateT(LANG_OTR_SMPPASSWORD_VERIFIED_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_SMPPASSWORD_VERIFIED_DESC), contact_get_nameT(hContact));
else
- mir_sntprintf(buff, TranslateT(LANG_OTR_SMPPASSWORD_VERIFY_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_SMPPASSWORD_VERIFY_DESC), contact_get_nameT(hContact));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
@@ -522,18 +522,18 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, L"");
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, FALSE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_SMP_PASSWORD));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateW(LANG_SMP_PASSWORD));
ShowWindow(GetDlgItem(hwndDlg, IDOK), SW_SHOWNA);
ShowWindow(GetDlgItem(hwndDlg, IDYES), SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDNO), SW_HIDE);
}
- else if (_tcsncmp(buff, TranslateT(LANG_SMPTYPE_FINGERPRINT), 255) == 0) {
+ else if (wcsncmp(buff, TranslateW(LANG_SMPTYPE_FINGERPRINT), 255) == 0) {
if (trusted)
- mir_sntprintf(buff, TranslateT(LANG_OTR_FPVERIFIED_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_FPVERIFIED_DESC), contact_get_nameT(hContact));
else
- mir_sntprintf(buff, TranslateT(LANG_OTR_FPVERIFY_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_FPVERIFY_DESC), contact_get_nameT(hContact));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
@@ -546,12 +546,12 @@ static INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam
otrl_privkey_hash_to_humanT(buff, hash);
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, buff);
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, TRUE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateT(LANG_YOUR_PRIVKEY));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateW(LANG_YOUR_PRIVKEY));
otrl_privkey_hash_to_humanT(buff, fp->fingerprint);
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, buff);
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, TRUE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_CONTACT_FINGERPRINT));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateW(LANG_CONTACT_FINGERPRINT));
ShowWindow(GetDlgItem(hwndDlg, IDOK), SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDYES), SW_SHOWNA);
@@ -626,8 +626,8 @@ static INT_PTR CALLBACK DlgBoxProcVerifyContext(HWND hwndDlg, UINT msg, WPARAM w
EndDialog(hwndDlg, IDCANCEL);
return FALSE;
}
- SetWindowText(hwndDlg, _T(LANG_OTR_FPVERIFY_TITLE));
- SetDlgItemText(hwndDlg, IDC_STC_SMP_HEAD, _T(LANG_OTR_FPVERIFY_TITLE));
+ SetWindowText(hwndDlg, LANG_OTR_FPVERIFY_TITLE);
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_HEAD, LANG_OTR_FPVERIFY_TITLE);
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
@@ -669,11 +669,11 @@ static INT_PTR CALLBACK DlgBoxProcVerifyContext(HWND hwndDlg, UINT msg, WPARAM w
EndDialog(hwndDlg, IDCANCEL);
return FALSE;
}
- TCHAR buff[512];
+ wchar_t buff[512];
if (!fp->trust || fp->trust[0] == '\0')
- mir_sntprintf(buff, TranslateT(LANG_OTR_FPVERIFY_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_FPVERIFY_DESC), contact_get_nameT(hContact));
else
- mir_sntprintf(buff, TranslateT(LANG_OTR_FPVERIFIED_DESC), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_FPVERIFIED_DESC), contact_get_nameT(hContact));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
@@ -686,12 +686,12 @@ static INT_PTR CALLBACK DlgBoxProcVerifyContext(HWND hwndDlg, UINT msg, WPARAM w
otrl_privkey_hash_to_humanT(buff, hash);
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD1, buff);
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, EM_SETREADONLY, TRUE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateT(LANG_YOUR_PRIVKEY));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD1, TranslateW(LANG_YOUR_PRIVKEY));
otrl_privkey_hash_to_humanT(buff, fp->fingerprint);
SetDlgItemText(hwndDlg, IDC_EDT_SMP_FIELD2, buff);
SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, EM_SETREADONLY, TRUE, 0);
- SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateT(LANG_CONTACT_FINGERPRINT));
+ SetDlgItemText(hwndDlg, IDC_STC_SMP_FIELD2, TranslateW(LANG_CONTACT_FINGERPRINT));
EnableWindow(GetDlgItem(hwndDlg, IDC_CBO_SMP_CHOOSE), FALSE);
@@ -728,14 +728,14 @@ static unsigned int CALLBACK verify_context_thread(void *param)
if (param) {
ConnContext *context = (ConnContext *)param;
MCONTACT hContact = (UINT_PTR)context->app_data;
- TCHAR msg[1024];
+ wchar_t msg[1024];
switch (DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_SMP_INPUT), 0, DlgBoxProcVerifyContext, (LPARAM)param)) {
case IDOK:
case IDYES:
lib_cs_lock();
otrl_context_set_trust(context->active_fingerprint, "verified");
otrl_privkey_write_fingerprints(otr_user_state, _T2A(g_fingerprint_store_filename));
- mir_sntprintf(msg, TranslateT(LANG_FINGERPRINT_VERIFIED), contact_get_nameT(hContact));
+ mir_sntprintf(msg, TranslateW(LANG_FINGERPRINT_VERIFIED), contact_get_nameT(hContact));
ShowMessage(hContact, msg);
SetEncryptionStatus(hContact, otr_context_get_trust(context));
break;
@@ -744,7 +744,7 @@ static unsigned int CALLBACK verify_context_thread(void *param)
lib_cs_lock();
otrl_context_set_trust(context->active_fingerprint, NULL);
otrl_privkey_write_fingerprints(otr_user_state, _T2A(g_fingerprint_store_filename));
- mir_sntprintf(msg, TranslateT(LANG_FINGERPRINT_NOT_VERIFIED), contact_get_nameT(hContact));
+ mir_sntprintf(msg, TranslateW(LANG_FINGERPRINT_NOT_VERIFIED), contact_get_nameT(hContact));
ShowMessage(hContact, msg);
SetEncryptionStatus(hContact, otr_context_get_trust(context));
break;