diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-15 18:52:16 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-06-15 18:52:16 +0000 |
commit | 58973a21a30bf95427fd43c456e41e35c386218c (patch) | |
tree | 1413fba069ecd351b2c99fa5a53e52c68d8a662c /plugins/Boltun/actionQueue.cpp | |
parent | 55b5cf8a5506f03350e5c80ac86f5717425e4d10 (diff) |
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Boltun/actionQueue.cpp')
-rw-r--r-- | plugins/Boltun/actionQueue.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/Boltun/actionQueue.cpp b/plugins/Boltun/actionQueue.cpp index b627d8abc4..c464c92f39 100644 --- a/plugins/Boltun/actionQueue.cpp +++ b/plugins/Boltun/actionQueue.cpp @@ -95,7 +95,7 @@ static bool NotifyTyping(HANDLE hContact) static char *MsgServiceName(HANDLE hContact)
{
-#ifdef _UNICODE
+
char szServiceName[100];
char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
if (szProto == NULL)
@@ -104,7 +104,7 @@ static char *MsgServiceName(HANDLE hContact) mir_snprintf(szServiceName, sizeof(szServiceName), "%s%sW", szProto, PSS_MESSAGE);
if (ServiceExists(szServiceName))
return PSS_MESSAGE "W";
-#endif
+
return PSS_MESSAGE;
}
@@ -114,7 +114,7 @@ static void TimerAnswer(HANDLE hContact, const TalkBot::MessageInfo* info) int size = (int)info->Answer.length() + 1;
int bufsize = size;
char* msg;
-#ifdef UNICODE
+
bufsize *= sizeof(TCHAR) + 1;
msg = new char[bufsize];
//msg[size - 1] = '\0';
@@ -123,9 +123,7 @@ static void TimerAnswer(HANDLE hContact, const TalkBot::MessageInfo* info) NULL, NULL))
FillMemory(msg, size - 1, '-'); //In case of fault return "----" in ANSI part
CopyMemory(msg + size, info->Answer.c_str(), size * 2);
-#else
- msg = respItem->szMes;
-#endif
+
CallContactService(hContact, MsgServiceName(hContact), PREF_TCHAR, (LPARAM)msg);
@@ -142,9 +140,9 @@ static void TimerAnswer(HANDLE hContact, const TalkBot::MessageInfo* info) CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)&ldbei);
bot->AnswerGiven(hContact, *info);
delete info;
-#ifdef UNICODE
+
delete msg;
-#endif
+
typingContactsLock.Enter();
typingContacts.erase(hContact);
typingContactsLock.Leave();
|