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 --- 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 + 7 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') 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