summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-07-31 18:07:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-07-31 18:07:27 +0300
commit500dd4848842f6d4207584417448586d060fbd6a (patch)
tree569ac641e814da1d706d36b12eaf35183a3ce7a5 /plugins/Scriver
parentb47e4b4b32698470bf52c0dc1c2d1af56c46c9b5 (diff)
Contact: group of functions gathered into the personal namespace
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp10
-rw-r--r--plugins/Scriver/src/msglog.cpp2
-rw-r--r--plugins/Scriver/src/msgs.cpp2
-rw-r--r--plugins/Scriver/src/msgutils.cpp2
-rw-r--r--plugins/Scriver/src/utils.cpp2
5 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 6890f3c971..3b4a728cf0 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -371,7 +371,7 @@ void CMsgDialog::OnDestroy()
if (m_hContact && g_dat.flags.bDelTemp) {
m_hContact = INVALID_CONTACT_ID; // to prevent recursion
- if (!Contact_OnList(m_hContact))
+ if (!Contact::OnList(m_hContact))
db_delete_contact(m_hContact);
}
@@ -457,7 +457,7 @@ void CMsgDialog::onClick_Ok(CCtrlButton *pButton)
void CMsgDialog::onClick_UserMenu(CCtrlButton *pButton)
{
if (GetKeyState(VK_SHIFT) & 0x8000) { // copy user name
- ptrW id(Contact_GetInfo(CNF_UNIQUEID, m_hContact, m_szProto));
+ ptrW id(Contact::GetInfo(CNF_UNIQUEID, m_hContact, m_szProto));
if (!OpenClipboard(m_hwnd) || !mir_wstrlen(id))
return;
@@ -512,9 +512,9 @@ void CMsgDialog::onClick_Quote(CCtrlButton*)
void CMsgDialog::onClick_Add(CCtrlButton*)
{
- Contact_Add(m_hContact, m_hwnd);
+ Contact::Add(m_hContact, m_hwnd);
- if (Contact_OnList(m_hContact))
+ if (Contact::OnList(m_hContact))
ShowWindow(GetDlgItem(m_hwnd, IDC_ADD), SW_HIDE);
}
@@ -1075,7 +1075,7 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
if (wParam == m_hContact && m_hContact && m_szProto) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam;
wchar_t buf[128];
- mir_snwprintf(buf, TranslateT("User menu - %s"), ptrW(Contact_GetInfo(CNF_UNIQUEID, m_hContact, m_szProto)).get());
+ mir_snwprintf(buf, TranslateT("User menu - %s"), ptrW(Contact::GetInfo(CNF_UNIQUEID, m_hContact, m_szProto)).get());
SendDlgItemMessage(m_hwnd, IDC_USERMENU, BUTTONADDTOOLTIP, (WPARAM)buf, BATF_UNICODE);
if (cws && !mir_strcmp(cws->szModule, m_szProto) && !mir_strcmp(cws->szSetting, "Status"))
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index cbb57583c1..95c7269cd7 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -105,7 +105,7 @@ EventData* CMsgDialog::GetEventFromDB(MCONTACT hContact, MEVENT hDbEvent)
evt->time = dbei.timestamp;
evt->szNick.w = nullptr;
if (evt->dwFlags & IEEDF_SENT)
- evt->szNick.w = Contact_GetInfo(CNF_DISPLAY, 0, m_szProto);
+ evt->szNick.w = Contact::GetInfo(CNF_DISPLAY, 0, m_szProto);
else
evt->szNick.w = mir_wstrdup(Clist_GetContactDisplayName(hContact));
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 38bb0461cb..1bba4511be 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -299,7 +299,7 @@ static int PrebuildContactMenu(WPARAM hContact, LPARAM)
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto) {
// leave this menu item hidden for chats
- if (!Contact_IsGroupChat(hContact, szProto))
+ if (!Contact::IsGroupChat(hContact, szProto))
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
bEnabled = true;
}
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp
index 934823bc9a..79d832a5f4 100644
--- a/plugins/Scriver/src/msgutils.cpp
+++ b/plugins/Scriver/src/msgutils.cpp
@@ -114,7 +114,7 @@ bool CMsgDialog::IsTypingNotificationEnabled()
if (protoCaps & PF1_INVISLIST && protoStatus == ID_STATUS_INVISIBLE && db_get_w(m_hContact, m_szProto, "ApparentMode", 0) != ID_STATUS_ONLINE)
return FALSE;
- if (!Contact_OnList(m_hContact) && !g_plugin.bTypingUnknown)
+ if (!Contact::OnList(m_hContact) && !g_plugin.bTypingUnknown)
return FALSE;
return TRUE;
}
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index a2702075f5..fd346b0ec4 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -259,7 +259,7 @@ void SetButtonsPos(HWND hwndDlg, MCONTACT hContact, bool bShow)
continue;
if (cbd->m_dwButtonCID == IDC_ADD)
- if (Contact_OnList(hContact)) {
+ if (Contact::OnList(hContact)) {
ShowWindow(hwndButton, SW_HIDE);
continue;
}