summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-08 19:39:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-08 19:39:48 +0000
commit05cd7934d4bdb097e112efdda356946868f3f5d6 (patch)
tree0fa678b494af8b994abf7319298a1af06fc9218a /protocols/WhatsApp
parent50a2ba5bf6827b8f010288021c1797c11bd1531e (diff)
- end of ANSI support in chats;
- manual crit section control removed from chat engine; - bunch of memory-related clutches either removed or replaced with smart pointers git-svn-id: http://svn.miranda-ng.org/main/trunk@7549 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r--protocols/WhatsApp/src/chat.cpp10
-rw-r--r--protocols/WhatsApp/src/proto.cpp10
2 files changed, 6 insertions, 14 deletions
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp
index e978c9f0ee..63551a953f 100644
--- a/protocols/WhatsApp/src/chat.cpp
+++ b/protocols/WhatsApp/src/chat.cpp
@@ -43,13 +43,9 @@ int WhatsAppProto::OnChatOutgoing(WPARAM wParam, LPARAM lParam)
// #TODO Move to SendMsgWorker, otherwise all messages are "acknowledged" by Miranda
- GCDEST gcd = { m_szModuleName, { NULL }, GC_EVENT_MESSAGE };
- gcd.ptszID = hook->pDest->ptszID;
-
- GCEVENT gce = {0};
- gce.cbSize = sizeof(GCEVENT);
- gce.dwFlags = GC_TCHAR | GCEF_ADDTOLOG;
- gce.pDest = &gcd;
+ GCDEST gcd = { m_szModuleName, hook->pDest->ptszID, GC_EVENT_MESSAGE };
+ GCEVENT gce = { sizeof(gce), &gcd };
+ gce.dwFlags = GCEF_ADDTOLOG;
gce.ptszNick = mir_a2t(this->nick.c_str());
gce.ptszUID = mir_a2t(this->jid.c_str());
gce.time = time(NULL);
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp
index 69f5931026..892ad9e373 100644
--- a/protocols/WhatsApp/src/proto.cpp
+++ b/protocols/WhatsApp/src/proto.cpp
@@ -38,13 +38,9 @@ WhatsAppProto::WhatsAppProto(const char* proto_name, const TCHAR* username) :
def_avatar_folder_ = std::tstring( VARST( _T("%miranda_avatarcache%"))) + _T("\\") + m_tszUserName;
// Register group chat
- GCREGISTER gcr = {0};
- gcr.cbSize = sizeof(GCREGISTER);
- gcr.dwFlags = GC_TYPNOTIF | GC_CHANMGR | GC_TCHAR;
- gcr.iMaxText = 0;
- gcr.nColors = 0;
- gcr.pColors = NULL; //(COLORREF*)crCols;
- gcr.ptszModuleDispName = m_tszUserName;
+ GCREGISTER gcr = { sizeof(gcr) };
+ gcr.dwFlags = GC_TYPNOTIF | GC_CHANMGR;
+ gcr.ptszDispName = m_tszUserName;
gcr.pszModule = m_szModuleName;
CallServiceSync(MS_GC_REGISTER, 0, (LPARAM)&gcr);