diff options
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r-- | plugins/Clist_nicer/src/clcitems.cpp | 15 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/init.cpp | 16 |
2 files changed, 14 insertions, 17 deletions
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index bf91386ba2..82c614643d 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -53,13 +53,11 @@ ClcContact* CreateClcContact(void) return p;
}
-int AddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText)
+ClcContact* AddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText)
{
- int i = coreCli.pfnAddInfoItemToGroup(group, flags, pszText);
-
- ClcContact* p = group->cl[i];
+ ClcContact *p = coreCli.pfnAddInfoItemToGroup(group, flags, pszText);
p->avatarLeft = p->extraIconRightBegin = -1;
- return i;
+ return p;
}
ClcGroup *AddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers)
@@ -97,10 +95,9 @@ void LoadAvatarForContact(ClcContact *p) p->cFlags &= ~ECF_AVATAR;
}
-int AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact)
+ClcContact* AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact)
{
- int i = coreCli.pfnAddContactToGroup(dat, group, hContact);
- ClcContact* p = group->cl[i];
+ ClcContact *p = coreCli.pfnAddContactToGroup(dat, group, hContact);
p->wStatus = db_get_w(hContact, p->proto, "Status", ID_STATUS_OFFLINE);
p->xStatus = db_get_b(hContact, p->proto, "XStatusId", 0);
@@ -140,7 +137,7 @@ int AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact) p->avatarLeft = p->extraIconRightBegin = -1;
p->flags |= db_get_b(p->hContact, "CList", "Priority", 0) ? CONTACTF_PRIORITY : 0;
- return i;
+ return p;
}
void RebuildEntireList(HWND hwnd, struct ClcData *dat)
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index 6fa5357254..eb83a1df9d 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -50,14 +50,14 @@ int ShowHide(WPARAM wParam, LPARAM lParam); int ClcShutdown(WPARAM wParam, LPARAM lParam);
CListEvent* AddEvent(CLISTEVENT *cle);
-ClcGroup* AddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers);
-
-int AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact);
-int AddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText);
-LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
-int RemoveEvent(MCONTACT hContact, MEVENT hDbEvent);
-INT_PTR TrayIconProcessMessage(WPARAM wParam, LPARAM lParam);
-void RecalcScrollBar(HWND hwnd, struct ClcData *dat);
+ClcGroup* AddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers);
+
+ClcContact* AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact);
+ClcContact* AddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText);
+LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
+int RemoveEvent(MCONTACT hContact, MEVENT hDbEvent);
+INT_PTR TrayIconProcessMessage(WPARAM wParam, LPARAM lParam);
+void RecalcScrollBar(HWND hwnd, struct ClcData *dat);
LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
|