diff options
author | George Hazan <ghazan@miranda.im> | 2019-12-04 16:08:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-12-04 16:08:03 +0300 |
commit | 3bb16e798cb51d5764aacbefd4edf26f52d8c4f0 (patch) | |
tree | 59dbb53fc9496d660ec2ef2846a4eab0f1720b88 /plugins/Scriver/src | |
parent | 3216d8df5cb355f34c82ed10b7e40bab7525b697 (diff) |
GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r-- | plugins/Scriver/src/globals.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msglog.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.cpp | 10 | ||||
-rw-r--r-- | plugins/Scriver/src/msgutils.cpp | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index 34b64b6081..025cca09b6 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -145,7 +145,7 @@ static int ackevent(WPARAM, LPARAM lParam) DBEVENTINFO dbei = {};
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_UTF | DBEF_SENT | ((item->flags & PREF_RTL) ? DBEF_RTL : 0);
- dbei.szModule = GetContactProto(hContact);
+ dbei.szModule = Proto_GetBaseAccountName(hContact);
dbei.timestamp = time(0);
dbei.cbBlob = (int)mir_strlen(item->sendBuffer) + 1;
dbei.pBlob = (PBYTE)item->sendBuffer;
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 7fad1b8f79..365190bfc8 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -197,7 +197,7 @@ void CMsgDialog::Init() g_arDialogs.insert(this);
m_autoClose = CLOSE_ON_CANCEL;
- m_szProto = GetContactProto(m_hContact);
+ m_szProto = Proto_GetBaseAccountName(m_hContact);
SetParent(GetParentWindow(m_hContact, isChat()));
m_pParent = (ParentWindowData *)GetWindowLongPtr(m_hwndParent, GWLP_USERDATA);
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index d01d2a9bab..1a088be1b7 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -804,7 +804,7 @@ void CLogWindow::LogEvents(MEVENT hDbEventFirst, int count, bool bAppend) smre.hwndRichEditControl = m_rtf.GetHwnd();
MCONTACT hContact = db_mc_getSrmmSub(m_pDlg.m_hContact);
- smre.Protocolname = (hContact != 0) ? GetContactProto(hContact) : m_pDlg.m_szProto;
+ smre.Protocolname = (hContact != 0) ? Proto_GetBaseAccountName(hContact) : m_pDlg.m_szProto;
if (fi.chrg.cpMin > 0) {
sel.cpMin = fi.chrg.cpMin;
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index a2175f52e5..b943a7a5f1 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -54,11 +54,11 @@ static int SRMMStatusToPf2(int status) int IsAutoPopup(MCONTACT hContact) {
if (g_dat.flags.bAutoPopup) {
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
hContact = db_mc_getSrmmSub(hContact);
if (hContact != 0)
- szProto = GetContactProto(hContact);
+ szProto = Proto_GetBaseAccountName(hContact);
if (szProto && (g_dat.openFlags & SRMMStatusToPf2(Proto_GetStatus(szProto))))
return 1;
@@ -132,7 +132,7 @@ static INT_PTR SendMessageCommandWorker(MCONTACT hContact, wchar_t *pszMsg) hContact = db_mc_tryMeta(hContact);
/* does the MCONTACT's protocol support IM messages? */
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto == nullptr)
return 1; /* unknown contact */
@@ -213,7 +213,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam) static int MessageSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam;
- char *szProto = GetContactProto(hContact); // szProto maybe nullptr
+ char *szProto = Proto_GetBaseAccountName(hContact); // szProto maybe nullptr
if (!strcmp(cws->szModule, "CList") || !mir_strcmp(cws->szModule, szProto))
Srmm_Broadcast(DM_CLISTSETTINGSCHANGED, hContact, lParam);
return 0;
@@ -296,7 +296,7 @@ static int PrebuildContactMenu(WPARAM hContact, LPARAM) return 0;
bool bEnabled = false;
- char *szProto = GetContactProto(hContact);
+ char *szProto = Proto_GetBaseAccountName(hContact);
if ( szProto ) {
// leave this menu item hidden for chats
if ( !db_get_b(hContact, szProto, "ChatRoom", 0))
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp index 47dc5e8de8..7196f22271 100644 --- a/plugins/Scriver/src/msgutils.cpp +++ b/plugins/Scriver/src/msgutils.cpp @@ -237,7 +237,7 @@ void CMsgDialog::SetStatusIcon() if (hContact == 0) hContact = m_hContact; - char *szProto = GetContactProto(hContact); + char *szProto = Proto_GetBaseAccountName(hContact); m_hStatusIcon = Skin_LoadProtoIcon(szProto, m_wStatus, false); m_hStatusIconBig = Skin_LoadProtoIcon(szProto, m_wStatus, true); |