From 97846e5e80ca89b0307d740e71cd488895ac42c6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 23 Jul 2023 21:08:23 +0300 Subject: let boolean variables inside ClcGroup be boolean --- include/m_clist.h | 6 ++++++ include/m_clistint.h | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/m_clist.h b/include/m_clist.h index 3eb05692cc..33ea474b98 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -419,6 +419,12 @@ EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GroupGetName(MGROUP hGroup, uint32_t *pdwFl EXTERN_C MIR_APP_DLL(int) Clist_GroupSetExpanded(MGROUP hGroup, int iNewState); +///////////////////////////////////////////////////////////////////////////////////////// +// saves & restores the state flag for all groups + +EXTERN_C MIR_APP_DLL(void) Clist_GroupSaveExpanded(); +EXTERN_C MIR_APP_DLL(void) Clist_GroupRestoreExpanded(); + ///////////////////////////////////////////////////////////////////////////////////////// // changes the flags for a group // iNewFlags = MAKELPARAM(flags, flagsMask) diff --git a/include/m_clistint.h b/include/m_clistint.h index 7877eb7934..f3aa749140 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -84,7 +84,8 @@ struct ClcGroup : public MZeroedObject {} LIST cl; - int expanded, hideOffline, groupId; + int groupId; + bool bExpanded, bHideOffline; ClcGroup *parent; int scanIndex; int totalMembers; @@ -278,6 +279,7 @@ MIR_APP_DLL(int) Clist_RemoveEvent(MCONTACT hContact, MEVENT hDbEvent); MIR_APP_DLL(ClcGroup*) Clist_RemoveItemFromGroup(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount); MIR_APP_DLL(void) Clist_SaveStateAndRebuildList(HWND hwnd, ClcData *dat); MIR_APP_DLL(void) Clist_SetGroupChildCheckboxes(ClcGroup *group, int checked); +MIR_APP_DLL(void) Clist_SetGroupExpand(HWND hwnd, ClcData *dat, ClcGroup *group, int newState); MIR_APP_DLL(int) Clist_TrayIconAdd(HWND hwnd, const char *szProto, const char *szIconProto, int status); MIR_APP_DLL(int) Clist_TrayIconDestroy(HWND hwnd); @@ -350,7 +352,6 @@ struct CLIST_INTERFACE int (*pfnHitTest)(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t * flags); void (*pfnScrollTo)(HWND hwnd, ClcData *dat, int desty, int noSmooth); void (*pfnRecalcScrollBar)(HWND hwnd, ClcData *dat); - void (*pfnSetGroupExpand)(HWND hwnd, ClcData *dat, ClcGroup *group, int newState); int (*pfnFindRowByText)(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk); void (*pfnBeginRenameSelection)(HWND hwnd, ClcData *dat); void (*pfnGetDefaultFontSetting)(int i, LOGFONT *lf, COLORREF *colour); -- cgit v1.2.3