diff options
author | George Hazan <ghazan@miranda.im> | 2022-07-31 18:07:27 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-07-31 18:07:27 +0300 |
commit | 500dd4848842f6d4207584417448586d060fbd6a (patch) | |
tree | 569ac641e814da1d706d36b12eaf35183a3ce7a5 /plugins/MirandaG15/src | |
parent | b47e4b4b32698470bf52c0dc1c2d1af56c46c9b5 (diff) |
Contact: group of functions gathered into the personal namespace
Diffstat (limited to 'plugins/MirandaG15/src')
-rw-r--r-- | plugins/MirandaG15/src/CAppletManager.cpp | 14 | ||||
-rw-r--r-- | plugins/MirandaG15/src/CChatScreen.cpp | 4 | ||||
-rw-r--r-- | plugins/MirandaG15/src/CContactList.cpp | 4 | ||||
-rw-r--r-- | plugins/MirandaG15/src/CEventScreen.cpp | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 0385fd5b56..ed688f189c 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -644,7 +644,7 @@ void CAppletManager::FinishMessageJob(SMessageJob *pJob) CIRCConnection *pIRCCon = GetIRCConnection(strProto); // Only add the message to the history if the contact isn't an irc chatroom - if (!(pIRCCon && Contact_IsGroupChat(pJob->hContact, szProto))) { + if (!(pIRCCon && Contact::IsGroupChat(pJob->hContact, szProto))) { // Add the message to the database DBEVENTINFO dbei = {}; dbei.eventType = EVENTTYPE_MESSAGE; @@ -720,7 +720,7 @@ void CAppletManager::SendTypingNotification(MCONTACT hContact, bool bEnable) return; if (protoCaps & PF1_INVISLIST && protoStatus == ID_STATUS_INVISIBLE && db_get_w(hContact, szProto, "ApparentMode", 0) != ID_STATUS_ONLINE) return; - if (!Contact_OnList(hContact) && !db_get_b(0, "SRMsg", "UnknownTyping", 1)) + if (!Contact::OnList(hContact) && !db_get_b(0, "SRMsg", "UnknownTyping", 1)) return; // End user check CallService(MS_PROTO_SELFISTYPING, hContact, bEnable ? PROTOTYPE_SELFTYPING_ON : PROTOTYPE_SELFTYPING_OFF); @@ -738,7 +738,7 @@ MEVENT CAppletManager::SendMessageToContact(MCONTACT hContact, tstring strMessag CIRCConnection *pIRCCon = CAppletManager::GetInstance()->GetIRCConnection(strProto); - if (pIRCCon && Contact_IsGroupChat(hContact, szProto)) { + if (pIRCCon && Contact::IsGroupChat(hContact, szProto)) { ptrW wszNick(db_get_wsa(hContact, szProto, "Nick")); if (wszNick == NULL) return NULL; @@ -1107,7 +1107,7 @@ int CAppletManager::HookChatInbound(WPARAM, LPARAM lParam) Event.hContact = NULL; // Ignore events from hidden chatrooms, except for join events - if (gce->pszID.w != nullptr && Contact_IsHidden(Event.hContact)) { + if (gce->pszID.w != nullptr && Contact::IsHidden(Event.hContact)) { if (gce->iType == GC_EVENT_JOIN && pHistory) pHistory->LUsers.push_back(toTstring(gce->pszNick.w)); @@ -1408,7 +1408,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) Event.bNotification = true; Event.eType = EVENT_SIGNED_ON; - if (pIRCCon && Contact_IsGroupChat(Event.hContact, szProto)) { + if (pIRCCon && Contact::IsGroupChat(Event.hContact, szProto)) { Event.strDescription = TranslateString(L"Joined %s", strName.c_str()); DBVARIANT dbv; @@ -1426,7 +1426,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) Event.bNotification = true; Event.eType = EVENT_SIGNED_OFF; - if (pIRCCon && Contact_IsGroupChat(Event.hContact, szProto)) { + if (pIRCCon && Contact::IsGroupChat(Event.hContact, szProto)) { Event.strDescription = TranslateString(L"Left %s", strName.c_str()); // delete IRC-Channel history CAppletManager::GetInstance()->DeleteIRCHistory(Event.hContact); @@ -1629,7 +1629,7 @@ int CAppletManager::HookSettingChanged(WPARAM hContact, LPARAM lParam) else if (!strcmp(dbcws->szModule, "CList")) { if (!strcmp(dbcws->szSetting, "Hidden")) { Event.eType = EVENT_CONTACT_HIDDEN; - Event.iValue = Contact_IsHidden(hContact); + Event.iValue = Contact::IsHidden(hContact); } else if (!strcmp(dbcws->szSetting, "Group")) { Event.eType = EVENT_CONTACT_GROUP; diff --git a/plugins/MirandaG15/src/CChatScreen.cpp b/plugins/MirandaG15/src/CChatScreen.cpp index 26f03f5c60..561fd98bd1 100644 --- a/plugins/MirandaG15/src/CChatScreen.cpp +++ b/plugins/MirandaG15/src/CChatScreen.cpp @@ -251,7 +251,7 @@ void CChatScreen::LoadHistory() char *szProto = Proto_GetBaseAccountName(m_hContact);
- if (m_bIRCProtocol && Contact_IsGroupChat(m_hContact, szProto)) {
+ if (m_bIRCProtocol && Contact::IsGroupChat(m_hContact, szProto)) {
if (!CAppletManager::GetInstance()->IsIRCHookEnabled()) {
time_t now;
tm tm_now;
@@ -615,7 +615,7 @@ void CChatScreen::OnEventReceived(CEvent *pEvent) // contact is set to hidden
if (pEvent->iValue == 1) {
// Close the chat screen if the contact is an irc chatroom
- if (!(m_bIRCProtocol && Contact_IsGroupChat(pEvent->hContact, toNarrowString(m_strProto).c_str())))
+ if (!(m_bIRCProtocol && Contact::IsGroupChat(pEvent->hContact, toNarrowString(m_strProto).c_str())))
break;
}
else
diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp index 872c3570a2..dbb8b27626 100644 --- a/plugins/MirandaG15/src/CContactList.cpp +++ b/plugins/MirandaG15/src/CContactList.cpp @@ -202,12 +202,12 @@ bool CContactList::IsVisible(CContactListEntry *pEntry) return true;
if (CConfig::GetBoolSetting(CLIST_USEIGNORE)) {
- if (Contact_IsHidden(pEntry->hHandle))
+ if (Contact::IsHidden(pEntry->hHandle))
return false;
if (db_mc_isSub(pEntry->hHandle)) {
MCONTACT hMetaContact = db_mc_getMeta(pEntry->hHandle);
- if (Contact_IsHidden(hMetaContact))
+ if (Contact::IsHidden(hMetaContact))
return false;
}
}
diff --git a/plugins/MirandaG15/src/CEventScreen.cpp b/plugins/MirandaG15/src/CEventScreen.cpp index ffd9989be2..dfa3248264 100644 --- a/plugins/MirandaG15/src/CEventScreen.cpp +++ b/plugins/MirandaG15/src/CEventScreen.cpp @@ -186,7 +186,7 @@ void CEventScreen::OnLCDButtonDown(int iButton) char *szProto = Proto_GetBaseAccountName(pEntry->hContact);
CIRCConnection *pIRCCon = CAppletManager::GetInstance()->GetIRCConnection(toTstring(szProto));
- if (pIRCCon && Contact_IsGroupChat(pEntry->hContact, szProto) && Contact_IsHidden(pEntry->hContact))
+ if (pIRCCon && Contact::IsGroupChat(pEntry->hContact, szProto) && Contact::IsHidden(pEntry->hContact))
return;
CAppletManager::GetInstance()->ActivateChatScreen(pEntry->hContact);
|