From 423fb81b36428c3a22f6be94dd8ba2e7161b9179 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 6 Apr 2018 20:05:59 +0300 Subject: CLIST_INTERFACE::pfnIsHiddenMode => Clist_IsHiddenMode --- include/delphi/m_clistint.inc | 2 +- include/m_clistint.h | 3 ++- libs/win32/mir_app.lib | Bin 152350 -> 152584 bytes libs/win64/mir_app.lib | Bin 147682 -> 147898 bytes plugins/Clist_modern/src/modern_clc.cpp | 4 ++-- plugins/Clist_modern/src/modern_clcitems.cpp | 4 ++-- plugins/Clist_nicer/src/clc.cpp | 4 ++-- src/mir_app/src/clc.cpp | 4 ++-- src/mir_app/src/clc.h | 1 - src/mir_app/src/clcitems.cpp | 10 +++++----- src/mir_app/src/clcutils.cpp | 2 +- src/mir_app/src/clistcore.cpp | 3 +-- src/mir_app/src/mir_app.def | 1 + src/mir_app/src/mir_app64.def | 1 + 14 files changed, 20 insertions(+), 19 deletions(-) diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc index a841d04fcf..3e90a263f7 100644 --- a/include/delphi/m_clistint.inc +++ b/include/delphi/m_clistint.inc @@ -353,7 +353,7 @@ type pfnCalcEipPosition : procedure (var dat:TClcData; var contact:TClcContact; var group:TClcGroup; var result:TPOINT); cdecl; pfnGetDropTargetInformation : function (hwnd:HWND; var dat:TClcData; pt:TPOINT):int; cdecl; pfnClcStatusToPf2 : function (status:int):int; cdecl; - pfnIsHiddenMode : function (var dat:TClcData; status:int):int; cdecl; + blablablabla11 : procedure; cdecl; blablablabla10 : procedure; cdecl; blablablabla9 : procedure; cdecl; blablablabla8 : procedure; cdecl; diff --git a/include/m_clistint.h b/include/m_clistint.h index e40a9053fe..91c321eef5 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -261,6 +261,7 @@ EXTERN_C MIR_APP_DLL(void) Clist_GetFontSetting(int i, LOGFONT *lf, COLORREF EXTERN_C MIR_APP_DLL(void) Clist_HideInfoTip(ClcData *dat); EXTERN_C MIR_APP_DLL(void) Clist_InitAutoRebuild(HWND hWnd); EXTERN_C MIR_APP_DLL(void) Clist_InvalidateItem(HWND hwnd, ClcData *dat, int iItem); +EXTERN_C MIR_APP_DLL(int) Clist_IsHiddenMode(ClcData *dat, int status); EXTERN_C MIR_APP_DLL(void) Clist_LoadContactTree(void); EXTERN_C MIR_APP_DLL(void) Clist_NotifyNewContact(HWND hwnd, MCONTACT hContact); EXTERN_C MIR_APP_DLL(void) Clist_RecalculateGroupCheckboxes(ClcData *dat); @@ -367,7 +368,7 @@ struct CLIST_INTERFACE void (*pfnCalcEipPosition)(ClcData *dat, ClcContact *contact, ClcGroup *group, POINT *result); int (*pfnGetDropTargetInformation)(HWND hwnd, ClcData *dat, POINT pt); int (*pfnClcStatusToPf2)(int status); - int (*pfnIsHiddenMode)(ClcData *dat, int status); + void (*blablablabla11)(); void (*blablablabla10)(); void (*blablablabla9)(); void (*blablablabla8)(); diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib index feee9e5aa6..89bcba0808 100644 Binary files a/libs/win32/mir_app.lib and b/libs/win32/mir_app.lib differ diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib index d4a10c3d97..10e21318f8 100644 Binary files a/libs/win64/mir_app.lib and b/libs/win64/mir_app.lib differ diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 5f8eaafd69..abce896da1 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1331,7 +1331,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE); bool isVisiblebyFilter = (((style & CLS_SHOWHIDDEN) && nHiddenStatus != -1) || !nHiddenStatus); - bool ifVisibleByClui = !pcli->pfnIsHiddenMode(dat, status); + bool ifVisibleByClui = !Clist_IsHiddenMode(dat, status); bool isVisible = (g_CluiData.bFilterEffective & CLVM_FILTER_STATUS) ? TRUE : ifVisibleByClui; bool isIconChanged = Clist_GetContactIcon(wParam) != LOWORD(lParam); @@ -1373,7 +1373,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam } else if (contact) { contact->iImage = lParam; - if (!pcli->pfnIsHiddenMode(dat, status)) + if (!Clist_IsHiddenMode(dat, status)) contact->flags |= CONTACTF_ONLINE; else contact->flags &= ~CONTACTF_ONLINE; diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index e7697c0a0b..cbf89f1cfe 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -74,7 +74,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) Cache_GetText(dat, &p); char *szProto = pdnce->szProto; - if (szProto != nullptr && !pcli->pfnIsHiddenMode(dat, wStatus)) + if (szProto != nullptr && !Clist_IsHiddenMode(dat, wStatus)) p.flags |= CONTACTF_ONLINE; int apparentMode = szProto != nullptr ? pdnce->ApparentMode : 0; if (apparentMode == ID_STATUS_OFFLINE) p.flags |= CONTACTF_INVISTO; @@ -131,7 +131,7 @@ static void _LoadDataToContact(ClcContact *cont, ClcCacheEntry *pdnce, ClcGroup cont->hContact = hContact; cont->proto = szProto; - if (szProto != nullptr && !pcli->pfnIsHiddenMode(dat, pdnce->m_iStatus)) + if (szProto != nullptr && !Clist_IsHiddenMode(dat, pdnce->m_iStatus)) cont->flags |= CONTACTF_ONLINE; WORD apparentMode = szProto != nullptr ? pdnce->ApparentMode : 0; diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 9683a875c1..89928963a2 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -319,7 +319,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L status = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE); int shouldShow = (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || - !CLVM_GetContactHiddenStatus(hContact, szProto, dat)) && ((cfg::dat.bFilterEffective ? TRUE : !pcli->pfnIsHiddenMode(dat, status)) || + !CLVM_GetContactHiddenStatus(hContact, szProto, dat)) && ((cfg::dat.bFilterEffective ? TRUE : !Clist_IsHiddenMode(dat, status)) || Clist_GetContactIcon(hContact) != lParam); // XXX CLVM changed - this means an offline msg is flashing, so the contact should be shown if (!Clist_FindItem(hwnd, dat, hContact, &contact, &group, nullptr)) { @@ -349,7 +349,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L } else { contact->iImage = (WORD)lParam; - if (!pcli->pfnIsHiddenMode(dat, status)) + if (!Clist_IsHiddenMode(dat, status)) contact->flags |= CONTACTF_ONLINE; else contact->flags &= ~CONTACTF_ONLINE; diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index 56c949f004..70366defc4 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -497,7 +497,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam // this means an offline msg is flashing, so the contact should be shown DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE); int shouldShow = (style & CLS_SHOWHIDDEN || !db_get_b(wParam, "CList", "Hidden", 0)) - && (!cli.pfnIsHiddenMode(dat, status) || Clist_GetContactIcon(wParam) != lParam); + && (!Clist_IsHiddenMode(dat, status) || Clist_GetContactIcon(wParam) != lParam); contact = nullptr; group = nullptr; @@ -524,7 +524,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam } else { contact->iImage = (WORD)lParam; - if (!cli.pfnIsHiddenMode(dat, status)) + if (!Clist_IsHiddenMode(dat, status)) contact->flags |= CONTACTF_ONLINE; else contact->flags &= ~CONTACTF_ONLINE; diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index e34514a267..66d574496c 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -89,7 +89,6 @@ void fnBeginRenameSelection(HWND hwnd, struct ClcData *dat); void fnCalcEipPosition(struct ClcData *dat, ClcContact *contact, ClcGroup *group, POINT *result); int fnGetDropTargetInformation(HWND hwnd, struct ClcData *dat, POINT pt); int fnClcStatusToPf2(int status); -int fnIsHiddenMode(struct ClcData *dat, int status); void fnGetDefaultFontSetting(int i, LOGFONT *lf, COLORREF *colour); void fnLoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst); diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp index 27c846d2f8..d43373dc82 100644 --- a/src/mir_app/src/clcitems.cpp +++ b/src/mir_app/src/clcitems.cpp @@ -190,7 +190,7 @@ ClcContact* fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact cc->hContact = hContact; cc->proto = szProto; cc->pce = pce; - if (szProto != nullptr && !cli.pfnIsHiddenMode(dat, db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE))) + if (szProto != nullptr && !Clist_IsHiddenMode(dat, db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE))) cc->flags |= CONTACTF_ONLINE; WORD apparentMode = szProto != nullptr ? db_get_w(hContact, szProto, "ApparentMode", 0) : 0; if (apparentMode == ID_STATUS_OFFLINE) @@ -233,7 +233,7 @@ void fnAddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTo if (!(style & CLS_HIDEEMPTYGROUPS)) return; - if (checkHideOffline && cli.pfnIsHiddenMode(dat, status)) { + if (checkHideOffline && Clist_IsHiddenMode(dat, status)) { for (i = 1;; i++) { wchar_t *szGroupName = Clist_GroupGetName(i, &groupFlags); if (szGroupName == nullptr) @@ -262,7 +262,7 @@ void fnAddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTo } if (checkHideOffline) { - if (cli.pfnIsHiddenMode(dat, status) && (style & CLS_HIDEOFFLINE || group->hideOffline)) { + if (Clist_IsHiddenMode(dat, status) && (style & CLS_HIDEOFFLINE || group->hideOffline)) { if (updateTotalCount) group->totalMembers++; return; @@ -390,10 +390,10 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat) else if (!(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) { char *szProto = GetContactProto(hContact); if (szProto == nullptr) { - if (!cli.pfnIsHiddenMode(dat, ID_STATUS_OFFLINE) || cli.pfnIsVisibleContact(pce, group)) + if (!Clist_IsHiddenMode(dat, ID_STATUS_OFFLINE) || cli.pfnIsVisibleContact(pce, group)) cli.pfnAddContactToGroup(dat, group, hContact); } - else if (!cli.pfnIsHiddenMode(dat, db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)) || cli.pfnIsVisibleContact(pce, group)) + else if (!Clist_IsHiddenMode(dat, db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)) || cli.pfnIsVisibleContact(pce, group)) cli.pfnAddContactToGroup(dat, group, hContact); } else cli.pfnAddContactToGroup(dat, group, hContact); diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index 57a4f4f5f9..02fe60392c 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -630,7 +630,7 @@ int fnClcStatusToPf2(int status) return 0; } -int fnIsHiddenMode(ClcData *dat, int status) +MIR_APP_DLL(int) Clist_IsHiddenMode(ClcData *dat, int status) { return dat->offlineModes & cli.pfnClcStatusToPf2(status); } diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index 8cbb0b23ac..a54dc5bf21 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -106,9 +106,8 @@ void InitClistCore() cli.pfnCalcEipPosition = fnCalcEipPosition; cli.pfnGetDropTargetInformation = fnGetDropTargetInformation; cli.pfnClcStatusToPf2 = fnClcStatusToPf2; - cli.pfnIsHiddenMode = fnIsHiddenMode; - cli.pfnIsVisibleContact = fnIsVisibleContact; + cli.pfnIsVisibleContact = fnIsVisibleContact; cli.pfnGetDefaultFontSetting = fnGetDefaultFontSetting; cli.pfnLoadClcOptions = fnLoadClcOptions; cli.pfnGetRowBottomY = fnGetRowBottomY; diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index d556c0ea3d..5044329303 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -564,3 +564,4 @@ Clist_GetFontSetting @583 Clist_GetDefaultExStyle @584 Clist_NotifyNewContact @585 Clist_HideInfoTip @586 +Clist_IsHiddenMode @587 diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index e4fdc729e1..204cefa262 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -564,3 +564,4 @@ Clist_GetFontSetting @583 Clist_GetDefaultExStyle @584 Clist_NotifyNewContact @585 Clist_HideInfoTip @586 +Clist_IsHiddenMode @587 -- cgit v1.2.3