summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_userinfo.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-20 19:31:57 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-20 19:31:57 +0000
commit14877a748010cf73448cc6892792120e4b191439 (patch)
tree0f433ab5b6daaed39e42265227c35dc951558d8b /protocols/JabberG/src/jabber_userinfo.cpp
parent6a7f572f84f3f23b55ab0f42c1203035463c38d8 (diff)
Jabber:
- JABBER_RESOURCE_STATUS became a class; - static item JABBER_LIST_ITEM::itemResource converted into a dynamically allocated structure for resourceless items only; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@6144 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_userinfo.cpp')
-rw-r--r--protocols/JabberG/src/jabber_userinfo.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index c3adeebac6..a9c7455bcb 100644
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -212,7 +212,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti
{
TCHAR buf[256];
HTREEITEM htiResource = htiRoot;
- JABBER_RESOURCE_STATUS *res = resource ? item->arResources[resource-1] : &item->itemResource;
+ JABBER_RESOURCE_STATUS *res = resource ? item->arResources[resource-1] : item->m_pItemResource;
if (res->resourceName && *res->resourceName)
htiResource = sttFillInfoLine(hwndTree, htiRoot, LoadSkinnedProtoIcon(ppro->m_szModuleName, res->status),
@@ -365,12 +365,12 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM
}
// logoff
- if (item->itemResource.idleStartTime > 0) {
- lstrcpyn(buf, _tctime(&item->itemResource.idleStartTime), SIZEOF(buf));
+ if (item->m_pItemResource->idleStartTime > 0) {
+ lstrcpyn(buf, _tctime(&item->m_pItemResource->idleStartTime), SIZEOF(buf));
int len = lstrlen(buf);
if (len > 0) buf[len-1] = 0;
}
- else if ( !item->itemResource.idleStartTime)
+ else if ( !item->m_pItemResource->idleStartTime)
lstrcpyn(buf, TranslateT("unknown"), SIZEOF(buf));
else
lstrcpyn(buf, TranslateT("<not specified>"), SIZEOF(buf));
@@ -381,7 +381,7 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM
// logoff msg
sttFillInfoLine(hwndTree, htiRoot, NULL, TranslateT("Logoff message"),
- item->itemResource.statusMessage ? item->itemResource.statusMessage : TranslateT("<not specified>"), sttInfoLineId(0, INFOLINE_LOGOFF_MSG));
+ item->m_pItemResource->statusMessage ? item->m_pItemResource->statusMessage : TranslateT("<not specified>"), sttInfoLineId(0, INFOLINE_LOGOFF_MSG));
// activity
if (item->pLastSeenResource)
@@ -397,7 +397,7 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM
for (int i = 0; i < item->arResources.getCount(); i++)
sttFillResourceInfo(ppro, hwndTree, htiRoot, item, i+1);
}
- else if ( !_tcschr(item->jid, _T('@')) || (item->itemResource.status != ID_STATUS_OFFLINE))
+ else if ( !_tcschr(item->jid, _T('@')) || (item->m_pItemResource->status != ID_STATUS_OFFLINE))
sttFillResourceInfo(ppro, hwndTree, htiRoot, item, 0);
sttCleanupInfo(hwndTree, 1);