From 0c8a93e6411035f6a1ca9e6537a6d569711cf4c3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 11 Dec 2014 13:42:27 +0000 Subject: garbage collection: dead params, unused variables etc git-svn-id: http://svn.miranda-ng.org/main/trunk@11328 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/Include/clc.h | 42 ++++++++------ plugins/Clist_nicer/src/Include/rowheight_funcs.h | 71 ++++++++++------------- 2 files changed, 54 insertions(+), 59 deletions(-) (limited to 'plugins/Clist_nicer/src/Include') diff --git a/plugins/Clist_nicer/src/Include/clc.h b/plugins/Clist_nicer/src/Include/clc.h index 9294481495..9e0b3bf50a 100644 --- a/plugins/Clist_nicer/src/Include/clc.h +++ b/plugins/Clist_nicer/src/Include/clc.h @@ -321,13 +321,15 @@ struct TCluiData { #define SORTBY_FREQUENCY 5 #define SORTBY_PRIOCONTACTS 6 -struct IconDesc { +struct IconDesc +{ char *szName; char *szDesc; int uId; // icon ID }; -struct NotifyMenuItemExData { +struct NotifyMenuItemExData +{ MCONTACT hContact; int iIcon; // icon index in the image list HICON hIcon; // corresponding icon handle @@ -336,7 +338,8 @@ struct NotifyMenuItemExData { // #define NOTIFY_HEIGHT 24 -struct CluiTopButton { +struct CluiTopButton +{ int ctrlid; char *pszButtonID, *pszButtonDn, *pszButtonName; int isPush, isVis, isAction; @@ -344,32 +347,35 @@ struct CluiTopButton { HWND hwndButton; }; -struct TrayIconInfo { - union { +struct TrayIconInfo +{ + union + { HICON hIcon; int iIcon; }; }; -typedef struct { +struct protoMenu +{ char protoName[50]; UINT menuID; BOOL added; HICON hIcon; -} protoMenu; +}; -//clcidents.c +// clcidents.c int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible); HANDLE ContactToItemHandle(ClcContact *contact, DWORD *nmFlags); -//clcitems.c +// clcitems.c void RebuildEntireList(HWND hwnd, struct ClcData *dat); DWORD INTSORT_GetLastMsgTime(MCONTACT hContact); -//clcmsgs.c +// clcmsgs.c LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam); -//clcutils.c +// clcutils.c void SetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newState); void DoSelectionDefaultAction(HWND hwnd, struct ClcData *dat); int FindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefixOk); @@ -396,7 +402,7 @@ void GetExtendedInfo(ClcContact *contact, struct ClcData *dat); extern LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); void HideShowNotifyFrame(); DWORD GetCLUIWindowStyle(BYTE style); -void ApplyCLUIBorderStyle(HWND hwnd); +void ApplyCLUIBorderStyle(); int FrameNCCalcSize(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, BOOL hasTitleBar); int FrameNCPaint(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, BOOL hasTitleBar); @@ -405,14 +411,14 @@ void FreeProtocolData( void ); void GetClientID(ClcContact *contact, char *client); int LoadCLCButtonModule(void); -void SetButtonStates(HWND hwnd); +void SetButtonStates(); void ConfigureCLUIGeometry(int mode); void IcoLibReloadIcons(); int CompareContacts(const ClcContact* p1, const ClcContact* p2); void PaintNotifyArea(HDC hDC, RECT *rc); int AvatarChanged(WPARAM wParam, LPARAM lParam); void ConfigureFrame(); -void ConfigureEventArea(HWND hwnd); +void ConfigureEventArea(); void ClearIcons(int mode); void SkinDrawBg(HWND hwnd, HDC hdc); int GetBasicFontID(ClcContact * contact); @@ -426,7 +432,7 @@ void ApplyViewMode(const char *name); void ClcSetButtonState(int ctrlId, int status); HWND ClcGetButtonWindow(int ctrlid); -//clcpaint.c +// clcpaint.c void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT *rcPaint); void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int indent, int y, struct ClcData *dat, int index, HWND hwnd, DWORD style, RECT *clRect, BOOL *bFirstNGdrawn, int groupCountsFontTopShift, int rowHeight); void Reload3dBevelColors(); @@ -437,12 +443,12 @@ void RTL_DetectGroupName(ClcContact *group); void CLN_LoadAllIcons(BOOL mode); void ReloadSkinItemsToCache(); -//clcopts.c +// clcopts.c int ClcOptInit(WPARAM wParam, LPARAM lParam); void GetFontSetting(int i, LOGFONTA *lf, COLORREF *colour); -void CluiProtocolStatusChanged( int parStatus, const char* szProto ); +void CluiProtocolStatusChanged(int, const char*); -void LoadSkinItemToCache(struct TExtraCache *cEntry, const char *szProto); +void LoadSkinItemToCache(struct TExtraCache *cEntry); // debugging support diff --git a/plugins/Clist_nicer/src/Include/rowheight_funcs.h b/plugins/Clist_nicer/src/Include/rowheight_funcs.h index d2292e6e5a..60a0998e1c 100644 --- a/plugins/Clist_nicer/src/Include/rowheight_funcs.h +++ b/plugins/Clist_nicer/src/Include/rowheight_funcs.h @@ -4,58 +4,50 @@ #define ROW_SPACE_BEETWEEN_LINES 0 #define ICON_HEIGHT 16 -class RowHeight { - +class RowHeight +{ public: - static BOOL Alloc (ClcData *dat, int size); - static BOOL Init (ClcData *dat); - static void Free (ClcData *dat); - static void Clear (ClcData *dat); + static BOOL Alloc(ClcData *dat, int size); + static BOOL Init(ClcData *dat); + static void Free(ClcData *dat); + static void Clear(ClcData *dat); // Calc and store max row height - static int getMaxRowHeight (ClcData *dat, const HWND hwnd); - + static int getMaxRowHeight(ClcData *dat, const HWND hwnd); // Calc and store row height - static int getRowHeight (ClcData *dat, const HWND hwnd, ClcContact* contact, int item, DWORD style) + static int getRowHeight(ClcData *dat, ClcContact* contact, int item, DWORD style) { - int height = 0; - //DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE); - - //if (contact->iRowHeight == item) - // return(dat->row_heights[item]); - - if ( !Alloc(dat, item + 1)) + if (!Alloc(dat, item + 1)) return -1; - height = dat->fontInfo[GetBasicFontID(contact)].fontHeight; + int height = dat->fontInfo[GetBasicFontID(contact)].fontHeight; - if ( !dat->bisEmbedded) { - if (contact->bSecondLine != MULTIROW_NEVER && contact->bSecondLine != MULTIROW_IFSPACE && contact->type == CLCIT_CONTACT) { - if ((contact->bSecondLine == MULTIROW_ALWAYS || ((cfg::dat.dwFlags & CLUI_FRAME_SHOWSTATUSMSG && contact->bSecondLine == MULTIROW_IFNEEDED) && (contact->xStatus > 0 || contact->pExtra->bStatusMsgValid > STATUSMSG_XSTATUSID)))) - height += (dat->fontInfo[FONTID_STATUS].fontHeight + cfg::dat.avatarPadding); - } + if (!dat->bisEmbedded) { + if (contact->bSecondLine != MULTIROW_NEVER && contact->bSecondLine != MULTIROW_IFSPACE && contact->type == CLCIT_CONTACT) { + if ((contact->bSecondLine == MULTIROW_ALWAYS || ((cfg::dat.dwFlags & CLUI_FRAME_SHOWSTATUSMSG && contact->bSecondLine == MULTIROW_IFNEEDED) && (contact->xStatus > 0 || contact->pExtra->bStatusMsgValid > STATUSMSG_XSTATUSID)))) + height += (dat->fontInfo[FONTID_STATUS].fontHeight + cfg::dat.avatarPadding); + } - // Avatar size - if (contact->cFlags & ECF_AVATAR && contact->type == CLCIT_CONTACT && contact->ace != NULL && !(contact->ace->dwFlags & AVS_HIDEONCLIST)) - height = max(height, cfg::dat.avatarSize + cfg::dat.avatarPadding); - } + // Avatar size + if (contact->cFlags & ECF_AVATAR && contact->type == CLCIT_CONTACT && contact->ace != NULL && !(contact->ace->dwFlags & AVS_HIDEONCLIST)) + height = max(height, cfg::dat.avatarSize + cfg::dat.avatarPadding); + } - // Checkbox size - if ((style&CLS_CHECKBOXES && contact->type==CLCIT_CONTACT) || - (style&CLS_GROUPCHECKBOXES && contact->type==CLCIT_GROUP) || - (contact->type==CLCIT_INFO && contact->flags&CLCIIF_CHECKBOX)) - { - height = max(height, dat->checkboxSize); - } + // Checkbox size + if ((style & CLS_CHECKBOXES && contact->type == CLCIT_CONTACT) || + (style & CLS_GROUPCHECKBOXES && contact->type == CLCIT_GROUP) || + (contact->type == CLCIT_INFO && contact->flags & CLCIIF_CHECKBOX)) { + height = max(height, dat->checkboxSize); + } - //height += 2 * dat->row_border; - // Min size - height = max(height, contact->type == CLCIT_GROUP ? dat->group_row_height : dat->min_row_heigh); - height += cfg::dat.bRowSpacing; + //height += 2 * dat->row_border; + // Min size + height = max(height, contact->type == CLCIT_GROUP ? dat->group_row_height : dat->min_row_heigh); + height += cfg::dat.bRowSpacing; dat->row_heights[item] = height; - //contact->iRowHeight = item; + //contact->iRowHeight = item; return height; } @@ -77,9 +69,6 @@ public: // Returns the height of the chosen row static int getHeight (ClcData *dat, int item); - - // returns the height for a floating contact - static int getFloatingRowHeight(const ClcData *dat, HWND hwnd, ClcContact *contact, DWORD dwFlags); }; #endif // __ROWHEIGHT_FUNCS_H__ -- cgit v1.2.3