summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-05-18 17:21:08 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-05-18 17:21:08 +0000
commita1d6cb7bdc354be0968c6ba5ac4615e14a90eead (patch)
treea1ed17002c33644b3362e6c1e6572f3fa7ef17d7 /plugins/Scriver
parentfef6b799309b5b9d7cbb2845fa27b777477e2a61 (diff)
these tons of code aren't needed anymore...
git-svn-id: http://svn.miranda-ng.org/main/trunk@16850 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/msglog.cpp16
-rw-r--r--plugins/Scriver/src/utils.cpp21
2 files changed, 6 insertions, 31 deletions
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index fd908788d0..0f8ec8a47e 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -144,19 +144,9 @@ EventData* getEventFromDB(SrmmWindowData *dat, MCONTACT hContact, MEVENT hDbEven
evt->time = dbei.timestamp;
evt->pszNick = NULL;
- if (evt->dwFlags & IEEDF_SENT) {
- CONTACTINFO ci = {};
- ci.cbSize = sizeof(ci);
- ci.szProto = dat->szProto;
- ci.dwFlag = CNF_DISPLAY | CNF_TCHAR;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, LPARAM(&ci))) {
- if (ci.type == CNFT_ASCIIZ)
- evt->pszNickT = ci.pszVal;
- else
- evt->pszNickT = CMString(FORMAT, _T("%d"), ci.dVal).Detach();
- }
- }
- if (evt->pszNickT == NULL)
+ if (evt->dwFlags & IEEDF_SENT)
+ evt->pszNickT = Contact_GetInfo(CNF_DISPLAY, NULL);
+ else
evt->pszNickT = mir_tstrdup(pcli->pfnGetContactDisplayName(hContact, 0));
if (evt->eventType == EVENTTYPE_FILE) {
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index 588871c788..8cc13d209b 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -387,24 +387,9 @@ void SetSearchEngineIcons(HMENU hMenu, HIMAGELIST hImageList)
void GetContactUniqueId(SrmmWindowData *dat, char *buf, int maxlen)
{
- CONTACTINFO ci;
- memset(&ci, 0, sizeof(ci));
- ci.cbSize = sizeof(ci);
- ci.hContact = dat->hContact;
- ci.szProto = dat->szProto;
- ci.dwFlag = CNF_UNIQUEID;
- buf[0] = 0;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci)) {
- switch (ci.type) {
- case CNFT_ASCIIZ:
- strncpy_s(buf, maxlen, (char*)ci.pszVal, _TRUNCATE);
- mir_free(ci.pszVal);
- break;
- case CNFT_DWORD:
- mir_snprintf(buf, maxlen, "%u", ci.dVal);
- break;
- }
- }
+ ptrT id(Contact_GetInfo(CNF_UNIQUEID, dat->hContact, dat->szProto));
+ if (id != NULL)
+ strncpy_s(buf, maxlen, _T2A(id), _TRUNCATE);
}
HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle, RECT *rect)