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/Msg_Export/src | |
parent | 3216d8df5cb355f34c82ed10b7e40bab7525b697 (diff) |
GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName
Diffstat (limited to 'plugins/Msg_Export/src')
-rwxr-xr-x | plugins/Msg_Export/src/options.cpp | 8 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/utils.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index cec37e9e5f..531e26f690 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -79,11 +79,11 @@ int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) return mir_wstrcmpi(Clist_GetContactDisplayName(lParam1), Clist_GetContactDisplayName(lParam2));
if (lParamSort == 2)
- return mir_strcmp(GetContactProto((MCONTACT)lParam1), GetContactProto((MCONTACT)lParam2));
+ return mir_strcmp(Proto_GetBaseAccountName((MCONTACT)lParam1), Proto_GetBaseAccountName((MCONTACT)lParam2));
if (lParamSort == 3) {
- DWORD dwUin1 = db_get_dw((MCONTACT)lParam1, GetContactProto((MCONTACT)lParam1), "UIN", 0);
- DWORD dwUin2 = db_get_dw((MCONTACT)lParam2, GetContactProto((MCONTACT)lParam2), "UIN", 0);
+ DWORD dwUin1 = db_get_dw((MCONTACT)lParam1, Proto_GetBaseAccountName((MCONTACT)lParam1), "UIN", 0);
+ DWORD dwUin2 = db_get_dw((MCONTACT)lParam2, Proto_GetBaseAccountName((MCONTACT)lParam2), "UIN", 0);
if (dwUin1 == dwUin2)
return 0;
return (dwUin1 > dwUin2) ? -1 : 1;
@@ -473,7 +473,7 @@ public: wstring sTmp;
LVITEM sItem = { 0 };
for (auto &hContact : Contacts()) {
- PROTOACCOUNT *pa = Proto_GetAccount(GetContactProto(hContact));
+ PROTOACCOUNT *pa = Proto_GetAccount(Proto_GetBaseAccountName(hContact));
if (pa == nullptr)
continue;
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index 9dbba8f4e9..d9e3cc9307 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -457,7 +457,7 @@ void ReplaceDefines(MCONTACT hContact, wstring & sTarget) bool bIdentifierUsed = sTarget.find(L"%identifier%") != string::npos;
if (bUINUsed || bEMailUsed || bProtoUsed || bIdentifierUsed) {
- const char *szProto = GetContactProto(hContact);
+ const char *szProto = Proto_GetBaseAccountName(hContact);
if (bUINUsed || (bIdentifierUsed && !mir_strcmp(szProto, "ICQ"))) {
DWORD dwUIN = db_get_dw(hContact, szProto, "UIN", 0);
wstring sReplaceUin;
@@ -665,7 +665,7 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, wstring sFilePath wchar_t szTemp[500];
bool bWriteUTF8Format = false;
- const char *szProto = GetContactProto(hContact);
+ const char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto == nullptr) {
Netlib_Logf(0, MODULENAME ": cannot write message for a contact %d without protocol", hContact);
return false;
@@ -949,7 +949,7 @@ bool bIsExportEnabled(MCONTACT hContact) if (!g_plugin.getByte(hContact, "EnableLog", 1))
return false;
- const char *szProto = GetContactProto(hContact);
+ const char *szProto = Proto_GetBaseAccountName(hContact);
char szTemp[500];
mir_snprintf(szTemp, "DisableProt_%s", szProto);
if (!g_plugin.getByte(szTemp, 1))
@@ -1130,6 +1130,6 @@ int nContactDeleted(WPARAM hContact, LPARAM) wchar_t* GetMyOwnNick(MCONTACT hContact)
{
- wchar_t *p = Contact_GetInfo(CNF_DISPLAY, NULL, GetContactProto(hContact));
+ wchar_t *p = Contact_GetInfo(CNF_DISPLAY, NULL, Proto_GetBaseAccountName(hContact));
return (p != nullptr) ? p : mir_wstrdup(TranslateT("No_Nick"));
}
|