From ed66ac7da13f746d05ed832cf1d6d84cecb18b22 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Apr 2016 18:50:35 +0000 Subject: unused method removed git-svn-id: http://svn.miranda-ng.org/main/trunk@16783 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_chat.cpp | 23 +++++++++-------------- protocols/JabberG/src/jabber_groupchat.cpp | 4 ++-- protocols/JabberG/src/jabber_proto.h | 1 - 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 6dd014257d..82f7b86477 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -117,11 +117,14 @@ int JabberGcGetStatus(JABBER_RESOURCE_STATUS *r) int CJabberProto::GcInit(JABBER_LIST_ITEM *item) { - int i; + if (item->bChatActive) + return 1; // translate string for menus (this can't be done in initializer) - for (i = 0; i < _countof(sttAffiliationItems); i++) sttAffiliationItems[i].translate(); - for (i = 0; i < _countof(sttRoleItems); i++) sttRoleItems[i].translate(); + for (int i = 0; i < _countof(sttAffiliationItems); i++) + sttAffiliationItems[i].translate(); + for (int i = 0; i < _countof(sttRoleItems); i++) + sttRoleItems[i].translate(); ptrT szNick(JabberNickFromJID(item->jid)); @@ -162,11 +165,11 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item) } } - item->bChatActive = TRUE; + item->bChatActive = true; GCDEST gcd = { m_szModuleName, item->jid, GC_EVENT_ADDGROUP }; GCEVENT gce = { sizeof(gce), &gcd }; - for (i = _countof(sttStatuses) - 1; i >= 0; i--) { + for (int i = _countof(sttStatuses) - 1; i >= 0; i--) { gce.ptszStatus = TranslateTS(sttStatuses[i]); CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce); } @@ -177,14 +180,6 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item) return 0; } -void CJabberProto::GcLogCreate(JABBER_LIST_ITEM *item) -{ - if (item->bChatActive) - return; - - GcInit(item); -} - void CJabberProto::GcLogShowInformation(JABBER_LIST_ITEM *item, pResourceStatus &user, TJabberGcLogInfoType type) { if (!item || !user || (item->bChatActive != 2)) return; @@ -354,7 +349,7 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, HXML reason) CallServiceSync(MS_GC_EVENT, (code == 200) ? SESSION_TERMINATE : SESSION_OFFLINE, (LPARAM)&gce); db_unset(item->hContact, "CList", "Hidden"); - item->bChatActive = FALSE; + item->bChatActive = false; if (m_bJabberOnline) { TCHAR szPresenceTo[JABBER_MAX_JID_LEN]; diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 4519a679b0..961776b08a 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -846,7 +846,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) if (ptrT(JabberNickFromJID(from)) == NULL) return; - GcLogCreate(item); + GcInit(item); item->iChatState = 0; // Update status of room participant @@ -1086,7 +1086,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) else gcd.iType = GC_EVENT_MESSAGE; } - GcLogCreate(item); + GcInit(item); time_t msgTime = 0; if (!JabberReadXep203delay(node, msgTime)) { diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 302205bbbc..8b0b35cad5 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -329,7 +329,6 @@ struct CJabberProto : public PROTO, public IJabberInterface //---- jabber_chat.cpp --------------------------------------------------------------- int GcInit(JABBER_LIST_ITEM *item); - void GcLogCreate(JABBER_LIST_ITEM *item); void GcLogUpdateMemberStatus(JABBER_LIST_ITEM *item, const TCHAR *resource, const TCHAR *nick, const TCHAR *jid, int action, HXML reason, int nStatusCode = -1); void GcLogShowInformation(JABBER_LIST_ITEM *item, pResourceStatus &user, TJabberGcLogInfoType type); void GcQuit(JABBER_LIST_ITEM* jid, int code, HXML reason); -- cgit v1.2.3