summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_adhoc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-02 22:24:11 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-02 22:24:11 +0000
commitfe09f8b1b3e119ee88332a79bdfb143b907c2805 (patch)
treeef4c19d6156da0fa58c6427d24b6c0cb10f77ad8 /protocols/JabberG/src/jabber_adhoc.cpp
parentc55fd3e3c7312d6a76bc8037df78c07cc269935f (diff)
static array of resources replaced with LIST<>
git-svn-id: http://svn.miranda-ng.org/main/trunk@5559 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_adhoc.cpp')
-rw-r--r--protocols/JabberG/src/jabber_adhoc.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp
index 222a34e044..3275897273 100644
--- a/protocols/JabberG/src/jabber_adhoc.cpp
+++ b/protocols/JabberG/src/jabber_adhoc.cpp
@@ -547,10 +547,10 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam)
mir_cslock lck(m_csLists);
item = ListGetItemPtr(LIST_ROSTER, jid);
if (item) {
- if (item->resourceCount > 1) {
+ if (item->arResources.getCount() > 1) {
HMENU hMenu = CreatePopupMenu();
- for (int i=0; i < item->resourceCount; i++)
- AppendMenu(hMenu,MF_STRING,i+1, item->pResources[i].resourceName);
+ for (int i=0; i < item->arResources.getCount(); i++)
+ AppendMenu(hMenu,MF_STRING,i+1, item->arResources[i]->resourceName);
HWND hwndTemp=CreateWindowEx(WS_EX_TOOLWINDOW,_T("button"),_T("PopupMenuHost"),0,0,0,10,10,NULL,NULL,hInst,NULL);
SetForegroundWindow(hwndTemp);
POINT pt;
@@ -563,10 +563,10 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam)
else selected = 1;
if (selected > 0) {
- selected--;
- if (item->pResources) {
- _tcsncat(jid,_T("/"),SIZEOF(jid));
- _tcsncat(jid,item->pResources[selected].resourceName,SIZEOF(jid));
+ JABBER_RESOURCE_STATUS *r = item->arResources[selected-1];
+ if (r) {
+ _tcsncat(jid, _T("/"),SIZEOF(jid));
+ _tcsncat(jid, r->resourceName, SIZEOF(jid));
}
selected = 1;
}