From 1a6ae4dcc2b3e20baf392127d590d02e855ba357 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 6 Apr 2018 19:50:12 +0300 Subject: CLIST_INTERFACE::pfnNotifyNewContact => Clist_NotifyNewContact --- include/delphi/m_clistint.inc | 2 +- include/m_clistint.h | 3 ++- libs/win32/mir_app.lib | Bin 151866 -> 152120 bytes libs/win64/mir_app.lib | Bin 147236 -> 147472 bytes plugins/Clist_blind/src/clcopts.cpp | 29 +++++++++++------------------ plugins/Clist_modern/src/modern_clc.cpp | 2 +- plugins/Clist_nicer/src/clc.cpp | 2 +- src/mir_app/src/clc.cpp | 6 +++--- src/mir_app/src/clc.h | 1 - src/mir_app/src/clcutils.cpp | 2 +- src/mir_app/src/clistcore.cpp | 1 - src/mir_app/src/mir_app.def | 1 + src/mir_app/src/mir_app64.def | 1 + 13 files changed, 22 insertions(+), 28 deletions(-) diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc index e10a4a4d32..ff05bde11a 100644 --- a/include/delphi/m_clistint.inc +++ b/include/delphi/m_clistint.inc @@ -355,7 +355,7 @@ type pfnClcStatusToPf2 : function (status:int):int; cdecl; pfnIsHiddenMode : function (var dat:TClcData; status:int):int; cdecl; pfnHideInfoTip : procedure (hwnd:HWND; var dat:TClcData); cdecl; - pfnNotifyNewContact : procedure (hwnd:HWND; hContact:TMCONTACT); cdecl; + blablablabla9 : procedure; cdecl; blablablabla8 : procedure; cdecl; pfnGetDefaultFontSetting : procedure (i:int; var lf:LOGFONT; var colour:COLORREF); cdecl; pfnLoadClcOptions : procedure (hwnd:HWND; var dat:TClcData; bFirst: int); cdecl; diff --git a/include/m_clistint.h b/include/m_clistint.h index f2a75b00c9..ec852fa122 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_InitAutoRebuild(HWND hWnd); EXTERN_C MIR_APP_DLL(void) Clist_InvalidateItem(HWND hwnd, ClcData *dat, int iItem); 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); EXTERN_C MIR_APP_DLL(void) Clist_SetGroupChildCheckboxes(ClcGroup *group, int checked); @@ -367,7 +368,7 @@ struct CLIST_INTERFACE int (*pfnClcStatusToPf2)(int status); int (*pfnIsHiddenMode)(ClcData *dat, int status); void (*pfnHideInfoTip)(HWND hwnd, ClcData *dat); - void (*pfnNotifyNewContact)(HWND hwnd, MCONTACT hContact); + void (*blablablabla9)(); void (*blablablabla8)(); void (*pfnGetDefaultFontSetting)(int i, LOGFONT *lf, COLORREF *colour); void (*pfnLoadClcOptions)(HWND hwnd, ClcData *dat, BOOL bFirst); diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib index 3d75f604a4..8946abe871 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 499274c6b4..cf129a5cdd 100644 Binary files a/libs/win64/mir_app.lib and b/libs/win64/mir_app.lib differ diff --git a/plugins/Clist_blind/src/clcopts.cpp b/plugins/Clist_blind/src/clcopts.cpp index 20d98c0557..8abc59289a 100644 --- a/plugins/Clist_blind/src/clcopts.cpp +++ b/plugins/Clist_blind/src/clcopts.cpp @@ -37,19 +37,15 @@ struct CheckBoxToStyleEx_t int not; } -static const checkBoxToStyleEx[] = { -// {IDC_DISABLEDRAGDROP, CLS_EX_DISABLEDRAGDROP, 0}, -// {IDC_NOTEDITLABELS, CLS_EX_EDITLABELS, 1}, -// {IDC_SHOWSELALWAYS, CLS_EX_SHOWSELALWAYS, 0}, - {IDC_TRACKSELECT, CLS_EX_TRACKSELECT, 0}, - {IDC_SHOWGROUPCOUNTS, CLS_EX_SHOWGROUPCOUNTS, 0}, - {IDC_HIDECOUNTSWHENEMPTY, CLS_EX_HIDECOUNTSWHENEMPTY, 0}, -// {IDC_DIVIDERONOFF, CLS_EX_DIVIDERONOFF, 0}, -// {IDC_NOTNOTRANSLUCENTSEL, CLS_EX_NOTRANSLUCENTSEL, 1}, - {IDC_LINEWITHGROUPS, CLS_EX_LINEWITHGROUPS, 0}, - {IDC_QUICKSEARCHVISONLY, CLS_EX_QUICKSEARCHVISONLY, 0}, - {IDC_SORTGROUPSALPHA, CLS_EX_SORTGROUPSALPHA, 0}, - {IDC_NOTNOSMOOTHSCROLLING, CLS_EX_NOSMOOTHSCROLLING, 1} +static const checkBoxToStyleEx[] = +{ + { IDC_TRACKSELECT, CLS_EX_TRACKSELECT, 0 }, + { IDC_SHOWGROUPCOUNTS, CLS_EX_SHOWGROUPCOUNTS, 0 }, + { IDC_HIDECOUNTSWHENEMPTY, CLS_EX_HIDECOUNTSWHENEMPTY, 0 }, + { IDC_LINEWITHGROUPS, CLS_EX_LINEWITHGROUPS, 0 }, + { IDC_QUICKSEARCHVISONLY, CLS_EX_QUICKSEARCHVISONLY, 0 }, + { IDC_SORTGROUPSALPHA, CLS_EX_SORTGROUPSALPHA, 0 }, + { IDC_NOTNOSMOOTHSCROLLING, CLS_EX_NOSMOOTHSCROLLING, 1 } }; struct CheckBoxValues_t @@ -128,12 +124,9 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES); { - int i; DWORD exStyle = db_get_dw(NULL, "CLC", "ExStyle", Clist_GetDefaultExStyle()); - for (i = 0; i < _countof(checkBoxToStyleEx); i++) - CheckDlgButton(hwndDlg, checkBoxToStyleEx[i].id, - (exStyle & checkBoxToStyleEx[i].flag) ^ (checkBoxToStyleEx[i].flag * - checkBoxToStyleEx[i].not) ? BST_CHECKED : BST_UNCHECKED); + for (auto &it : checkBoxToStyleEx) + CheckDlgButton(hwndDlg, it.id, (exStyle & it.flag) ^ (it.flag * it.not) ? BST_CHECKED : BST_UNCHECKED); } { UDACCEL accel[2] = { {0, 10} , {2, 50} }; diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 0aa55e9858..2f73560dd5 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1351,7 +1351,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam if (contact) { contact->iImage = lParam; contact->bImageIsSpecial = bImageIsSpecial; - pcli->pfnNotifyNewContact(hwnd, wParam); + Clist_NotifyNewContact(hwnd, wParam); dat->bNeedsResort = true; } } diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index ca0c6c673c..e4598bb954 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -331,7 +331,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L Clist_FindItem(hwnd, dat, hContact, &contact, nullptr, nullptr); if (contact) { contact->iImage = (WORD)lParam; - pcli->pfnNotifyNewContact(hwnd, hContact); + Clist_NotifyNewContact(hwnd, hContact); } } } diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index c2b0efeadf..e3a10a32f8 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -424,7 +424,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam case INTM_CONTACTADDED: cli.pfnAddContactToTree(hwnd, dat, wParam, 1, 1); - cli.pfnNotifyNewContact(hwnd, wParam); + Clist_NotifyNewContact(hwnd, wParam); SortClcByTimer(hwnd); break; @@ -442,7 +442,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam if (Clist_FindItem(hwnd, dat, wParam, nullptr, nullptr, nullptr)) break; cli.pfnAddContactToTree(hwnd, dat, wParam, 1, 1); - cli.pfnNotifyNewContact(hwnd, wParam); + Clist_NotifyNewContact(hwnd, wParam); } else cli.pfnDeleteItemFromTree(hwnd, wParam); @@ -509,7 +509,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam Clist_FindItem(hwnd, dat, wParam, &contact, nullptr, nullptr); if (contact) { contact->iImage = (WORD)lParam; - cli.pfnNotifyNewContact(hwnd, wParam); + Clist_NotifyNewContact(hwnd, wParam); dat->bNeedsResort = true; } } diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index 46f95c5d5a..6da7cbae76 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -91,7 +91,6 @@ int fnGetDropTargetInformation(HWND hwnd, struct ClcData *dat, POINT pt); int fnClcStatusToPf2(int status); int fnIsHiddenMode(struct ClcData *dat, int status); void fnHideInfoTip(HWND hwnd, struct ClcData *dat); -void fnNotifyNewContact(HWND hwnd, MCONTACT hContact); void fnGetDefaultFontSetting(int i, LOGFONT *lf, COLORREF *colour); void fnLoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst); void fnSetContactCheckboxes(ClcContact *cc, int checked); diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index 1e41121b0e..fb21c93e7b 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -648,7 +648,7 @@ void fnHideInfoTip(HWND, ClcData *dat) NotifyEventHooks(hHideInfoTipEvent, 0, (LPARAM)&it); } -void fnNotifyNewContact(HWND hwnd, MCONTACT hContact) +MIR_APP_DLL(void) Clist_NotifyNewContact(HWND hwnd, MCONTACT hContact) { NMCLISTCONTROL nm; nm.hdr.code = CLN_NEWCONTACT; diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index ba3ebdbf46..28a1171b96 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -109,7 +109,6 @@ void InitClistCore() cli.pfnIsHiddenMode = fnIsHiddenMode; cli.pfnIsVisibleContact = fnIsVisibleContact; cli.pfnHideInfoTip = fnHideInfoTip; - cli.pfnNotifyNewContact = fnNotifyNewContact; 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 7847920997..284713443f 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -562,3 +562,4 @@ Clist_SetGroupChildCheckboxes @581 Clist_RecalculateGroupCheckboxes @582 Clist_GetFontSetting @583 Clist_GetDefaultExStyle @584 +Clist_NotifyNewContact @585 diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 33dfe19f1c..bb3890fc94 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -562,3 +562,4 @@ Clist_SetGroupChildCheckboxes @581 Clist_RecalculateGroupCheckboxes @582 Clist_GetFontSetting @583 Clist_GetDefaultExStyle @584 +Clist_NotifyNewContact @585 -- cgit v1.2.3