diff options
-rw-r--r-- | include/m_clistint.h | 1 | ||||
-rw-r--r-- | plugins/Clist_blind/src/clc.cpp | 9 | ||||
-rw-r--r-- | src/mir_app/src/clcutils.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/clistcore.cpp | 5 |
4 files changed, 12 insertions, 5 deletions
diff --git a/include/m_clistint.h b/include/m_clistint.h index f3aa749140..2661700b13 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -434,6 +434,7 @@ struct CLIST_INTERFACE * Miranda NG additions
*************************************************************************************/
void (*pfnSetContactCheckboxes)(ClcContact *cc, int checked);
+ void (*pfnOnGroupExpanded)(ClcData *dat, ClcGroup *pGroup);
};
// retrieves the pointer to a CLIST_INTERFACE structure
diff --git a/plugins/Clist_blind/src/clc.cpp b/plugins/Clist_blind/src/clc.cpp index dbdc1fec5a..ffb58bc133 100644 --- a/plugins/Clist_blind/src/clc.cpp +++ b/plugins/Clist_blind/src/clc.cpp @@ -133,7 +133,7 @@ static void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, bool call_ori {
CMStringW wszText(template_group);
wszText.Replace(L"%name%", item->szText);
- wszText.Replace(L"%mode%", item->group->expanded ? TranslateT("Expanded") : TranslateT("Collapsed"));
+ wszText.Replace(L"%mode%", item->group->bExpanded ? TranslateT("Expanded") : TranslateT("Collapsed"));
wchar_t *szCounts = Clist_GetGroupCountsText(dat, item);
wchar_t count[128];
@@ -178,7 +178,7 @@ static void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, bool call_ori lvi.lParam = LPARAM(item);
ListView_InsertItem(dat->hwnd_list, &lvi);
- if (item->type == CLCIT_GROUP && item->group->expanded) {
+ if (item->type == CLCIT_GROUP && item->group->bExpanded) {
group = item->group;
level++;
group->scanIndex = 0;
@@ -319,9 +319,8 @@ static void RebuildEntireList(HWND hwnd, ClcData *dat) RebuildEntireListInternal(hwnd, dat, true);
}
-static void SetGroupExpand(HWND hwnd, ClcData *dat, ClcGroup *group, int newState)
+static void OnGroupExpanded(ClcData *dat, ClcGroup*)
{
- coreCli.pfnSetGroupExpand(hwnd, dat, group, newState);
dat->bNeedsRebuild = true;
}
@@ -358,7 +357,7 @@ void InitClc() g_clistApi.pfnContactListWndProc = ContactListWndProc;
g_clistApi.pfnContactListControlWndProc = ContactListControlWndProc;
g_clistApi.pfnRebuildEntireList = RebuildEntireList;
- g_clistApi.pfnSetGroupExpand = SetGroupExpand;
+ g_clistApi.pfnOnGroupExpanded = OnGroupExpanded;
g_clistApi.pfnRecalcScrollBar = RecalcScrollBar;
g_clistApi.pfnScrollTo = ScrollTo;
g_clistApi.pfnLoadClcOptions = LoadClcOptions;
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index 34a012ae34..33b86e60e5 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -297,6 +297,8 @@ MIR_APP_DLL(void) Clist_SetGroupExpand(HWND hwnd, ClcData *dat, ClcGroup *group, group->bExpanded = newState != 0;
}
+ g_clistApi.pfnOnGroupExpanded(dat, group);
+
g_clistApi.pfnInvalidateRect(hwnd, nullptr, FALSE);
int contentCount = g_clistApi.pfnGetGroupContentsCount(group, 1);
int groupy = g_clistApi.pfnGetRowsPriorTo(&dat->list, group, -1);
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index 77800b9113..297851d52d 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -56,6 +56,10 @@ static int fnIsVisibleContact(ClcCacheEntry*, ClcGroup*) return false;
}
+static void fnOnGroupExpanded(ClcData *, ClcGroup *)
+{
+}
+
void InitClistCore()
{
g_clistApi.menuProtos = &g_menuProtos;
@@ -129,6 +133,7 @@ void InitClistCore() g_clistApi.pfnTrayCalcChanged = fnTrayCalcChanged;
g_clistApi.pfnSetContactCheckboxes = fnSetContactCheckboxes;
+ g_clistApi.pfnOnGroupExpanded = fnOnGroupExpanded;
}
MIR_APP_DLL(CLIST_INTERFACE*) Clist_GetInterface(void)
|