summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/src/svcs_menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirOTR/src/svcs_menu.cpp')
-rw-r--r--plugins/MirOTR/src/svcs_menu.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp
index 15a139bef8..e21c05c762 100644
--- a/plugins/MirOTR/src/svcs_menu.cpp
+++ b/plugins/MirOTR/src/svcs_menu.cpp
@@ -19,22 +19,22 @@ int StartOTR(MCONTACT hContact) {
otr_gui_inject_message((void*)hContact, proto, proto, uname, msg ? msg : MIROTR_PROTO_HELLO);
free(msg);
#else
- TCHAR* nick=ProtoGetNickname(proto);
+ wchar_t* nick=ProtoGetNickname(proto);
if(nick){
- TCHAR msg[1024];
- TCHAR* msgend = msg+_countof(msg)-1;
- TCHAR* msgoff = msg;
+ wchar_t msg[1024];
+ wchar_t* msgend = msg+_countof(msg)-1;
+ wchar_t* msgoff = msg;
for(const char* c=MIROTR_PROTO_HELLO; *c; *msgoff++=*c++);
*msgoff++ = '\n';
- for(const TCHAR* c=nick; *c && msgoff<msgend; *msgoff++=*c++);
- for(const TCHAR* c=MIROTR_PROTO_HELLO_MSG; *c && msgoff<msgend; *msgoff++=*c++);
+ for(const wchar_t* c=nick; *c && msgoff<msgend; *msgoff++=*c++);
+ for(const wchar_t* c=MIROTR_PROTO_HELLO_MSG; *c && msgoff<msgend; *msgoff++=*c++);
LCID langid = Langpack_GetDefaultLocale();
if(langid != 0x0409/*US*/ && langid != 0x1009/*CA*/ && langid != 0x0809/*GB*/){ // non english
- const TCHAR* translated=TranslateTS(MIROTR_PROTO_HELLO_MSG);
+ const wchar_t* translated=TranslateTS(MIROTR_PROTO_HELLO_MSG);
if(mir_tstrcmp(MIROTR_PROTO_HELLO_MSG,translated)){
*msgoff++ = '\n';
- for(const TCHAR* c=nick; *c && msgoff<msgend; *msgoff++=*c++);
- for(const TCHAR* c=translated; *c && msgoff<msgend; *msgoff++=*c++);
+ for(const wchar_t* c=nick; *c && msgoff<msgend; *msgoff++=*c++);
+ for(const wchar_t* c=translated; *c && msgoff<msgend; *msgoff++=*c++);
}
}
*msgoff='\0';
@@ -50,19 +50,19 @@ int StartOTR(MCONTACT hContact) {
INT_PTR SVC_StartOTR(WPARAM hContact, LPARAM)
{
- TCHAR buff[512];
+ wchar_t buff[512];
MCONTACT hSub = db_mc_getMostOnline(hContact);
if(hSub != 0)
hContact = hSub;
if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", hContact, 0) != 0 ) {
- mir_sntprintf(buff, TranslateT(LANG_OTR_SECUREIM_STARTED), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_OTR_SECUREIM_STARTED), contact_get_nameT(hContact));
ShowError(buff);
return 0;
}
- mir_sntprintf(buff, TranslateT(LANG_SESSION_REQUEST_OTR), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_SESSION_REQUEST_OTR), contact_get_nameT(hContact));
ShowMessage(hContact, buff);
return StartOTR(hContact);
@@ -70,19 +70,19 @@ INT_PTR SVC_StartOTR(WPARAM hContact, LPARAM)
INT_PTR SVC_RefreshOTR(WPARAM hContact, LPARAM)
{
- TCHAR buff[512];
+ wchar_t buff[512];
MCONTACT hSub = db_mc_getMostOnline(hContact);
if(hSub != 0)
hContact = hSub;
if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", hContact, 0) != 0 ) {
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SECUREIM_STARTED), contact_get_nameT(hContact));
+ mir_sntprintf(buff, 512, TranslateW(LANG_OTR_SECUREIM_STARTED), contact_get_nameT(hContact));
ShowError(buff);
return 0;
}
- mir_sntprintf(buff, TranslateT(LANG_SESSION_TRY_CONTINUE_OTR), contact_get_nameT(hContact));
+ mir_sntprintf(buff, TranslateW(LANG_SESSION_TRY_CONTINUE_OTR), contact_get_nameT(hContact));
ShowMessage(hContact, buff);
int res = StartOTR(hContact);
@@ -115,8 +115,8 @@ INT_PTR SVC_StopOTR(WPARAM hContact, LPARAM)
SetEncryptionStatus(hContact, TRUST_NOT_PRIVATE);
- TCHAR buff[512];
- mir_sntprintf(buff, TranslateT(LANG_SESSION_TERMINATED_OTR), contact_get_nameT(hContact));
+ wchar_t buff[512];
+ mir_sntprintf(buff, TranslateW(LANG_SESSION_TERMINATED_OTR), contact_get_nameT(hContact));
ShowMessage(hContact, buff);
return 0;
}
@@ -163,13 +163,13 @@ void InitMenu()
mi.position = -400000;
SET_UID(mi, 0xAB574FAD, 0x15D8, 0x49FF, 0xB7, 0x03, 0xDA, 0x2B, 0x45, 0x46, 0xC3, 0x56);
- mi.name.t = _T(LANG_STOP_OTR);
+ mi.name.w = _T(LANG_STOP_OTR);
mi.pszService = MS_OTR_MENUSTOP;
mi.hIcolibItem = IcoLib_GetIconHandle(ICON_PRIVATE);
hStopItem = Menu_AddContactMenuItem(&mi);
mi.uid.d[7]++;
- mi.name.t = _T(LANG_START_OTR);
+ mi.name.w = _T(LANG_START_OTR);
mi.pszService = MS_OTR_MENUSTART;
mi.hIcolibItem = IcoLib_GetIconHandle(ICON_NOT_PRIVATE);
hStartItem = Menu_AddContactMenuItem(&mi);