summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-06 21:25:07 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-06 21:25:07 +0300
commit4f5b5ef8c908156bd30d5bb391c1e238cbcc2f0c (patch)
tree425ddf661b958e7a10c8b955105b267ea9252135 /src/mir_app
parentaba87b6bcc2158bc7a070ce4027aee687d554d77 (diff)
CLIST_INTERFACE::pfnRemoveItemFromGroup => Clist_RemoveItemFromGroup
CLIST_INTERFACE::pfnFreeGroup => suspended
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/clc.cpp4
-rw-r--r--src/mir_app/src/clc.h4
-rw-r--r--src/mir_app/src/clcitems.cpp14
-rw-r--r--src/mir_app/src/clistcore.cpp10
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
6 files changed, 17 insertions, 17 deletions
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index a486029bb9..9cd81ba7d2 100644
--- a/src/mir_app/src/clc.cpp
+++ b/src/mir_app/src/clc.cpp
@@ -520,7 +520,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) {
if (dat->selection >= 0 && cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, nullptr) != -1)
hSelItem = Clist_ContactToHItem(selcontact);
- cli.pfnRemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
+ Clist_RemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
}
else {
contact->iImage = (WORD)lParam;
@@ -1278,7 +1278,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
DestroyWindow(dat->hwndRenameEdit);
if (dat->hBmpBackground)
DeleteObject(dat->hBmpBackground);
- cli.pfnFreeGroup(&dat->list);
+ FreeGroup(&dat->list);
delete dat;
cli.pfnUnregisterFileDropping(hwnd);
WindowList_Remove(hClcWindowList, hwnd);
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h
index 9bddc54ad2..5a9099cd49 100644
--- a/src/mir_app/src/clc.h
+++ b/src/mir_app/src/clc.h
@@ -54,14 +54,14 @@ ClcContact* fnFindItem(DWORD dwItem, ClcContact *contact);
/* clcitems.c */
ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers);
-ClcGroup* fnRemoveItemFromGroup(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount);
ClcContact* fnAddInfoItemToGroup(ClcGroup *group, int flags, const wchar_t *pszText);
ClcContact* fnAddItemToGroup(ClcGroup *group, int iAboveItem);
ClcContact* fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact);
void fnFreeContact(ClcContact *p);
-void fnFreeGroup(ClcGroup *group);
+
+void FreeGroup(ClcGroup *group);
void fnAddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline);
void fnRebuildEntireList(HWND hwnd, ClcData *dat);
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp
index 51a90d5fc3..ad290a31eb 100644
--- a/src/mir_app/src/clcitems.cpp
+++ b/src/mir_app/src/clcitems.cpp
@@ -119,12 +119,12 @@ ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, DWORD flags
void fnFreeContact(ClcContact* p)
{
if (p->type == CLCIT_GROUP) {
- cli.pfnFreeGroup(p->group);
+ FreeGroup(p->group);
delete p->group; p->group = nullptr;
}
}
-void fnFreeGroup(ClcGroup *group)
+void FreeGroup(ClcGroup *group)
{
if (!group)
return;
@@ -273,7 +273,7 @@ void fnAddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTo
group->totalMembers++;
}
-ClcGroup* fnRemoveItemFromGroup(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount)
+MIR_APP_DLL(ClcGroup*) Clist_RemoveItemFromGroup(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount)
{
int iContact = group->cl.indexOf(contact);
if (iContact == -1)
@@ -293,7 +293,7 @@ ClcGroup* fnRemoveItemFromGroup(HWND hwnd, ClcGroup *group, ClcContact *contact,
if ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) && group->cl.getCount() == 0 && group->parent != nullptr)
for (auto &cc : group->parent->cl)
if (cc->type == CLCIT_GROUP && cc->groupId == group->groupId)
- return cli.pfnRemoveItemFromGroup(hwnd, group->parent, cc, 0);
+ return Clist_RemoveItemFromGroup(hwnd, group->parent, cc, 0);
return group;
}
@@ -333,7 +333,7 @@ MIR_APP_DLL(void) Clist_DeleteItemFromTree(HWND hwnd, MCONTACT hItem)
}
mir_free(dbv.ptszVal);
}
- else cli.pfnRemoveItemFromGroup(hwnd, group, contact, 1);
+ else Clist_RemoveItemFromGroup(hwnd, group, contact, 1);
}
int fnGetContactHiddenStatus(MCONTACT hContact, char*, ClcData*)
@@ -415,7 +415,7 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat)
ClcContact *cc = group->cl[group->scanIndex];
if (cc->type == CLCIT_GROUP) {
if (cc->group->cl.getCount() == 0) {
- group = cli.pfnRemoveItemFromGroup(hwnd, group, cc, 0);
+ group = Clist_RemoveItemFromGroup(hwnd, group, cc, 0);
}
else {
group = cc->group;
@@ -662,7 +662,7 @@ MIR_APP_DLL(void) Clist_SaveStateAndRebuildList(HWND hwnd, ClcData *dat)
group->scanIndex++;
}
- cli.pfnFreeGroup(&dat->list);
+ FreeGroup(&dat->list);
cli.pfnRebuildEntireList(hwnd, dat);
group = &dat->list;
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp
index d397005691..b885d86ba2 100644
--- a/src/mir_app/src/clistcore.cpp
+++ b/src/mir_app/src/clistcore.cpp
@@ -76,13 +76,11 @@ void InitClistCore()
cli.pfnAddGroup = fnAddGroup;
cli.pfnAddItemToGroup = fnAddItemToGroup;
cli.pfnCreateClcContact = fnCreateClcContact;
- cli.pfnRemoveItemFromGroup = fnRemoveItemFromGroup;
- cli.pfnFreeContact = fnFreeContact;
- cli.pfnFreeGroup = fnFreeGroup;
- cli.pfnAddInfoItemToGroup = fnAddInfoItemToGroup;
- cli.pfnAddContactToGroup = fnAddContactToGroup;
- cli.pfnAddContactToTree = fnAddContactToTree;
+ cli.pfnFreeContact = fnFreeContact;
+ cli.pfnAddInfoItemToGroup = fnAddInfoItemToGroup;
+ cli.pfnAddContactToGroup = fnAddContactToGroup;
+ cli.pfnAddContactToTree = fnAddContactToTree;
cli.pfnRebuildEntireList = fnRebuildEntireList;
cli.pfnGetGroupContentsCount = fnGetGroupContentsCount;
cli.pfnSortCLC = fnSortCLC;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 0e6f53b6dd..e8b2c97f9b 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -574,3 +574,4 @@ Clist_EnsureVisible @593
Clist_GetGroupCountsText @594
Clist_SaveStateAndRebuildList @595
Clist_DeleteItemFromTree @596
+Clist_RemoveItemFromGroup @597
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 929ffeae10..d9782165d9 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -574,3 +574,4 @@ Clist_EnsureVisible @593
Clist_GetGroupCountsText @594
Clist_SaveStateAndRebuildList @595
Clist_DeleteItemFromTree @596
+Clist_RemoveItemFromGroup @597