diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
commit | 78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch) | |
tree | 8512c50df70b8dd80c919e88ade3419207c95956 /plugins/Clist_nicer/SRC | |
parent | ce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff) |
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/SRC')
22 files changed, 134 insertions, 134 deletions
diff --git a/plugins/Clist_nicer/SRC/CLCButton.cpp b/plugins/Clist_nicer/SRC/CLCButton.cpp index 440178208a..3eedad8d28 100644 --- a/plugins/Clist_nicer/SRC/CLCButton.cpp +++ b/plugins/Clist_nicer/SRC/CLCButton.cpp @@ -240,7 +240,7 @@ static void PaintWorker(MButtonCtrl *ctl, HDC hdcPaint) DeleteObject(hbr);
}
}
- if(!ctl->bSkinned && ctl->buttonItem == 0) {
+ if (!ctl->bSkinned && ctl->buttonItem == 0) {
if (ctl->stateId == PBS_HOT || ctl->focus) {
if (ctl->pbState)
DrawEdge(hdcMem, &rc, EDGE_ETCHED, BF_RECT | BF_SOFT);
@@ -328,7 +328,7 @@ static void PaintWorker(MButtonCtrl *ctl, HDC hdcPaint) CopyRect(&rcText, &rcClient);
SetBkMode(hdcMem, TRANSPARENT);
// XP w/themes doesn't used the glossy disabled text. Is it always using COLOR_GRAYTEXT? Seems so.
- if(!ctl->bSkinned)
+ if (!ctl->bSkinned)
SetTextColor(hdcMem, IsWindowEnabled(ctl->hwnd) || !ctl->hThemeButton ? GetSysColor(COLOR_BTNTEXT) : GetSysColor(COLOR_GRAYTEXT));
if (ctl->arrow)
DrawState(hdcMem, NULL, NULL, (LPARAM) ctl->arrow, 0, rcClient.right - rcClient.left - 5 - g_cxsmIcon + (!ctl->hThemeButton && ctl->stateId == PBS_PRESSED ? 1 : 0), (rcClient.bottom - rcClient.top) / 2 - g_cysmIcon / 2 + (!ctl->hThemeButton && ctl->stateId == PBS_PRESSED ? 1 : 0), g_cxsmIcon, g_cysmIcon, IsWindowEnabled(ctl->hwnd) ? DST_ICON : DST_ICON | DSS_DISABLED);
@@ -433,7 +433,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L bct->pbState = 1;
InvalidateRect(bct->hwnd, NULL, TRUE);
}
- if(!bct->bSendOnDown)
+ if (!bct->bSendOnDown)
SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKELONG(GetDlgCtrlID(hwndDlg), BN_CLICKED), (LPARAM) hwndDlg);
return 0;
}
@@ -469,7 +469,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L return (LRESULT)(bct->hIconPrivate ? bct->hIconPrivate : bct->hIcon);
break;
case BM_SETIMAGE:
- if(!lParam)
+ if (!lParam)
break;
bct->hIml = 0;
bct->iIcon = 0;
@@ -668,7 +668,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L bct->stateId = PBS_NORMAL;
InvalidateRect(bct->hwnd, NULL, TRUE);
}
- if(!bct->bSendOnDown)
+ if (!bct->bSendOnDown)
SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKELONG(GetDlgCtrlID(hwndDlg), BN_CLICKED), (LPARAM) hwndDlg);
break;
}
diff --git a/plugins/Clist_nicer/SRC/Docking.cpp b/plugins/Clist_nicer/SRC/Docking.cpp index bb736880d2..b51d5237a1 100644 --- a/plugins/Clist_nicer/SRC/Docking.cpp +++ b/plugins/Clist_nicer/SRC/Docking.cpp @@ -152,7 +152,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam) Docking_GetMonitorRectFromPoint(ptCursor, &rcMonitor);
if ((ptCursor.x < rcMonitor.left + EDGESENSITIVITY) || (ptCursor.x >= rcMonitor.right - EDGESENSITIVITY)) {
- if(!(GetWindowLong(msg->hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW)) {
+ if (!(GetWindowLong(msg->hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW)) {
SendMessage(msg->hwnd, CLUIINTM_REDRAW, 0, 0);
MessageBox(0, TranslateT("The clist cannot be docked when using the default title bar and border. Use a toolwindow or borderless style instead."),
TranslateT("Clist docking"), MB_OK);
diff --git a/plugins/Clist_nicer/SRC/alphablend.cpp b/plugins/Clist_nicer/SRC/alphablend.cpp index b9fd07e904..f81c029bad 100644 --- a/plugins/Clist_nicer/SRC/alphablend.cpp +++ b/plugins/Clist_nicer/SRC/alphablend.cpp @@ -141,7 +141,7 @@ void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor TRIVERTEX tvtx[2];
int orig = 1, dest = 0;
- if(!(FLG_GRADIENT & GRADIENT_ACTIVE)) {
+ if (!(FLG_GRADIENT & GRADIENT_ACTIVE)) {
tvtx[0].Red = tvtx[1].Red = (COLOR16)GetRValue(basecolor) << 8;
tvtx[0].Blue = tvtx[1].Blue = (COLOR16)GetBValue(basecolor) << 8;
tvtx[0].Green = tvtx[1].Green = (COLOR16)GetGValue(basecolor) << 8;
diff --git a/plugins/Clist_nicer/SRC/clcitems.cpp b/plugins/Clist_nicer/SRC/clcitems.cpp index d62dd52db9..0f918be17e 100644 --- a/plugins/Clist_nicer/SRC/clcitems.cpp +++ b/plugins/Clist_nicer/SRC/clcitems.cpp @@ -252,7 +252,7 @@ void RebuildEntireList(HWND hwnd, struct ClcData *dat) }
}
pcli->pfnSortCLC(hwnd, dat, 0);
- if(!dat->bisEmbedded)
+ if (!dat->bisEmbedded)
FLT_SyncWithClist();
}
@@ -280,16 +280,16 @@ BYTE GetCachedStatusMsg(int iExtraCacheEntry, char *szProto) if ( !result && lstrlen(dbv.ptszVal) > 1)
cEntry->bStatusMsgValid = STATUSMSG_CLIST;
else {
- if(!szProto)
+ if (!szProto)
szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
if(szProto) {
if ( !result )
DBFreeVariant( &dbv );
- if( !( result = cfg::getTString(hContact, szProto, "YMsg", &dbv)) && lstrlen(dbv.ptszVal) > 1)
+ if ( !( result = cfg::getTString(hContact, szProto, "YMsg", &dbv)) && lstrlen(dbv.ptszVal) > 1)
cEntry->bStatusMsgValid = STATUSMSG_YIM;
else if ( !(result = cfg::getTString(hContact, szProto, "StatusDescr", &dbv)) && lstrlen(dbv.ptszVal) > 1)
cEntry->bStatusMsgValid = STATUSMSG_GG;
- else if( !(result = cfg::getTString(hContact, szProto, "XStatusMsg", &dbv)) && lstrlen(dbv.ptszVal) > 1)
+ else if ( !(result = cfg::getTString(hContact, szProto, "XStatusMsg", &dbv)) && lstrlen(dbv.ptszVal) > 1)
cEntry->bStatusMsgValid = STATUSMSG_XSTATUS;
} }
@@ -319,7 +319,7 @@ BYTE GetCachedStatusMsg(int iExtraCacheEntry, char *szProto) cst.flags = CSSF_MASK_NAME | CSSF_DEFAULT_NAME | CSSF_TCHAR;
cst.wParam = &xStatus2;
cst.ptszName = xStatusName;
- if(!CallService(szServiceName, (WPARAM)hContact, (LPARAM)&cst)) {
+ if (!CallService(szServiceName, (WPARAM)hContact, (LPARAM)&cst)) {
TCHAR *szwXstatusName = TranslateTS(xStatusName);
cEntry->statusMsg = (TCHAR *)realloc(cEntry->statusMsg, (lstrlen(szwXstatusName) + 2) * sizeof(TCHAR));
_tcsncpy(cEntry->statusMsg, szwXstatusName, lstrlen(szwXstatusName) + 1);
@@ -615,7 +615,7 @@ int __fastcall CLVM_GetContactHiddenStatus(HANDLE hContact, char *szProto, struc szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
// check stickies first (priority), only if we really have stickies defined (CLVM_STICKY_CONTACTS is set).
if(cfg::dat.bFilterEffective & CLVM_STICKY_CONTACTS) {
- if((dwLocalMask = cfg::getDword(hContact, "CLVM", cfg::dat.current_viewmode, 0)) != 0) {
+ if ((dwLocalMask = cfg::getDword(hContact, "CLVM", cfg::dat.current_viewmode, 0)) != 0) {
if(cfg::dat.bFilterEffective & CLVM_FILTER_STICKYSTATUS) {
WORD wStatus = cfg::getWord(hContact, szProto, "Status", ID_STATUS_OFFLINE);
return !((1 << (wStatus - ID_STATUS_OFFLINE)) & HIWORD(dwLocalMask));
@@ -629,7 +629,7 @@ int __fastcall CLVM_GetContactHiddenStatus(HANDLE hContact, char *szProto, struc filterResult = strstr(cfg::dat.protoFilter, szTemp) ? 1 : 0;
}
if(cfg::dat.bFilterEffective & CLVM_FILTER_GROUPS) {
- if(!cfg::getTString(hContact, "CList", "Group", &dbv)) {
+ if (!cfg::getTString(hContact, "CList", "Group", &dbv)) {
_sntprintf(szGroupMask, safe_sizeof(szGroupMask), _T("%s|"), &dbv.ptszVal[1]);
filterResult = (cfg::dat.filterFlags & CLVM_PROTOGROUP_OP) ? (filterResult | (_tcsstr(cfg::dat.groupFilter, szGroupMask) ? 1 : 0)) : (filterResult & (_tcsstr(cfg::dat.groupFilter, szGroupMask) ? 1 : 0));
mir_free(dbv.ptszVal);
diff --git a/plugins/Clist_nicer/SRC/clcopts.cpp b/plugins/Clist_nicer/SRC/clcopts.cpp index f942f833e4..aeb999bfa5 100644 --- a/plugins/Clist_nicer/SRC/clcopts.cpp +++ b/plugins/Clist_nicer/SRC/clcopts.cpp @@ -254,7 +254,7 @@ static int DSP_Read(DISPLAYPROFILESET *p) */
mir_snprintf(szKey, 256, "{dw_%u_%u}", p->uID, j);
- if(!cfg::getString(NULL, DSP_PROFILES_MODULE, szKey, &dbv)) {
+ if (!cfg::getString(NULL, DSP_PROFILES_MODULE, szKey, &dbv)) {
sscanf(dbv.pszVal, "%u,%u,%u,%u,%u", dp->dwFlags, dp->dwExtraImageMask, dp->avatarBorder, dp->clcExStyle, dp->clcOfflineModes);
DBFreeVariant(&dbv);
}
@@ -266,7 +266,7 @@ static int DSP_Read(DISPLAYPROFILESET *p) */
_snprintf(szKey, 256, "{b_%u_%u}", p->uID, j);
- if(!cfg::getString(NULL, DSP_PROFILES_MODULE, szKey, &dbv)) {
+ if (!cfg::getString(NULL, DSP_PROFILES_MODULE, szKey, &dbv)) {
if(lstrlenA(dbv.pszVal) >= 16) {
dp->exIconScale = (int)szBuf[i++];
dp->dualRowMode = szBuf[i++];
@@ -740,7 +740,7 @@ static INT_PTR CALLBACK DlgProcDspAdvanced(HWND hwndDlg, UINT msg, WPARAM wParam case WM_COMMAND:
switch(LOWORD(wParam)) {
case IDC_CLISTAVATARS:
- if((HWND)lParam != GetFocus())
+ if ((HWND)lParam != GetFocus())
return 0;
break;
case IDC_SHOWLOCALTIME:
@@ -992,7 +992,7 @@ static INT_PTR CALLBACK DlgProcXIcons(HWND hwndDlg, UINT msg, WPARAM wParam, LPA return 0;
}
case WM_NOTIFY:
- if(((LPNMHDR) lParam)->idFrom == IDC_EXTRAORDER) {
+ if (((LPNMHDR) lParam)->idFrom == IDC_EXTRAORDER) {
switch (((LPNMHDR)lParam)->code) {
case TVN_BEGINDRAGA:
case TVN_BEGINDRAGW:
@@ -1034,7 +1034,7 @@ static INT_PTR CALLBACK DlgProcXIcons(HWND hwndDlg, UINT msg, WPARAM wParam, LPA case WM_MOUSEMOVE:
{
- if(!dragging)
+ if (!dragging)
break;
{
TVHITTESTINFO hti;
@@ -1063,7 +1063,7 @@ static INT_PTR CALLBACK DlgProcXIcons(HWND hwndDlg, UINT msg, WPARAM wParam, LPA break;
case WM_LBUTTONUP:
{
- if(!dragging) break;
+ if (!dragging) break;
TreeView_SetInsertMark(GetDlgItem(hwndDlg,IDC_EXTRAORDER),NULL,0);
dragging=0;
ReleaseCapture();
@@ -1254,7 +1254,7 @@ static INT_PTR CALLBACK DlgProcDspProfiles(HWND hwnd, UINT msg, WPARAM wParam, L }
case PSM_CHANGED: // used so tabs dont have to call SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0);
- if(!iInit)
+ if (!iInit)
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
case WM_NOTIFY:
@@ -1363,7 +1363,7 @@ static INT_PTR CALLBACK TabOptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LP }
case PSM_CHANGED: // used so tabs dont have to call SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0);
- if(!iInit)
+ if (!iInit)
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
case WM_NOTIFY:
@@ -1528,7 +1528,7 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam int i;
DWORD exStyle = cfg::getDword("CLC", "ExStyle", CLCDEFAULT_EXSTYLE);
- if(!opt_clc_main_changed)
+ if (!opt_clc_main_changed)
return TRUE;
for (i = 0; i < sizeof(checkBoxToStyleEx) / sizeof(checkBoxToStyleEx[0]); i++)
@@ -1665,7 +1665,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, case 0:
switch (((LPNMHDR) lParam)->code) {
case PSN_APPLY:
- if(!opt_clc_bkg_changed)
+ if (!opt_clc_bkg_changed)
return TRUE;
cfg::writeByte("CLC", "UseBitmap", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_BITMAP)); {
diff --git a/plugins/Clist_nicer/SRC/clcpaint.cpp b/plugins/Clist_nicer/SRC/clcpaint.cpp index 866279ae59..0943c3d846 100644 --- a/plugins/Clist_nicer/SRC/clcpaint.cpp +++ b/plugins/Clist_nicer/SRC/clcpaint.cpp @@ -291,7 +291,7 @@ static int __fastcall DrawAvatar(HDC hdcMem, RECT *rc, struct ClcContact *contac BOOL fOverlay = (cfg::dat.dwFlags & CLUI_FRAME_OVERLAYICONS);
contact->avatarLeft = -1;
- if(!cfg::dat.bAvatarServiceAvail || dat->bisEmbedded)
+ if (!cfg::dat.bAvatarServiceAvail || dat->bisEmbedded)
return 0;
if(contact->ace != NULL && contact->ace->cbSize == sizeof(struct avatarCacheEntry)) {
@@ -338,7 +338,7 @@ static int __fastcall DrawAvatar(HDC hdcMem, RECT *rc, struct ClcContact *contac newHeight = (float)(bmHeight * dScale) - skinMarginY;
}
topoffset = rowHeight > (int)newHeight ? (rowHeight - (int)newHeight) / 2 : 0;
- if(!item->IGNORED) {
+ if (!item->IGNORED) {
//topoffset += item->MARGIN_TOP;
leftoffset = item->MARGIN_LEFT;
}
@@ -395,7 +395,7 @@ static int __fastcall DrawAvatar(HDC hdcMem, RECT *rc, struct ClcContact *contac SelectClipRgn(hdcMem, NULL);
DeleteObject(rgn);
- if(!item->IGNORED) {
+ if (!item->IGNORED) {
RECT rcFrame;
BOOL inClCPaint_save = g_inCLCpaint;
HDC hdcTemp = 0, hdcSaved = 0;
@@ -514,7 +514,7 @@ void __inline PaintItem(HDC hdcMem, struct ClcGroup *group, struct ClcContact *c bg_indent_l = cfg::dat.bApplyIndentToBg ? indent * dat->groupIndent : 0;
}
else if(type == CLCIT_GROUP && API::pfnSetLayout != NULL) {
- if((contact->isRtl && cfg::dat.bGroupAlign == CLC_GROUPALIGN_AUTO) || cfg::dat.bGroupAlign == CLC_GROUPALIGN_RIGHT) {
+ if ((contact->isRtl && cfg::dat.bGroupAlign == CLC_GROUPALIGN_AUTO) || cfg::dat.bGroupAlign == CLC_GROUPALIGN_RIGHT) {
g_RTL = TRUE;
bg_indent_r = cfg::dat.bApplyIndentToBg ? indent * dat->groupIndent : 0;
}
@@ -614,12 +614,12 @@ set_bg_l: if (cstatus >= ID_STATUS_OFFLINE && cstatus <= ID_STATUS_OUTTOLUNCH) {
BYTE perstatus_ignored;
- if((flags & CONTACTF_IDLE) && !StatusItems[ID_EXTBKIDLE - ID_STATUS_OFFLINE].IGNORED)
+ if ((flags & CONTACTF_IDLE) && !StatusItems[ID_EXTBKIDLE - ID_STATUS_OFFLINE].IGNORED)
sitem = &StatusItems[ID_EXTBKIDLE - ID_STATUS_OFFLINE];
else
sitem = &StatusItems[cstatus - ID_STATUS_OFFLINE];
- if(!dat->bisEmbedded) {
+ if (!dat->bisEmbedded) {
pp_item = cEntry->status_item ? cEntry->status_item : cEntry->proto_status_item;
if (!(perstatus_ignored = sitem->IGNORED) && !(flags & CONTACTF_NOTONLIST))
@@ -627,11 +627,11 @@ set_bg_l: if(cfg::dat.bUsePerProto && pp_item && !pp_item->IGNORED) {
sitem = pp_item;
- if((perstatus_ignored || cfg::dat.bOverridePerStatusColors) && sitem->TEXTCOLOR != -1)
+ if ((perstatus_ignored || cfg::dat.bOverridePerStatusColors) && sitem->TEXTCOLOR != -1)
SetTextColor(hdcMem, sitem->TEXTCOLOR);
}
}
- else if(!sitem->IGNORED)
+ else if (!sitem->IGNORED)
SetTextColor(hdcMem, sitem->TEXTCOLOR);
sevencontact_pos = &StatusItems[ID_EXTBKEVEN_CNTCTPOS - ID_STATUS_OFFLINE];
@@ -885,7 +885,7 @@ set_bg_l: SetHotTrackColour(hdcMem,dat);
if(ht->IGNORED == 0)
SetTextColor(hdcMem, ht->TEXTCOLOR);
- if(!g_hottrack_done) {
+ if (!g_hottrack_done) {
if (ht->IGNORED == 0) {
DrawAlpha(hdcMem, &rc, ht->COLOR, ht->ALPHA, ht->COLOR2, ht->COLOR2_TRANSPARENT, ht->GRADIENT,
ht->CORNER, ht->BORDERSTYLE, ht->imageItem);
@@ -974,9 +974,9 @@ bgskipped: int mode = ILD_NORMAL;
pi_selectiveIcon = g_selectiveIcon && (type == CLCIT_CONTACT);
- if((dwFlags & CLUI_FRAME_STATUSICONS && !pi_selectiveIcon) || type != CLCIT_CONTACT || (pi_selectiveIcon && !avatar_done)) {
+ if ((dwFlags & CLUI_FRAME_STATUSICONS && !pi_selectiveIcon) || type != CLCIT_CONTACT || (pi_selectiveIcon && !avatar_done)) {
HIMAGELIST hImgList = 0;
- if(!dat->bisEmbedded && type == CLCIT_CONTACT && cEntry && (dwFlags & CLUI_FRAME_USEXSTATUSASSTATUS) && cEntry->iExtraImage[EXTRA_ICON_ADV1] != 0xff) {
+ if (!dat->bisEmbedded && type == CLCIT_CONTACT && cEntry && (dwFlags & CLUI_FRAME_USEXSTATUSASSTATUS) && cEntry->iExtraImage[EXTRA_ICON_ADV1] != 0xff) {
if(pcli->pfnIconFromStatusMode(contact->proto, contact->wStatus, contact->hContact) == iImage) {
hImgList = dat->himlExtraColumns;
iImage = cEntry->iExtraImage[EXTRA_ICON_ADV1];
@@ -1137,7 +1137,7 @@ text: }
if (dat->exStyle & CLS_EX_LINEWITHGROUPS) {
- if(!g_center) {
+ if (!g_center) {
rc.top = y + ((rowHeight) >> 1); rc.bottom = rc.top + 2;
rc.left = rightLineStart;
rc.right = clRect->right - 1 - dat->extraColumnSpacing * dat->extraColumnsCount - dat->rightMargin;
@@ -1163,7 +1163,7 @@ text: // avatar
- if(!dat->bisEmbedded) {
+ if (!dat->bisEmbedded) {
if(av_local_wanted && !avatar_done && pi_avatar) {
if(av_rightwithnick) {
RECT rcAvatar = rcContent;
@@ -1180,7 +1180,7 @@ text: }
// nickname
- if(!twoRows) {
+ if (!twoRows) {
if(dt_nickflags)
DrawText(hdcMem, szText, -1, &rcContent, DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP | DT_WORD_ELLIPSIS | DT_SINGLELINE | dt_nickflags);
else
@@ -1273,7 +1273,7 @@ nodisplay: TCHAR *szText = NULL;
BYTE smsgValid = cEntry->bStatusMsgValid;
- if((dwFlags & CLUI_FRAME_SHOWSTATUSMSG && smsgValid > STATUSMSG_XSTATUSID) || smsgValid == STATUSMSG_XSTATUSNAME)
+ if ((dwFlags & CLUI_FRAME_SHOWSTATUSMSG && smsgValid > STATUSMSG_XSTATUSID) || smsgValid == STATUSMSG_XSTATUSNAME)
szText = cEntry->statusMsg;
else
#if defined(_UNICODE)
@@ -1285,7 +1285,7 @@ nodisplay: dt_2ndrowflags |= (DT_RTLREADING | DT_RIGHT);
if(rightIcons == 0) {
- if((rcContent.bottom - rcContent.top) >= (2 * statusFontHeight)) {
+ if ((rcContent.bottom - rcContent.top) >= (2 * statusFontHeight)) {
dtFlags &= ~(DT_SINGLELINE | DT_BOTTOM | DT_NOCLIP);
dtFlags |= DT_WORDBREAK;
rcContent.bottom -= ((rcContent.bottom - rcContent.top) % statusFontHeight);
@@ -1293,7 +1293,7 @@ nodisplay: DrawText(hdcMem, szText, -1, &rcContent, dtFlags | dt_2ndrowflags);
}
else {
- if((rcContent.bottom - rcContent.top) < (2 * statusFontHeight) - 2)
+ if ((rcContent.bottom - rcContent.top) < (2 * statusFontHeight) - 2)
DrawText(hdcMem, szText, -1, &rcContent, dtFlags | dt_2ndrowflags);
else {
DRAWTEXTPARAMS dtp = {0};
diff --git a/plugins/Clist_nicer/SRC/clcutils.cpp b/plugins/Clist_nicer/SRC/clcutils.cpp index bec62044e9..b158a4394b 100644 --- a/plugins/Clist_nicer/SRC/clcutils.cpp +++ b/plugins/Clist_nicer/SRC/clcutils.cpp @@ -142,7 +142,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, struct Clc for (i = 5; i >= 0; i--) {
if (cfg::eCache[hitcontact->extraCacheEntry].iExtraImage[i] == 0xFF)
continue;
- if(!((1 << i) & cfg::eCache[hitcontact->extraCacheEntry].dwXMask))
+ if (!((1 << i) & cfg::eCache[hitcontact->extraCacheEntry].dwXMask))
continue;
images_present++;
if (testx < right - (rightOffset - (cfg::dat.exIconScale + 2) * images_present) && testx > right - (rightOffset - (cfg::dat.exIconScale + 2) * images_present + (cfg::dat.exIconScale))) {
@@ -240,7 +240,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, struct ClcCont ;
}
- if(!dat->bisEmbedded) {
+ if (!dat->bisEmbedded) {
if(hitcontact->type == CLCIT_CONTACT) {
if(mirror_mode == 1 || (mirror_mode == 2 && cfg::eCache[hitcontact->extraCacheEntry].dwCFlags & ECF_RTLNICK))
return RTL_HitTest(hwnd, dat, testx, testy, hitcontact, flags, indent, hit);
@@ -298,7 +298,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, struct ClcCont for (i = 5; i >= 0; i--) {
if (cfg::eCache[hitcontact->extraCacheEntry].iExtraImage[i] == 0xFF)
continue;
- if(!((1 << i) & cfg::eCache[hitcontact->extraCacheEntry].dwXMask))
+ if (!((1 << i) & cfg::eCache[hitcontact->extraCacheEntry].dwXMask))
continue;
images_present++;
if (testx > (rightOffset - (cfg::dat.exIconScale + 2) * images_present) && testx < (rightOffset - (cfg::dat.exIconScale + 2) * images_present + (cfg::dat.exIconScale))) {
@@ -389,7 +389,7 @@ void ScrollTo(HWND hwnd, struct ClcData *dat, int desty, int noSmooth) }
dat->yScroll = desty;
if (dat->backgroundBmpUse & CLBF_SCROLL || dat->hBmpBackground == NULL) {
- if(!noSmooth)
+ if (!noSmooth)
ScrollWindowEx(hwnd, 0, previousy - dat->yScroll, NULL, NULL, NULL, NULL, SW_INVALIDATE);
else
InvalidateRect(hwnd, NULL, FALSE);
@@ -545,7 +545,7 @@ void BeginRenameSelection(HWND hwnd, struct ClcData *dat) #if defined(_UNICODE)
dat->hwndRenameEdit = CreateWindowEx(0, _T("RichEdit20W"),contact->szText,WS_CHILD|WS_BORDER|ES_MULTILINE|ES_AUTOHSCROLL,x,y,clRect.right-x,h,hwnd,NULL,g_hInst,NULL);
{
- if((contact->type == CLCIT_CONTACT && cfg::eCache[contact->extraCacheEntry].dwCFlags & ECF_RTLNICK) || (contact->type == CLCIT_GROUP && contact->isRtl)) {
+ if ((contact->type == CLCIT_CONTACT && cfg::eCache[contact->extraCacheEntry].dwCFlags & ECF_RTLNICK) || (contact->type == CLCIT_GROUP && contact->isRtl)) {
PARAFORMAT2 pf2;
ZeroMemory((void *)&pf2, sizeof(pf2));
pf2.cbSize = sizeof(pf2);
diff --git a/plugins/Clist_nicer/SRC/clistevents.cpp b/plugins/Clist_nicer/SRC/clistevents.cpp index 85b145f32a..953877c27d 100644 --- a/plugins/Clist_nicer/SRC/clistevents.cpp +++ b/plugins/Clist_nicer/SRC/clistevents.cpp @@ -75,7 +75,7 @@ void HideShowNotifyFrame() desired = dwVisible;
if(desired) {
- if(!dwVisible)
+ if (!dwVisible)
CallService(MS_CLIST_FRAMES_SHFRAME, (WPARAM)hNotifyFrame, 0);
}
else {
diff --git a/plugins/Clist_nicer/SRC/clistmenus.cpp b/plugins/Clist_nicer/SRC/clistmenus.cpp index 22b5b87df1..074bbcf355 100644 --- a/plugins/Clist_nicer/SRC/clistmenus.cpp +++ b/plugins/Clist_nicer/SRC/clistmenus.cpp @@ -306,7 +306,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA cfg::writeDword(hContact, "CList", "CLN_Flags", dwFlags);
- if((iSel = SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_GETCURSEL, 0, 0)) != CB_ERR) {
+ if ((iSel = SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_GETCURSEL, 0, 0)) != CB_ERR) {
if(iSel == 0) {
DBDeleteContactSetting(hContact, "CList", "CLN_2ndline");
if(contact)
diff --git a/plugins/Clist_nicer/SRC/clistmod.cpp b/plugins/Clist_nicer/SRC/clistmod.cpp index a691dc44d4..5e551d4b87 100644 --- a/plugins/Clist_nicer/SRC/clistmod.cpp +++ b/plugins/Clist_nicer/SRC/clistmod.cpp @@ -177,7 +177,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) /*if(rgn) {
ptTest.x = j;
ptTest.y = i;
- if(!PtInRegion(rgn, ptTest.x, ptTest.y)) {
+ if (!PtInRegion(rgn, ptTest.x, ptTest.y)) {
continue;
}
}*/
diff --git a/plugins/Clist_nicer/SRC/clistopts.cpp b/plugins/Clist_nicer/SRC/clistopts.cpp index 520c9ceb49..338886fce9 100644 --- a/plugins/Clist_nicer/SRC/clistopts.cpp +++ b/plugins/Clist_nicer/SRC/clistopts.cpp @@ -154,7 +154,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case 0:
switch (((LPNMHDR) lParam)->code) {
case PSN_APPLY:
- if(!opt_gen_opts_changed)
+ if (!opt_gen_opts_changed)
return TRUE;
cfg::writeByte("CList", "HideOffline", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_HIDEOFFLINE));
diff --git a/plugins/Clist_nicer/SRC/clistsettings.cpp b/plugins/Clist_nicer/SRC/clistsettings.cpp index ce58e22b45..708abb0853 100644 --- a/plugins/Clist_nicer/SRC/clistsettings.cpp +++ b/plugins/Clist_nicer/SRC/clistsettings.cpp @@ -27,7 +27,7 @@ UNICODE done INT_PTR GetContactStatusMessage(WPARAM wParam, LPARAM lParam)
{
- if(!cfg::shutDown)
+ if (!cfg::shutDown)
return SendMessage(pcli->hwndContactTree, CLM_GETSTATUSMSG, wParam, lParam);
return 0;
}
diff --git a/plugins/Clist_nicer/SRC/clui.cpp b/plugins/Clist_nicer/SRC/clui.cpp index 0a3d3133ed..fe76f3d8b7 100644 --- a/plugins/Clist_nicer/SRC/clui.cpp +++ b/plugins/Clist_nicer/SRC/clui.cpp @@ -1311,7 +1311,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l rcFrame.left += (cfg::dat.bCLeft - 1);
rcFrame.right -= (cfg::dat.bCRight - 1);
- //if(!g_CluiData.bSkinnedButtonMode)
+ //if (!g_CluiData.bSkinnedButtonMode)
// rcFrame.bottom -= (g_CluiData.bottomOffset);
rcFrame.bottom++;
rcFrame.bottom -= cfg::dat.statusBarHeight;
@@ -1408,7 +1408,7 @@ skipbg: }
case WM_WINDOWPOSCHANGED:
- if(!Docking_IsDocked(0, 0))
+ if (!Docking_IsDocked(0, 0))
return(0);
else
break;
diff --git a/plugins/Clist_nicer/SRC/cluiopts.cpp b/plugins/Clist_nicer/SRC/cluiopts.cpp index d77caadea4..79ad2efcb3 100644 --- a/plugins/Clist_nicer/SRC/cluiopts.cpp +++ b/plugins/Clist_nicer/SRC/cluiopts.cpp @@ -177,7 +177,7 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l BYTE windowStyle = (BYTE)SendDlgItemMessage(hwndDlg, IDC_BORDERSTYLE, CB_GETCURSEL, 0, 0);
COLORREF clr_cluiframes;
- if(!opt_clui_changed)
+ if (!opt_clui_changed)
return TRUE;
cfg::writeByte("CLUI", "FadeInOut", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_FADEINOUT));
@@ -265,7 +265,7 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l cfg::dat.dwFlags = IsDlgButtonChecked(hwndDlg, IDC_ROUNDEDBORDER) ? cfg::dat.dwFlags | CLUI_FRAME_ROUNDEDFRAME : cfg::dat.dwFlags & ~CLUI_FRAME_ROUNDEDFRAME;
cfg::writeByte("CLUI", "AutoSize", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
- if((cfg::dat.autosize = IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE) ? 1 : 0)) {
+ if ((cfg::dat.autosize = IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE) ? 1 : 0)) {
SendMessage(pcli->hwndContactList, WM_SIZE, 0, 0);
SendMessage(pcli->hwndContactTree, WM_SIZE, 0, 0);
}
@@ -310,7 +310,7 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l }
} else {
API::SetLayeredWindowAttributes(pcli->hwndContactList, RGB(0, 0, 0), (BYTE)255, LWA_ALPHA);
- if(!cfg::dat.bLayeredHack)
+ if (!cfg::dat.bLayeredHack)
SetWindowLong(pcli->hwndContactList, GWL_EXSTYLE, GetWindowLong(pcli->hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
}
@@ -383,7 +383,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case WM_NOTIFY:
switch (((LPNMHDR) lParam)->code) {
case PSN_APPLY:
- if(!opt_sbar_changed)
+ if (!opt_sbar_changed)
return TRUE;
cfg::writeByte("CLUI", "ShowSBar", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_SHOWSBAR));
diff --git a/plugins/Clist_nicer/SRC/cluiservices.cpp b/plugins/Clist_nicer/SRC/cluiservices.cpp index d2c5c4d9fa..bacbdd3716 100644 --- a/plugins/Clist_nicer/SRC/cluiservices.cpp +++ b/plugins/Clist_nicer/SRC/cluiservices.cpp @@ -36,7 +36,7 @@ static INT_PTR GetClistVersion(WPARAM wParam, LPARAM lParam) static char g_szVersionString[256];
mir_snprintf(g_szVersionString, 256, "%s, %d.%d.%d.%d", pluginInfo.shortName, HIBYTE(HIWORD(pluginInfo.version)), LOBYTE(HIWORD(pluginInfo.version)), HIBYTE(LOWORD(pluginInfo.version)), LOBYTE(LOBYTE(pluginInfo.version)));
- if(!IsBadWritePtr((LPVOID)lParam, 4))
+ if (!IsBadWritePtr((LPVOID)lParam, 4))
*((DWORD *)lParam) = pluginInfo.version;
return (INT_PTR)g_szVersionString;
@@ -199,7 +199,7 @@ void CluiProtocolStatusChanged( int parStatus, const char* szProto ) }
caps2 = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0);
caps1 = CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
- if((caps1 & PF1_IM) && (caps2 & (PF2_LONGAWAY | PF2_SHORTAWAY))) {
+ if ((caps1 & PF1_IM) && (caps2 & (PF2_LONGAWAY | PF2_SHORTAWAY))) {
onlineness = GetStatusOnlineness(status);
if(onlineness > maxOnline) {
maxStatus = status;
@@ -243,7 +243,7 @@ void CluiProtocolStatusChanged( int parStatus, const char* szProto ) if (szStatus) {
if(pcli->hwndContactList && IsWindow(GetDlgItem(pcli->hwndContactList, IDC_TBGLOBALSTATUS)) && IsWindow(GetDlgItem(pcli->hwndContactList, IDC_TBTOPSTATUS))) {
SendMessage(GetDlgItem(pcli->hwndContactList, IDC_TBGLOBALSTATUS), WM_SETTEXT, 0, (LPARAM) szStatus);
- if(!hIcon) {
+ if (!hIcon) {
SendMessage(GetDlgItem(pcli->hwndContactList, IDC_TBGLOBALSTATUS), BM_SETIMLICON, (WPARAM) hCListImages, (LPARAM) iIcon);
if(g_ButtonItems == NULL)
SendMessage(GetDlgItem(pcli->hwndContactList, IDC_TBTOPSTATUS), BM_SETIMLICON, (WPARAM) hCListImages, (LPARAM) iIcon);
diff --git a/plugins/Clist_nicer/SRC/contact.cpp b/plugins/Clist_nicer/SRC/contact.cpp index 34f15b3fb9..f553dd2e40 100644 --- a/plugins/Clist_nicer/SRC/contact.cpp +++ b/plugins/Clist_nicer/SRC/contact.cpp @@ -164,15 +164,15 @@ void LoadContactTree(void) pcli->pfnChangeContactIcon(hContact, IconFromStatusMode((char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0), status, hContact, NULL), 1);
if(mc_disablehgh && !mc_hgh_removed) {
- if(!DBGetContactSetting(hContact, "CList", "Group", &dbv)) {
- if(!strcmp(dbv.pszVal, "MetaContacts Hidden Group"))
+ if (!DBGetContactSetting(hContact, "CList", "Group", &dbv)) {
+ if (!strcmp(dbv.pszVal, "MetaContacts Hidden Group"))
DBDeleteContactSetting(hContact, "CList", "Group");
mir_free(dbv.pszVal);
}
}
// build initial data for message frequency
- if(!bMsgFrequency)
+ if (!bMsgFrequency)
MF_CalcFrequency(hContact, 100, 0);
hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
@@ -231,7 +231,7 @@ int __forceinline INTSORT_CompareContacts(const struct ClcContact* c1, const str return 2 * (c2->flags & CONTACTF_STICKY) - 1;
if(bywhat == SORTBY_PRIOCONTACTS) {
- if((cfg::clcdat->exStyle & CLS_EX_DIVIDERONOFF) && ((c1->flags & CONTACTF_ONLINE) != (c2->flags & CONTACTF_ONLINE)))
+ if ((cfg::clcdat->exStyle & CLS_EX_DIVIDERONOFF) && ((c1->flags & CONTACTF_ONLINE) != (c2->flags & CONTACTF_ONLINE)))
return 0;
if ((c1->flags & CONTACTF_PRIORITY) != (c2->flags & CONTACTF_PRIORITY))
return 2 * (c2->flags & CONTACTF_PRIORITY) - 1;
diff --git a/plugins/Clist_nicer/SRC/extBackg.cpp b/plugins/Clist_nicer/SRC/extBackg.cpp index 3b7d692c33..4851622bbe 100644 --- a/plugins/Clist_nicer/SRC/extBackg.cpp +++ b/plugins/Clist_nicer/SRC/extBackg.cpp @@ -261,7 +261,7 @@ StatusItems_t *GetProtocolStatusItem(const char *szProto) return NULL;
for(i = ID_EXTBK_LAST_D - ID_STATUS_OFFLINE + 1; i <= ID_EXTBK_LAST - ID_STATUS_OFFLINE; i++) {
- if(!strcmp(StatusItems[i].szName[0] == '{' ? &StatusItems[i].szName[3] : StatusItems[i].szName, szProto))
+ if (!strcmp(StatusItems[i].szName[0] == '{' ? &StatusItems[i].szName[3] : StatusItems[i].szName, szProto))
return &StatusItems[i];
}
return NULL;
@@ -553,7 +553,7 @@ void extbk_export(char *file) mir_snprintf(szSection, 255, "Font%d", n);
mir_snprintf(szKey, 255, "Font%dName", n);
- if(!cfg::getString(NULL, "CLC", szKey, &dbv)) {
+ if (!cfg::getString(NULL, "CLC", szKey, &dbv)) {
WritePrivateProfileStringA(szSection, "Name", dbv.pszVal, file);
mir_free(dbv.pszVal);
}
@@ -598,7 +598,7 @@ void extbk_export(char *file) WritePrivateProfileStructA("Global", _tagSettings[i].szSetting, &data, _tagSettings[i].size, file);
i++;
}
- if(!cfg::getString(NULL, "CLC", "BkBitmap", &dbv)) {
+ if (!cfg::getString(NULL, "CLC", "BkBitmap", &dbv)) {
WritePrivateProfileStringA("Global", "BkBitmap", dbv.pszVal, file);
DBFreeVariant(&dbv);
}
@@ -751,7 +751,7 @@ static void IMG_CreateItem(ImageItem *item, const char *fileName, HDC hdc) static void IMG_DeleteItem(ImageItem *item)
{
- if(!(item->dwFlags & IMAGE_GLYPH)) {
+ if (!(item->dwFlags & IMAGE_GLYPH)) {
SelectObject(item->hdc, item->hbmOld);
DeleteObject(item->hbm);
DeleteDC(item->hdc);
@@ -773,7 +773,7 @@ static void ReadItem(StatusItems_t *this_item, char *szItem, char *file) int i;
for(i = 0; i <= ID_EXTBK_LAST - ID_STATUS_OFFLINE; i++) {
- if(!_stricmp(StatusItems[i].szName[0] == '{' ? &StatusItems[i].szName[3] : StatusItems[i].szName, buffer)) {
+ if (!_stricmp(StatusItems[i].szName[0] == '{' ? &StatusItems[i].szName[3] : StatusItems[i].szName, buffer)) {
defaults = &StatusItems[i];
break;
}
@@ -905,7 +905,7 @@ done_with_glyph: tmpItem.bStretch = IMAGE_STRETCH_H;
tmpItem.hbm = 0;
- if(!_stricmp(itemname, "$glyphs")) {
+ if (!_stricmp(itemname, "$glyphs")) {
IMG_CreateItem(&tmpItem, szFinalName, hdc);
if(tmpItem.hbm) {
newItem = reinterpret_cast<ImageItem *>(malloc(sizeof(ImageItem)));
@@ -916,7 +916,7 @@ done_with_glyph: goto imgread_done;
}
if(itemname[0] == '@') {
- if(!(tmpItem.dwFlags & IMAGE_GLYPH))
+ if (!(tmpItem.dwFlags & IMAGE_GLYPH))
IMG_CreateItem(&tmpItem, szFinalName, hdc);
if(tmpItem.hbm || tmpItem.dwFlags & IMAGE_GLYPH) {
ImageItem *pItem = g_ImageItems;
@@ -940,10 +940,10 @@ done_with_glyph: for(n = 0;;n++) {
mir_snprintf(szItemNr, 30, "Item%d", n);
GetPrivateProfileStringA(itemname, szItemNr, "None", buffer, 500, szFileName);
- if(!strcmp(buffer, "None"))
+ if (!strcmp(buffer, "None"))
break;
- if(!strcmp(buffer, "CLUI")) {
- if(!(tmpItem.dwFlags & IMAGE_GLYPH))
+ if (!strcmp(buffer, "CLUI")) {
+ if (!(tmpItem.dwFlags & IMAGE_GLYPH))
IMG_CreateItem(&tmpItem, szFinalName, hdc);
if(tmpItem.hbm || tmpItem.dwFlags & IMAGE_GLYPH) {
COLORREF clr;
@@ -964,9 +964,9 @@ done_with_glyph: continue;
}
for(i = 0; i <= ID_EXTBK_LAST - ID_STATUS_OFFLINE; i++) {
- if(!_stricmp(StatusItems[i].szName[0] == '{' ? &StatusItems[i].szName[3] : StatusItems[i].szName, buffer)) {
- if(!alloced) {
- if(!(tmpItem.dwFlags & IMAGE_GLYPH))
+ if (!_stricmp(StatusItems[i].szName[0] == '{' ? &StatusItems[i].szName[3] : StatusItems[i].szName, buffer)) {
+ if (!alloced) {
+ if (!(tmpItem.dwFlags & IMAGE_GLYPH))
IMG_CreateItem(&tmpItem, szFinalName, hdc);
if(tmpItem.hbm || tmpItem.dwFlags & IMAGE_GLYPH) {
newItem = reinterpret_cast<ImageItem *>(malloc(sizeof(ImageItem)));
@@ -1051,11 +1051,11 @@ static void BTN_ReadItem(char *itemName, char *file) tmpItem.dwFlags |= GetPrivateProfileIntA(itemName, "toggle", 0, file) ? BUTTON_ISTOGGLE : 0;
GetPrivateProfileStringA(itemName, "Pressed", "None", szBuffer, 1000, file);
- if(!_stricmp(szBuffer, "default"))
+ if (!_stricmp(szBuffer, "default"))
tmpItem.imgPressed = StatusItems[ID_EXTBKTBBUTTONSPRESSED - ID_STATUS_OFFLINE].imageItem;
else {
while(imgItem) {
- if(!_stricmp(imgItem->szName, szBuffer)) {
+ if (!_stricmp(imgItem->szName, szBuffer)) {
tmpItem.imgPressed = imgItem;
break;
}
@@ -1065,11 +1065,11 @@ static void BTN_ReadItem(char *itemName, char *file) imgItem = g_ImageItems;
GetPrivateProfileStringA(itemName, "Normal", "None", szBuffer, 1000, file);
- if(!_stricmp(szBuffer, "default"))
+ if (!_stricmp(szBuffer, "default"))
tmpItem.imgNormal = StatusItems[ID_EXTBKTBBUTTONSNPRESSED - ID_STATUS_OFFLINE].imageItem;
else {
while(imgItem) {
- if(!_stricmp(imgItem->szName, szBuffer)) {
+ if (!_stricmp(imgItem->szName, szBuffer)) {
tmpItem.imgNormal = imgItem;
break;
}
@@ -1079,11 +1079,11 @@ static void BTN_ReadItem(char *itemName, char *file) imgItem = g_ImageItems;
GetPrivateProfileStringA(itemName, "Hover", "None", szBuffer, 1000, file);
- if(!_stricmp(szBuffer, "default"))
+ if (!_stricmp(szBuffer, "default"))
tmpItem.imgHover = StatusItems[ID_EXTBKTBBUTTONMOUSEOVER - ID_STATUS_OFFLINE].imageItem;
else {
while(imgItem) {
- if(!_stricmp(imgItem->szName, szBuffer)) {
+ if (!_stricmp(imgItem->szName, szBuffer)) {
tmpItem.imgHover = imgItem;
break;
}
@@ -1113,7 +1113,7 @@ static void BTN_ReadItem(char *itemName, char *file) tmpItem.uId = IDC_TBFIRSTUID - 1;
GetPrivateProfileStringA(itemName, "Action", "Custom", szBuffer, 1000, file);
- if(!_stricmp(szBuffer, "service")) {
+ if (!_stricmp(szBuffer, "service")) {
tmpItem.szService[0] = 0;
GetPrivateProfileStringA(itemName, "Service", "None", szBuffer, 1000, file);
if(_stricmp(szBuffer, "None")) {
@@ -1122,7 +1122,7 @@ static void BTN_ReadItem(char *itemName, char *file) tmpItem.uId = nextButtonID++;
}
}
- else if(!_stricmp(szBuffer, "protoservice")) {
+ else if (!_stricmp(szBuffer, "protoservice")) {
tmpItem.szService[0] = 0;
GetPrivateProfileStringA(itemName, "Service", "None", szBuffer, 1000, file);
if(_stricmp(szBuffer, "None")) {
@@ -1131,7 +1131,7 @@ static void BTN_ReadItem(char *itemName, char *file) tmpItem.uId = nextButtonID++;
}
}
- else if(!_stricmp(szBuffer, "database")) {
+ else if (!_stricmp(szBuffer, "database")) {
int n;
GetPrivateProfileStringA(itemName, "Module", "None", szBuffer, 1000, file);
@@ -1192,7 +1192,7 @@ static void BTN_ReadItem(char *itemName, char *file) int i = 0;
while(top_buttons[i].id) {
- if(!_stricmp(top_buttons[i].szIcoLibIcon, szBuffer)) {
+ if (!_stricmp(top_buttons[i].szIcoLibIcon, szBuffer)) {
tmpItem.uId = top_buttons[i].id;
tmpItem.dwFlags |= BUTTON_ISINTERNAL;
break;
@@ -1273,7 +1273,7 @@ void IMG_LoadItems() DBFreeVariant(&dbv);
- if(!PathFileExists(tszFileName))
+ if (!PathFileExists(tszFileName))
return;
IMG_DeleteItems();
@@ -1396,7 +1396,7 @@ void LoadPerContactSkins(TCHAR *tszFileName) break;
}
for(j = 0; j < i - 1; j++) {
- if(!strcmp(szProto, items[j].szName) && !strcmp(UIN, items[j].szDBname)
+ if (!strcmp(szProto, items[j].szName) && !strcmp(UIN, items[j].szDBname)
&& lstrlenA(szProto) == lstrlenA(items[j].szName) && lstrlenA(UIN) == lstrlenA(items[j].szDBname)) {
//_DebugPopup(hContact, "Found: %s, %s", szProto, UIN);
@@ -1571,7 +1571,7 @@ static void ApplyCLUISkin() DBVARIANT dbv = {0};
TCHAR tszFinalName[MAX_PATH];
char szFinalName[MAX_PATH];
- if(!cfg::getTString(NULL, "CLC", "AdvancedSkin", &dbv)) {
+ if (!cfg::getTString(NULL, "CLC", "AdvancedSkin", &dbv)) {
MY_pathToAbsolute(dbv.ptszVal, tszFinalName);
#if defined(_UNICODE)
WideCharToMultiByte(CP_ACP, 0, tszFinalName, MAX_PATH, szFinalName, MAX_PATH, 0, 0);
@@ -1620,7 +1620,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L CheckDlgButton(hwndDlg, IDC_IGNORESELFORGROUPS, cfg::getByte("CLC", "IgnoreSelforGroups", 0) ? BST_CHECKED : BST_UNCHECKED);
- if(!cfg::getString(NULL, "CLC", "ContactSkins", &dbv)) {
+ if (!cfg::getString(NULL, "CLC", "ContactSkins", &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_SKINFILE, dbv.pszVal);
DBFreeVariant(&dbv);
Utils::enableDlgControl(hwndDlg, IDC_RELOAD, TRUE);
@@ -1628,7 +1628,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L else
Utils::enableDlgControl(hwndDlg, IDC_RELOAD, FALSE);
CheckDlgButton(hwndDlg, IDC_USESKIN, cfg::getByte("CLUI", "useskin", 0) ? BST_CHECKED : BST_UNCHECKED);
- if(!cfg::getTString(NULL, "CLC", "AdvancedSkin", &dbv)) {
+ if (!cfg::getTString(NULL, "CLC", "AdvancedSkin", &dbv)) {
SetDlgItemText(hwndDlg, IDC_SKINFILENAME, dbv.ptszVal);
DBFreeVariant(&dbv);
}
@@ -1676,7 +1676,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L int skinChanged = 0;
DBVARIANT dbv = {0};
- if(!cfg::getTString(NULL, "CLC", "AdvancedSkin", &dbv)) {
+ if (!cfg::getTString(NULL, "CLC", "AdvancedSkin", &dbv)) {
if(_tcscmp(dbv.ptszVal, final_path))
skinChanged = TRUE;
DBFreeVariant(&dbv);
@@ -1785,7 +1785,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara }
case PSM_CHANGED: // used so tabs dont have to call SendMessage(GetParent(GetParent(hwnd)), PSM_CHANGED, 0, 0);
- if(!iInit)
+ if (!iInit)
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
case WM_COMMAND:
@@ -1901,7 +1901,7 @@ int CoolSB_SetupScrollBar() !StatusItems[ID_EXTBKSCROLLBUTTONPRESSED - ID_STATUS_OFFLINE].IGNORED;
- if(!StatusItems[ID_EXTBKSCROLLBACK - ID_STATUS_OFFLINE].imageItem ||
+ if (!StatusItems[ID_EXTBKSCROLLBACK - ID_STATUS_OFFLINE].imageItem ||
!StatusItems[ID_EXTBKSCROLLBACKLOWER - ID_STATUS_OFFLINE].imageItem ||
!StatusItems[ID_EXTBKSCROLLTHUMB - ID_STATUS_OFFLINE].imageItem ||
!StatusItems[ID_EXTBKSCROLLTHUMBHOVER - ID_STATUS_OFFLINE].imageItem ||
diff --git a/plugins/Clist_nicer/SRC/init.cpp b/plugins/Clist_nicer/SRC/init.cpp index 59ada8931b..77d5ed123e 100644 --- a/plugins/Clist_nicer/SRC/init.cpp +++ b/plugins/Clist_nicer/SRC/init.cpp @@ -249,7 +249,7 @@ extern "C" int __declspec(dllexport) CListInitialise(PLUGINLINK * link) int iCount = CallService(MS_DB_CONTACT_GETCOUNT, 0, 0);
iCount += 20;
- if( iCount < 300 )
+ if ( iCount < 300 )
iCount = 300;
cfg::eCache = reinterpret_cast<TExtraCache *>(malloc(sizeof(TExtraCache) * iCount));
@@ -301,7 +301,7 @@ extern "C" int __declspec(dllexport) CListInitialise(PLUGINLINK * link) if(cfg::dat.bFirstRun)
cfg::writeByte("CLUI", "firstrun", 0);
- if(!cfg::getString(NULL, "CLUI", "exIconOrder", &dbv)) {
+ if (!cfg::getString(NULL, "CLUI", "exIconOrder", &dbv)) {
if(lstrlenA(dbv.pszVal) < EXICON_COUNT) {
for(i = 1; i <= EXICON_COUNT; i++)
cfg::dat.exIconOrder[i - 1] = i;
@@ -349,7 +349,7 @@ LBL_Error: MessageBoxA( NULL, "This plugin requires Miranda IM 0.8.0.9 or later", "Fatal error", MB_OK );
return 1;
}
- if ( pcli->version < 6 ) // don't join it with the previous if()
+ if ( pcli->version < 6 ) // don't join it with the previous if ()
goto LBL_Error;
pcli->pfnBuildGroupPopupMenu = BuildGroupPopupMenu;
diff --git a/plugins/Clist_nicer/SRC/rowheight_funcs.cpp b/plugins/Clist_nicer/SRC/rowheight_funcs.cpp index bb06013fe0..3fe3c311a2 100644 --- a/plugins/Clist_nicer/SRC/rowheight_funcs.cpp +++ b/plugins/Clist_nicer/SRC/rowheight_funcs.cpp @@ -269,8 +269,8 @@ int RowHeight::getFloatingRowHeight(const ClcData *dat, HWND hwnd, ClcContact *c height = dat->fontInfo[GetBasicFontID(contact)].fontHeight;
- if(!dat->bisEmbedded) {
- if(!(dwFlags & FLT_SIMPLE)){
+ if (!dat->bisEmbedded) {
+ if (!(dwFlags & FLT_SIMPLE)) {
if(dwFlags & FLT_DUALROW) {
height += (dat->fontInfo[FONTID_STATUS].fontHeight + cfg::dat.avatarPadding);
}
diff --git a/plugins/Clist_nicer/SRC/statusbar.cpp b/plugins/Clist_nicer/SRC/statusbar.cpp index 11308dac52..aba30d92a1 100644 --- a/plugins/Clist_nicer/SRC/statusbar.cpp +++ b/plugins/Clist_nicer/SRC/statusbar.cpp @@ -53,7 +53,7 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM ptMouse = pt;
if (tooltip_active){
KillTimer(hwnd, TIMERID_HOVER);
- if(!NotifyEventHooks(hStatusBarHideToolTipEvent, 0, 0))
+ if (!NotifyEventHooks(hStatusBarHideToolTipEvent, 0, 0))
CallService("mToolTip/HideTip", 0, 0);
tooltip_active = FALSE;
}
@@ -77,7 +77,7 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
KillTimer(hwnd, TIMERID_HOVER);
- if(!NotifyEventHooks(hStatusBarHideToolTipEvent, 0, 0))
+ if (!NotifyEventHooks(hStatusBarHideToolTipEvent, 0, 0))
CallService("mToolTip/HideTip", 0, 0);
tooltip_active = FALSE;
break;
@@ -113,7 +113,7 @@ LRESULT CALLBACK NewStatusBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM hOldFont = reinterpret_cast<HFONT>(SelectObject(hdcMem, GetStockObject(DEFAULT_GUI_FONT)));
BitBlt(hdcMem, 0, 0, rcClient.right, rcClient.bottom, cfg::dat.hdcBg, pt.x, pt.y, SRCCOPY);
item = &StatusItems[ID_EXTBKSTATUSBAR - ID_STATUS_OFFLINE];
- if(!item->IGNORED) {
+ if (!item->IGNORED) {
RECT rc = rcClient;
rc.left += item->MARGIN_LEFT;
rc.right -= item->MARGIN_RIGHT;
diff --git a/plugins/Clist_nicer/SRC/statusfloater.cpp b/plugins/Clist_nicer/SRC/statusfloater.cpp index acc3ba8dc0..06c088da45 100644 --- a/plugins/Clist_nicer/SRC/statusfloater.cpp +++ b/plugins/Clist_nicer/SRC/statusfloater.cpp @@ -163,22 +163,22 @@ void FLT_SnapToFloater(HWND hwnd) while(pCurrent) {
GetWindowRect(pCurrent->hwnd, &rcWindow);
//top
- if((rcWindow.top - rcBase.bottom > -SNAP_FLT_TOLERANCE) && (rcWindow.top - rcBase.bottom < minTop)){
+ if ((rcWindow.top - rcBase.bottom > -SNAP_FLT_TOLERANCE) && (rcWindow.top - rcBase.bottom < minTop)) {
posTop = rcWindow.top;
minTop = rcWindow.top - rcBase.bottom;
}
//bottom
- if((rcBase.top - rcWindow.bottom > -SNAP_FLT_TOLERANCE) && (rcBase.top - rcWindow.bottom < minBottom)){
+ if ((rcBase.top - rcWindow.bottom > -SNAP_FLT_TOLERANCE) && (rcBase.top - rcWindow.bottom < minBottom)) {
posBottom = rcWindow.bottom;
minBottom = rcBase.top - rcWindow.bottom;
}
//left
- if((rcWindow.left - rcBase.right > -SNAP_FLT_TOLERANCE) && (rcWindow.left - rcBase.right < minLeft)){
+ if ((rcWindow.left - rcBase.right > -SNAP_FLT_TOLERANCE) && (rcWindow.left - rcBase.right < minLeft)) {
posLeft= rcWindow.left;
minLeft = rcWindow.left - rcBase.right;
}
//right
- if((rcBase.left - rcWindow.right > -SNAP_FLT_TOLERANCE) && (rcBase.left - rcWindow.right < minRight)){
+ if ((rcBase.left - rcWindow.right > -SNAP_FLT_TOLERANCE) && (rcBase.left - rcWindow.right < minRight)) {
posRight= rcWindow.right;
minRight = rcBase.left - rcWindow.right;
}
@@ -315,7 +315,7 @@ INT_PTR CALLBACK DlgProcFloatingContacts(HWND hwndDlg, UINT msg, WPARAM wParam, break;
case IDC_FLT_SIMPLELAYOUT:
{
- if (IsDlgButtonChecked(hwndDlg, IDC_FLT_ENABLED)){
+ if (IsDlgButtonChecked(hwndDlg, IDC_FLT_ENABLED)) {
int isSimple = IsDlgButtonChecked(hwndDlg, IDC_FLT_SIMPLELAYOUT);
Utils::enableDlgControl(hwndDlg, IDC_FLT_AVATARS, !isSimple);
Utils::enableDlgControl(hwndDlg, IDC_FLT_EXTRAICONS, !isSimple);
@@ -325,7 +325,7 @@ INT_PTR CALLBACK DlgProcFloatingContacts(HWND hwndDlg, UINT msg, WPARAM wParam, break;
case IDC_FLT_BORDER:
{
- if (IsDlgButtonChecked(hwndDlg, IDC_FLT_ENABLED)){
+ if (IsDlgButtonChecked(hwndDlg, IDC_FLT_ENABLED)) {
int isBorder = IsDlgButtonChecked(hwndDlg, IDC_FLT_BORDER);
Utils::enableDlgControl(hwndDlg, IDC_FLT_BORDERCOLOUR, isBorder);
}
@@ -333,7 +333,7 @@ INT_PTR CALLBACK DlgProcFloatingContacts(HWND hwndDlg, UINT msg, WPARAM wParam, break;
case IDC_FLT_ROUNDED:
{
- if (IsDlgButtonChecked(hwndDlg, IDC_FLT_ENABLED)){
+ if (IsDlgButtonChecked(hwndDlg, IDC_FLT_ENABLED)) {
int isRounded = IsDlgButtonChecked(hwndDlg, IDC_FLT_ROUNDED);
Utils::enableDlgControl(hwndDlg, IDC_FLT_RADIUS, isRounded);
Utils::enableDlgControl(hwndDlg, IDC_FLT_RADIUSSPIN, isRounded);
@@ -342,7 +342,7 @@ INT_PTR CALLBACK DlgProcFloatingContacts(HWND hwndDlg, UINT msg, WPARAM wParam, break;
case IDC_FLT_SHOWTOOLTIPS:
{
- if (IsDlgButtonChecked(hwndDlg, IDC_FLT_ENABLED)){
+ if (IsDlgButtonChecked(hwndDlg, IDC_FLT_ENABLED)) {
int isTooltip = IsDlgButtonChecked(hwndDlg, IDC_FLT_SHOWTOOLTIPS);
int isDefHoverTime = IsDlgButtonChecked(hwndDlg, IDC_FLT_DEFHOVERTIME);
Utils::enableDlgControl(hwndDlg, IDC_FLT_DEFHOVERTIME, isTooltip);
@@ -353,7 +353,7 @@ INT_PTR CALLBACK DlgProcFloatingContacts(HWND hwndDlg, UINT msg, WPARAM wParam, break;
case IDC_FLT_DEFHOVERTIME:
{
- if (IsDlgButtonChecked(hwndDlg, IDC_FLT_ENABLED) && IsDlgButtonChecked(hwndDlg, IDC_FLT_SHOWTOOLTIPS)){
+ if (IsDlgButtonChecked(hwndDlg, IDC_FLT_ENABLED) && IsDlgButtonChecked(hwndDlg, IDC_FLT_SHOWTOOLTIPS)) {
int isDefHoverTime = IsDlgButtonChecked(hwndDlg, IDC_FLT_DEFHOVERTIME);
Utils::enableDlgControl(hwndDlg, IDC_FLT_HOVERTIME, !isDefHoverTime);
Utils::enableDlgControl(hwndDlg, IDC_FLT_HOVERTIMESPIN, !isDefHoverTime);
@@ -517,7 +517,7 @@ LRESULT CALLBACK StatusFloaterClassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR GetCursorPos(&ptMouse);
GetWindowRect(hwnd, &rcWindow);
rcWindow.right = rcWindow.left + 25;
- if(!PtInRect(&rcWindow, ptMouse))
+ if (!PtInRect(&rcWindow, ptMouse))
return SendMessage(hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(ptMouse.x, ptMouse.y));
break;
}
@@ -631,12 +631,12 @@ LRESULT CALLBACK ContactFloaterClassProc(HWND hwnd, UINT msg, WPARAM wParam, LPA GetCursorPos(&ptMouse);
GetWindowRect(hwnd, &rcWindow);
rcWindow.right = rcWindow.left + 25;
- if(!PtInRect(&rcWindow, ptMouse))
+ if (!PtInRect(&rcWindow, ptMouse))
return SendMessage(hwnd, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, MAKELPARAM(ptMouse.x, ptMouse.y));
break;
}
case WM_MOUSEMOVE:
- if( API::pfnTrackMouseEvent && !hover ) {
+ if ( API::pfnTrackMouseEvent && !hover ) {
TRACKMOUSEEVENT tme;
tme.cbSize = sizeof(TRACKMOUSEEVENT);
tme.dwFlags = TME_HOVER | TME_LEAVE;
@@ -664,7 +664,7 @@ LRESULT CALLBACK ContactFloaterClassProc(HWND hwnd, UINT msg, WPARAM wParam, LPA while(pCurrent->hwnd != hwnd)
pCurrent = pCurrent->pNextFloater;
- if(FindItem(pcli->hwndContactTree, cfg::clcdat, pCurrent->hContact, &contact, NULL, 0)){
+ if(FindItem(pcli->hwndContactTree, cfg::clcdat, pCurrent->hContact, &contact, NULL, 0)) {
g_floatoptions.trans = g_floatoptions.act_trans;
FLT_Update(cfg::clcdat, contact);
g_floatoptions.trans = oldTrans;
@@ -818,7 +818,7 @@ void SFL_Update(HICON hIcon, int iIcon, HIMAGELIST hIml, const TCHAR *szText, BO sfl_statustext[99] = 0;
}
- if(!hIcon) {
+ if (!hIcon) {
HICON p_hIcon;
if(refresh)
@@ -941,7 +941,7 @@ void FLT_SetSize(struct TExtraCache *centry, LONG width, LONG height) int flags = SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOACTIVATE;
int iVis = pcli->pfnGetWindowVisibleState(pcli->hwndContactList, 0, 0);
- if((g_floatoptions.dwFlags & FLT_AUTOHIDE) && (iVis == 2 || iVis == 4)) //2 = GWVS_VISIBLE, 4 = GWVS_PARTIALLY_COVERED
+ if ((g_floatoptions.dwFlags & FLT_AUTOHIDE) && (iVis == 2 || iVis == 4)) //2 = GWVS_VISIBLE, 4 = GWVS_PARTIALLY_COVERED
flags = SWP_NOMOVE | SWP_NOACTIVATE;
if(centry->floater) {
@@ -1093,19 +1093,19 @@ void FLT_Update(struct ClcData *dat, struct ClcContact *contact) cfg::eCache[contact->extraCacheEntry].dwXMask = 0;
}
else{
- if(!(g_floatoptions.dwFlags & FLT_AVATARS)) {
+ if (!(g_floatoptions.dwFlags & FLT_AVATARS)) {
contact->ace = 0;
g_list_avatars = 0;
}
else
g_list_avatars = 1;
- if(!(g_floatoptions.dwFlags & FLT_DUALROW))
+ if (!(g_floatoptions.dwFlags & FLT_DUALROW))
contact->bSecondLine = MULTIROW_NEVER;
else
contact->bSecondLine = MULTIROW_ALWAYS;
- if(!(g_floatoptions.dwFlags & FLT_EXTRAICONS)) {
+ if (!(g_floatoptions.dwFlags & FLT_EXTRAICONS)) {
cfg::dat.dwFlags &= ~(CLUI_SHOWCLIENTICONS | CLUI_SHOWVISI);
cfg::eCache[contact->extraCacheEntry].dwXMask = 0;
}
@@ -1178,10 +1178,10 @@ void FLT_SyncWithClist() if(g_floatoptions.dwFlags & FLT_SYNCWITHCLIST){
while(pCurrent) {
hwnd = pCurrent->hwnd;
- if(hwnd && IsWindow(hwnd)){
+ if(hwnd && IsWindow(hwnd)) {
if(FindItem(pcli->hwndContactTree, cfg::clcdat, pCurrent->hContact, &contact, NULL, 0)) {
FLT_Update(cfg::clcdat, contact);
- if(((g_floatoptions.dwFlags & FLT_AUTOHIDE) && (iVis == 2 || iVis == 4)) || !(g_floatoptions.dwFlags & FLT_AUTOHIDE))
+ if (((g_floatoptions.dwFlags & FLT_AUTOHIDE) && (iVis == 2 || iVis == 4)) || !(g_floatoptions.dwFlags & FLT_AUTOHIDE))
ShowWindow(hwnd, SW_SHOWNOACTIVATE);
else
ShowWindow(hwnd, SW_HIDE);
@@ -1208,7 +1208,7 @@ void FLT_ShowHideAll(int showCmd) if(g_floatoptions.dwFlags & FLT_AUTOHIDE){
while(pCurrent) {
hwnd = pCurrent->hwnd;
- if(hwnd && IsWindow(hwnd)){
+ if(hwnd && IsWindow(hwnd)) {
if(showCmd == SW_SHOWNOACTIVATE && FindItem(pcli->hwndContactTree, cfg::clcdat, pCurrent->hContact, &contact, NULL, 0))
ShowWindow(hwnd, SW_SHOWNOACTIVATE);
else if(showCmd != SW_SHOWNOACTIVATE)
diff --git a/plugins/Clist_nicer/SRC/viewmodes.cpp b/plugins/Clist_nicer/SRC/viewmodes.cpp index ab51b0e121..a8d48f754e 100644 --- a/plugins/Clist_nicer/SRC/viewmodes.cpp +++ b/plugins/Clist_nicer/SRC/viewmodes.cpp @@ -498,7 +498,7 @@ void UpdateFilters() if(cfg::getTString(NULL, CLVM_MODULE, szSetting, &dbv_gf))
goto cleanup;
mir_snprintf(szSetting, 128, "%c%s_OPT", 246, szBuf);
- if((opt = cfg::getDword(NULL, CLVM_MODULE, szSetting, -1)) != -1) {
+ if ((opt = cfg::getDword(NULL, CLVM_MODULE, szSetting, -1)) != -1) {
SendDlgItemMessage(clvmHwnd, IDC_AUTOCLEARSPIN, UDM_SETPOS, 0, MAKELONG(LOWORD(opt), 0));
}
mir_snprintf(szSetting, 128, "%c%s_SM", 246, szBuf);
@@ -555,7 +555,7 @@ void UpdateFilters() int i;
for(i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
- if((1 << (i - ID_STATUS_OFFLINE)) & statusMask)
+ if ((1 << (i - ID_STATUS_OFFLINE)) & statusMask)
ListView_SetCheckState(hwndList, i - ID_STATUS_OFFLINE, TRUE)
else
ListView_SetCheckState(hwndList, i - ID_STATUS_OFFLINE, FALSE);
@@ -703,7 +703,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP mir_snprintf(szSetting, 256, "%c%s_SSM", 246, szBuf);
DBDeleteContactSetting(NULL, CLVM_MODULE, szSetting);
DBDeleteContactSetting(NULL, CLVM_MODULE, szBuf);
- if(!strcmp(cfg::dat.current_viewmode, szBuf) && lstrlenA(szBuf) == lstrlenA(cfg::dat.current_viewmode)) {
+ if (!strcmp(cfg::dat.current_viewmode, szBuf) && lstrlenA(szBuf) == lstrlenA(cfg::dat.current_viewmode)) {
cfg::dat.bFilterEffective = 0;
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
SetWindowTextA(hwndSelector, Translate("No view mode"));
@@ -826,7 +826,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
hItem = (HANDLE)SendDlgItemMessage(hwndDlg,IDC_CLIST,CLM_HITTEST,(WPARAM)&hitFlags,MAKELPARAM(nm->pt.x,nm->pt.y));
if(hItem==NULL) break;
- if(!(hitFlags&CLCHT_ONITEMEXTRA))
+ if (!(hitFlags&CLCHT_ONITEMEXTRA))
break;
iImage = SendDlgItemMessage(hwndDlg,IDC_CLIST,CLM_GETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(nm->iColumn,0));
if(iImage == nullImage)
@@ -1014,7 +1014,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break;
KillTimer(hwnd, wParam);
- if(!cfg::dat.old_viewmode[0])
+ if (!cfg::dat.old_viewmode[0])
SendMessage(hwnd, WM_COMMAND, IDC_RESETMODES, 0);
else
ApplyViewMode((const char *)cfg::dat.old_viewmode);
@@ -1069,7 +1069,7 @@ clvm_reset_command: break;
case IDC_CONFIGUREMODES:
clvm_config_command:
- if(!g_ViewModeOptDlg)
+ if (!g_ViewModeOptDlg)
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_OPT_VIEWMODES), 0, DlgProcViewModesSetup, 0);
break;
}
@@ -1126,7 +1126,7 @@ void ApplyViewMode(const char *name) cfg::dat.bFilterEffective = 0;
mir_snprintf(szSetting, 256, "%c%s_PF", 246, name);
- if(!cfg::getString(NULL, CLVM_MODULE, szSetting, &dbv)) {
+ if (!cfg::getString(NULL, CLVM_MODULE, szSetting, &dbv)) {
if(lstrlenA(dbv.pszVal) >= 2) {
strncpy(cfg::dat.protoFilter, dbv.pszVal, sizeof(cfg::dat.protoFilter));
cfg::dat.protoFilter[sizeof(cfg::dat.protoFilter) - 1] = 0;
@@ -1135,7 +1135,7 @@ void ApplyViewMode(const char *name) mir_free(dbv.pszVal);
}
mir_snprintf(szSetting, 256, "%c%s_GF", 246, name);
- if(!cfg::getTString(NULL, CLVM_MODULE, szSetting, &dbv)) {
+ if (!cfg::getTString(NULL, CLVM_MODULE, szSetting, &dbv)) {
if(lstrlen(dbv.ptszVal) >= 2) {
_tcsncpy(cfg::dat.groupFilter, dbv.ptszVal, safe_sizeof(cfg::dat.groupFilter));
cfg::dat.groupFilter[safe_sizeof(cfg::dat.groupFilter) - 1] = 0;
@@ -1155,7 +1155,7 @@ void ApplyViewMode(const char *name) /*
mir_snprintf(szSetting, 256, "%c%s_VA", 246, name);
- if(!DBGetContactSettingString(NULL, CLVM_MODULE, szSetting, &dbv)) {
+ if (!DBGetContactSettingString(NULL, CLVM_MODULE, szSetting, &dbv)) {
strncpy(g_CluiData.varFilter, dbv.pszVal, sizeof(g_CluiData.varFilter));
g_CluiData.varFilter[sizeof(g_CluiData.varFilter) - 1] = 0;
if(lstrlenA(g_CluiData.varFilter) > 10 && ServiceExists(MS_VARS_FORMATSTRING))
@@ -1174,7 +1174,7 @@ void ApplyViewMode(const char *name) if(szProto) {
id = (char*) CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if(id) {
- if(!DBGetContactSetting(hContact, szProto, id, &dbv)) {
+ if (!DBGetContactSetting(hContact, szProto, id, &dbv)) {
if(dbv.type == DBVT_ASCIIZ) {
mir_snprintf(UIN, 256, "<%s:%s>", szProto, dbv.pszVal);
}
|