summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-05-05 20:21:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-05-05 20:21:34 +0000
commitc492ee8fbc407bff76f58a30b2445d230ca0cdee (patch)
treecdfe06cc52c0b13313d2a86d81ba534aecf5bec5
parentebc84ea42d86c4fab45ede823ffc4bc55529bc35 (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16804 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--src/mir_app/src/BaseExtraIcon.cpp7
-rw-r--r--src/mir_app/src/ExtraIcon.h1
-rw-r--r--src/mir_app/src/clc.cpp4
-rw-r--r--src/mir_app/src/clcfiledrop.cpp14
-rw-r--r--src/mir_app/src/clcidents.cpp4
-rw-r--r--src/mir_app/src/clcitems.cpp14
-rw-r--r--src/mir_app/src/clcmsgs.cpp11
-rw-r--r--src/mir_app/src/clcutils.cpp52
-rw-r--r--src/mir_app/src/extraicons.cpp14
9 files changed, 58 insertions, 63 deletions
diff --git a/src/mir_app/src/BaseExtraIcon.cpp b/src/mir_app/src/BaseExtraIcon.cpp
index 4503a85ed9..2ff3beaf3f 100644
--- a/src/mir_app/src/BaseExtraIcon.cpp
+++ b/src/mir_app/src/BaseExtraIcon.cpp
@@ -29,8 +29,7 @@ BaseExtraIcon::BaseExtraIcon(int id, const char *name, const TCHAR *description,
m_OnClick(OnClick),
m_onClickParam(param),
m_tszDescription(mir_tstrdup(description)),
- m_szDescIcon(mir_strdup(descIcon)),
- m_hOldImage(INVALID_HANDLE_VALUE)
+ m_szDescIcon(mir_strdup(descIcon))
{
}
@@ -77,10 +76,6 @@ void BaseExtraIcon::onClick(MCONTACT hContact)
int BaseExtraIcon::ClistSetExtraIcon(MCONTACT hContact, HANDLE hImage)
{
- if (hImage == m_hOldImage)
- return 0;
-
- m_hOldImage = hImage;
ExtraIcon *tmp = extraIconsByHandle[m_id - 1];
if (tmp != this)
return tmp->ClistSetExtraIcon(hContact, hImage);
diff --git a/src/mir_app/src/ExtraIcon.h b/src/mir_app/src/ExtraIcon.h
index 26cc63133c..3d00bf5a04 100644
--- a/src/mir_app/src/ExtraIcon.h
+++ b/src/mir_app/src/ExtraIcon.h
@@ -93,7 +93,6 @@ protected:
ptrA m_szDescIcon;
MIRANDAHOOKPARAM m_OnClick;
LPARAM m_onClickParam;
- HANDLE m_hOldImage;
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index 6169fef209..7a5b558588 100644
--- a/src/mir_app/src/clc.cpp
+++ b/src/mir_app/src/clc.cpp
@@ -238,7 +238,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
DWORD hitFlags;
int hit;
- ClcData *dat = (struct ClcData *) GetWindowLongPtr(hwnd, 0);
+ ClcData *dat = (ClcData *) GetWindowLongPtr(hwnd, 0);
if (uMsg >= CLM_FIRST && uMsg < CLM_LAST)
return cli.pfnProcessExternalMessages(hwnd, dat, uMsg, wParam, lParam);
@@ -247,7 +247,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
WindowList_Add(hClcWindowList, hwnd, NULL);
cli.pfnRegisterFileDropping(hwnd);
if (dat == NULL) {
- dat = (struct ClcData *) mir_calloc(sizeof(struct ClcData));
+ dat = (ClcData *) mir_calloc(sizeof(ClcData));
SetWindowLongPtr(hwnd, 0, (LONG_PTR)dat);
}
{
diff --git a/src/mir_app/src/clcfiledrop.cpp b/src/mir_app/src/clcfiledrop.cpp
index 4a7ca90c82..4f91d76d17 100644
--- a/src/mir_app/src/clcfiledrop.cpp
+++ b/src/mir_app/src/clcfiledrop.cpp
@@ -70,7 +70,7 @@ ULONG CDropTarget::Release(void)
return InterlockedDecrement(&refCount);
}
-static MCONTACT HContactFromPoint(HWND hwnd, struct ClcData *dat, int x, int y, int *hitLine)
+static MCONTACT HContactFromPoint(HWND hwnd, ClcData *dat, int x, int y, int *hitLine)
{
DWORD hitFlags;
ClcContact *contact;
@@ -95,7 +95,6 @@ static MCONTACT HContactFromPoint(HWND hwnd, struct ClcData *dat, int x, int y,
HRESULT CDropTarget::DragOver(DWORD /*grfKeyState*/, POINTL pt, DWORD * pdwEffect)
{
POINT shortPt;
- struct ClcData *dat;
RECT clRect;
int hit;
MCONTACT hContact;
@@ -109,7 +108,7 @@ HRESULT CDropTarget::DragOver(DWORD /*grfKeyState*/, POINTL pt, DWORD * pdwEffec
return S_OK;
}
cli.pfnTrayIconPauseAutoHide(0, 0);
- dat = (struct ClcData *) GetWindowLongPtr(hwndCurrentDrag, 0);
+ ClcData *dat = (ClcData *) GetWindowLongPtr(hwndCurrentDrag, 0);
shortPt.x = pt.x;
shortPt.y = pt.y;
ScreenToClient(hwndCurrentDrag, &shortPt);
@@ -149,9 +148,8 @@ HRESULT CDropTarget::DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL
hwnd = WindowFromPoint(shortPt);
GetClassName(hwnd, szWindowClass, _countof(szWindowClass));
if (!mir_tstrcmp(szWindowClass, _T(CLISTCONTROL_CLASS))) {
- struct ClcData *dat;
hwndCurrentDrag = hwnd;
- dat = (struct ClcData *) GetWindowLongPtr(hwndCurrentDrag, 0);
+ ClcData *dat = (ClcData *) GetWindowLongPtr(hwndCurrentDrag, 0);
originalSelection = dat->selection;
dat->showSelAlways = 1;
}
@@ -163,10 +161,9 @@ HRESULT CDropTarget::DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL
HRESULT CDropTarget::DragLeave(void)
{
if (hwndCurrentDrag) {
- struct ClcData *dat;
if (pDropTargetHelper)
pDropTargetHelper->DragLeave();
- dat = (struct ClcData *) GetWindowLongPtr(hwndCurrentDrag, 0);
+ ClcData *dat = (ClcData *) GetWindowLongPtr(hwndCurrentDrag, 0);
dat->showSelAlways = 0;
dat->selection = originalSelection;
cli.pfnInvalidateRect(hwndCurrentDrag, NULL, FALSE);
@@ -206,7 +203,6 @@ HRESULT CDropTarget::Drop(IDataObject * pDataObj, DWORD /*fKeyState*/, POINTL pt
STGMEDIUM stg;
HDROP hDrop;
POINT shortPt;
- struct ClcData *dat;
if (pDropTargetHelper && hwndCurrentDrag)
pDropTargetHelper->Drop(pDataObj, (POINT*)&pt, *pdwEffect);
@@ -215,7 +211,7 @@ HRESULT CDropTarget::Drop(IDataObject * pDataObj, DWORD /*fKeyState*/, POINTL pt
if (hwndCurrentDrag == NULL || S_OK != pDataObj->GetData(&fe, &stg))
return S_OK;
hDrop = (HDROP) stg.hGlobal;
- dat = (struct ClcData *) GetWindowLongPtr(hwndCurrentDrag, 0);
+ ClcData *dat = (ClcData *) GetWindowLongPtr(hwndCurrentDrag, 0);
shortPt.x = pt.x;
shortPt.y = pt.y;
diff --git a/src/mir_app/src/clcidents.cpp b/src/mir_app/src/clcidents.cpp
index 1048038b42..ff377d900f 100644
--- a/src/mir_app/src/clcidents.cpp
+++ b/src/mir_app/src/clcidents.cpp
@@ -74,7 +74,7 @@ int fnGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex)
return -1;
}
-int fnFindItem(HWND hwnd, struct ClcData *dat, DWORD dwItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible)
+int fnFindItem(HWND hwnd, ClcData *dat, DWORD dwItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible)
{
int index = 0;
int nowVisible = 1;
@@ -142,7 +142,7 @@ int fnFindItem(HWND hwnd, struct ClcData *dat, DWORD dwItem, ClcContact **contac
return 0;
}
-int fnGetRowByIndex(struct ClcData *dat, int testindex, ClcContact **contact, ClcGroup **subgroup)
+int fnGetRowByIndex(ClcData *dat, int testindex, ClcContact **contact, ClcGroup **subgroup)
{
int index = 0;
ClcGroup *group = &dat->list;
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp
index 2016cb34e5..5342c3b5b3 100644
--- a/src/mir_app/src/clcitems.cpp
+++ b/src/mir_app/src/clcitems.cpp
@@ -39,7 +39,7 @@ int fnAddItemToGroup(ClcGroup *group, int iAboveItem)
return iAboveItem;
}
-ClcGroup* fnAddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers)
+ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers)
{
TCHAR *pBackslash, *pNextField, szThisField[ _countof(dat->list.cl.items[0]->szText) ];
ClcGroup *group = &dat->list;
@@ -171,7 +171,7 @@ int fnAddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText)
return i;
}
-int fnAddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact)
+int fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact)
{
int i, index = -1;
@@ -216,7 +216,7 @@ int fnAddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact)
return i;
}
-void fnAddContactToTree(HWND hwnd, struct ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline)
+void fnAddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline)
{
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
WORD status = ID_STATUS_OFFLINE;
@@ -344,7 +344,7 @@ void fnDeleteItemFromTree(HWND hwnd, MCONTACT hItem)
else cli.pfnRemoveItemFromGroup(hwnd, group, contact, 1);
}
-void fnRebuildEntireList(HWND hwnd, struct ClcData *dat)
+void fnRebuildEntireList(HWND hwnd, ClcData *dat)
{
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
ClcGroup *group;
@@ -484,7 +484,7 @@ static void InsertionSort(ClcContact **pContactArray, int nArray, int (*CompareP
}
}
-static void SortGroup(struct ClcData *dat, ClcGroup *group, int useInsertionSort)
+static void SortGroup(ClcData *dat, ClcGroup *group, int useInsertionSort)
{
int i, sortCount;
@@ -540,7 +540,7 @@ static void SortGroup(struct ClcData *dat, ClcGroup *group, int useInsertionSort
}
}
-void fnSortCLC(HWND hwnd, struct ClcData *dat, int useInsertionSort)
+void fnSortCLC(HWND hwnd, ClcData *dat, int useInsertionSort)
{
ClcGroup *group = &dat->list;
@@ -598,7 +598,7 @@ struct SavedInfoState_t
ClcContact contact;
};
-void fnSaveStateAndRebuildList(HWND hwnd, struct ClcData *dat)
+void fnSaveStateAndRebuildList(HWND hwnd, ClcData *dat)
{
NMCLISTCONTROL nm;
int i, j;
diff --git a/src/mir_app/src/clcmsgs.cpp b/src/mir_app/src/clcmsgs.cpp
index 9f35437b3c..089f780a15 100644
--- a/src/mir_app/src/clcmsgs.cpp
+++ b/src/mir_app/src/clcmsgs.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// processing of all the CLM_ messages incoming
-LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam)
+LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam)
{
ClcContact *contact;
ClcGroup *group;
@@ -336,9 +336,14 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR
break;
case CLM_SETEXTRAIMAGE:
- if (LOWORD(lParam) < dat->extraColumnsCount)
- if (cli.pfnFindItem(hwnd, dat, wParam, &contact, NULL, NULL))
+ if (LOWORD(lParam) < dat->extraColumnsCount) {
+ int bVisible;
+ if (cli.pfnFindItem(hwnd, dat, wParam, &contact, NULL, &bVisible)) {
contact->iExtraImage[LOWORD(lParam)] = HIWORD(lParam);
+ if (bVisible)
+ cli.pfnInvalidateRect(hwnd, NULL, FALSE);
+ }
+ }
break;
case CLM_SETEXTRAIMAGELIST:
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp
index 8c52cd2b6f..1e89d3e202 100644
--- a/src/mir_app/src/clcutils.cpp
+++ b/src/mir_app/src/clcutils.cpp
@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern HANDLE hHideInfoTipEvent;
-TCHAR* fnGetGroupCountsText(struct ClcData *dat, ClcContact *contact)
+TCHAR* fnGetGroupCountsText(ClcData *dat, ClcContact *contact)
{
if (contact->type != CLCIT_GROUP || !(dat->exStyle & CLS_EX_SHOWGROUPCOUNTS))
return _T("");
@@ -63,7 +63,7 @@ TCHAR* fnGetGroupCountsText(struct ClcData *dat, ClcContact *contact)
return szName;
}
-int fnHitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD * flags)
+int fnHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD * flags)
{
ClcContact *hitcontact = NULL;
ClcGroup *hitgroup = NULL;
@@ -189,7 +189,7 @@ int fnHitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact *
return -1;
}
-void fnScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth)
+void fnScrollTo(HWND hwnd, ClcData *dat, int desty, int noSmooth)
{
int oldy = dat->yScroll;
@@ -239,7 +239,7 @@ void fnScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth)
SetScrollPos(hwnd, SB_VERT, dat->yScroll, TRUE);
}
-void fnEnsureVisible(HWND hwnd, struct ClcData *dat, int iItem, int partialOk)
+void fnEnsureVisible(HWND hwnd, ClcData *dat, int iItem, int partialOk)
{
int itemy = cli.pfnGetRowTopY(dat, iItem), itemh = cli.pfnGetRowHeight(dat, iItem), newY = 0;
int moved = 0;
@@ -270,7 +270,7 @@ void fnEnsureVisible(HWND hwnd, struct ClcData *dat, int iItem, int partialOk)
cli.pfnScrollTo(hwnd, dat, newY, 0);
}
-void fnRecalcScrollBar(HWND hwnd, struct ClcData *dat)
+void fnRecalcScrollBar(HWND hwnd, ClcData *dat)
{
RECT clRect;
GetClientRect(hwnd, &clRect);
@@ -299,7 +299,7 @@ void fnRecalcScrollBar(HWND hwnd, struct ClcData *dat)
SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
}
-void fnSetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newState)
+void fnSetGroupExpand(HWND hwnd, ClcData *dat, ClcGroup *group, int newState)
{
int contentCount;
int groupy;
@@ -338,7 +338,7 @@ void fnSetGroupExpand(HWND hwnd, struct ClcData *dat, ClcGroup *group, int newSt
SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
}
-void fnDoSelectionDefaultAction(HWND hwnd, struct ClcData *dat)
+void fnDoSelectionDefaultAction(HWND hwnd, ClcData *dat)
{
ClcContact *contact;
@@ -353,7 +353,7 @@ void fnDoSelectionDefaultAction(HWND hwnd, struct ClcData *dat)
CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)contact->hContact, 0);
}
-int fnFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefixOk)
+int fnFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk)
{
ClcGroup *group = &dat->list;
size_t testlen = mir_tstrlen(text);
@@ -396,7 +396,7 @@ int fnFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefi
return -1;
}
-void fnEndRename(HWND, struct ClcData *dat, int save)
+void fnEndRename(HWND, ClcData *dat, int save)
{
HWND hwndEdit = dat->hwndRenameEdit;
if (hwndEdit == NULL)
@@ -435,7 +435,7 @@ void fnEndRename(HWND, struct ClcData *dat, int save)
DestroyWindow(hwndEdit);
}
-void fnDeleteFromContactList(HWND hwnd, struct ClcData *dat)
+void fnDeleteFromContactList(HWND hwnd, ClcData *dat)
{
ClcContact *contact;
if (dat->selection == -1)
@@ -459,10 +459,10 @@ static LRESULT CALLBACK RenameEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wPar
case WM_KEYDOWN:
switch (wParam) {
case VK_RETURN:
- cli.pfnEndRename(GetParent(hwnd), (struct ClcData *) GetWindowLongPtr(GetParent(hwnd), 0), 1);
+ cli.pfnEndRename(GetParent(hwnd), (ClcData *) GetWindowLongPtr(GetParent(hwnd), 0), 1);
return 0;
case VK_ESCAPE:
- cli.pfnEndRename(GetParent(hwnd), (struct ClcData *) GetWindowLongPtr(GetParent(hwnd), 0), 0);
+ cli.pfnEndRename(GetParent(hwnd), (ClcData *) GetWindowLongPtr(GetParent(hwnd), 0), 0);
return 0;
}
break;
@@ -476,13 +476,13 @@ static LRESULT CALLBACK RenameEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wPar
}
return DLGC_WANTMESSAGE;
case WM_KILLFOCUS:
- cli.pfnEndRename(GetParent(hwnd), (struct ClcData *) GetWindowLongPtr(GetParent(hwnd), 0), 1);
+ cli.pfnEndRename(GetParent(hwnd), (ClcData *) GetWindowLongPtr(GetParent(hwnd), 0), 1);
return 0;
}
return mir_callNextSubclass(hwnd, RenameEditSubclassProc, uMsg, wParam, lParam);
}
-void fnBeginRenameSelection(HWND hwnd, struct ClcData *dat)
+void fnBeginRenameSelection(HWND hwnd, ClcData *dat)
{
ClcContact *contact;
ClcGroup *group;
@@ -510,7 +510,7 @@ void fnBeginRenameSelection(HWND hwnd, struct ClcData *dat)
SetFocus(dat->hwndRenameEdit);
}
-void fnCalcEipPosition(struct ClcData *dat, ClcContact *, ClcGroup *group, POINT *result)
+void fnCalcEipPosition(ClcData *dat, ClcContact *, ClcGroup *group, POINT *result)
{
int indent;
for (indent = 0; group->parent; indent++, group = group->parent);
@@ -518,7 +518,7 @@ void fnCalcEipPosition(struct ClcData *dat, ClcContact *, ClcGroup *group, POINT
result->y = cli.pfnGetRowTopY(dat, dat->selection) - dat->yScroll;
}
-int fnGetDropTargetInformation(HWND hwnd, struct ClcData *dat, POINT pt)
+int fnGetDropTargetInformation(HWND hwnd, ClcData *dat, POINT pt)
{
RECT clRect;
GetClientRect(hwnd, &clRect);
@@ -617,12 +617,12 @@ int fnClcStatusToPf2(int status)
return 0;
}
-int fnIsHiddenMode(struct ClcData *dat, int status)
+int fnIsHiddenMode(ClcData *dat, int status)
{
return dat->offlineModes & cli.pfnClcStatusToPf2(status);
}
-void fnHideInfoTip(HWND, struct ClcData *dat)
+void fnHideInfoTip(HWND, ClcData *dat)
{
if (dat->hInfoTipItem == NULL)
return;
@@ -717,7 +717,7 @@ void fnGetFontSetting(int i, LOGFONT* lf, COLORREF* colour)
lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
}
-void fnLoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst)
+void fnLoadClcOptions(HWND hwnd, ClcData *dat, BOOL bFirst)
{
dat->rowHeight = db_get_b(NULL, "CLC", "RowHeight", CLCDEFAULT_ROWHEIGHT);
dat->leftMargin = db_get_b(NULL, "CLC", "LeftMargin", CLCDEFAULT_LEFTMARGIN);
@@ -782,7 +782,7 @@ void fnLoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst)
#define GSIF_ALLCHECKED 0x40000000
#define GSIF_INDEXMASK 0x3FFFFFFF
-void fnRecalculateGroupCheckboxes(HWND, struct ClcData *dat)
+void fnRecalculateGroupCheckboxes(HWND, ClcData *dat)
{
ClcGroup *group = &dat->list;
group->scanIndex = GSIF_ALLCHECKED;
@@ -835,7 +835,7 @@ void fnSetGroupChildCheckboxes(ClcGroup *group, int checked)
}
}
-void fnInvalidateItem(HWND hwnd, struct ClcData *dat, int iItem)
+void fnInvalidateItem(HWND hwnd, ClcData *dat, int iItem)
{
if (iItem == -1)
return;
@@ -850,27 +850,27 @@ void fnInvalidateItem(HWND hwnd, struct ClcData *dat, int iItem)
///////////////////////////////////////////////////////////////////////////////
// row coord functions
-int fnGetRowTopY(struct ClcData *dat, int item)
+int fnGetRowTopY(ClcData *dat, int item)
{
return item * dat->rowHeight;
}
-int fnGetRowBottomY(struct ClcData *dat, int item)
+int fnGetRowBottomY(ClcData *dat, int item)
{
return (item+1) * dat->rowHeight;
}
-int fnGetRowTotalHeight(struct ClcData *dat)
+int fnGetRowTotalHeight(ClcData *dat)
{
return dat->rowHeight * cli.pfnGetGroupContentsCount(&dat->list, 1);
}
-int fnGetRowHeight(struct ClcData *dat, int)
+int fnGetRowHeight(ClcData *dat, int)
{
return dat->rowHeight;
}
-int fnRowHitTest(struct ClcData *dat, int y)
+int fnRowHitTest(ClcData *dat, int y)
{
if (!dat->rowHeight)
return y;
diff --git a/src/mir_app/src/extraicons.cpp b/src/mir_app/src/extraicons.cpp
index 6a127fde5b..bdaa2d746f 100644
--- a/src/mir_app/src/extraicons.cpp
+++ b/src/mir_app/src/extraicons.cpp
@@ -35,8 +35,8 @@ int SortFunc(const ExtraIcon *p1, const ExtraIcon *p2)
if (ret != 0)
return ret;
- int id1 = (p1->getType() != EXTRAICON_TYPE_GROUP) ? ((BaseExtraIcon*)p1)->getID() : 0;
- int id2 = (p2->getType() != EXTRAICON_TYPE_GROUP) ? ((BaseExtraIcon*)p2)->getID() : 0;
+ int id1 = (p1->getType() != EXTRAICON_TYPE_GROUP) ? ((BaseExtraIcon*) p1)->getID() : 0;
+ int id2 = (p2->getType() != EXTRAICON_TYPE_GROUP) ? ((BaseExtraIcon*) p2)->getID() : 0;
return id1 - id2;
}
@@ -80,7 +80,7 @@ int Clist_SetExtraIcon(MCONTACT hContact, int slot, HANDLE hImage)
if (cli.hwndContactTree == 0)
return -1;
- int icol = ExtraImage_ExtraIDToColumnNum(ConvertToClistSlot(slot));
+ int icol = ExtraImage_ExtraIDToColumnNum( ConvertToClistSlot(slot));
if (icol == -1)
return -1;
@@ -88,7 +88,7 @@ int Clist_SetExtraIcon(MCONTACT hContact, int slot, HANDLE hImage)
if (hItem == 0)
return -1;
- SendMessage(cli.hwndContactTree, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(icol, hImage));
+ SendMessage(cli.hwndContactTree, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(icol,hImage));
return 0;
}
@@ -289,7 +289,7 @@ HANDLE ExtraIcon_Add(HICON hIcon)
void fnReloadExtraIcons()
{
- SendMessage(cli.hwndContactTree, CLM_SETEXTRASPACE, db_get_b(NULL, "CLUI", "ExtraColumnSpace", 18), 0);
+ SendMessage(cli.hwndContactTree, CLM_SETEXTRASPACE, db_get_b(NULL,"CLUI","ExtraColumnSpace",18), 0);
SendMessage(cli.hwndContactTree, CLM_SETEXTRAIMAGELIST, 0, 0);
if (hExtraImageList)
@@ -299,7 +299,7 @@ void fnReloadExtraIcons()
SendMessage(cli.hwndContactTree, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hExtraImageList);
SendMessage(cli.hwndContactTree, CLM_SETEXTRACOLUMNS, EXTRA_ICON_COUNT, 0);
- NotifyEventHooks(hEventExtraImageListRebuilding, 0, 0);
+ NotifyEventHooks(hEventExtraImageListRebuilding,0,0);
bImageCreated = true;
}
@@ -379,7 +379,7 @@ static void EI_PostCreate(BaseExtraIcon *extra, const char *name, int _hLang)
}
}
-EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterCallback(const char *name, const char *description, const char *descIcon,
+EXTERN_C MIR_APP_DLL(HANDLE) ExtraIcon_RegisterCallback(const char *name, const char *description, const char *descIcon,
MIRANDAHOOK RebuildIcons, MIRANDAHOOK ApplyIcon,
MIRANDAHOOKPARAM OnClick, LPARAM onClickParam, int _hLang)
{