summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-06 22:23:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-06 22:23:39 +0000
commitb8a20c7e3e0dca06effc09868bc5cf1702be30cf (patch)
tree3fc23f24f6aaff7c0796d1fbedfd907cda9d86f4 /plugins/Clist_modern
parentf6943a588688a64a0154a0bc3a2a56ad8727e9fa (diff)
more correct autoformatter
git-svn-id: http://svn.miranda-ng.org/main/trunk@803 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/init.cpp114
-rw-r--r--plugins/Clist_modern/modern_aniavatars.cpp34
-rw-r--r--plugins/Clist_modern/modern_awaymsg.cpp4
-rw-r--r--plugins/Clist_modern/modern_cachefuncs.cpp82
-rw-r--r--plugins/Clist_modern/modern_clc.cpp52
-rw-r--r--plugins/Clist_modern/modern_clcidents.cpp9
-rw-r--r--plugins/Clist_modern/modern_clcitems.cpp28
-rw-r--r--plugins/Clist_modern/modern_clcmsgs.cpp198
-rw-r--r--plugins/Clist_modern/modern_clcopts.cpp54
-rw-r--r--plugins/Clist_modern/modern_clcpaint.cpp178
-rw-r--r--plugins/Clist_modern/modern_clcutils.cpp22
-rw-r--r--plugins/Clist_modern/modern_clistevents.cpp24
-rw-r--r--plugins/Clist_modern/modern_clistmenus.cpp2
-rw-r--r--plugins/Clist_modern/modern_clistmod.cpp12
-rw-r--r--plugins/Clist_modern/modern_clistopts.cpp40
-rw-r--r--plugins/Clist_modern/modern_clistsettings.cpp26
-rw-r--r--plugins/Clist_modern/modern_clisttray.cpp18
-rw-r--r--plugins/Clist_modern/modern_clui.cpp60
-rw-r--r--plugins/Clist_modern/modern_cluiframes.cpp86
-rw-r--r--plugins/Clist_modern/modern_cluiservices.cpp6
-rw-r--r--plugins/Clist_modern/modern_commonheaders.cpp12
-rw-r--r--plugins/Clist_modern/modern_contact.cpp10
-rw-r--r--plugins/Clist_modern/modern_docking.cpp2
-rw-r--r--plugins/Clist_modern/modern_extraimage.cpp18
-rw-r--r--plugins/Clist_modern/modern_framesmenu.cpp2
-rw-r--r--plugins/Clist_modern/modern_gdiplus.cpp4
-rw-r--r--plugins/Clist_modern/modern_groupmenu.cpp4
-rw-r--r--plugins/Clist_modern/modern_image_array.cpp42
-rw-r--r--plugins/Clist_modern/modern_keyboard.cpp2
-rw-r--r--plugins/Clist_modern/modern_newrowopts.cpp6
-rw-r--r--plugins/Clist_modern/modern_popup.cpp2
-rw-r--r--plugins/Clist_modern/modern_row.cpp10
-rw-r--r--plugins/Clist_modern/modern_rowheight_funcs.cpp44
-rw-r--r--plugins/Clist_modern/modern_rowtemplateopt.cpp18
-rw-r--r--plugins/Clist_modern/modern_skinbutton.cpp8
-rw-r--r--plugins/Clist_modern/modern_skineditor.cpp16
-rw-r--r--plugins/Clist_modern/modern_skinengine.cpp110
-rw-r--r--plugins/Clist_modern/modern_skinopt.cpp10
-rw-r--r--plugins/Clist_modern/modern_skinselector.cpp36
-rw-r--r--plugins/Clist_modern/modern_statusbar.cpp20
-rw-r--r--plugins/Clist_modern/modern_statusbar_options.cpp12
-rw-r--r--plugins/Clist_modern/modern_sync.cpp4
-rw-r--r--plugins/Clist_modern/modern_tbbutton.cpp16
-rw-r--r--plugins/Clist_modern/modern_toolbar.cpp32
-rw-r--r--plugins/Clist_modern/modern_viewmodebar.cpp74
-rw-r--r--plugins/Clist_modern/modern_xptheme.cpp4
46 files changed, 774 insertions, 793 deletions
diff --git a/plugins/Clist_modern/init.cpp b/plugins/Clist_modern/init.cpp
index f37e754bf7..6a42b4188d 100644
--- a/plugins/Clist_modern/init.cpp
+++ b/plugins/Clist_modern/init.cpp
@@ -177,72 +177,72 @@ static HRESULT SubclassClistInterface()
pcli->pfnInvalidateDisplayNameCacheEntry = cliInvalidateDisplayNameCacheEntry;
pcli->pfnTrayIconUpdateBase = cliTrayIconUpdateBase;
- pcli->pfnCluiProtocolStatusChanged = cliCluiProtocolStatusChanged;
-
- pcli->pfnBeginRenameSelection = cliBeginRenameSelection;
- pcli->pfnCreateClcContact = cliCreateClcContact;
- pcli->pfnCreateCacheItem = cliCreateCacheItem;
- pcli->pfnGetRowBottomY = cliGetRowBottomY;
- pcli->pfnGetRowHeight = cliGetRowHeight;
- pcli->pfnGetRowTopY = cliGetRowTopY;
- pcli->pfnGetRowTotalHeight = cliGetRowTotalHeight;
- pcli->pfnInvalidateRect = CLUI__cliInvalidateRect;
- pcli->pfnGetCacheEntry = cliGetCacheEntry;
- pcli->pfnOnCreateClc = CLUI::cliOnCreateClc;
- pcli->pfnPaintClc = CLCPaint::cliPaintClc;
- pcli->pfnRebuildEntireList = cliRebuildEntireList;
- pcli->pfnRecalcScrollBar = cliRecalcScrollBar;
- pcli->pfnRowHitTest = cliRowHitTest;
- pcli->pfnScrollTo = cliScrollTo;
- pcli->pfnShowHide = cliShowHide;
- pcli->pfnHitTest = cliHitTest;
- pcli->pfnCompareContacts = cliCompareContacts;
- pcli->pfnBuildGroupPopupMenu = cliBuildGroupPopupMenu;
+ pcli->pfnCluiProtocolStatusChanged = cliCluiProtocolStatusChanged;
+
+ pcli->pfnBeginRenameSelection = cliBeginRenameSelection;
+ pcli->pfnCreateClcContact = cliCreateClcContact;
+ pcli->pfnCreateCacheItem = cliCreateCacheItem;
+ pcli->pfnGetRowBottomY = cliGetRowBottomY;
+ pcli->pfnGetRowHeight = cliGetRowHeight;
+ pcli->pfnGetRowTopY = cliGetRowTopY;
+ pcli->pfnGetRowTotalHeight = cliGetRowTotalHeight;
+ pcli->pfnInvalidateRect = CLUI__cliInvalidateRect;
+ pcli->pfnGetCacheEntry = cliGetCacheEntry;
+ pcli->pfnOnCreateClc = CLUI::cliOnCreateClc;
+ pcli->pfnPaintClc = CLCPaint::cliPaintClc;
+ pcli->pfnRebuildEntireList = cliRebuildEntireList;
+ pcli->pfnRecalcScrollBar = cliRecalcScrollBar;
+ pcli->pfnRowHitTest = cliRowHitTest;
+ pcli->pfnScrollTo = cliScrollTo;
+ pcli->pfnShowHide = cliShowHide;
+ pcli->pfnHitTest = cliHitTest;
+ pcli->pfnCompareContacts = cliCompareContacts;
+ pcli->pfnBuildGroupPopupMenu = cliBuildGroupPopupMenu;
pcli->pfnGetIconFromStatusMode = cliGetIconFromStatusMode;
- pcli->pfnFindItem = cliFindItem;
- pcli->pfnGetRowByIndex = cliGetRowByIndex;
- pcli->pfnGetRowsPriorTo = cliGetRowsPriorTo;
- pcli->pfnGetGroupContentsCount = cliGetGroupContentsCount;
- pcli->pfnCreateEvent = cliCreateEvent;
- pcli->pfnFindRowByText = cliFindRowByText;
+ pcli->pfnFindItem = cliFindItem;
+ pcli->pfnGetRowByIndex = cliGetRowByIndex;
+ pcli->pfnGetRowsPriorTo = cliGetRowsPriorTo;
+ pcli->pfnGetGroupContentsCount = cliGetGroupContentsCount;
+ pcli->pfnCreateEvent = cliCreateEvent;
+ pcli->pfnFindRowByText = cliFindRowByText;
//partialy overloaded - call default handlers from inside
- pcli->pfnIconFromStatusMode = cli_IconFromStatusMode;
- pcli->pfnLoadCluiGlobalOpts = CLUI_cli_LoadCluiGlobalOpts;
- pcli->pfnSortCLC = cli_SortCLC;
- pcli->pfnAddGroup = cli_AddGroup;
- pcli->pfnGetGroupCountsText = cli_GetGroupCountsText;
- pcli->pfnAddContactToTree = cli_AddContactToTree;
- pcli->pfnAddInfoItemToGroup = cli_AddInfoItemToGroup;
- pcli->pfnAddItemToGroup = cli_AddItemToGroup;
- pcli->pfnContactListWndProc = CLUI::cli_ContactListWndProc;
- pcli->pfnDeleteItemFromTree = cli_DeleteItemFromTree;
- pcli->pfnFreeContact = cli_FreeContact;
- pcli->pfnFreeGroup = cli_FreeGroup;
- pcli->pfnChangeContactIcon = cli_ChangeContactIcon;
- pcli->pfnTrayIconProcessMessage = cli_TrayIconProcessMessage;
+ pcli->pfnIconFromStatusMode = cli_IconFromStatusMode;
+ pcli->pfnLoadCluiGlobalOpts = CLUI_cli_LoadCluiGlobalOpts;
+ pcli->pfnSortCLC = cli_SortCLC;
+ pcli->pfnAddGroup = cli_AddGroup;
+ pcli->pfnGetGroupCountsText = cli_GetGroupCountsText;
+ pcli->pfnAddContactToTree = cli_AddContactToTree;
+ pcli->pfnAddInfoItemToGroup = cli_AddInfoItemToGroup;
+ pcli->pfnAddItemToGroup = cli_AddItemToGroup;
+ pcli->pfnContactListWndProc = CLUI::cli_ContactListWndProc;
+ pcli->pfnDeleteItemFromTree = cli_DeleteItemFromTree;
+ pcli->pfnFreeContact = cli_FreeContact;
+ pcli->pfnFreeGroup = cli_FreeGroup;
+ pcli->pfnChangeContactIcon = cli_ChangeContactIcon;
+ pcli->pfnTrayIconProcessMessage = cli_TrayIconProcessMessage;
pcli->pfnSaveStateAndRebuildList = cli_SaveStateAndRebuildList;
- pcli->pfnContactListControlWndProc = cli_ContactListControlWndProc;
- pcli->pfnProcessExternalMessages = cli_ProcessExternalMessages;
- pcli->pfnAddEvent = cli_AddEvent;
- pcli->pfnRemoveEvent = cli_RemoveEvent;
+ pcli->pfnContactListControlWndProc = cli_ContactListControlWndProc;
+ pcli->pfnProcessExternalMessages = cli_ProcessExternalMessages;
+ pcli->pfnAddEvent = cli_AddEvent;
+ pcli->pfnRemoveEvent = cli_RemoveEvent;
pcli->pfnDocking_ProcessWindowMessage = Docking_ProcessWindowMessage;
return S_OK;
}
static HRESULT CreateHookableEvents()
{
- g_CluiData.hEventExtraImageListRebuilding = CreateHookableEvent(ME_CLIST_EXTRA_LIST_REBUILD);
- g_CluiData.hEventExtraImageApplying = CreateHookableEvent(ME_CLIST_EXTRA_IMAGE_APPLY);
- g_CluiData.hEventExtraClick = CreateHookableEvent(ME_CLIST_EXTRA_CLICK);
- g_CluiData.hEventBkgrChanged = CreateHookableEvent(ME_BACKGROUNDCONFIG_CHANGED);
- g_CluiData.hEventPreBuildTrayMenu = CreateHookableEvent(ME_CLIST_PREBUILDTRAYMENU);
- g_CluiData.hEventPreBuildFrameMenu = CreateHookableEvent(ME_CLIST_PREBUILDFRAMEMENU);
- g_CluiData.hEventPreBuildGroupMenu = CreateHookableEvent(ME_CLIST_PREBUILDGROUPMENU);
- g_CluiData.hEventPreBuildSubGroupMenu = CreateHookableEvent(ME_CLIST_PREBUILDSUBGROUPMENU);
- g_CluiData.hEventStatusBarShowToolTip = CreateHookableEvent(ME_CLIST_FRAMES_SB_SHOW_TOOLTIP);
- g_CluiData.hEventStatusBarHideToolTip = CreateHookableEvent(ME_CLIST_FRAMES_SB_HIDE_TOOLTIP);
- g_CluiData.hEventToolBarModuleLoaded = CreateHookableEvent(ME_TB_MODULELOADED);
- g_CluiData.hEventSkinServicesCreated = CreateHookableEvent(ME_SKIN_SERVICESCREATED);
+ g_CluiData.hEventExtraImageListRebuilding = CreateHookableEvent(ME_CLIST_EXTRA_LIST_REBUILD);
+ g_CluiData.hEventExtraImageApplying = CreateHookableEvent(ME_CLIST_EXTRA_IMAGE_APPLY);
+ g_CluiData.hEventExtraClick = CreateHookableEvent(ME_CLIST_EXTRA_CLICK);
+ g_CluiData.hEventBkgrChanged = CreateHookableEvent(ME_BACKGROUNDCONFIG_CHANGED);
+ g_CluiData.hEventPreBuildTrayMenu = CreateHookableEvent(ME_CLIST_PREBUILDTRAYMENU);
+ g_CluiData.hEventPreBuildFrameMenu = CreateHookableEvent(ME_CLIST_PREBUILDFRAMEMENU);
+ g_CluiData.hEventPreBuildGroupMenu = CreateHookableEvent(ME_CLIST_PREBUILDGROUPMENU);
+ g_CluiData.hEventPreBuildSubGroupMenu = CreateHookableEvent(ME_CLIST_PREBUILDSUBGROUPMENU);
+ g_CluiData.hEventStatusBarShowToolTip = CreateHookableEvent(ME_CLIST_FRAMES_SB_SHOW_TOOLTIP);
+ g_CluiData.hEventStatusBarHideToolTip = CreateHookableEvent(ME_CLIST_FRAMES_SB_HIDE_TOOLTIP);
+ g_CluiData.hEventToolBarModuleLoaded = CreateHookableEvent(ME_TB_MODULELOADED);
+ g_CluiData.hEventSkinServicesCreated = CreateHookableEvent(ME_SKIN_SERVICESCREATED);
return S_OK;
}
diff --git a/plugins/Clist_modern/modern_aniavatars.cpp b/plugins/Clist_modern/modern_aniavatars.cpp
index e3b83249aa..7e5d2e773f 100644
--- a/plugins/Clist_modern/modern_aniavatars.cpp
+++ b/plugins/Clist_modern/modern_aniavatars.cpp
@@ -36,7 +36,7 @@ File contains implementation of animated avatars in contact list
#define IMMEDIATE_DRAW (!AniAva.bSeparateWindow)
-void GDIPlus_ExtractAnimatedGif (TCHAR * szName, int width, int height, HBITMAP * pBmp, int ** pframesDelay, int * pframesCount, SIZE * sizeAvatar);
+void GDIPlus_ExtractAnimatedGIF (TCHAR * szName, int width, int height, HBITMAP * pBmp, int ** pframesDelay, int * pframesCount, SIZE * sizeAvatar);
BOOL GDIPlus_IsAnimatedGif (TCHAR * szName);
/* Next is module */
@@ -230,7 +230,7 @@ int AniAva_UnloadModule()
{
int i;
AniAva.bModuleStarted = FALSE;
- for (i = 0; i < AniAva.Objects->realCount; i++)
+ for (i=0; i < AniAva.Objects->realCount; i++)
{
if (AniAva.Objects->items[i])
{
@@ -241,7 +241,7 @@ int AniAva_UnloadModule()
List_Destroy(AniAva.Objects);
mir_free(AniAva.Objects);
- for (i = 0; i < AniAva.AniAvatarList->realCount; i++)
+ for (i=0; i < AniAva.AniAvatarList->realCount; i++)
{
ANIAVA_INFO * aai = (ANIAVA_INFO *)AniAva.AniAvatarList->items[i];
if (aai->tcsFilename) mir_free(aai->tcsFilename);
@@ -277,7 +277,7 @@ int AniAva_UpdateOptions()
}
BOOL oldSeparate = AniAva.bSeparateWindow;
_AniAva_LoadOptions();
- if ( oldSeparate !=AniAva.bSeparateWindow )
+ if ( oldSeparate != AniAva.bSeparateWindow )
{
AniAva_InvalidateAvatarPositions(NULL);
AniAva_RemoveInvalidatedAvatars();
@@ -301,7 +301,7 @@ int AniAva_AddAvatar(HANDLE hContact, TCHAR * szFilename, int width, int heigth)
ANIAVA_OBJECT * pavi;
ANIAVATARIMAGEINFO avii = {0};
SIZE szAva = { width, heigth };
- for (i = 0; i < AniAva.Objects->realCount; i++)
+ for (i=0; i < AniAva.Objects->realCount; i++)
{
pavi = (ANIAVA_OBJECT *)AniAva.Objects->items[i];
if (pavi->hContact == hContact)
@@ -355,7 +355,7 @@ void AniAva_UpdateParent()
{
int i;
HWND parent = fnGetAncestor(pcli->hwndContactList,GA_PARENT);
- for (i = 0; i < AniAva.Objects->realCount; i++)
+ for (i=0; i < AniAva.Objects->realCount; i++)
{
ANIAVA_OBJECT * pai = (ANIAVA_OBJECT *)AniAva.Objects->items[i];
SendMessage(pai->hWindow, AAM_SETPARENT, (WPARAM)parent,0);
@@ -365,7 +365,7 @@ void AniAva_UpdateParent()
}
ANIAVA_OBJECT * FindAvatarByContact( HANDLE hContact )
{
- for ( int i = 0; i < AniAva.Objects->realCount; i++)
+ for ( int i=0; i < AniAva.Objects->realCount; i++)
{
ANIAVA_OBJECT * pai = ((ANIAVA_OBJECT *)AniAva.Objects->items[i]);
if (pai->hContact == hContact)
@@ -437,7 +437,7 @@ int AniAva_RemoveAvatar(HANDLE hContact)
aalock;
{
int i;
- for (i = 0; i < AniAva.Objects->realCount; i++)
+ for (i=0; i < AniAva.Objects->realCount; i++)
{
ANIAVA_OBJECT * pai = (ANIAVA_OBJECT *)AniAva.Objects->items[i];
if (pai->hContact == hContact)
@@ -456,7 +456,7 @@ int AniAva_InvalidateAvatarPositions(HANDLE hContact)
int i;
aacheck 0;
aalock;
- for (i = 0; i < AniAva.Objects->realCount; i++)
+ for (i=0; i < AniAva.Objects->realCount; i++)
{
ANIAVA_OBJECT * pai = (ANIAVA_OBJECT *)AniAva.Objects->items[i];
if (pai->hContact == hContact || !hContact)
@@ -477,7 +477,7 @@ int AniAva_RemoveInvalidatedAvatars()
{
int i;
- for (i = 0; i < AniAva.Objects->realCount; i++)
+ for (i=0; i < AniAva.Objects->realCount; i++)
{
ANIAVA_OBJECT * pai = (ANIAVA_OBJECT *)AniAva.Objects->items[i];
if (pai->hWindow && (pai->bInvalidPos))
@@ -514,7 +514,7 @@ int AniAva_RedrawAllAvatars(BOOL updateZOrder)
aacheck 0;
aalock;
updateZOrder = 1;
- for (i = 0; i < AniAva.Objects->realCount; i++)
+ for (i=0; i < AniAva.Objects->realCount; i++)
{
ANIAVA_OBJECT * pai = (ANIAVA_OBJECT *)AniAva.Objects->items[i];
if (updateZOrder)
@@ -592,7 +592,7 @@ static void _AniAva_RealRemoveAvatar(DWORD UniqueID)
int newWidth = AniAva.width-aai->FrameSize.cx*aai->nFrameCount;
int newHeight = 0;
int i;
- for (i = 0; i < AniAva.AniAvatarList->realCount; i++)
+ for (i=0; i < AniAva.AniAvatarList->realCount; i++)
if (i != j)
{
newHeight = max(newHeight,((ANIAVA_INFO *) AniAva.AniAvatarList->items[i])->FrameSize.cy);
@@ -675,7 +675,7 @@ static int _AniAva_LoadAvatarFromImage(TCHAR * szFileName, int width, int height
paai->dwAvatarUniqId = rand();
fNeedInsertToList = TRUE;
//get image strip
- GDIPlus_ExtractAnimatedGif (szFileName, width, height, &hBitmap, &(paai->pFrameDelays), &(paai->nFrameCount), &(paai->FrameSize));
+ GDIPlus_ExtractAnimatedGIF (szFileName, width, height, &hBitmap, &(paai->pFrameDelays), &(paai->nFrameCount), &(paai->FrameSize));
//copy image to temp DC
hTempDC = CreateCompatibleDC(NULL);
@@ -884,7 +884,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /*= NULL
}
if ( ( AniAva.bFlags & AAO_HAS_OVERLAY )
- && ( dat->overlayIconIdx !=-1 )
+ && ( dat->overlayIconIdx != -1 )
&& ( AniAva.overlayIconImageList ))
{
// if overlay - draw overlay icon
@@ -959,7 +959,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /*= NULL
static void _AniAva_PausePainting()
{
int i;
- for (i = 0; i < AniAva.Objects->realCount; i++)
+ for (i=0; i < AniAva.Objects->realCount; i++)
{
ANIAVA_OBJECT * pai = (ANIAVA_OBJECT *)AniAva.Objects->items[i];
SendMessage(pai->hWindow,AAM_PAUSE,0,0);
@@ -968,7 +968,7 @@ static void _AniAva_PausePainting()
static void _AniAva_ResumePainting()
{
int i;
- for (i = 0; i < AniAva.Objects->realCount; i++)
+ for (i=0; i < AniAva.Objects->realCount; i++)
{
ANIAVA_OBJECT * pai = (ANIAVA_OBJECT *)AniAva.Objects->items[i];
SendNotifyMessage(pai->hWindow,AAM_RESUME,0,0);
@@ -978,7 +978,7 @@ static void _AniAva_ResumePainting()
static void _AniAva_ReduceAvatarImages(int startY, int dY, BOOL bDestroyWindow)
{
int i;
- for (i = 0; i < AniAva.Objects->realCount; i++)
+ for (i=0; i < AniAva.Objects->realCount; i++)
{
ANIAVA_OBJECT * pai = (ANIAVA_OBJECT *)AniAva.Objects->items[i];
int res = SendMessage(pai->hWindow,AAM_REMOVEAVATAR,(WPARAM)startY,(LPARAM)dY);
diff --git a/plugins/Clist_modern/modern_awaymsg.cpp b/plugins/Clist_modern/modern_awaymsg.cpp
index de53d066ba..b9575a39f6 100644
--- a/plugins/Clist_modern/modern_awaymsg.cpp
+++ b/plugins/Clist_modern/modern_awaymsg.cpp
@@ -161,7 +161,7 @@ static int amThreadProc(HWND hwnd)
hContact = amGetCurrentChain();
if (hContact)
{
- DWORD i = 0;
+ DWORD i=0;
do
{
i++;
@@ -209,7 +209,7 @@ void amRequestAwayMsg(HANDLE hContact)
return;
//Do not re-ask for chat rooms
szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if (szProto == NULL || db_get_b(hContact, szProto, "ChatRoom", 0) !=0)
+ if (szProto == NULL || db_get_b(hContact, szProto, "ChatRoom", 0) != 0)
return;
amAddHandleToChain(hContact);
}
diff --git a/plugins/Clist_modern/modern_cachefuncs.cpp b/plugins/Clist_modern/modern_cachefuncs.cpp
index 3e6f69bc2c..fa3850c66a 100644
--- a/plugins/Clist_modern/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/modern_cachefuncs.cpp
@@ -146,10 +146,10 @@ void CSmileyString::_CopySmileyList( SortedList *plInput )
if ( !plInput || plInput->realCount == 0 ) return;
plText = List_Create( 0, 1 );
- for ( int i = 0; i < plInput->realCount; i++ )
+ for ( int i=0; i < plInput->realCount; i++ )
{
ClcContactTextPiece *pieceFrom = (ClcContactTextPiece *) plInput->items[i];
- if ( pieceFrom !=NULL )
+ if ( pieceFrom != NULL )
{
ClcContactTextPiece *piece = (ClcContactTextPiece *) mir_alloc( sizeof(ClcContactTextPiece));
*piece = *pieceFrom;
@@ -171,18 +171,18 @@ void CSmileyString::DestroySmileyList()
return;
}
- if ( plText->realCount !=0 )
+ if ( plText->realCount != 0 )
{
int i;
- for ( i = 0 ; i < plText->realCount ; i++ )
+ for ( i=0 ; i < plText->realCount ; i++ )
{
- if ( plText->items[i] !=NULL )
+ if ( plText->items[i] != NULL )
{
ClcContactTextPiece *piece = (ClcContactTextPiece *) plText->items[i];
if ( !IsBadWritePtr(piece, sizeof(ClcContactTextPiece)) )
{
- if (piece->type == TEXT_PIECE_TYPE_SMILEY && piece->smiley !=g_hListeningToIcon)
+ if (piece->type == TEXT_PIECE_TYPE_SMILEY && piece->smiley != g_hListeningToIcon)
DestroyIcon_protect(piece->smiley);
mir_free(piece);
}
@@ -221,10 +221,10 @@ void CSmileyString::ReplaceSmileys(struct SHORTDATA *dat, PDNCE pdnce, TCHAR * s
{
sp.Protocolname = pdnce->m_cache_cszProto;
- if (db_get_b(NULL,"CLC","Meta",SETTING_USEMETAICON_DEFAULT) !=1 && pdnce->m_cache_cszProto !=NULL && g_szMetaModuleName && strcmp(pdnce->m_cache_cszProto, g_szMetaModuleName) == 0)
+ if (db_get_b(NULL,"CLC","Meta",SETTING_USEMETAICON_DEFAULT) != 1 && pdnce->m_cache_cszProto != NULL && g_szMetaModuleName && strcmp(pdnce->m_cache_cszProto, g_szMetaModuleName) == 0)
{
HANDLE hContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (LPARAM)pdnce->m_cache_hContact, 0);
- if (hContact !=0)
+ if (hContact != 0)
{
sp.Protocolname = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (LPARAM)hContact, 0);
}
@@ -249,9 +249,9 @@ void CSmileyString::ReplaceSmileys(struct SHORTDATA *dat, PDNCE pdnce, TCHAR * s
// Lets add smileys
plText = List_Create( 0, 1 );
- for (unsigned i = 0; i < sp.numSmileys; ++i)
+ for (unsigned i=0; i < sp.numSmileys; ++i)
{
- if (spr[i].hIcon !=NULL) // For deffective smileypacks
+ if (spr[i].hIcon != NULL) // For deffective smileypacks
{
// Add text
if (spr[i].startChar - last_pos > 0)
@@ -335,7 +335,7 @@ int GetStatusName(TCHAR *text, int text_size, PDNCE pdnce, BOOL xstatus_has_prio
CopySkipUnprintableChars(text, dbv.ptszVal, text_size-1);
db_free(&dbv);
- if (text[0] !='\0')
+ if (text[0] != '\0')
return -1;
}
}
@@ -345,7 +345,7 @@ int GetStatusName(TCHAR *text, int text_size, PDNCE pdnce, BOOL xstatus_has_prio
TCHAR *tmp = (TCHAR *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)nStatus, GSMDF_TCHAR_MY);
lstrcpyn(text, tmp, text_size);
//CopySkipUnprintableChars(text, dbv.pszVal, text_size-1);
- if (text[0] !='\0')
+ if (text[0] != '\0')
return 1;
}
@@ -359,7 +359,7 @@ int GetStatusName(TCHAR *text, int text_size, PDNCE pdnce, BOOL xstatus_has_prio
CopySkipUnprintableChars(text, dbv.ptszVal, text_size-1);
db_free(&dbv);
- if (text[0] !='\0')
+ if (text[0] != '\0')
return -1;
}
}
@@ -409,7 +409,7 @@ int GetStatusMessage(TCHAR *text, int text_size, PDNCE pdnce, BOOL xstatus_has_
CopySkipUnprintableChars(text, dbv.ptszVal, text_size-1);
db_free(&dbv);
- if (text[0] !='\0')
+ if (text[0] != '\0')
return -1;
}
}
@@ -423,7 +423,7 @@ int GetStatusMessage(TCHAR *text, int text_size, PDNCE pdnce, BOOL xstatus_has_
CopySkipUnprintableChars(text, dbv.ptszVal, text_size-1);
db_free(&dbv);
- if (text[0] !='\0')
+ if (text[0] != '\0')
return 1;
}
}
@@ -438,7 +438,7 @@ int GetStatusMessage(TCHAR *text, int text_size, PDNCE pdnce, BOOL xstatus_has_
CopySkipUnprintableChars(text, dbv.ptszVal, text_size-1);
db_free(&dbv);
- if (text[0] !='\0')
+ if (text[0] != '\0')
return -1;
}
}
@@ -462,7 +462,7 @@ int Cache_GetLineText(PDNCE pdnce, int type, LPTSTR text, int text_size, TCHAR *
// Try to get XStatusMsg
if (!DBGetContactSettingTString(pdnce->m_cache_hContact, pdnce->m_cache_cszProto, "XStatusMsg", &dbv)) {
- if (dbv.ptszVal !=NULL && dbv.ptszVal[0] !=0) {
+ if (dbv.ptszVal != NULL && dbv.ptszVal[0] != 0) {
TCHAR *tmp = mir_tstrdup(text);
mir_sntprintf(text, text_size, TEXT("%s: %s"), tmp, dbv.pszVal);
mir_free_and_nill(tmp);
@@ -492,7 +492,7 @@ int Cache_GetLineText(PDNCE pdnce, int type, LPTSTR text, int text_size, TCHAR *
// Try to get XStatusName
if (!DBGetContactSettingTString(pdnce->m_cache_hContact, pdnce->m_cache_cszProto, "XStatusName", &dbv)) {
- if (dbv.pszVal !=NULL && dbv.pszVal[0] !=0) {
+ if (dbv.pszVal != NULL && dbv.pszVal[0] != 0) {
TCHAR *tmp = mir_tstrdup(text);
mir_sntprintf(text, text_size, TEXT("%s: %s"), dbv.pszVal, tmp);
@@ -506,7 +506,7 @@ int Cache_GetLineText(PDNCE pdnce, int type, LPTSTR text, int text_size, TCHAR *
DBVARIANT dbv = {0};
// Try to get XStatusName
if (!DBGetContactSettingTString(pdnce->m_cache_hContact, pdnce->m_cache_cszProto, "XStatusName", &dbv)) {
- if (dbv.pszVal !=NULL && dbv.pszVal[0] !=0)
+ if (dbv.pszVal != NULL && dbv.pszVal[0] != 0)
mir_sntprintf(text, text_size, TEXT("%s"), dbv.pszVal);
CopySkipUnprintableChars(text, text, text_size-1);
db_free(&dbv);
@@ -516,7 +516,7 @@ int Cache_GetLineText(PDNCE pdnce, int type, LPTSTR text, int text_size, TCHAR *
if (text[0] == '\0') {
if (show_listening_if_no_away) {
Cache_GetLineText(pdnce, TEXT_LISTENING_TO, text, text_size, variable_text, xstatus_has_priority, 0, 0, use_name_and_message_for_xstatus, pdnce_time_show_only_if_different);
- if (text[0] !='\0')
+ if (text[0] != '\0')
return TEXT_LISTENING_TO;
}
@@ -622,7 +622,7 @@ void Cache_GetSecondLineText(struct SHORTDATA *dat, PDNCE pdnce)
if (pdnce->szSecondLineText)
{
- if (type == TEXT_LISTENING_TO && pdnce->szSecondLineText[0] !=_T('\0'))
+ if (type == TEXT_LISTENING_TO && pdnce->szSecondLineText[0] != _T('\0'))
{
pdnce->ssSecondLine.AddListeningToIcon(dat, pdnce, pdnce->szSecondLineText, dat->second_line_draw_smileys);
}
@@ -658,7 +658,7 @@ void Cache_GetThirdLineText(struct SHORTDATA *dat, PDNCE pdnce)
if (pdnce->szThirdLineText)
{
- if (type == TEXT_LISTENING_TO && pdnce->szThirdLineText[0] !=_T('\0'))
+ if (type == TEXT_LISTENING_TO && pdnce->szThirdLineText[0] != _T('\0'))
{
pdnce->ssThirdLine.AddListeningToIcon(dat, pdnce, pdnce->szThirdLineText, dat->third_line_draw_smileys);
}
@@ -698,7 +698,7 @@ static int CopySkipUnprintableChars(TCHAR *to, TCHAR * buf, DWORD size)
to[0] = '\0';
return 0;
}
- for (i = 0; i < size; i++)
+ for (i=0; i < size; i++)
{
if (buf[i] == 0) break;
if (buf[i]>0 && buf[i] < ' ')
@@ -716,22 +716,22 @@ static int CopySkipUnprintableChars(TCHAR *to, TCHAR * buf, DWORD size)
}
*cp = 0;
{
- //remove bbcodes: [b] [i] [u] < b> < i> < u>
+ //remove bbcodes: [b] [i] [u] <b> <i> <u>
RemoveTag(to,_T("[b]")); RemoveTag(to,_T("[/b]"));
RemoveTag(to,_T("[u]")); RemoveTag(to,_T("[/u]"));
RemoveTag(to,_T("[i]")); RemoveTag(to,_T("[/i]"));
- RemoveTag(to,_T(" < b>")); RemoveTag(to,_T(" < /b>"));
- RemoveTag(to,_T(" < u>")); RemoveTag(to,_T(" < /u>"));
- RemoveTag(to,_T(" < i>")); RemoveTag(to,_T(" < /i>"));
+ RemoveTag(to,_T("<b>")); RemoveTag(to,_T("</b>"));
+ RemoveTag(to,_T("<u>")); RemoveTag(to,_T("</u>"));
+ RemoveTag(to,_T("<i>")); RemoveTag(to,_T("</i>"));
RemoveTag(to,_T("[B]")); RemoveTag(to,_T("[/b]"));
RemoveTag(to,_T("[U]")); RemoveTag(to,_T("[/u]"));
RemoveTag(to,_T("[I]")); RemoveTag(to,_T("[/i]"));
- RemoveTag(to,_T(" < B>")); RemoveTag(to,_T(" < /B>"));
- RemoveTag(to,_T(" < U>")); RemoveTag(to,_T(" < /U>"));
- RemoveTag(to,_T(" < I>")); RemoveTag(to,_T(" < /I>"));
+ RemoveTag(to,_T("<B>")); RemoveTag(to,_T("</B>"));
+ RemoveTag(to,_T("<U>")); RemoveTag(to,_T("</U>"));
+ RemoveTag(to,_T("<I>")); RemoveTag(to,_T("</I>"));
}
return i;
}
@@ -760,7 +760,7 @@ static BOOL ExecuteOnAllContactsOfGroup(struct ClcGroup *group, ExecuteOnAllCont
if (group->cl.items[scanIndex]->SubAllocated > 0)
{
- for (i = 0 ; i < group->cl.items[scanIndex]->SubAllocated ; i++)
+ for (i=0 ; i < group->cl.items[scanIndex]->SubAllocated ; i++)
{
if (!func(&group->cl.items[scanIndex]->subcontacts[i], TRUE, param))
{
@@ -798,7 +798,7 @@ void UpdateAllAvatars(struct ClcData *dat)
BOOL ReduceAvatarPosition(struct ClcContact *contact, BOOL subcontact, void *param)
{
- if (contact->avatar_pos >= *((int *)param))
+ if (contact->avatar_pos >= *((int *)param))
{
contact->avatar_pos--;
}
@@ -826,7 +826,7 @@ void Cache_ProceedAvatarInList(struct ClcData *dat, struct ClcContact *contact)
return;
}
}
- else if (contact->avatar_data->hbmPic !=NULL) //Lets Add it
+ else if (contact->avatar_data->hbmPic != NULL) //Lets Add it
{
HDC hdc;
HBITMAP hDrawBmp,oldBmp;
@@ -932,7 +932,7 @@ void Cache_ProceedAvatarInList(struct ClcData *dat, struct ClcContact *contact)
SelectObject(hdc,oldBmp);
DeleteDC(hdc);
// Add to list
- if (old_pos >= 0)
+ if (old_pos >= 0)
{
ImageArray_ChangeImage(&dat->avatar_cache, hDrawBmp, old_pos);
contact->avatar_pos = old_pos;
@@ -967,13 +967,13 @@ void Cache_GetAvatar(struct ClcData *dat, struct ClcContact *contact)
if (dat->avatars_show && !db_get_b(contact->hContact, "CList", "HideContactAvatar", 0))
{
contact->avatar_data = (struct avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)contact->hContact, 0);
- if (contact->avatar_data == NULL || contact->avatar_data->cbSize !=sizeof(struct avatarCacheEntry)
+ if (contact->avatar_data == NULL || contact->avatar_data->cbSize != sizeof(struct avatarCacheEntry)
|| contact->avatar_data->dwFlags == AVS_BITMAP_EXPIRED)
{
contact->avatar_data = NULL;
}
- if (contact->avatar_data !=NULL)
+ if (contact->avatar_data != NULL)
{
contact->avatar_data->t_lastAccess = (DWORD)time(NULL);
}
@@ -993,7 +993,7 @@ void Cache_GetAvatar(struct ClcData *dat, struct ClcContact *contact)
if (!DBGetContactSettingTString(contact->hContact, "ContactPhoto", "File", &dbv))
{
HBITMAP hBmp = (HBITMAP) CallService(MS_UTILS_LOADBITMAPT, 0, (LPARAM)dbv.ptszVal);
- if (hBmp !=NULL)
+ if (hBmp != NULL)
{
// Make bounds
BITMAP bm;
@@ -1056,7 +1056,7 @@ void Cache_GetAvatar(struct ClcData *dat, struct ClcContact *contact)
mod_DeleteDC(hdc);
// Add to list
- if (old_pos >= 0)
+ if (old_pos >= 0)
{
ImageArray_ChangeImage(&dat->avatar_cache, hDrawBmp, old_pos);
contact->avatar_pos = old_pos;
@@ -1069,19 +1069,19 @@ void Cache_GetAvatar(struct ClcData *dat, struct ClcContact *contact)
DeleteObject(hDrawBmp);
} // if (GetObject(hBmp,sizeof(BITMAP),&bm))
DeleteObject(hBmp);
- } //if (hBmp !=NULL)
+ } //if (hBmp != NULL)
}
db_free(&dbv);
}
// Remove avatar if needed
- if (old_pos >= 0 && contact->avatar_pos == AVATAR_POS_DONT_HAVE)
+ if (old_pos >= 0 && contact->avatar_pos == AVATAR_POS_DONT_HAVE)
{
ImageArray_RemoveImage(&dat->avatar_cache, old_pos);
// Update all items
ExecuteOnAllContacts(dat, ReduceAvatarPosition, (void *)&old_pos);
}
- if (old_pos == AVATAR_POS_ANIMATED && contact->avatar_pos !=AVATAR_POS_ANIMATED)
+ if (old_pos == AVATAR_POS_ANIMATED && contact->avatar_pos != AVATAR_POS_ANIMATED)
{
AniAva_RemoveAvatar( contact->hContact );
}
diff --git a/plugins/Clist_modern/modern_clc.cpp b/plugins/Clist_modern/modern_clc.cpp
index 88996ec28b..90b63f2c37 100644
--- a/plugins/Clist_modern/modern_clc.cpp
+++ b/plugins/Clist_modern/modern_clc.cpp
@@ -98,7 +98,7 @@ static int clcHookModulesLoaded(WPARAM wParam,LPARAM lParam)
Skin_AddIcon(&sid);
sid.pszSection = LPGEN("Contact List/Avatar Overlay");
- for (i = 0; i < MAX_REGS(g_pAvatarOverlayIcons) ; i++) {
+ for (i=0; i < MAX_REGS(g_pAvatarOverlayIcons) ; i++) {
sid.pszDescription = g_pAvatarOverlayIcons[i].description;
sid.pszName = g_pAvatarOverlayIcons[i].name;
sid.iDefaultIndex = - g_pAvatarOverlayIcons[i].id;
@@ -106,7 +106,7 @@ static int clcHookModulesLoaded(WPARAM wParam,LPARAM lParam)
}
sid.pszSection = LPGEN("Contact List/Status Overlay");
- for (i = 0; i < MAX_REGS(g_pStatusOverlayIcons); i++) {
+ for (i=0; i < MAX_REGS(g_pStatusOverlayIcons); i++) {
sid.pszDescription = g_pStatusOverlayIcons[i].description;
sid.pszName = g_pStatusOverlayIcons[i].name;
sid.iDefaultIndex = - g_pStatusOverlayIcons[i].id;
@@ -161,14 +161,14 @@ static int clcHookIconsChanged(WPARAM wParam, LPARAM lParam)
{
int i;
if (MirandaExiting()) return 0;
- for (i = 0 ; i < MAX_REGS(g_pAvatarOverlayIcons) ; i++)
+ for (i=0 ; i < MAX_REGS(g_pAvatarOverlayIcons) ; i++)
{
g_pAvatarOverlayIcons[i].listID = -1;
g_pStatusOverlayIcons[i].listID = -1;
}
if (hAvatarOverlays) ImageList_Destroy(hAvatarOverlays);
hAvatarOverlays = ImageList_Create(16,16,ILC_MASK|ILC_COLOR32,MAX_REGS(g_pAvatarOverlayIcons)*2,1);
- for (i = 0 ; i < MAX_REGS(g_pAvatarOverlayIcons) ; i++)
+ for (i=0 ; i < MAX_REGS(g_pAvatarOverlayIcons) ; i++)
{
HICON hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)g_pAvatarOverlayIcons[i].name);
g_pAvatarOverlayIcons[i].listID = ImageList_AddIcon(hAvatarOverlays,hIcon);
@@ -206,7 +206,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam)
CLUIServices_ProtocolStatusChanged(0,(LPARAM)cws->szModule);
}
}
- else // (HANDLE)wParam !=NULL
+ else // (HANDLE)wParam != NULL
{
if (!strcmp(cws->szSetting,"TickTS"))
{
@@ -375,7 +375,7 @@ static int clcSearchNextContact(HWND hwnd, struct ClcData *dat, int index, const
group->scanIndex++;
continue;
}
- if (group->cl.items[group->scanIndex]->type !=CLCIT_DIVIDER)
+ if (group->cl.items[group->scanIndex]->type != CLCIT_DIVIDER)
{
if ((prefixOk && CSTR_EQUAL == CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, text, -1, group->cl.items[group->scanIndex]->szText, testlen)) ||
(!prefixOk && !lstrcmpi(text, group->cl.items[group->scanIndex]->szText)))
@@ -495,7 +495,7 @@ static LRESULT clcOnCommand(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wPa
switch (LOWORD(wParam))
{
case POPUP_NEWSUBGROUP:
- if (contact->type !=CLCIT_GROUP)
+ if (contact->type != CLCIT_GROUP)
return 0;
SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~CLS_HIDEEMPTYGROUPS);
SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | CLS_USEGROUPS);
@@ -505,19 +505,19 @@ static LRESULT clcOnCommand(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wPa
pcli->pfnBeginRenameSelection(hwnd, dat);
return 0;
case POPUP_DELETEGROUP:
- if (contact->type !=CLCIT_GROUP)
+ if (contact->type != CLCIT_GROUP)
return 0;
CallService(MS_CLIST_GROUPDELETE, contact->groupId, 0);
return 0;
case POPUP_GROUPSHOWOFFLINE:
- if (contact->type !=CLCIT_GROUP)
+ if (contact->type != CLCIT_GROUP)
return 0;
CallService(MS_CLIST_GROUPSETFLAGS, contact->groupId,
MAKELPARAM(CLCItems_IsShowOfflineGroup(contact->group) ? 0 : GROUPF_SHOWOFFLINE, GROUPF_SHOWOFFLINE));
pcli->pfnClcBroadcast(CLM_AUTOREBUILD,0, 0);
return 0;
case POPUP_GROUPHIDEOFFLINE:
- if (contact->type !=CLCIT_GROUP)
+ if (contact->type != CLCIT_GROUP)
return 0;
CallService(MS_CLIST_GROUPSETFLAGS, contact->groupId,
MAKELPARAM(contact->group->hideOffline ? 0 : GROUPF_HIDEOFFLINE, GROUPF_HIDEOFFLINE));
@@ -756,7 +756,7 @@ static LRESULT clcOnKeyDown(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wPa
cliRecalcScrollBar(hwnd,dat);
if (ht)
{
- int i = 0;
+ int i=0;
struct ClcContact *contact2;
struct ClcGroup *group2;
if (FindItem(hwnd,dat,contact->hContact,&contact2,&group2,NULL,FALSE))
@@ -881,7 +881,7 @@ static LRESULT clcOnTimer(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wPara
cliRecalcScrollBar(hwnd,dat);
if (ht)
{
- int i = 0;
+ int i=0;
struct ClcContact *contact;
struct ClcGroup *group;
if (FindItem(hwnd,dat,hitcontact->hContact,&contact,&group,NULL,FALSE))
@@ -1621,9 +1621,9 @@ static LRESULT clcOnLButtonDblClick(struct ClcData *dat, HWND hwnd, UINT msg, WP
}
static LRESULT clcOnDestroy(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- int i = 0;
+ int i=0;
- for(i = 0;i <= FONTID_MODERN_MAX;i++)
+ for(i=0;i <= FONTID_MODERN_MAX;i++)
{
if (dat->fontModernInfo[i].hFont) DeleteObject(dat->fontModernInfo[i].hFont);
dat->fontModernInfo[i].hFont = NULL;
@@ -1707,15 +1707,15 @@ static LRESULT clcOnIntmIconChanged(struct ClcData *dat, HWND hwnd, UINT msg, WP
status = ID_STATUS_OFFLINE;
else
status = GetContactCachedStatus((HANDLE) wParam);
- image_is_special = (LOWORD(contacticon) !=(LOWORD(lParam))); //check only base icons
+ image_is_special = (LOWORD(contacticon) != (LOWORD(lParam))); //check only base icons
nHiddenStatus = CLVM_GetContactHiddenStatus((HANDLE)wParam, szProto, dat);
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- bool isVisiblebyFilter = ( ( ( style & CLS_SHOWHIDDEN ) && nHiddenStatus !=-1 ) || !nHiddenStatus );
+ bool isVisiblebyFilter = ( ( ( style & CLS_SHOWHIDDEN ) && nHiddenStatus != -1 ) || !nHiddenStatus );
bool ifVisibleByClui = !pcli->pfnIsHiddenMode( dat, status );
bool isVisible = g_CluiData.bFilterEffective&CLVM_FILTER_STATUS ? TRUE : ifVisibleByClui;
- bool isIconChanged = CallService(MS_CLIST_GETCONTACTICON, wParam, 0) !=LOWORD(lParam);
+ bool isIconChanged = CallService(MS_CLIST_GETCONTACTICON, wParam, 0) != LOWORD(lParam);
shouldShow = isVisiblebyFilter && ( isVisible || isIconChanged ) ;
@@ -1725,7 +1725,7 @@ static LRESULT clcOnIntmIconChanged(struct ClcData *dat, HWND hwnd, UINT msg, WP
{
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0))
{
- if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) !=-1)
+ if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
hSelItem = pcli->pfnContactToHItem(selcontact);
pcli->pfnAddContactToTree(hwnd, dat, (HANDLE) wParam, (style & CLS_CONTACTLIST) == 0, 0);
recalcScrollBar = 1;
@@ -1751,7 +1751,7 @@ static LRESULT clcOnIntmIconChanged(struct ClcData *dat, HWND hwnd, UINT msg, WP
}
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && ((style & CLS_HIDEOFFLINE) || group->hideOffline || g_CluiData.bFilterEffective)) // CLVM changed
{
- if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) !=-1)
+ if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
hSelItem = pcli->pfnContactToHItem(selcontact);
pcli->pfnRemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
needRepaint = TRUE;
@@ -1912,7 +1912,7 @@ static LRESULT clcOnIntmScrollBarChanged(struct ClcData *dat, HWND hwnd, UINT ms
static LRESULT clcOnIntmStatusChanged(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
int ret = corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
- if (wParam !=0)
+ if (wParam != 0)
{
pdisplayNameCacheEntry pdnce = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry((HANDLE)wParam);
if (pdnce && pdnce->m_cache_cszProto)
@@ -1996,9 +1996,9 @@ int ClcUnloadModule()
if (hIconChangedHook != 0)
ModernUnhookEvent(hIconChangedHook);
- if ( g_CluiData.bOldUseGroups !=(BYTE)-1 )
+ if ( g_CluiData.bOldUseGroups != (BYTE)-1 )
db_set_b(NULL,"CList","UseGroups",(BYTE)g_CluiData.bOldUseGroups );
- if ( g_CluiData.boldHideOffline !=(BYTE)-1 )
+ if ( g_CluiData.boldHideOffline != (BYTE)-1 )
db_set_b(NULL,"CList","HideOffline",(BYTE)g_CluiData.boldHideOffline );
return 0;
@@ -2011,7 +2011,7 @@ int ClcDoProtoAck(HANDLE wParam,ACKDATA * ack)
int i;
if (ack->result == ACKRESULT_SUCCESS)
{
- for (i = 0; i < pcli->hClcProtoCount; i++)
+ for (i=0; i < pcli->hClcProtoCount; i++)
{
if (!lstrcmpA(pcli->clcProto[i].szProto, ack->szModule))
{
@@ -2031,7 +2031,7 @@ int ClcDoProtoAck(HANDLE wParam,ACKDATA * ack)
if (ack->result == ACKRESULT_SUCCESS && ack->lParam) {
{//Do not change DB if it is IRC protocol
if (ack->szModule != NULL)
- if (db_get_b(ack->hContact, ack->szModule, "ChatRoom", 0) !=0) return 0;
+ if (db_get_b(ack->hContact, ack->szModule, "ChatRoom", 0) != 0) return 0;
}
db_set_ws(ack->hContact,"CList","StatusMsg",(const TCHAR *)ack->lParam);
@@ -2043,7 +2043,7 @@ int ClcDoProtoAck(HANDLE wParam,ACKDATA * ack)
//char a = '\0';
{//Do not change DB if it is IRC protocol
if (ack->szModule != NULL)
- if (db_get_b(ack->hContact, ack->szModule, "ChatRoom", 0) !=0) return 0;
+ if (db_get_b(ack->hContact, ack->szModule, "ChatRoom", 0) != 0) return 0;
}
if (ack->hContact)
{
@@ -2065,7 +2065,7 @@ int ClcDoProtoAck(HANDLE wParam,ACKDATA * ack)
if (ack->result == ACKRESULT_SUCCESS)
{
PROTO_AVATAR_INFORMATIONT *pai = (PROTO_AVATAR_INFORMATIONT*)ack->hProcess;
- if (pai !=NULL && pai->hContact !=NULL)
+ if (pai != NULL && pai->hContact != NULL)
pcli->pfnClcBroadcast( INTM_AVATARCHANGED,(WPARAM)pai->hContact,0);
}
}
diff --git a/plugins/Clist_modern/modern_clcidents.cpp b/plugins/Clist_modern/modern_clcidents.cpp
index 2658d81a62..ed19eded5b 100644
--- a/plugins/Clist_modern/modern_clcidents.cpp
+++ b/plugins/Clist_modern/modern_clcidents.cpp
@@ -48,8 +48,7 @@ exclusively externally
int GetContactIndex(struct ClcGroup *group,struct ClcContact *contact)
{
- int i = 0;
- for (i = 0; i < group->cl.count; i++)
+ for (int i=0; i < group->cl.count; i++)
if (group->cl.items[i]->hContact == contact->hContact) return i;
return -1;
}
@@ -90,7 +89,7 @@ int cliGetRowsPriorTo(struct ClcGroup *group,struct ClcGroup *subgroup,int conta
if (group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->SubAllocated)
{
int rows = (group->cl.items[group->scanIndex]->SubAllocated*group->cl.items[group->scanIndex]->SubExpanded*k);
- if (group->scanIndex+rows >= contactIndex)
+ if (group->scanIndex+rows >= contactIndex)
return count+(contactIndex-group->scanIndex)-1;
}
}
@@ -166,7 +165,7 @@ int FindItem(HWND hwnd,struct ClcData *dat,HANDLE hItem,struct ClcContact **cont
group->cl.items[group->scanIndex]->type == CLCIT_CONTACT &&
group->cl.items[group->scanIndex]->SubAllocated > 0)
{
- for (i = 0; i < group->cl.items[group->scanIndex]->SubAllocated; i++)
+ for (i=0; i < group->cl.items[group->scanIndex]->SubAllocated; i++)
{
if (group->cl.items[group->scanIndex]->subcontacts[i].hContact == hItem)
{
@@ -238,7 +237,7 @@ int cliGetRowByIndex(struct ClcData *dat,int testindex,struct ClcContact **conta
if (group->cl.items[group->scanIndex]->SubAllocated)
if (group->cl.items[group->scanIndex]->SubExpanded && dat->expandMeta)
{
- for (i = 0;i < group->cl.items[group->scanIndex]->SubAllocated;i++)
+ for (i=0;i < group->cl.items[group->scanIndex]->SubAllocated;i++)
{
if ((index>0) && (index < CacheArrSize))
{
diff --git a/plugins/Clist_modern/modern_clcitems.cpp b/plugins/Clist_modern/modern_clcitems.cpp
index a0684697ac..319766c139 100644
--- a/plugins/Clist_modern/modern_clcitems.cpp
+++ b/plugins/Clist_modern/modern_clcitems.cpp
@@ -47,7 +47,7 @@ void AddSubcontacts(struct ClcData *dat, struct ClcContact * cont, BOOL showOffl
mir_free(cont->subcontacts);
cont->subcontacts = (struct ClcContact *) mir_calloc(sizeof(struct ClcContact)*subcount);
cont->SubAllocated = subcount;
- i = 0;
+ i=0;
for (j = 0; j < subcount; j++) {
WORD wStatus;
@@ -100,7 +100,7 @@ void AddSubcontacts(struct ClcData *dat, struct ClcContact * cont, BOOL showOffl
} }
cont->SubAllocated = i;
- if (!i && cont->subcontacts !=NULL) mir_free_and_nill(cont->subcontacts);
+ if (!i && cont->subcontacts != NULL) mir_free_and_nill(cont->subcontacts);
}
int cli_AddItemToGroup(struct ClcGroup *group,int iAboveItem)
@@ -138,7 +138,7 @@ void cli_FreeContact(struct ClcContact *p)
if ( p->SubAllocated) {
if ( p->subcontacts && !p->isSubcontact) {
int i;
- for ( i = 0 ; i < p->SubAllocated ; i++ ) {
+ for ( i=0 ; i < p->SubAllocated ; i++ ) {
p->subcontacts[i].ssText.DestroySmileyList();
if ( p->subcontacts[i].avatar_pos == AVATAR_POS_ANIMATED )
AniAva_RemoveAvatar( p->subcontacts[i].hContact );
@@ -252,7 +252,7 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,struct ClcGroup
void * AddTempGroup(HWND hwnd,struct ClcData *dat,const TCHAR *szName,DWORD flags,int groupId,int calcTotalMembers)
{
- int i = 0;
+ int i=0;
int f = 0;
TCHAR * szGroupName;
DWORD groupFlags;
@@ -351,7 +351,7 @@ int RestoreSelection( struct ClcData *dat, HANDLE hSelected )
{
dat->selection = pcli->pfnGetRowsPriorTo(&dat->list, selgroup, List_IndexOf((SortedList*)&selgroup->cl, selcontact->subcontacts ));
- if (dat->selection !=-1 )
+ if (dat->selection != -1 )
dat->selection += selcontact->isSubcontact;
}
return dat->selection;
@@ -533,9 +533,9 @@ void cli_SaveStateAndRebuildList(HWND hwnd, struct ClcData *dat)
NMCLISTCONTROL nm;
int i, j;
- OBJLIST < SavedGroupState_t> savedGroup( 4 );
- OBJLIST < SavedContactState_t> savedContact( 4 );
- OBJLIST < SavedInfoState_t> savedInfo( 4 );
+ OBJLIST<SavedGroupState_t> savedGroup( 4 );
+ OBJLIST<SavedContactState_t> savedContact( 4 );
+ OBJLIST<SavedInfoState_t> savedInfo( 4 );
struct ClcGroup *group;
struct ClcContact *contact;
@@ -603,7 +603,7 @@ void cli_SaveStateAndRebuildList(HWND hwnd, struct ClcData *dat)
else if (group->cl.items[group->scanIndex]->type == CLCIT_GROUP) {
group = group->cl.items[group->scanIndex]->group;
group->scanIndex = 0;
- for (i = 0; i < savedGroup.getCount(); i++)
+ for (i=0; i < savedGroup.getCount(); i++)
if (savedGroup[i].groupId == group->groupId) {
group->expanded = savedGroup[i].expanded;
break;
@@ -611,7 +611,7 @@ void cli_SaveStateAndRebuildList(HWND hwnd, struct ClcData *dat)
continue;
}
else if (group->cl.items[group->scanIndex]->type == CLCIT_CONTACT) {
- for (i = 0; i < savedContact.getCount(); i++)
+ for (i=0; i < savedContact.getCount(); i++)
if (savedContact[i].hContact == group->cl.items[group->scanIndex]->hContact) {
CopyMemory(group->cl.items[group->scanIndex]->iExtraImage, savedContact[i].iExtraImage,
sizeof(group->cl.items[group->scanIndex]->iExtraImage));
@@ -629,7 +629,7 @@ void cli_SaveStateAndRebuildList(HWND hwnd, struct ClcData *dat)
savedGroup.destroy();
savedContact.destroy();
- for (i = 0; i < savedInfo.getCount(); i++) {
+ for (i=0; i < savedInfo.getCount(); i++) {
if (savedInfo[i].parentId == -1)
group = &dat->list;
else {
@@ -734,7 +734,7 @@ int cliGetGroupContentsCount(struct ClcGroup *group, int visibleOnly)
continue;
}
else if ((group->cl.items[group->scanIndex]->type == CLCIT_CONTACT) &&
- (group->cl.items[group->scanIndex]->subcontacts !=NULL) &&
+ (group->cl.items[group->scanIndex]->subcontacts != NULL) &&
((group->cl.items[group->scanIndex]->SubExpanded || (!visibleOnly))))
{
count += group->cl.items[group->scanIndex]->SubAllocated;
@@ -762,7 +762,7 @@ int __fastcall CLVM_GetContactHiddenStatus(HANDLE hContact, char *szProto, struc
BOOL fEmbedded = dat->force_in_dialog;
// always hide subcontacts (but show them on embedded contact lists)
- if (g_CluiData.bMetaAvail && dat !=NULL && dat->IsMetaContactsEnabled && g_szMetaModuleName && db_get_b(hContact, g_szMetaModuleName, "IsSubcontact", 0))
+ if (g_CluiData.bMetaAvail && dat != NULL && dat->IsMetaContactsEnabled && g_szMetaModuleName && db_get_b(hContact, g_szMetaModuleName, "IsSubcontact", 0))
return -1; //subcontact
if (pdnce && pdnce->isUnknown && !fEmbedded)
return 1; //'Unknown Contact'
@@ -773,7 +773,7 @@ int __fastcall CLVM_GetContactHiddenStatus(HANDLE hContact, char *szProto, struc
// check stickies first (priority), only if we really have stickies defined (CLVM_STICKY_CONTACTS is set).
if (g_CluiData.bFilterEffective & CLVM_STICKY_CONTACTS)
{
- if ((dwLocalMask = db_get_dw(hContact, CLVM_MODULE, g_CluiData.current_viewmode, 0)) !=0) {
+ if ((dwLocalMask = db_get_dw(hContact, CLVM_MODULE, g_CluiData.current_viewmode, 0)) != 0) {
if (g_CluiData.bFilterEffective & CLVM_FILTER_STICKYSTATUS)
{
WORD wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
diff --git a/plugins/Clist_modern/modern_clcmsgs.cpp b/plugins/Clist_modern/modern_clcmsgs.cpp
index 23892a4795..251a540d26 100644
--- a/plugins/Clist_modern/modern_clcmsgs.cpp
+++ b/plugins/Clist_modern/modern_clcmsgs.cpp
@@ -30,23 +30,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARAM wParam,LPARAM lParam)
{
- switch(msg)
- {
-
+ ClcContact *contact;
+ ClcGroup *group;
+
+ switch(msg) {
case CLM_DELETEITEM:
- {
- pcli->pfnDeleteItemFromTree(hwnd, (HANDLE) wParam);
- clcSetDelayTimer( TIMERID_DELAYEDRESORTCLC, hwnd, 1 ); //pcli->pfnSortCLC(hwnd, dat, 1);
- clcSetDelayTimer( TIMERID_RECALCSCROLLBAR, hwnd, 2 ); //pcli->pfnRecalcScrollBar(hwnd, dat);
- }
+ pcli->pfnDeleteItemFromTree(hwnd, (HANDLE) wParam);
+ clcSetDelayTimer( TIMERID_DELAYEDRESORTCLC, hwnd, 1 ); //pcli->pfnSortCLC(hwnd, dat, 1);
+ clcSetDelayTimer( TIMERID_RECALCSCROLLBAR, hwnd, 2 ); //pcli->pfnRecalcScrollBar(hwnd, dat);
return 0;
+
case CLM_AUTOREBUILD:
if (dat->force_in_dialog)
- {
pcli->pfnSaveStateAndRebuildList(hwnd, dat);
- }
- else
- {
+ else {
clcSetDelayTimer( TIMERID_REBUILDAFTER, hwnd );
CLM_AUTOREBUILD_WAS_POSTED = FALSE;
}
@@ -69,7 +66,6 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
CLUI__cliInvalidateRect(hwnd,NULL,FALSE);
return 0;
-
case CLM_SETHIDEEMPTYGROUPS:
{
BOOL old = ((GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_HIDEEMPTYGROUPS) != 0);
@@ -81,7 +77,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
SendMessage(hwnd,CLM_AUTOREBUILD,0,0);
}
return 0;
-
+
case CLM_SETTEXTCOLOR:
if (wParam < 0 || wParam>FONTID_MODERN_MAX) break;
@@ -89,51 +85,46 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
dat->force_in_dialog = TRUE;
// Issue 40: option knows nothing about moderns colors
// others who know have to set colors from lowest to highest
- switch ( wParam )
- {
- case FONTID_CONTACTS:
- dat->fontModernInfo[FONTID_SECONDLINE].colour = lParam;
- dat->fontModernInfo[FONTID_THIRDLINE].colour = lParam;
- dat->fontModernInfo[FONTID_AWAY].colour = lParam;
- dat->fontModernInfo[FONTID_DND].colour = lParam;
- dat->fontModernInfo[FONTID_NA].colour = lParam;
- dat->fontModernInfo[FONTID_OCCUPIED].colour = lParam;
- dat->fontModernInfo[FONTID_CHAT].colour = lParam;
- dat->fontModernInfo[FONTID_INVISIBLE].colour = lParam;
- dat->fontModernInfo[FONTID_PHONE].colour = lParam;
- dat->fontModernInfo[FONTID_LUNCH].colour = lParam;
- dat->fontModernInfo[FONTID_CONTACT_TIME].colour = lParam;
- break;
- case FONTID_OPENGROUPS:
- dat->fontModernInfo[FONTID_CLOSEDGROUPS].colour = lParam;
- break;
- case FONTID_OPENGROUPCOUNTS:
- dat->fontModernInfo[FONTID_CLOSEDGROUPCOUNTS].colour = lParam;
- break;
+ switch ( wParam ) {
+ case FONTID_CONTACTS:
+ dat->fontModernInfo[FONTID_SECONDLINE].colour = lParam;
+ dat->fontModernInfo[FONTID_THIRDLINE].colour = lParam;
+ dat->fontModernInfo[FONTID_AWAY].colour = lParam;
+ dat->fontModernInfo[FONTID_DND].colour = lParam;
+ dat->fontModernInfo[FONTID_NA].colour = lParam;
+ dat->fontModernInfo[FONTID_OCCUPIED].colour = lParam;
+ dat->fontModernInfo[FONTID_CHAT].colour = lParam;
+ dat->fontModernInfo[FONTID_INVISIBLE].colour = lParam;
+ dat->fontModernInfo[FONTID_PHONE].colour = lParam;
+ dat->fontModernInfo[FONTID_LUNCH].colour = lParam;
+ dat->fontModernInfo[FONTID_CONTACT_TIME].colour = lParam;
+ break;
+ case FONTID_OPENGROUPS:
+ dat->fontModernInfo[FONTID_CLOSEDGROUPS].colour = lParam;
+ break;
+ case FONTID_OPENGROUPCOUNTS:
+ dat->fontModernInfo[FONTID_CLOSEDGROUPCOUNTS].colour = lParam;
+ break;
}
return 0;
case CLM_GETNEXTITEM:
{
- struct ClcContact *contact;
- struct ClcGroup *group;
int i;
-
- if (wParam !=CLGN_ROOT) {
+ if (wParam != CLGN_ROOT) {
if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) lParam, &contact, &group, NULL))
return (LRESULT) (HANDLE) NULL;
i = List_IndexOf((SortedList*)&group->cl,contact);
if (i < 0) return 0;
}
- switch (wParam)
- {
+ switch (wParam) {
case CLGN_ROOT:
if (dat->list.cl.count)
return (LRESULT) pcli->pfnContactToHItem(dat->list.cl.items[0]);
else
return (LRESULT) (HANDLE) NULL;
case CLGN_CHILD:
- if (contact->type !=CLCIT_GROUP)
+ if (contact->type != CLCIT_GROUP)
return (LRESULT) (HANDLE) NULL;
group = contact->group;
if (group->cl.count == 0)
@@ -142,30 +133,30 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
case CLGN_PARENT:
return group->groupId | HCONTACT_ISGROUP;
case CLGN_NEXT:
- do {
- if (++i >= group->cl.count)
- return NULL;
- }
- while (group->cl.items[i]->type == CLCIT_DIVIDER);
+ do {
+ if (++i >= group->cl.count)
+ return NULL;
+ }
+ while (group->cl.items[i]->type == CLCIT_DIVIDER);
return (LRESULT) pcli->pfnContactToHItem(group->cl.items[i]);
case CLGN_PREVIOUS:
- do {
- if (--i < 0)
- return NULL;
- }
- while (group->cl.items[i]->type == CLCIT_DIVIDER);
+ do {
+ if (--i < 0)
+ return NULL;
+ }
+ while (group->cl.items[i]->type == CLCIT_DIVIDER);
return (LRESULT) pcli->pfnContactToHItem(group->cl.items[i]);
case CLGN_NEXTCONTACT:
for (i++; i < group->cl.count; i++)
if (group->cl.items[i]->type == CLCIT_CONTACT)
break;
- if (i >= group->cl.count)
+ if (i >= group->cl.count)
return (LRESULT) (HANDLE) NULL;
return (LRESULT) pcli->pfnContactToHItem(group->cl.items[i]);
case CLGN_PREVIOUSCONTACT:
- if (i >= group->cl.count)
+ if (i >= group->cl.count)
return (LRESULT) (HANDLE) NULL;
- for (i--; i >= 0; i--)
+ for (i--; i >= 0; i--)
if (group->cl.items[i]->type == CLCIT_CONTACT)
break;
if (i < 0)
@@ -175,13 +166,13 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
for (i++; i < group->cl.count; i++)
if (group->cl.items[i]->type == CLCIT_GROUP)
break;
- if (i >= group->cl.count)
+ if (i >= group->cl.count)
return (LRESULT) (HANDLE) NULL;
return (LRESULT) pcli->pfnContactToHItem(group->cl.items[i]);
case CLGN_PREVIOUSGROUP:
- if (i >= group->cl.count)
+ if (i >= group->cl.count)
return (LRESULT) (HANDLE) NULL;
- for (i--; i >= 0; i--)
+ for (i--; i >= 0; i--)
if (group->cl.items[i]->type == CLCIT_GROUP)
break;
if (i < 0)
@@ -193,8 +184,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
return 0;
case CLM_SELECTITEM:
{
- struct ClcContact *contact;
- struct ClcGroup *group, *tgroup;
+ struct ClcGroup *tgroup;
int index = -1;
int mainindex = -1;
if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, &group, NULL))
@@ -213,68 +203,60 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARA
mainindex = index;
index += contact->isSubcontact;
}
- {
- BYTE k = db_get_b(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT);
- if (k)
+
+ BYTE k = db_get_b(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT);
+ if (k) {
+ for (int i=0; i < mainindex; i++)
{
- int subcontactscount = 0;
- int i;
- for ( i = 0; i < mainindex; i++)
- {
- struct ClcContact *tempCont = group->cl.items[i];
- if (tempCont->type == CLCIT_CONTACT && tempCont->SubAllocated && tempCont->SubExpanded)
- index += tempCont->SubAllocated;
- }
- }
- }
+ struct ClcContact *tempCont = group->cl.items[i];
+ if (tempCont->type == CLCIT_CONTACT && tempCont->SubAllocated && tempCont->SubExpanded)
+ index += tempCont->SubAllocated;
+ }
+ }
+
dat->selection = pcli->pfnGetRowsPriorTo(&dat->list, group, index);
pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
}
return 0;
case CLM_SETEXTRAIMAGE:
- {
- struct ClcContact *contact;
- if (LOWORD(lParam) >= dat->extraColumnsCount)
- return 0;
- if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
- return 0;
- contact->iExtraImage[LOWORD(lParam)] = (BYTE) HIWORD(lParam); //set oldstyle icon
- contact->iWideExtraImage[LOWORD(lParam)] = (WORD) 0xFFFF; //reset wide icon
- pcli->pfnInvalidateRect(hwnd, NULL, FALSE);
+ if (LOWORD(lParam) >= dat->extraColumnsCount)
return 0;
- }
+
+ if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
+ return 0;
+
+ contact->iExtraImage[LOWORD(lParam)] = (BYTE) HIWORD(lParam); //set oldstyle icon
+ contact->iWideExtraImage[LOWORD(lParam)] = (WORD) 0xFFFF; //reset wide icon
+ pcli->pfnInvalidateRect(hwnd, NULL, FALSE);
+ return 0;
case CLM_SETWIDEEXTRAIMAGE:
- {
- struct ClcContact *contact;
- if (LOWORD(lParam) >= dat->extraColumnsCount)
- return 0;
- if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
- return 0;
- contact->iExtraImage[LOWORD(lParam)] = (BYTE) 0xFF; //reset oldstyle icon
- contact->iWideExtraImage[LOWORD(lParam)] = (WORD) HIWORD(lParam); //set wide icon
- pcli->pfnInvalidateRect(hwnd, NULL, FALSE);
- return 0;
- }
+ if (LOWORD(lParam) >= dat->extraColumnsCount)
+ return 0;
- case CLM_SETEXTRAIMAGELIST:
- {
- dat->himlExtraColumns = (HIMAGELIST) lParam;
- dat->himlWideExtraColumns = (HIMAGELIST) wParam;
- pcli->pfnInvalidateRect(hwnd, NULL, FALSE);
+ if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
return 0;
- }
+
+ contact->iExtraImage[LOWORD(lParam)] = (BYTE) 0xFF; //reset oldstyle icon
+ contact->iWideExtraImage[LOWORD(lParam)] = (WORD) HIWORD(lParam); //set wide icon
+ pcli->pfnInvalidateRect(hwnd, NULL, FALSE);
+ return 0;
+
+ case CLM_SETEXTRAIMAGELIST:
+ dat->himlExtraColumns = (HIMAGELIST) lParam;
+ dat->himlWideExtraColumns = (HIMAGELIST) wParam;
+ pcli->pfnInvalidateRect(hwnd, NULL, FALSE);
+ return 0;
case CLM_GETWIDEEXTRAIMAGE:
- {
- struct ClcContact *contact;
- if (LOWORD(lParam) >= dat->extraColumnsCount)
- return 0xFFFF;
- if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
- return 0xFFFF;
- return contact->iWideExtraImage[LOWORD(lParam)];
- }
+ if (LOWORD(lParam) >= dat->extraColumnsCount)
+ return 0xFFFF;
+
+ if (!pcli->pfnFindItem(hwnd, dat, (HANDLE) wParam, &contact, NULL, NULL))
+ return 0xFFFF;
+
+ return contact->iWideExtraImage[LOWORD(lParam)];
}
return corecli.pfnProcessExternalMessages(hwnd, dat, msg, wParam, lParam);
}
diff --git a/plugins/Clist_modern/modern_clcopts.cpp b/plugins/Clist_modern/modern_clcopts.cpp
index 42f6092e04..8c8c5bd400 100644
--- a/plugins/Clist_modern/modern_clcopts.cpp
+++ b/plugins/Clist_modern/modern_clcopts.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "hdr/modern_defsettings.h"
#include "hdr/modern_effectenum.h"
#include "hdr/modern_sync.h"
-#include < m_modernopt.h>
+#include <m_modernopt.h>
#include "m_fontservice.h"
#define FONTF_NORMAL 0
@@ -144,7 +144,7 @@ void RegisterCLUIFonts( void )
effectid.cbSize = sizeof(effectid);
strncpy(effectid.dbSettingsGroup, "CLC", SIZEOF(effectid.dbSettingsGroup));
- for ( i = 0; i < SIZEOF(fontOptionsList); i++, index++ )
+ for ( i=0; i < SIZEOF(fontOptionsList); i++, index++ )
{
fontid.flags = FIDF_DEFAULTVALID | FIDF_APPENDNAME | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS | FIDF_ALLOWREREGISTER | FIDF_NOAS;
fontid.flags |= fontOptionsList[i].dwFlags;
@@ -179,7 +179,7 @@ void RegisterCLUIFonts( void )
ColourIDT colourid = {0};
colourid.cbSize = sizeof(colourid);
- for ( i = 0; i < SIZEOF( colourOptionsList); i++ )
+ for ( i=0; i < SIZEOF( colourOptionsList); i++ )
{
_tcsncpy(colourid.group, colourOptionsList[i].szGroup, SIZEOF(colourid.group));
_tcsncpy(colourid.name, colourOptionsList[i].szDescr, SIZEOF(colourid.group));
@@ -285,7 +285,7 @@ int ClcOptInit(WPARAM wParam,LPARAM lParam)
odp.pfnDlgProc = DlgProcClistListOpts;
odp.flags = ODPF_BOLDGROUPS;
- for (int i = 0; i < SIZEOF(clist_opt_items); i++) {
+ for (int i=0; i < SIZEOF(clist_opt_items); i++) {
odp.pszTemplate = MAKEINTRESOURCEA(clist_opt_items[i].id);
odp.pszTab = clist_opt_items[i].name;
odp.pfnDlgProc = clist_opt_items[i].wnd_proc;
@@ -368,7 +368,7 @@ static void FillCheckBoxTree(HWND hwndTree,const struct CheckBoxValues_t *values
tvis.hParent = NULL;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_PARAM|TVIF_TEXT|TVIF_STATE|TVIF_IMAGE;
- for(i = 0;i < nValues;i++) {
+ for(i=0;i < nValues;i++) {
tvis.item.lParam = values[i].style;
tvis.item.pszText = TranslateTS(values[i].szDescr);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
@@ -506,7 +506,7 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
}
{
DWORD exStyle = db_get_dw(NULL,"CLC","ExStyle",GetDefaultExStyle());
- for(int i = 0;i < SIZEOF(checkBoxToStyleEx);i++)
+ for(int i=0;i < SIZEOF(checkBoxToStyleEx);i++)
CheckDlgButton(hwndDlg,checkBoxToStyleEx[i].id,(exStyle&checkBoxToStyleEx[i].flag)^(checkBoxToStyleEx[i].flag*checkBoxToStyleEx[i].neg)?BST_CHECKED:BST_UNCHECKED);
}
{
@@ -566,7 +566,7 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar
case PSN_APPLY:
{
DWORD exStyle = 0;
- for(int i = 0;i < SIZEOF(checkBoxToStyleEx);i++)
+ for(int i=0;i < SIZEOF(checkBoxToStyleEx);i++)
if ((IsDlgButtonChecked(hwndDlg,checkBoxToStyleEx[i].id) == 0) == checkBoxToStyleEx[i].neg)
exStyle |= checkBoxToStyleEx[i].flag;
db_set_dw(NULL,"CLC","ExStyle",exStyle);
@@ -753,7 +753,7 @@ static int _GetNetVisibleProtoCount()
int i,count,netProtoCount;
PROTOACCOUNT **accs;
ProtoEnumAccounts( &count, &accs );
- for(i = 0,netProtoCount = 0;i < count;i++)
+ for(i=0,netProtoCount = 0;i < count;i++)
{
if ( pcli->pfnGetProtocolVisibility(accs[i]->szModuleName) == 0 ) continue;
netProtoCount++;
@@ -784,7 +784,7 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
int i, item;
int s1, s2, s3;
- for (i = 0; i < SIZEOF(sortby); i++)
+ for (i=0; i < SIZEOF(sortby); i++)
{
item = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_ADDSTRING,0,(LPARAM)TranslateTS(sortby[i]));
SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_SETITEMDATA,item,(LPARAM)0);
@@ -798,7 +798,7 @@ static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
s2 = db_get_b(NULL,"CList","SortBy2",SETTING_SORTBY2_DEFAULT);
s3 = db_get_b(NULL,"CList","SortBy3",SETTING_SORTBY3_DEFAULT);
- for (i = 0; i < SIZEOF(sortby); i++)
+ for (i=0; i < SIZEOF(sortby); i++)
{
if (s1 == sortbyValue[i])
SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_SETCURSEL,i,0);
@@ -923,7 +923,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
ProtoEnumAccounts( &count, &accs );
item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING,0,(LPARAM)TranslateT("Global"));
SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,(LPARAM)0);
- for(i = 0;i < count;i++) {
+ for(i=0;i < count;i++) {
if ( !IsAccountEnabled( accs[i] ) || CallProtoService(accs[i]->szModuleName,PS_GETCAPS,PFLAGNUM_2,0) == 0)
continue;
@@ -972,7 +972,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
EnableWindow(GetDlgItem(hwndDlg,IDC_ALWAYSPRIMARY),IsDlgButtonChecked(hwndDlg,IDC_DONTCYCLE));
}
if (LOWORD(wParam) == IDC_PRIMARYSTATUS && HIWORD(wParam) != CBN_SELCHANGE) break;
- if (LOWORD(wParam) == IDC_BLINKTIME && (HIWORD(wParam) !=EN_CHANGE || (HWND)lParam !=GetFocus())) return 0; // dont make apply enabled during buddy set crap
+ if (LOWORD(wParam) == IDC_BLINKTIME && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0; // dont make apply enabled during buddy set crap
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
}
break;
@@ -1076,7 +1076,7 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM
{
int i, item;
TCHAR *hidemode[] = {TranslateT("Hide to tray"), TranslateT("Behind left edge"), TranslateT("Behind right edge")};
- for (i = 0; i < SIZEOF(hidemode); i++) {
+ for (i=0; i < SIZEOF(hidemode); i++) {
item = SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_ADDSTRING,0,(LPARAM)(hidemode[i]));
SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_SETITEMDATA,item,(LPARAM)0);
SendDlgItemMessage(hwndDlg,IDC_HIDEMETHOD,CB_SETCURSEL,db_get_b(NULL,"ModernData","HideBehind",SETTING_HIDEBEHIND_DEFAULT),0);
@@ -1226,7 +1226,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWMAINMENU),fEnabled);
EnableWindow(GetDlgItem(hwndDlg,IDC_TITLETEXT),fEnabled);
EnableWindow(GetDlgItem(hwndDlg,IDC_DROPSHADOW),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_AEROGLASS),!fEnabled && (g_proc_DWMEnableBlurBehindWindow !=NULL));
+ EnableWindow(GetDlgItem(hwndDlg,IDC_AEROGLASS),!fEnabled && (g_proc_DWMEnableBlurBehindWindow != NULL));
EnableWindow(GetDlgItem(hwndDlg,IDC_TITLEBAR_STATIC),fEnabled);
EnableWindow(GetDlgItem(hwndDlg,IDC_ROUNDCORNERS),fEnabled);
}
@@ -1356,7 +1356,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
EnableWindow(GetDlgItem(hwndDlg,IDC_NOBORDERWND),fEnabled);
EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWMAINMENU),fEnabled);
EnableWindow(GetDlgItem(hwndDlg,IDC_DROPSHADOW),fEnabled);
- EnableWindow(GetDlgItem(hwndDlg,IDC_AEROGLASS),!fEnabled && (g_proc_DWMEnableBlurBehindWindow !=NULL));
+ EnableWindow(GetDlgItem(hwndDlg,IDC_AEROGLASS),!fEnabled && (g_proc_DWMEnableBlurBehindWindow != NULL));
EnableWindow(GetDlgItem(hwndDlg,IDC_TITLEBAR_STATIC),fEnabled);
EnableWindow(GetDlgItem(hwndDlg,IDC_ROUNDCORNERS),fEnabled);
if (LOWORD(wParam) == IDC_DISABLEENGINE)
@@ -1611,7 +1611,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
case M_BKGR_GETSTATE:
{
int indx = wParam;
- if (indx == CB_ERR || indx >= dat->count) break;
+ if (indx == CB_ERR || indx >= dat->count) break;
indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
dat->item[indx].useBitmap = IsDlgButtonChecked(hwndDlg,IDC_BITMAP);
@@ -1639,7 +1639,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
int indx = wParam;
if (indx == -1) break;
flags = dat->item[indx].flags;
- if (indx == CB_ERR || indx >= dat->count) break;
+ if (indx == CB_ERR || indx >= dat->count) break;
indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
CheckDlgButton(hwndDlg, IDC_BITMAP, dat->item[indx].useBitmap?BST_CHECKED:BST_UNCHECKED);
@@ -1736,10 +1736,10 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
SetDlgItemTextA(hwndDlg, IDC_FILENAME, str);
}
else
- if (LOWORD(wParam) == IDC_FILENAME && HIWORD(wParam) !=EN_CHANGE) break;
+ if (LOWORD(wParam) == IDC_FILENAME && HIWORD(wParam) != EN_CHANGE) break;
if (LOWORD(wParam) == IDC_BITMAP)
SendMessage(hwndDlg, M_BKGR_UPDATE, 0,0);
- if (LOWORD(wParam) == IDC_FILENAME && (HIWORD(wParam) !=EN_CHANGE || (HWND)lParam !=GetFocus()))
+ if (LOWORD(wParam) == IDC_FILENAME && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
return 0;
if (LOWORD(wParam) == IDC_BKGRLIST)
{
@@ -1752,7 +1752,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
}
{
int indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0,0);
- if (indx !=CB_ERR && indx < dat->count)
+ if (indx != CB_ERR && indx < dat->count)
{
indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
dat->item[indx].changed = TRUE;
@@ -1853,11 +1853,11 @@ HRESULT BackgroundsLoadModule()
int BackgroundsUnloadModule(void)
{
- if (bkgrList !=NULL)
+ if (bkgrList != NULL)
{
int indx;
for(indx = 0; indx < bkgrCount; indx++)
- if (bkgrList[indx] !=NULL)
+ if (bkgrList[indx] != NULL)
mir_free(bkgrList[indx]);
mir_free(bkgrList);
}
@@ -2013,12 +2013,12 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar
{
bInit = true;
- int i = 0;
+ int i=0;
int item;
int s1, s2, s3;
TranslateDialogDefault(hwndDlg);
- for (i = 0; i < SIZEOF(opts); ++i)
+ for (i=0; i < SIZEOF(opts); ++i)
OptCheckBox_Load(hwndDlg, opts+i);
EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIME),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
@@ -2049,7 +2049,7 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar
SendMessage(hwndDlg,WM_HSCROLL,0x12345678,0);
- for (i = 0; i < SIZEOF(sortby); i++)
+ for (i=0; i < SIZEOF(sortby); i++)
{
item = SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_ADDSTRING,0,(LPARAM)TranslateTS(sortby[i]));
SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_SETITEMDATA,item,(LPARAM)0);
@@ -2063,7 +2063,7 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar
s2 = db_get_b(NULL,"CList","SortBy2",SETTING_SORTBY2_DEFAULT);
s3 = db_get_b(NULL,"CList","SortBy3",SETTING_SORTBY3_DEFAULT);
- for (i = 0; i < SIZEOF(sortby); i++)
+ for (i=0; i < SIZEOF(sortby); i++)
{
if (s1 == sortbyValue[i])
SendDlgItemMessage(hwndDlg,IDC_CLSORT1,CB_SETCURSEL,i,0);
@@ -2123,7 +2123,7 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar
g_mutex_bChangingMode = TRUE;
- for (i = 0; i < SIZEOF(opts); ++i)
+ for (i=0; i < SIZEOF(opts); ++i)
OptCheckBox_Save(hwndDlg, opts+i);
SetWindowPos(pcli->hwndContactList, IsDlgButtonChecked(hwndDlg,IDC_ONTOP)?HWND_TOPMOST:HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
diff --git a/plugins/Clist_modern/modern_clcpaint.cpp b/plugins/Clist_modern/modern_clcpaint.cpp
index 8b06600863..eb9a8ae937 100644
--- a/plugins/Clist_modern/modern_clcpaint.cpp
+++ b/plugins/Clist_modern/modern_clcpaint.cpp
@@ -146,7 +146,7 @@ HFONT CLCPaint::ChangeToFont( HDC hdc, struct ClcData *dat, int id, int *fontHei
*fontHeight = dat->fontModernInfo[id].fontHeight;
ske_ResetTextEffect( hdc );
- if ( dat->hWnd == pcli->hwndContactTree && dat->fontModernInfo[id].effect !=0 )
+ if ( dat->hWnd == pcli->hwndContactTree && dat->fontModernInfo[id].effect != 0 )
ske_SelectTextEffect( hdc, dat->fontModernInfo[id].effect-1, dat->fontModernInfo[id].effectColour1, dat->fontModernInfo[id].effectColour2 );
else
ske_ResetTextEffect( hdc );
@@ -181,7 +181,7 @@ int CLCPaint::GetBasicFontID( struct ClcContact * contact )
if ( contact->flags & CONTACTF_NOTONLIST )
return FONTID_NOTONLIST;
else if ( ( contact->flags&CONTACTF_INVISTO
- && _GetRealStatus( contact, ID_STATUS_OFFLINE ) !=ID_STATUS_INVISIBLE )
+ && _GetRealStatus( contact, ID_STATUS_OFFLINE ) != ID_STATUS_INVISIBLE )
||
( contact->flags&CONTACTF_VISTO
&& _GetRealStatus( contact, ID_STATUS_OFFLINE ) == ID_STATUS_INVISIBLE ))
@@ -244,7 +244,7 @@ void CLCPaint::GetTextSize( SIZE *text_size, HDC hdcMem, RECT free_row_rc, TCHA
text_size->cx = 0;
- for ( i = 0; i < plText->realCount && text_size->cx < free_width; i++ )
+ for ( i=0; i < plText->realCount && text_size->cx < free_width; i++ )
{
ClcContactTextPiece *piece = ( ClcContactTextPiece * ) plText->items[i];
@@ -300,7 +300,7 @@ tPaintCallbackProc CLCPaint::PaintCallbackProc( HWND hWnd, HDC hDC, RECT * rcPai
void CLCPaint::_FillQuickHash()
{
int i;
- for ( i = 0;i < hi_LastItem;i++ )
+ for ( i=0;i < hi_LastItem;i++ )
HASH[i] = mod_CalcHash( HASHTEXT[i] );
}
@@ -375,7 +375,7 @@ int CLCPaint::_GetGeneralisedStatus()
int status = ID_STATUS_OFFLINE;
int statusOnlineness = 0;
- for ( int i = 0; i < pcli->hClcProtoCount; i++ )
+ for ( int i=0; i < pcli->hClcProtoCount; i++ )
{
int thisStatus = pcli->clcProto[i].dwStatus;
if ( thisStatus == ID_STATUS_INVISIBLE )
@@ -396,7 +396,7 @@ int CLCPaint::_GetRealStatus( struct ClcContact * pContact, int nStatus )
if ( !pContact->proto )
return nStatus;
- for ( int i = 0; i < pcli->hClcProtoCount; i++ )
+ for ( int i=0; i < pcli->hClcProtoCount; i++ )
{
if ( !lstrcmpA( pcli->clcProto[i].szProto, pContact->proto ))
return pcli->clcProto[i].dwStatus;
@@ -464,7 +464,7 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT * free_rc, SIZE * text_size, T
if ( uTextFormat & DT_RTLREADING )
i = plText->realCount - 1;
else
- i = 0;
+ i=0;
// Get real height of the line
row_height = ske_DrawText( hdcMem, TEXT( "A" ), 1, &tmp_rc, DT_CALCRECT | uTextFormat );
@@ -477,7 +477,7 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT * free_rc, SIZE * text_size, T
else
{
// Draw text and smileys
- for ( ; i < plText->realCount && i >= 0 && pos_x < text_size->cx && len > 0; i += ( uTextFormat & DT_RTLREADING ? -1 : 1 ))
+ for ( ; i < plText->realCount && i >= 0 && pos_x < text_size->cx && len > 0; i += ( uTextFormat & DT_RTLREADING ? -1 : 1 ))
{
ClcContactTextPiece *piece = ( ClcContactTextPiece * ) plText->items[i];
RECT text_rc = *free_rc;
@@ -630,7 +630,7 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group,
case ID_STATUS_IDLE: _AddParamShort( mpModernMask, hi_Status, hi_IDLE ); break;
default: _AddParamShort( mpModernMask, hi_Status, hi_OFFLINE );
}
- _AddParamShort( mpModernMask, hi_HasAvatar, ( dat->avatars_show && Drawing->avatar_data !=NULL )?hi_True:hi_False );
+ _AddParamShort( mpModernMask, hi_HasAvatar, ( dat->avatars_show && Drawing->avatar_data != NULL )?hi_True:hi_False );
_AddParamShort( mpModernMask, hi_Rate, hi_None + Drawing->bContactRate );
break;
}
@@ -666,7 +666,7 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group,
TCHAR * b2 = mir_tstrdup( Drawing->szText );
int i, m;
m = lstrlen( b2 );
- for ( i = 0; i < m;i++ )
+ for ( i=0; i < m;i++ )
if ( b2[i] == TEXT( ',' )) b2[i] = TEXT( '.' );
{
char* b3 = mir_utf8encodeT( b2 );
@@ -681,7 +681,7 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group,
TCHAR * b2 = mir_tstrdup( group->parent->cl.items[0]->szText );
int i, m;
m = lstrlen( b2 );
- for ( i = 0; i < m;i++ )
+ for ( i=0; i < m;i++ )
if ( b2[i] == TEXT( ',' )) b2[i] = TEXT( '.' );
{
char * b3 = mir_utf8encodeT( b2 );
@@ -708,7 +708,7 @@ void CLCPaint::_RTLRect( RECT *rect, int width, int offset )
void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct ClcContact *Drawing, RECT row_rc, RECT free_row_rc, int left_pos, int right_pos, int selected, int hottrack, RECT *rcPaint )
{
- int i = 0;
+ int i=0;
int dx = free_row_rc.left;
int dy = row_rc.top+dat->row_border;
int dg = 0;
@@ -729,7 +729,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
if ( Drawing->type == CLCIT_GROUP &&
Drawing->group->parent->groupId == 0 &&
- Drawing->group->parent->cl.items[0] !=Drawing )
+ Drawing->group->parent->cl.items[0] != Drawing )
{
dg = dat->row_before_group_space;
free_row_rc.top += dg;
@@ -751,7 +751,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
}
else if ( Drawing->type == CLCIT_CONTACT )
iImage = Drawing->iImage;
- if ( iImage !=-1 )
+ if ( iImage != -1 )
{
COLORREF colourFg;
int mode;
@@ -761,7 +761,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
p_rect.right = p_rect.left+ICON_HEIGHT;
p_rect.bottom = p_rect.top+ICON_HEIGHT;
// Store pos
- if ( dat->text_rtl !=0 ) _RTLRect( &p_rect, free_row_rc.right, dx );
+ if ( dat->text_rtl != 0 ) _RTLRect( &p_rect, free_row_rc.right, dx );
Drawing->pos_icon = p_rect;
if ( hottrack )
{
@@ -780,7 +780,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
}
if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
- _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) !=ID_STATUS_OFFLINE )
+ _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) != ID_STATUS_OFFLINE )
{
mode = ILD_SELECTED;
}
@@ -815,7 +815,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
{
x += ( x>0 )?dat->extraColumnSpacing:ICON_HEIGHT;
SetRect( &rc, fr_rc.right-x, p_rect.top, fr_rc.right-x+ICON_HEIGHT, p_rect.bottom );
- if ( dat->text_rtl !=0 ) _RTLRect( &rc, free_row_rc.right, 0 );
+ if ( dat->text_rtl != 0 ) _RTLRect( &rc, free_row_rc.right, 0 );
Drawing->pos_extra[iImage] = rc;
count++;
}
@@ -836,13 +836,13 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
x += ( x>0 )?dat->extraColumnSpacing:ICON_HEIGHT;
SetRect( &rc, fr_rc.right-x, p_rect.top, fr_rc.right-x+ICON_HEIGHT, p_rect.bottom );
- if ( dat->text_rtl !=0 ) _RTLRect( &rc, free_row_rc.right, dx );
+ if ( dat->text_rtl != 0 ) _RTLRect( &rc, free_row_rc.right, dx );
Drawing->pos_extra[iImage] = rc;
Drawing->pos_extra[iImage] = rc;
- if ( Drawing->iExtraImage[iImage] !=0xFF )
+ if ( Drawing->iExtraImage[iImage] != 0xFF )
ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[iImage], hdcMem,
rc.left, rc.top, 0, 0, CLR_NONE, colourFg, mode );
- else if ( Drawing->iWideExtraImage[iImage] !=0xFFFF )
+ else if ( Drawing->iWideExtraImage[iImage] != 0xFFFF )
ske_ImageList_DrawEx( dat->himlWideExtraColumns, Drawing->iWideExtraImage[iImage], hdcMem,
rc.left, rc.top, 0, 0, CLR_NONE, colourFg, mode );
@@ -898,7 +898,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
if ( wid-count_size.cx > text_size.cx )
{
- if ( dat->row_align_group_mode !=2 ) //center or left
+ if ( dat->row_align_group_mode != 2 ) //center or left
{
int x = ( dat->row_align_group_mode == 1 )?( wid-( text_size.cx+count_size.cx ))>>1:0;
nameRect.left += x;
@@ -937,9 +937,9 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
SetTextColor( hdcMem, dat->selTextColour );
else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
- if ( dat->text_rtl !=0 ) _RTLRect( &nameRect, free_row_rc.right, dx );
+ if ( dat->text_rtl != 0 ) _RTLRect( &nameRect, free_row_rc.right, dx );
_DrawTextSmiley( hdcMem, &nameRect, &text_size, Drawing->szText, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
- if ( selected && dat->szQuickSearch[0] !='\0' )
+ if ( selected && dat->szQuickSearch[0] != '\0' )
{
SetTextColor( hdcMem, dat->quickSearchColour );
_DrawTextSmiley( hdcMem, &nameRect, &text_size, Drawing->szText, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
@@ -951,12 +951,12 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
SetTextColor( hdcMem, dat->selTextColour );
else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
- if ( dat->text_rtl !=0 ) _RTLRect( &countRect, free_row_rc.right, dx );
+ if ( dat->text_rtl != 0 ) _RTLRect( &countRect, free_row_rc.right, dx );
ske_DrawTextA( hdcMem, szCounts, lstrlenA( szCounts ), &countRect, uTextFormat );
}
{
RECT rc = fr_rc;
- if ( dat->text_rtl !=0 ) _RTLRect( &rc, free_row_rc.right, dx );
+ if ( dat->text_rtl != 0 ) _RTLRect( &rc, free_row_rc.right, dx );
Drawing->pos_rename_rect = rc;
}
Drawing->pos_label = nameRect;
@@ -1013,9 +1013,9 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
SetTextColor( hdcMem, dat->selTextColour );
else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
- if ( dat->text_rtl !=0 ) _RTLRect( &text_rect, free_row_rc.right, dx );
+ if ( dat->text_rtl != 0 ) _RTLRect( &text_rect, free_row_rc.right, dx );
_DrawTextSmiley( hdcMem, &text_rect, &text_size, Drawing->szText, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
- if ( selected && dat->szQuickSearch[0] !='\0' )
+ if ( selected && dat->szQuickSearch[0] != '\0' )
{
SetTextColor( hdcMem, dat->quickSearchColour );
_DrawTextSmiley( hdcMem, &text_rect, &text_size, Drawing->szText, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
@@ -1023,7 +1023,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
if ( Drawing->type == CLCIT_GROUP && szCounts && szCounts[0] && counts_rc.right-counts_rc.left>0 )
{
ChangeToFont( hdcMem, dat, Drawing->group->expanded?FONTID_OPENGROUPCOUNTS:FONTID_CLOSEDGROUPCOUNTS, NULL );
- if ( dat->text_rtl !=0 ) _RTLRect( &counts_rc, free_row_rc.right, dx );
+ if ( dat->text_rtl != 0 ) _RTLRect( &counts_rc, free_row_rc.right, dx );
if ( InClistWindow && g_CluiData.fLayered )
ske_DrawTextA( hdcMem, szCounts, lstrlenA( szCounts ), &counts_rc, uTextFormat );
else
@@ -1037,7 +1037,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
Drawing->pos_label = text_rect;
{
RECT rc = fr_rc;
- if ( dat->text_rtl !=0 ) _RTLRect( &rc, free_row_rc.right, dx );
+ if ( dat->text_rtl != 0 ) _RTLRect( &rc, free_row_rc.right, dx );
Drawing->pos_rename_rect = rc;
}
@@ -1045,7 +1045,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
{
//???
RECT rc = fr_rc;
- if ( dat->text_rtl !=0 )
+ if ( dat->text_rtl != 0 )
{
rc.left = Drawing->pos_rename_rect.left;
rc.right = text_rect.left-3;
@@ -1069,7 +1069,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
// Call Placement
cppCalculateRowItemsPos( gl_RowRoot, free_row_rc.right-free_row_rc.left );
// Now paint
- while ( ( gl_RowTabAccess[i] !=NULL || ( i < 2 && Drawing->type == CLCIT_GROUP )) && !( i >= 2 && Drawing->type == CLCIT_GROUP ))
+ while ( ( gl_RowTabAccess[i] != NULL || ( i < 2 && Drawing->type == CLCIT_GROUP )) && !( i >= 2 && Drawing->type == CLCIT_GROUP ))
{
if ( gl_RowTabAccess[i]->r.right-gl_RowTabAccess[i]->r.left>0
@@ -1077,7 +1077,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
{
RECT p_rect = gl_RowTabAccess[i]->r;
OffsetRect( &p_rect, dx, dy );
- if ( dat->text_rtl !=0 && gl_RowTabAccess[i]->type !=TC_EXTRA /*each extra icon modified separately*/ ) _RTLRect( &p_rect, free_row_rc.right, 0 );
+ if ( dat->text_rtl != 0 && gl_RowTabAccess[i]->type != TC_EXTRA /*each extra icon modified separately*/ ) _RTLRect( &p_rect, free_row_rc.right, 0 );
switch ( gl_RowTabAccess[i]->type )
{
case TC_TEXT1:
@@ -1100,7 +1100,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
_DrawTextSmiley( hdcMem, &p_rect, &text_size, Drawing->szText, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
- if ( selected && dat->szQuickSearch[0] !='\0' )
+ if ( selected && dat->szQuickSearch[0] != '\0' )
{
SetTextColor( hdcMem, dat->quickSearchColour );
_DrawTextSmiley( hdcMem, &p_rect, &text_size, Drawing->szText, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
@@ -1149,7 +1149,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
if ( wid-count_size.cx > text_size.cx )
{
- if ( dat->row_align_group_mode !=2 ) //center or left
+ if ( dat->row_align_group_mode != 2 ) //center or left
{
int x = ( dat->row_align_group_mode == 1 )?( wid-( text_size.cx+count_size.cx ))>>1:0;
nameRect.left += x;
@@ -1189,7 +1189,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
_DrawTextSmiley( hdcMem, &nameRect, &text_size, Drawing->szText, lstrlen( Drawing->szText ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
- if ( selected && dat->szQuickSearch[0] !='\0' )
+ if ( selected && dat->szQuickSearch[0] != '\0' )
{
SetTextColor( hdcMem, dat->quickSearchColour );
_DrawTextSmiley( hdcMem, &nameRect, &text_size, Drawing->szText, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
@@ -1271,10 +1271,10 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
{
if ( ( Drawing->type == CLCIT_GROUP && !dat->row_hide_group_icon )
- || ( Drawing->type == CLCIT_CONTACT && Drawing->iImage !=-1
+ || ( Drawing->type == CLCIT_CONTACT && Drawing->iImage != -1
&& !( dat->icon_hide_on_avatar && dat->avatars_show
- && ( ( dat->use_avatar_service && Drawing->avatar_data !=NULL ) ||
- ( !dat->use_avatar_service && Drawing->avatar_pos !=AVATAR_POS_DONT_HAVE )
+ && ( ( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
+ ( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE )
)
&& !Drawing->image_is_special )) )
{
@@ -1287,7 +1287,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
}
else if ( Drawing->type == CLCIT_CONTACT )
iImage = Drawing->iImage;
- if ( iImage !=-1 )
+ if ( iImage != -1 )
{
COLORREF colourFg;
int mode;
@@ -1310,7 +1310,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
}
if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
- _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) !=ID_STATUS_OFFLINE )
+ _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) != ID_STATUS_OFFLINE )
{
mode = ILD_SELECTED;
}
@@ -1324,19 +1324,19 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
}
case TC_AVATAR:
{
- BOOL hasAvatar = ( dat->use_avatar_service && Drawing->avatar_data !=NULL ) ||( !dat->use_avatar_service && Drawing->avatar_pos !=AVATAR_POS_DONT_HAVE );
+ BOOL hasAvatar = ( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE );
BYTE blendmode = 255;
if ( hottrack )
blendmode = 255;
else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
blendmode = 128;
if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
- _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) !=ID_STATUS_OFFLINE )
+ _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) != ID_STATUS_OFFLINE )
blendmode = 128;
if ( !hasAvatar ) //if no avatar then paint icon image
{
int iImage = Drawing->iImage;
- if ( iImage !=-1 )
+ if ( iImage != -1 )
{
COLORREF colourFg;
int mode;
@@ -1359,7 +1359,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
}
if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
- _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) !=ID_STATUS_OFFLINE )
+ _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) != ID_STATUS_OFFLINE )
{
mode = ILD_SELECTED;
}
@@ -1495,7 +1495,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
//TODO fix overlays
// Draw overlay
- if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
+ if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
&& GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ))
{
p_rect.top = p_rect.bottom - ICON_HEIGHT;
@@ -1529,7 +1529,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
item = ExtIconFromStatusMode( Drawing->hContact, Drawing->proto,
Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ));
- if ( item !=-1 )
+ if ( item != -1 )
_DrawStatusIcon( Drawing, dat, item, hdcMem,
p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
CLR_NONE, CLR_NONE, ( blendmode == 255 )?ILD_NORMAL:( blendmode == 128 )?ILD_BLEND50:ILD_BLEND25 );
@@ -1537,7 +1537,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
}
case SETTING_AVATAR_OVERLAY_TYPE_CONTACT:
{
- if ( Drawing->iImage !=-1 )
+ if ( Drawing->iImage != -1 )
_DrawStatusIcon( Drawing, dat, Drawing->iImage, hdcMem,
p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
CLR_NONE, CLR_NONE, ( blendmode == 255 )?ILD_NORMAL:( blendmode == 128 )?ILD_BLEND50:ILD_BLEND25 );
@@ -1571,7 +1571,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
{
SetRect( &rc, p_rect.left+x, p_rect.top, p_rect.left+x+ICON_HEIGHT, p_rect.bottom );
x += dat->extraColumnSpacing;
- if ( dat->text_rtl !=0 ) _RTLRect( &rc, free_row_rc.right, 0 );
+ if ( dat->text_rtl != 0 ) _RTLRect( &rc, free_row_rc.right, 0 );
Drawing->pos_extra[iImage] = rc;
count++;
}
@@ -1593,12 +1593,12 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
SetRect( &rc, p_rect.left+x, p_rect.top, p_rect.left+x+ICON_HEIGHT, p_rect.bottom );
x += dat->extraColumnSpacing;
count++;
- if ( dat->text_rtl !=0 ) _RTLRect( &rc, free_row_rc.right, 0 );
+ if ( dat->text_rtl != 0 ) _RTLRect( &rc, free_row_rc.right, 0 );
Drawing->pos_extra[iImage] = rc;
- if ( Drawing->iExtraImage[iImage] !=0xFF )
+ if ( Drawing->iExtraImage[iImage] != 0xFF )
ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[iImage], hdcMem,
rc.left, rc.top, 0, 0, CLR_NONE, colourFg, mode );
- else if ( Drawing->iWideExtraImage[iImage] !=0xFFFF )
+ else if ( Drawing->iWideExtraImage[iImage] != 0xFFFF )
ske_ImageList_DrawEx( dat->himlWideExtraColumns, Drawing->iWideExtraImage[iImage], hdcMem,
rc.left, rc.top, 0, 0, CLR_NONE, colourFg, mode );
}
@@ -1620,12 +1620,12 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
{
int eNum = gl_RowTabAccess[i]->type-TC_EXTRA1;
if ( eNum < dat->extraColumnsCount )
- if ( Drawing->iExtraImage[eNum] !=0xFF || Drawing->iWideExtraImage[eNum] !=0xFFFF )
+ if ( Drawing->iExtraImage[eNum] != 0xFF || Drawing->iWideExtraImage[eNum] != 0xFFFF )
{
int mode = 0;
int BlendedInActiveState = dat->dbbBlendInActiveState;
int BlendValue = dat->dbbBlend25 ? ILD_BLEND25 : ILD_BLEND50;
- if ( mode2 !=-1 ) mode = mode2;
+ if ( mode2 != -1 ) mode = mode2;
else
{
if ( selected ) mode = BlendedInActiveState?ILD_NORMAL:ILD_SELECTED;
@@ -1641,12 +1641,12 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
}
mode2 = mode;
}
- if ( dat->text_rtl !=0 ) _RTLRect( &p_rect, free_row_rc.right, 0 );
+ if ( dat->text_rtl != 0 ) _RTLRect( &p_rect, free_row_rc.right, 0 );
Drawing->pos_extra[eNum] = p_rect;
- if ( Drawing->iExtraImage[eNum] !=0xFF )
+ if ( Drawing->iExtraImage[eNum] != 0xFF )
ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[eNum], hdcMem,
p_rect.left, p_rect.top, 0, 0, CLR_NONE, colourFg, mode );
- else if ( Drawing->iWideExtraImage[eNum] !=0xFFFF )
+ else if ( Drawing->iWideExtraImage[eNum] != 0xFFFF )
ske_ImageList_DrawEx( dat->himlWideExtraColumns, Drawing->iWideExtraImage[eNum], hdcMem,
p_rect.left, p_rect.top, 0, 0, CLR_NONE, colourFg, mode );
}
@@ -1676,7 +1676,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str
void CLCPaint::_DrawStatusIcon( struct ClcContact * Drawing, struct ClcData *dat, int iImage, HDC hdcMem, int x, int y, int cx, int cy, DWORD colorbg, DWORD colorfg, int mode )
{
- if ( Drawing->type !=CLCIT_CONTACT )
+ if ( Drawing->type != CLCIT_CONTACT )
{
ske_ImageList_DrawEx( g_himlCListClc, LOWORD( iImage ), hdcMem,
x, y, cx, cy, colorbg, colorfg, mode );
@@ -1686,7 +1686,7 @@ void CLCPaint::_DrawStatusIcon( struct ClcContact * Drawing, struct ClcData *dat
ske_ImageList_DrawEx( g_himlCListClc, LOWORD( iImage ), hdcMem,
x, y, cx, cy, colorbg, colorfg, mode );
}
- else if ( iImage !=-1 && HIWORD( iImage ) && dat->drawOverlayedStatus )
+ else if ( iImage != -1 && HIWORD( iImage ) && dat->drawOverlayedStatus )
{
int status = GetContactCachedStatus( Drawing->hContact );
if ( status < ID_STATUS_OFFLINE ) status = ID_STATUS_OFFLINE;
@@ -1806,7 +1806,7 @@ int CLCPaint::_DetermineDrawMode( HWND hWnd, struct ClcData *dat )
int nStatus = _GetGeneralisedStatus();
if ( ( lStyle & WS_DISABLED )
|| ( dat->greyoutFlags & pcli->pfnClcStatusToPf2( nStatus ))
- || ( ( dat->greyoutFlags & GREYF_UNFOCUS) && ( GetFocus() !=hWnd )) )
+ || ( ( dat->greyoutFlags & GREYF_UNFOCUS) && ( GetFocus() != hWnd )) )
paintMode |= DM_GRAY;
if ( lStyle&CLS_GREYALTERNATE )
@@ -1974,8 +1974,8 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
else RowHeight_CalcRowHeight( dat, hWnd, Drawing, line_num );
// Init settings
- selected = ( ( line_num == dat->selection ) && ( dat->hwndRenameEdit !=NULL || dat->showSelAlways || dat->exStyle&CLS_EX_SHOWSELALWAYS || is_foreground ) && Drawing->type !=CLCIT_DIVIDER );
- hottrack = dat->exStyle&CLS_EX_TRACKSELECT && Drawing->type !=CLCIT_DIVIDER && dat->iHotTrack == line_num;
+ selected = ( ( line_num == dat->selection ) && ( dat->hwndRenameEdit != NULL || dat->showSelAlways || dat->exStyle&CLS_EX_SHOWSELALWAYS || is_foreground ) && Drawing->type != CLCIT_DIVIDER );
+ hottrack = dat->exStyle&CLS_EX_TRACKSELECT && Drawing->type != CLCIT_DIVIDER && dat->iHotTrack == line_num;
left_pos = clRect.left + dat->leftMargin + indent * dat->groupIndent + subident;
right_pos = dat->rightMargin; // Border
@@ -2024,7 +2024,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
{
RECT mrc = row_rc;
if ( group->parent == 0
- && group->scanIndex !=0
+ && group->scanIndex != 0
&& group->scanIndex < group->cl.count
&& group->cl.items[group->scanIndex]->type == CLCIT_GROUP )
{
@@ -2038,7 +2038,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
RECT mrc = row_rc;
if ( Drawing->type == CLCIT_GROUP &&
Drawing->group->parent->groupId == 0 &&
- Drawing->group->parent->cl.items[0] !=Drawing )
+ Drawing->group->parent->cl.items[0] != Drawing )
{
mrc.top += dat->row_before_group_space;
}
@@ -2115,7 +2115,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
rc.top += ( rc.bottom - rc.top - dat->checkboxSize ) >> 1;
rc.bottom = rc.top + dat->checkboxSize;
- if ( dat->text_rtl !=0 ) _RTLRect( &rc, free_row_rc.right, 0 );
+ if ( dat->text_rtl != 0 ) _RTLRect( &rc, free_row_rc.right, 0 );
if ( xpt_IsThemed( dat->hCheckBoxTheme )) {
xpt_DrawThemeBackground( dat->hCheckBoxTheme, pc.hdcMem, BP_CHECKBOX, Drawing->flags&CONTACTF_CHECKED?( hottrack?CBS_CHECKEDHOT:CBS_CHECKEDNORMAL ):( hottrack?CBS_UNCHECKEDHOT:CBS_UNCHECKEDNORMAL ), &rc, &rc );
@@ -2139,7 +2139,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
RECT mrc = row_rc;
if ( Drawing->type == CLCIT_GROUP &&
Drawing->group->parent->groupId == 0 &&
- Drawing->group->parent->cl.items[0] !=Drawing )
+ Drawing->group->parent->cl.items[0] != Drawing )
{
mrc.top += dat->row_before_group_space;
}
@@ -2153,7 +2153,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo
}
y += dat->row_heights[line_num];
//increment by subcontacts
- if ( ( group->cl.items && group->scanIndex < group->cl.count && group->cl.items[group->scanIndex]->subcontacts !=NULL && group->cl.items[group->scanIndex]->type !=CLCIT_GROUP )
+ if ( ( group->cl.items && group->scanIndex < group->cl.count && group->cl.items[group->scanIndex]->subcontacts != NULL && group->cl.items[group->scanIndex]->type != CLCIT_GROUP )
&& ( group->cl.items[group->scanIndex]->SubExpanded && dat->expandMeta ))
{
if ( subindex < group->cl.items[group->scanIndex]->SubAllocated-1 )
@@ -2224,7 +2224,7 @@ void CLCPaint::_CopyPaintToDest( HWND hWnd, struct ClcData * dat, HDC hdc, int p
BitBlt( hdc, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, pc.hdcMem, rcPaint->left, rcPaint->top, SRCCOPY );
}
- if ( ( paintMode&DM_GRAY ) && hdc && hdc !=pc.hdcMem )
+ if ( ( paintMode&DM_GRAY ) && hdc && hdc != pc.hdcMem )
{
BLENDFUNCTION bf = {AC_SRC_OVER, 0, 80, AC_SRC_ALPHA };
BOOL a = ( ( paintMode&DM_GRAY ) && ( ( paintMode&DM_NON_LAYERED)) );
@@ -2280,7 +2280,7 @@ void CLCPaint::_PaintClc( HWND hwnd, struct ClcData *dat, HDC hdc, RECT *_rcPain
_DrawLines( hwnd, dat, hdc, paintMode, rcPaint, clRect, pc );
//insertion mark
- if ( dat->iInsertionMark !=-1 )
+ if ( dat->iInsertionMark != -1 )
_DrawInsertionMark( dat, clRect, pc );
// BitBlt from memory to destination
@@ -2353,7 +2353,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
int width;
int height;
BOOL miniMode;
- if ( !dat->avatars_show || Drawing->type !=CLCIT_CONTACT )
+ if ( !dat->avatars_show || Drawing->type != CLCIT_CONTACT )
break;
miniMode = CheckMiniMode( dat, selected, hottrack );
AniAva_InvalidateAvatarPositions( Drawing->hContact );
@@ -2370,7 +2370,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
// Don't have to draw avatar
// Has to draw icon instead?
- if ( dat->icon_hide_on_avatar && dat->icon_draw_on_avatar_space && Drawing->iImage !=-1 )
+ if ( dat->icon_hide_on_avatar && dat->icon_draw_on_avatar_space && Drawing->iImage != -1 )
{
RECT rc;
@@ -2435,8 +2435,8 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
{
RECT rc;
int iImage = -1;
- BOOL has_avatar = ( ( dat->use_avatar_service && Drawing->avatar_data !=NULL ) ||
- ( !dat->use_avatar_service && Drawing->avatar_pos !=AVATAR_POS_DONT_HAVE ))
+ BOOL has_avatar = ( ( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
+ ( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE ))
&& !( CheckMiniMode( dat, selected, hottrack ));
if ( Drawing->type == CLCIT_CONTACT
@@ -2464,7 +2464,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
&& ( !Drawing->image_is_special || !has_avatar ||
(
dat->avatars_draw_overlay
- && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
+ && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
&& GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons )
&& dat->avatars_overlay_type == SETTING_AVATAR_OVERLAY_TYPE_CONTACT
)) )
@@ -2481,7 +2481,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
iImage = Drawing->iImage;
// Has image to draw?
- if ( iImage !=-1 )
+ if ( iImage != -1 )
{
// Make rectangle
rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
@@ -2550,9 +2550,9 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
int count = 0;
RECT rc;
- for ( iImage = dat->extraColumnsCount-1 ; iImage >= 0 ; iImage -- )
+ for ( iImage = dat->extraColumnsCount-1 ; iImage >= 0 ; iImage -- )
{
- if ( Drawing->iExtraImage[iImage] !=0xFF || Drawing->iWideExtraImage[iImage] !=0xFFFF || !dat->MetaIgnoreEmptyExtra )
+ if ( Drawing->iExtraImage[iImage] != 0xFF || Drawing->iWideExtraImage[iImage] != 0xFFFF || !dat->MetaIgnoreEmptyExtra )
{
rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
left, dat->extraColumnSpacing, dat->extraColumnSpacing, ICON_HEIGHT, 0 );
@@ -2751,7 +2751,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct
tmi.printDateTime(pdnce->hTimeZone, _T("t"), buf, SIZEOF(buf), 0);
pdnce->szThirdLineText = mir_tstrdup( buf );
}
- if ( dat->third_line_show && pdnce->szThirdLineText !=NULL && pdnce->szThirdLineText[0]
+ if ( dat->third_line_show && pdnce->szThirdLineText != NULL && pdnce->szThirdLineText[0]
&& free_height > dat->third_line_top_space )
{
//RECT rc_tmp = free_row_rc;
@@ -2978,7 +2978,7 @@ void CLCPaint::_GetBlendMode( IN struct ClcData *dat, IN struct ClcContact * Dra
mode = ILD_NORMAL;
}
if ( Drawing->type == CLCIT_CONTACT && dat->showIdle && ( Drawing->flags&CONTACTF_IDLE ) &&
- _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) !=ID_STATUS_OFFLINE &&
+ _GetRealStatus( Drawing, ID_STATUS_OFFLINE ) != ID_STATUS_OFFLINE &&
( bFlag&GIM_IDLE_AFFECT )
)
mode = ILD_SELECTED;
@@ -2999,7 +2999,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo
{
int overlayIdx = -1;
int blendmode = 255;
- if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
+ if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
&& GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ))
{
switch( dat->avatars_overlay_type )
@@ -3071,7 +3071,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo
SelectClipRgn( hdcMem, rgn );
DeleteObject( rgn );
// Draw overlays
- if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
+ if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
&& GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ))
{
POINT ptOverlay = { prcItem->right-ICON_HEIGHT, prcItem->bottom-ICON_HEIGHT };
@@ -3097,7 +3097,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo
item = ExtIconFromStatusMode( Drawing->hContact, Drawing->proto,
Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ));
- if ( item !=-1 )
+ if ( item != -1 )
_DrawStatusIcon( Drawing, dat, item, hdcMem,
ptOverlay.x, ptOverlay.y, ICON_HEIGHT, ICON_HEIGHT,
CLR_NONE, CLR_NONE, ( blendmode == 255 )?ILD_NORMAL:( blendmode == 128 )?ILD_BLEND50:ILD_BLEND25 );
@@ -3105,7 +3105,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo
}
case SETTING_AVATAR_OVERLAY_TYPE_CONTACT:
{
- if ( Drawing->iImage !=-1 )
+ if ( Drawing->iImage != -1 )
_DrawStatusIcon( Drawing, dat, Drawing->iImage, hdcMem,
ptOverlay.x, ptOverlay.y, ICON_HEIGHT, ICON_HEIGHT,
CLR_NONE, CLR_NONE, ( blendmode == 255 )?ILD_NORMAL:( blendmode == 128 )?ILD_BLEND50:ILD_BLEND25 );
@@ -3130,7 +3130,7 @@ void CLCPaint::_DrawContactIcon( HDC hdcMem, struct ClcData *dat, struct ClcCont
iImage = Drawing->iImage;
// Has image to draw?
- if ( iImage !=-1 )
+ if ( iImage != -1 )
{
COLORREF colourFg;
int mode;
@@ -3152,7 +3152,7 @@ void CLCPaint::_DrawContactText( HDC hdcMem, struct ClcData *dat, struct ClcCont
if ( Drawing->type == CLCIT_GROUP )
{
ske_DrawText( hdcMem, Drawing->szText, -1, prcItem, uTextFormat );
- if ( selected && dat->szQuickSearch[0] !='\0' )
+ if ( selected && dat->szQuickSearch[0] != '\0' )
{
SetTextColor( hdcMem, dat->quickSearchColour );
ske_DrawText( hdcMem, Drawing->szText, lstrlen( dat->szQuickSearch ), prcItem, uTextFormat );
@@ -3166,7 +3166,7 @@ void CLCPaint::_DrawContactText( HDC hdcMem, struct ClcData *dat, struct ClcCont
uTextFormat |= DT_VCENTER;
//get font
_DrawTextSmiley( hdcMem, prcItem, &text_size, Drawing->szText, -1, Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
- if ( selected && dat->szQuickSearch[0] !='\0' )
+ if ( selected && dat->szQuickSearch[0] != '\0' )
{
SetTextColor( hdcMem, dat->quickSearchColour );
_DrawTextSmiley( hdcMem, prcItem, &text_size, Drawing->szText, lstrlen( dat->szQuickSearch ), Drawing->ssText.plText, uTextFormat, dat->text_resize_smileys );
@@ -3251,13 +3251,13 @@ void CLCPaint::_DrawContactExtraIcon( HDC hdcMem, struct ClcData *dat, struct Cl
//Draw extra icon
COLORREF colourFg;
int mode;
- if ( iImage !=-1 )
+ if ( iImage != -1 )
{
_GetBlendMode( dat, Drawing, selected, hottrack, GIM_EXTRAICON_AFFECT, &colourFg, &mode );
- if ( Drawing->iExtraImage[iImage] !=0xFF )
+ if ( Drawing->iExtraImage[iImage] != 0xFF )
ske_ImageList_DrawEx( dat->himlExtraColumns, Drawing->iExtraImage[iImage], hdcMem,
rc->left, rc->top, 0, 0, CLR_NONE, colourFg, mode );
- else if ( Drawing->iWideExtraImage[iImage] !=0xFFFF )
+ else if ( Drawing->iWideExtraImage[iImage] != 0xFFFF )
ske_ImageList_DrawEx( dat->himlWideExtraColumns, Drawing->iWideExtraImage[iImage], hdcMem,
rc->left, rc->top, 0, 0, CLR_NONE, colourFg, mode );
}
@@ -3319,7 +3319,7 @@ void CLCPaint::_DrawContactItems( HWND hwnd, HDC hdcMem, struct ClcData *dat, st
text_rc.right = row_rc->left;
text_rc.left = row_rc->right;
- for ( i = 0; i < Drawing->ext_nItemsNum; i++ )
+ for ( i=0; i < Drawing->ext_nItemsNum; i++ )
{
RECT * prcItem = &( Drawing->ext_mpItemsDesc[i].itemRect );
if ( __IsVisible( rcPaint, prcItem ) || ( Drawing->ext_mpItemsDesc[i].itemType == CIT_AVATAR && Drawing->avatar_pos == AVATAR_POS_ANIMATED ))
diff --git a/plugins/Clist_modern/modern_clcutils.cpp b/plugins/Clist_modern/modern_clcutils.cpp
index cc99840039..c08c57bacd 100644
--- a/plugins/Clist_modern/modern_clcutils.cpp
+++ b/plugins/Clist_modern/modern_clcutils.cpp
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
BOOL RectHitTest(RECT *rc, int testx, int testy)
{
- return testx >= rc->left && testx < rc->right && testy >= rc->top && testy < rc->bottom;
+ return testx >= rc->left && testx < rc->right && testy >= rc->top && testy < rc->bottom;
}
int cliHitTest(HWND hwnd,struct ClcData *dat,int testx,int testy,struct ClcContact **contact,struct ClcGroup **group,DWORD *flags)
@@ -63,7 +63,7 @@ int cliHitTest(HWND hwnd,struct ClcData *dat,int testx,int testy,struct ClcConta
// Get hit item
hit = cliRowHitTest(dat, dat->yScroll + testy);
- if (hit !=-1)
+ if (hit != -1)
hit = cliGetRowByIndex(dat, hit, &hitcontact, &hitgroup);
if (hit == -1) {
@@ -104,7 +104,7 @@ int cliHitTest(HWND hwnd,struct ClcData *dat,int testx,int testy,struct ClcConta
{
// int c = -1;
int i;
- for(i = 0; i < dat->extraColumnsCount; i++)
+ for(i=0; i < dat->extraColumnsCount; i++)
{
if (RectHitTest(&hitcontact->pos_extra[i], testx, testy))
{
@@ -137,7 +137,7 @@ void cliScrollTo(HWND hwnd,struct ClcData *dat,int desty,int noSmooth)
RECT clRect,rcInvalidate;
int maxy,previousy;
- if (dat->iHotTrack != -1 && dat->yScroll !=desty) {
+ if (dat->iHotTrack != -1 && dat->yScroll != desty) {
pcli->pfnInvalidateItem(hwnd,dat,dat->iHotTrack);
dat->iHotTrack = -1;
ReleaseCapture();
@@ -295,7 +295,7 @@ void cliBeginRenameSelection(HWND hwnd,struct ClcData *dat)
h = dat->row_heights[dat->selection];
{
int i;
- for (i = 0; i <= FONTID_MODERN_MAX; i++)
+ for (i=0; i <= FONTID_MODERN_MAX; i++)
if (h < dat->fontModernInfo[i].fontHeight+4) h = dat->fontModernInfo[i].fontHeight+4;
}
//TODO contact->pos_label
@@ -480,7 +480,7 @@ void LoadCLCFonts( HWND hwnd, struct ClcData *dat )
HDC hdc = GetDC(hwnd);
HFONT holdfont = (HFONT)GetCurrentObject( hdc, OBJ_FONT );
- for ( int i = 0 ; i <= FONTID_MODERN_MAX; i++ )
+ for ( int i=0 ; i <= FONTID_MODERN_MAX; i++ )
{
if ( !dat->fontModernInfo[i].changed && dat->fontModernInfo[i].hFont )
{
@@ -531,7 +531,7 @@ void LoadCLCOptions(HWND hwnd, struct ClcData *dat )
{
int defItemsOrder[NUM_ITEM_TYPE] = SETTINS_ROWITEMORDER_DEFAULT;
- for (i = 0 ; i < NUM_ITEM_TYPE ; i++)
+ for (i=0 ; i < NUM_ITEM_TYPE ; i++)
{
char tmp[128];
mir_snprintf(tmp, SIZEOF(tmp), "RowPos%d", i);
@@ -541,7 +541,7 @@ void LoadCLCOptions(HWND hwnd, struct ClcData *dat )
else
{
int defItems[] = {ITEM_ICON, ITEM_TEXT, ITEM_EXTRA_ICONS,};
- for (i = 0 ; i < NUM_ITEM_TYPE; i++)
+ for (i=0 ; i < NUM_ITEM_TYPE; i++)
dat->row_items[i] = (i < SIZEOF(defItems)) ? defItems[i] : -1;
}
@@ -820,7 +820,7 @@ int cliFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int pref
continue;
}
contact = group->cl.items[group->scanIndex];
- if (contact->type !=CLCIT_DIVIDER)
+ if (contact->type != CLCIT_DIVIDER)
{
if ((prefixOk && !_tcsnicmp(text, contact->szText, testlen)) ||
(!prefixOk && !lstrcmpi(text, contact->szText)))
@@ -845,8 +845,8 @@ int cliFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int pref
{
if (!(dat->exStyle & CLS_EX_QUICKSEARCHVISONLY) || contact->SubExpanded )
{
- int i = 0;
- for (i = 0; i < contact->SubAllocated; i++)
+ int i=0;
+ for (i=0; i < contact->SubAllocated; i++)
{
struct ClcContact * subcontact = &(contact->subcontacts[i]);
if ((prefixOk && !_tcsnicmp(text, subcontact->szText, testlen)) ||
diff --git a/plugins/Clist_modern/modern_clistevents.cpp b/plugins/Clist_modern/modern_clistevents.cpp
index 2b47b3403a..5000929294 100644
--- a/plugins/Clist_modern/modern_clistevents.cpp
+++ b/plugins/Clist_modern/modern_clistevents.cpp
@@ -84,7 +84,7 @@ static CLISTEVENT* MyGetEvent(int iSelection)
{
int i;
- for (i = 0; i < pcli->events.count; i++) {
+ for (i=0; i < pcli->events.count; i++) {
struct CListEvent* p = pcli->events.items[i];
if (p->menuId == iSelection)
return &p->cle;
@@ -106,7 +106,7 @@ struct CListEvent* cli_AddEvent(CLISTEVENT *cle)
return NULL;
if (1) {
- if (p->cle.hContact !=0 && p->cle.hDbEvent !=(HANDLE) 1 && !(p->cle.flags & CLEF_ONLYAFEW)) {
+ if (p->cle.hContact != 0 && p->cle.hDbEvent != (HANDLE) 1 && !(p->cle.flags & CLEF_ONLYAFEW)) {
int j;
struct NotifyMenuItemExData *nmi = 0;
char *szProto;
@@ -120,9 +120,9 @@ struct CListEvent* cli_AddEvent(CLISTEVENT *cle)
{
// dup check only for msg events
for (j = 0; j < GetMenuItemCount(g_CluiData.hMenuNotify); j++) {
- if (GetMenuItemInfo(g_CluiData.hMenuNotify, j, TRUE, &mii) !=0) {
+ if (GetMenuItemInfo(g_CluiData.hMenuNotify, j, TRUE, &mii) != 0) {
nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
- if (nmi !=0 && (HANDLE) nmi->hContact == (HANDLE) p->cle.hContact && nmi->iIcon == p->imlIconIndex)
+ if (nmi != 0 && (HANDLE) nmi->hContact == (HANDLE) p->cle.hContact && nmi->iIcon == p->imlIconIndex)
return p;
} } }
@@ -156,7 +156,7 @@ struct CListEvent* cli_AddEvent(CLISTEVENT *cle)
}
}
- else if (p->cle.hContact !=0 && (p->cle.flags & CLEF_ONLYAFEW))
+ else if (p->cle.hContact != 0 && (p->cle.flags & CLEF_ONLYAFEW))
{
g_CluiData.iIconNotify = p->imlIconIndex;
g_CluiData.hUpdateContact = p->cle.hContact;
@@ -181,7 +181,7 @@ int cli_RemoveEvent(HANDLE hContact, HANDLE hDbEvent)
int res = 0;
// Find the event that should be removed
- for (i = 0; i < pcli->events.count; i++)
+ for (i=0; i < pcli->events.count; i++)
{
if ((pcli->events.items[i]->cle.hContact == hContact) && (pcli->events.items[i]->cle.hDbEvent == hDbEvent))
{
@@ -201,7 +201,7 @@ int cli_RemoveEvent(HANDLE hContact, HANDLE hDbEvent)
MENUITEMINFO mii = {0};
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA;
- if (GetMenuItemInfo(g_CluiData.hMenuNotify, pcli->events.items[i]->menuId, FALSE, &mii) !=0)
+ if (GetMenuItemInfo(g_CluiData.hMenuNotify, pcli->events.items[i]->menuId, FALSE, &mii) != 0)
{
struct NotifyMenuItemExData *nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
if (nmi && nmi->hContact == hContact && nmi->hDbEvent == hDbEvent)
@@ -350,7 +350,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC)
{
int iCount = GetMenuItemCount(g_CluiData.hMenuNotify);
rc.left += 26;
- if (g_CluiData.hUpdateContact !=0)
+ if (g_CluiData.hUpdateContact != 0)
{
TCHAR *szName = pcli->pfnGetContactDisplayName(g_CluiData.hUpdateContact, 0);
int iIcon = CallService(MS_CLIST_GETCONTACTICON, (WPARAM) g_CluiData.hUpdateContact, 0);
@@ -487,7 +487,7 @@ static LRESULT CALLBACK EventArea_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LP
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA | MIIM_ID;
- if (GetMenuItemInfoA(g_CluiData.hMenuNotify, lpi->itemID, FALSE, &mii) !=0) {
+ if (GetMenuItemInfoA(g_CluiData.hMenuNotify, lpi->itemID, FALSE, &mii) != 0) {
if (mii.dwItemData == lpi->itemData)
{
lpi->itemWidth = 8 + 16;
@@ -509,7 +509,7 @@ static LRESULT CALLBACK EventArea_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LP
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA;
- if (GetMenuItemInfoA(g_CluiData.hMenuNotify, (UINT) dis->itemID, FALSE, &mii) !=0)
+ if (GetMenuItemInfoA(g_CluiData.hMenuNotify, (UINT) dis->itemID, FALSE, &mii) != 0)
{
nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
if (nmi)
@@ -544,7 +544,7 @@ static LRESULT CALLBACK EventArea_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LP
else
iSelection = GetMenuItemID(g_CluiData.hMenuNotify, 0);
result = GetMenuItemInfo(g_CluiData.hMenuNotify, (UINT) iSelection, FALSE, &mii);
- if (result !=0) {
+ if (result != 0) {
nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
if (nmi) {
CLISTEVENT *cle = MyGetEvent(iSelection);
@@ -554,7 +554,7 @@ static LRESULT CALLBACK EventArea_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LP
// re-obtain the pointer, it may already be invalid/point to another event if the
// event we're interested in was removed by the service (nasty one...)
cle1 = MyGetEvent(iSelection);
- if (cle1 !=NULL)
+ if (cle1 != NULL)
CallService(MS_CLIST_REMOVEEVENT, (WPARAM) cle->hContact, (LPARAM) cle->hDbEvent);
}
}
diff --git a/plugins/Clist_modern/modern_clistmenus.cpp b/plugins/Clist_modern/modern_clistmenus.cpp
index 509c4908bd..8ef9abdd83 100644
--- a/plugins/Clist_modern/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/modern_clistmenus.cpp
@@ -152,7 +152,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam)
hFavoriteContactMenuItems = (HANDLE*)malloc(sizeof(HANDLE)*SIZEOF(rates));
memset(hFavoriteContactMenuItems,0,sizeof(HANDLE)*SIZEOF(rates));
}
- for (i = 0; i < SIZEOF(rates); i++)
+ for (i=0; i < SIZEOF(rates); i++)
{
mi.hIcon = mi.hIcon = CLUI_LoadIconFromExternalFile("clisticons.dll",8+i,TRUE,TRUE,iconsName[i],"Contact List",Translate(iconsName[i]),-IDI_FAVORITE_0 - i, &NeedFree);
mi.ptszName = rates[i];
diff --git a/plugins/Clist_modern/modern_clistmod.cpp b/plugins/Clist_modern/modern_clistmod.cpp
index 5f126f7f7d..27216b7797 100644
--- a/plugins/Clist_modern/modern_clistmod.cpp
+++ b/plugins/Clist_modern/modern_clistmod.cpp
@@ -22,13 +22,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "hdr/modern_commonheaders.h"
#include "m_clui.h"
-#include < m_file.h>
-#include < m_addcontact.h>
+#include <m_file.h>
+#include <m_addcontact.h>
#include "hdr/modern_clist.h"
#include "hdr/modern_commonprototypes.h"
#include "hdr/modern_sync.h"
#include "hdr/modern_clui.h"
-#include < m_modernopt.h>
+#include <m_modernopt.h>
pfnMyMonitorFromPoint MyMonitorFromPoint = NULL;
pfnMyMonitorFromWindow MyMonitorFromWindow = NULL;
pfnMyGetMonitorInfo MyGetMonitorInfo = NULL;
@@ -337,7 +337,7 @@ __inline DWORD GetDIBPixelColor(int X, int Y, int Width, int Height, int ByteWid
int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) {
RECT rc = { 0 };
POINT pt = { 0 };
- register int i = 0,
+ register int i=0,
j = 0,
width = 0,
height = 0,
@@ -384,7 +384,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) {
else
{
RECT rc;
- int i = 0;
+ int i=0;
rgn = CreateRectRgn(0,0,1,1);
GetWindowRect(hWnd,&rc);
GetWindowRgn(hWnd,rgn);
@@ -566,7 +566,7 @@ int cliShowHide(WPARAM wParam,LPARAM lParam)
}
}
- if (MySetProcessWorkingSetSize !=NULL)
+ if (MySetProcessWorkingSetSize != NULL)
MySetProcessWorkingSetSize(GetCurrentProcess(),-1,-1);
}
return 0;
diff --git a/plugins/Clist_modern/modern_clistopts.cpp b/plugins/Clist_modern/modern_clistopts.cpp
index 41ca2c64b1..eb3701a75a 100644
--- a/plugins/Clist_modern/modern_clistopts.cpp
+++ b/plugins/Clist_modern/modern_clistopts.cpp
@@ -71,7 +71,7 @@ int CListOptInit(WPARAM wParam,LPARAM lParam)
odp.flags = ODPF_BOLDGROUPS;
{
BOOL hasExtraIconsService = ServiceExists("ExtraIcon/Register");
- for (int i = 0; i < SIZEOF(row_opt_items); i++) {
+ for (int i=0; i < SIZEOF(row_opt_items); i++) {
if (hasExtraIconsService && row_opt_items[i].id == IDD_OPT_ITEM_EXTRAICONS)
continue;
@@ -119,7 +119,7 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam
// Listbox
hwndList = GetDlgItem(hwndDlg, IDC_LIST_ORDER);
- for(i = 0 ; i < NUM_ITEM_TYPE ; i++)
+ for(i=0 ; i < NUM_ITEM_TYPE ; i++)
{
char tmp[128];
int type;
@@ -191,7 +191,7 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam
HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST_ORDER);
int pos = SendMessage(hwndList, LB_GETCURSEL, 0, 0);
- if (pos !=LB_ERR)
+ if (pos != LB_ERR)
{
int type = SendMessage(hwndList, LB_GETITEMDATA, pos, 0);
@@ -243,7 +243,7 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam
HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST_ORDER);
int pos = SendMessage(hwndList, LB_GETCURSEL, 0, 0);
- if (pos !=LB_ERR)
+ if (pos != LB_ERR)
{
int type = SendMessage(hwndList, LB_GETITEMDATA, pos, 0);
@@ -292,13 +292,13 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam
{
int pos = SendMessage(GetDlgItem(hwndDlg, IDC_LIST_ORDER), LB_GETCURSEL, 0, 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_UP),pos !=LB_ERR && pos > 0);
- EnableWindow(GetDlgItem(hwndDlg,IDC_DOWN),pos !=LB_ERR && pos < 4);
+ EnableWindow(GetDlgItem(hwndDlg,IDC_UP),pos != LB_ERR && pos > 0);
+ EnableWindow(GetDlgItem(hwndDlg,IDC_DOWN),pos != LB_ERR && pos < 4);
}
if (LOWORD(wParam) == IDC_LIST_ORDER) return 0;
- if (LOWORD(wParam) == IDC_MIN_ROW_HEIGHT && HIWORD(wParam) !=EN_CHANGE || (HWND)lParam !=GetFocus()) return 0; // dont make apply enabled during buddy set crap
- if ((LOWORD(wParam) == IDC_LEFTMARGIN || LOWORD(wParam) == IDC_RIGHTMARGIN || LOWORD(wParam) == IDC_ROW_BORDER) && HIWORD(wParam) !=EN_CHANGE || (HWND)lParam !=GetFocus()) return 0; // dont make apply enabled during buddy set crap
+ if (LOWORD(wParam) == IDC_MIN_ROW_HEIGHT && HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) return 0; // dont make apply enabled during buddy set crap
+ if ((LOWORD(wParam) == IDC_LEFTMARGIN || LOWORD(wParam) == IDC_RIGHTMARGIN || LOWORD(wParam) == IDC_ROW_BORDER) && HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) return 0; // dont make apply enabled during buddy set crap
SendMessage((GetParent(hwndDlg)), PSM_CHANGED, 0, 0);
break;
@@ -326,7 +326,7 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam
db_set_b(NULL,"CLC","RightMargin",(BYTE)SendDlgItemMessage(hwndDlg,IDC_RIGHTMARGINSPIN,UDM_GETPOS,0,0));
hwndList = GetDlgItem(hwndDlg, IDC_LIST_ORDER);
- for(i = 0 ; i < NUM_ITEM_TYPE ; i++)
+ for(i=0 ; i < NUM_ITEM_TYPE ; i++)
{
char tmp[128];
mir_snprintf(tmp, SIZEOF(tmp), "RowPos%d", i);
@@ -525,8 +525,8 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_OVERLAY_ICON_PROTOCOL),enabled);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_OVERLAY_ICON_CONTACT),enabled);
}
- else if (LOWORD(wParam) == IDC_AVATAR_SIZE && HIWORD(wParam) !=EN_CHANGE || (HWND)lParam !=GetFocus()) return 0; // dont make apply enabled during buddy set crap
- else if (LOWORD(wParam) == IDC_AVATAR_CUSTOM_CORNER_SIZE && HIWORD(wParam) !=EN_CHANGE || (HWND)lParam !=GetFocus()) return 0; // dont make apply enabled during buddy set crap
+ else if (LOWORD(wParam) == IDC_AVATAR_SIZE && HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) return 0; // dont make apply enabled during buddy set crap
+ else if (LOWORD(wParam) == IDC_AVATAR_CUSTOM_CORNER_SIZE && HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) return 0; // dont make apply enabled during buddy set crap
SendMessage((GetParent(hwndDlg)), PSM_CHANGED, 0, 0);
break;
@@ -712,7 +712,7 @@ static INT_PTR CALLBACK DlgProcItemTextOpts(HWND hwndDlg, UINT msg, WPARAM wPara
{
int i, item;
TCHAR *align[] = {_T("Left align group names"), _T("Center group names"), _T("Right align group names")};
- for (i = 0; i < sizeof(align)/sizeof(char*); i++)
+ for (i=0; i < sizeof(align)/sizeof(char*); i++)
item = SendDlgItemMessage(hwndDlg,IDC_ALIGNGROUPCOMBO,CB_ADDSTRING,0,(LPARAM)TranslateTS(align[i]));
SendDlgItemMessage(hwndDlg,IDC_ALIGNGROUPCOMBO,CB_SETCURSEL,db_get_b(NULL,"CList","AlignGroupCaptions",SETTING_ALIGNGROPCAPTION_DEFAULT),0);
}
@@ -726,7 +726,7 @@ static INT_PTR CALLBACK DlgProcItemTextOpts(HWND hwndDlg, UINT msg, WPARAM wPara
CheckDlgButton(hwndDlg, IDC_APPEND_NICK, db_get_b(NULL,"CList","FirstLineAppendNick",SETTING_FIRSTLINE_APPENDNICK_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED );
CheckDlgButton(hwndDlg, IDC_TRIM_TEXT, db_get_b(NULL,"CList","TrimText",SETTING_FIRSTLINE_TRIMTEXT_DEFAULT) == 1 ? BST_CHECKED : BST_UNCHECKED );
- bool smileAddPresent = ServiceExists(MS_SMILEYADD_BATCHPARSE) !=0;
+ bool smileAddPresent = ServiceExists(MS_SMILEYADD_BATCHPARSE) != 0;
CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_REPLACE_SMILEYS), smileAddPresent ? SW_SHOW : SW_HIDE);
CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_USE_PROTOCOL_SMILEYS), smileAddPresent ? SW_SHOW : SW_HIDE);
//CLUI_ShowWindowMod(GetDlgItem(hwndDlg,IDC_RESIZE_SMILEYS), smileAddPresent ? SW_SHOW : SW_HIDE);
@@ -923,7 +923,7 @@ static INT_PTR CALLBACK DlgProcItemSecondLineOpts(HWND hwndDlg, UINT msg, WPARAM
|| IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE)));
}
- if (LOWORD(wParam) == IDC_TOP_SPACE && HIWORD(wParam) !=EN_CHANGE || (HWND)lParam !=GetFocus()) return 0; // dont make apply enabled during buddy set crap
+ if (LOWORD(wParam) == IDC_TOP_SPACE && HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) return 0; // dont make apply enabled during buddy set crap
SendMessage((GetParent(hwndDlg)), PSM_CHANGED, 0, 0);
break;
@@ -1116,7 +1116,7 @@ static INT_PTR CALLBACK DlgProcItemThirdLineOpts(HWND hwndDlg, UINT msg, WPARAM
EnableWindow(GetDlgItem(hwndDlg,IDC_SHOW_LISTENING_IF_NOAWAY), enabled && IsDlgButtonChecked(hwndDlg,IDC_STATUS_MESSAGE));
}
- if (LOWORD(wParam) == IDC_TOP_SPACE && HIWORD(wParam) !=EN_CHANGE || (HWND)lParam !=GetFocus()) return 0; // dont make apply enabled during buddy set crap
+ if (LOWORD(wParam) == IDC_TOP_SPACE && HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) return 0; // dont make apply enabled during buddy set crap
SendMessage((GetParent(hwndDlg)), PSM_CHANGED, 0, 0);
break;
@@ -1270,7 +1270,7 @@ static int DeleteAllSettingInOrder()
if (nArrayLen == 0){return(0);};
{
int i;
- for (i = 0;i < nArrayLen;i++)
+ for (i=0;i < nArrayLen;i++)
{
db_unset(0,CLUIFrameModule,settingname[i]);
free(settingname[i]);
@@ -1289,7 +1289,7 @@ static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSor
static int FillOrderTree(HWND hwndDlg, HWND Tree)
{
- int i = 0;
+ int i=0;
TVINSERTSTRUCT tvis = {0};
TreeView_DeleteAllItems(Tree);
tvis.hParent = NULL;
@@ -1300,7 +1300,7 @@ static int FillOrderTree(HWND hwndDlg, HWND Tree)
DeleteAllSettingInOrder();
db_set_b(NULL,CLUIFrameModule,"ExtraCountStored",SIZEOF(OrderTreeData));
}
- for (i = 0; i < SIZEOF(OrderTreeData); i++)
+ for (i=0; i < SIZEOF(OrderTreeData); i++)
{
char buf[256];
sprintf(buf,"ORDER_%s",OrderTreeData[i].KeyName);
@@ -1349,14 +1349,14 @@ static int SaveOrderTree(HWND hwndDlg, HWND Tree)
int LoadPositionsFromDB(BYTE * OrderPos)
{
- int i = 0;
+ int i=0;
if (db_get_b(NULL,CLUIFrameModule,"ExtraCountStored",0) != SIZEOF(OrderTreeData))
{
DeleteAllSettingInOrder();
db_set_b(NULL,CLUIFrameModule,"ExtraCountStored",SIZEOF(OrderTreeData));
}
- for (i = 0; i < SIZEOF(OrderTreeData); i++)
+ for (i=0; i < SIZEOF(OrderTreeData); i++)
{
char buf[256];
sprintf(buf,"ORDER_%s",OrderTreeData[i].KeyName);
diff --git a/plugins/Clist_modern/modern_clistsettings.cpp b/plugins/Clist_modern/modern_clistsettings.cpp
index f5134b289f..80491b030b 100644
--- a/plugins/Clist_modern/modern_clistsettings.cpp
+++ b/plugins/Clist_modern/modern_clistsettings.cpp
@@ -64,7 +64,7 @@ void UninitCacheAsync();
void InitDisplayNameCache(void)
{
- int i = 0;
+ int i=0;
InitCacheAsync();
InitAwayMsgModule();
clistCache = List_Create( 0, 50 );
@@ -75,9 +75,9 @@ void FreeDisplayNameCache()
{
UninitCacheAsync();
UninitAwayMsgModule();
- if ( clistCache !=NULL ) {
+ if ( clistCache != NULL ) {
int i;
- for ( i = 0; i < clistCache->realCount; i++) {
+ for ( i=0; i < clistCache->realCount; i++) {
pcli->pfnFreeCacheItem(( ClcCacheEntryBase* )clistCache->items[i] );
mir_free_and_nill( clistCache->items[i] );
}
@@ -94,7 +94,7 @@ ClcCacheEntryBase* cliGetCacheEntry(HANDLE hContact)
int idx;
if (!clistCache) return NULL;
if ( !List_GetIndex( clistCache, &hContact, &idx )) {
- if (( p = pcli->pfnCreateCacheItem( hContact )) !=NULL ) {
+ if (( p = pcli->pfnCreateCacheItem( hContact )) != NULL ) {
List_Insert( clistCache, p, idx );
pcli->pfnInvalidateDisplayNameCacheEntry( hContact );
}
@@ -241,7 +241,7 @@ void cliFreeCacheItem( pdisplayNameCacheEntry p )
void FreeDisplayNameCache(SortedList *list)
{
int i;
- for ( i = 0; i < list->realCount; i++) {
+ for ( i=0; i < list->realCount; i++) {
FreeDisplayNameCacheItem(( pdisplayNameCacheEntry )list->items[i] );
mir_free_and_nill(list->items[i]);
}
@@ -349,10 +349,10 @@ void cliCheckCacheItem(pdisplayNameCacheEntry pdnce)
void IvalidateDisplayNameCache(DWORD mode)
{
- if ( clistCache !=NULL )
+ if ( clistCache != NULL )
{
int i;
- for ( i = 0; i < clistCache->realCount; i++)
+ for ( i=0; i < clistCache->realCount; i++)
{
PDNCE pdnce = (PDNCE)clistCache->items[i];
if (mode&16)
@@ -450,16 +450,16 @@ int GetStatusForContact(HANDLE hContact,char *szProto)
if (szProto)
return (int)(db_get_w((HANDLE)hContact,szProto,"Status",ID_STATUS_OFFLINE));
else
- return (ID_STATUS_OFFLINE);
+ return ID_STATUS_OFFLINE;
}
-TCHAR* GetNameForContact(HANDLE hContact,int flag,boolean *isUnknown)
+TCHAR* GetNameForContact(HANDLE hContact, int flag, boolean *isUnknown)
{
- TCHAR* result = pcli->pfnGetContactDisplayName(hContact, flag | GCDNF_NOCACHE);
- BOOL itUnknown;
if (UnknownConctactTranslatedName == NULL)
UnknownConctactTranslatedName = TranslateT("(Unknown Contact)");
- itUnknown = lstrcmp(result ,UnknownConctactTranslatedName) == 0;
+
+ TCHAR* result = pcli->pfnGetContactDisplayName(hContact, flag | GCDNF_NOCACHE);
+ BOOL itUnknown = lstrcmp(result, UnknownConctactTranslatedName) == 0;
if (itUnknown) {
mir_free(result);
result = UnknownConctactTranslatedName;
@@ -468,7 +468,7 @@ TCHAR* GetNameForContact(HANDLE hContact,int flag,boolean *isUnknown)
*isUnknown = itUnknown;
}
- return (result);
+ return result;
}
int GetContactInfosForSort(HANDLE hContact,char **Proto,TCHAR **Name,int *Status)
diff --git a/plugins/Clist_modern/modern_clisttray.cpp b/plugins/Clist_modern/modern_clisttray.cpp
index 7bf2e661a1..b3e87dd814 100644
--- a/plugins/Clist_modern/modern_clisttray.cpp
+++ b/plugins/Clist_modern/modern_clisttray.cpp
@@ -21,7 +21,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "hdr/modern_commonheaders.h"
-#include < m_clui.h>
+#include <m_clui.h>
#include "hdr/modern_clist.h"
#include "hdr/modern_commonprototypes.h"
#include "hdr/modern_statusbar.h"
@@ -97,7 +97,7 @@ INT_PTR CListTray_GetGlobalStatus(WPARAM wparam,LPARAM lparam)
int curstatus = 0;
int i;
int connectingCount = 0;
- for (i = 0;i < pcli->hClcProtoCount;i++)
+ for (i=0;i < pcli->hClcProtoCount;i++)
{
if (!pcli->pfnGetProtocolVisibility(pcli->clcProto[i].szProto)) continue;
if (pcli->clcProto[i].dwStatus >= ID_STATUS_CONNECTING &&
@@ -126,7 +126,7 @@ int GetAverageMode()
int averageMode = 0;
PROTOACCOUNT **accs;
ProtoEnumAccounts( &count, &accs );
- for(i = 0,netProtoCount = 0;i < count;i++) {
+ for(i=0,netProtoCount = 0;i < count;i++) {
if ( pcli->pfnGetProtocolVisibility(accs[i]->szModuleName) == 0 ) continue;
pcli->cycleStep = i;
netProtoCount++;
@@ -148,7 +148,7 @@ static VOID CALLBACK RefreshTimerProc(HWND hwnd,UINT message,UINT idEvent,DWORD
if (RefreshTimerId) {KillTimer(NULL,RefreshTimerId); RefreshTimerId = 0;}
ProtoEnumAccounts( &count, &accs );
- for (i = 0; i < count; i++)
+ for (i=0; i < count; i++)
if ( pcli->pfnGetProtocolVisibility(accs[i]->szModuleName))
pcli->pfnTrayIconUpdateBase(accs[i]->szModuleName);
@@ -172,7 +172,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto)
pcli->cycleTimerId = 0;
}
ProtoEnumAccounts( &count, &accs );
- for(i = 0,netProtoCount = 0;i < count;i++) {
+ for(i=0,netProtoCount = 0;i < count;i++) {
if ( pcli->pfnGetProtocolVisibility(accs[i]->szModuleName) == 0 ) continue;
netProtoCount++;
if (!lstrcmpA(szChangedProto,accs[i]->szModuleName)) pcli->cycleStep = i;
@@ -347,7 +347,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto)
}
}
- if (changed !=-1) // && pcli->trayIcon[changed].isBase)
+ if (changed != -1) // && pcli->trayIcon[changed].isBase)
pcli->pfnTrayIconUpdate(pcli->trayIcon[changed].hBaseIcon,NULL,szChangedProto,1); // by FYR (No suitable protocol)
{ pcli->pfnUnlockTray(); return; }
}
@@ -372,8 +372,8 @@ INT_PTR TrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam)
{
if (db_get_b(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT))
{
- if (GetActiveWindow() !=pcli->hwndContactList
- && GetWindow(GetParent(GetActiveWindow()),GW_OWNER) !=pcli->hwndContactList)
+ if (GetActiveWindow() != pcli->hwndContactList
+ && GetWindow(GetParent(GetActiveWindow()),GW_OWNER) != pcli->hwndContactList)
{
KillTimer(NULL,autoHideTimerId);
autoHideTimerId = CLUI_SafeSetTimer(NULL,0,1000*db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),TrayIconAutoHideTimer);
@@ -385,7 +385,7 @@ INT_PTR TrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam)
void DestroyTrayMenu(HMENU hMenu)
{
int cnt = GetMenuItemCount(hMenu);
- for (int i = 0; i < cnt; ++i)
+ for (int i=0; i < cnt; ++i)
{
HMENU hSubMenu = GetSubMenu(hMenu, i);
if (hSubMenu == hStatusMenu || hSubMenu == hMainMenu)
diff --git a/plugins/Clist_modern/modern_clui.cpp b/plugins/Clist_modern/modern_clui.cpp
index 6391c7e133..e4d6c2691a 100644
--- a/plugins/Clist_modern/modern_clui.cpp
+++ b/plugins/Clist_modern/modern_clui.cpp
@@ -405,7 +405,7 @@ HRESULT CLUI::FillAlphaChannel( HDC hDC, RECT * prcParent, BYTE bAlpha)
RECT * pRect = (RECT *)rgnData->Buffer;
- for (DWORD i = 0; i < rgnData->rdh.nCount; i++)
+ for (DWORD i=0; i < rgnData->rdh.nCount; i++)
ske_SetRectOpaque( hDC, &pRect[i] );
free(rgnData);
@@ -435,11 +435,11 @@ HRESULT CLUI::CreateCLC()
nLastRequiredHeight = 0;
if ( g_CluiData.current_viewmode[0] == '\0' )
{
- if (bOldHideOffline !=(BYTE)-1)
+ if (bOldHideOffline != (BYTE)-1)
CallService( MS_CLIST_SETHIDEOFFLINE,(WPARAM)bOldHideOffline, 0);
else
CallService( MS_CLIST_SETHIDEOFFLINE,(WPARAM)0, 0);
- if (bOldUseGroups !=(BYTE)-1)
+ if (bOldUseGroups != (BYTE)-1)
CallService( MS_CLIST_SETUSEGROUPS ,(WPARAM)bOldUseGroups, 0);
else
CallService( MS_CLIST_SETUSEGROUPS ,(WPARAM)bOldUseGroups, 0);
@@ -497,7 +497,7 @@ HICON GetMainStatusOverlay(int STATUS)
void UnloadAvatarOverlayIcon()
{
int i;
- for (i = 0 ; i < MAX_REGS(g_pAvatarOverlayIcons) ; i++)
+ for (i=0 ; i < MAX_REGS(g_pAvatarOverlayIcons) ; i++)
{
g_pAvatarOverlayIcons[i].listID = -1;
g_pStatusOverlayIcons[i].listID = -1;
@@ -605,7 +605,7 @@ void CLUI_UpdateLayeredMode()
BOOL tLayeredFlag = TRUE;
tLayeredFlag &= (db_get_b(NULL, "ModernData", "EnableLayering", tLayeredFlag) && !g_CluiData.fDisableSkinEngine);
- if (g_CluiData.fLayered !=tLayeredFlag)
+ if (g_CluiData.fLayered != tLayeredFlag)
{
LONG exStyle;
BOOL fWasVisible = IsWindowVisible(pcli->hwndContactList);
@@ -630,7 +630,7 @@ void CLUI_UpdateLayeredMode()
void CLUI_UpdateAeroGlass()
{
BOOL tAeroGlass = db_get_b(NULL, "ModernData", "AeroGlass", SETTING_AEROGLASS_DEFAULT) && (g_CluiData.fLayered);
- if (g_proc_DWMEnableBlurBehindWindow && (tAeroGlass !=g_CluiData.fAeroGlass))
+ if (g_proc_DWMEnableBlurBehindWindow && (tAeroGlass != g_CluiData.fAeroGlass))
{
if (g_CluiData.hAeroGlassRgn)
{
@@ -738,7 +738,7 @@ void CLUI_ChangeWindowMode()
curStyleEx = (curStyleEx & ~styleMaskEx) | styleEx;
curStyle = (curStyle & ~styleMask) | style;
- if (oldStyleEx !=curStyleEx || oldStyle !=curStyle)
+ if (oldStyleEx != curStyleEx || oldStyle != curStyle)
{
if (IsWindowVisible(pcli->hwndContactList))
{
@@ -965,13 +965,13 @@ static LPPROTOTICKS CLUI_GetProtoTicksByProto(char * szProto)
{
int i;
- for (i = 0;i < 64;i++)
+ for (i=0;i < 64;i++)
{
if (CycleStartTick[i].szProto == NULL) break;
if (mir_strcmp(CycleStartTick[i].szProto,szProto)) continue;
return(&CycleStartTick[i]);
}
- for (i = 0;i < 64;i++)
+ for (i=0;i < 64;i++)
{
if (CycleStartTick[i].szProto == NULL)
{
@@ -998,7 +998,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName)
char szRelativePath[MAX_PATH];
GetModuleFileNameA(GetModuleHandle(NULL), szRelativePath, MAX_PATH);
char *str = strrchr( szRelativePath, '\\' );
- if ( str !=NULL ) *str = 0;
+ if ( str != NULL ) *str = 0;
CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)szRelativePath, (LPARAM)szFolderPath);
}
@@ -1082,7 +1082,7 @@ HICON CLUI_LoadIconFromExternalFile(char *filename,int i,boolean UseLibrary,bool
}
}
else {
- if (registerit && IconName !=NULL && SectName !=NULL) {
+ if (registerit && IconName != NULL && SectName != NULL) {
sid.cbSize = sizeof(sid);
sid.cx = 16;
sid.cy = 16;
@@ -1202,12 +1202,12 @@ static int CLUI_CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam)
cnt = CLUI_GetConnectingIconForProtoCount(szProto);
if (cnt != 0)
{
- int i = 0;
+ int i=0;
nAnimatedIconStep = 100;/*DBGetContactSettingWord(NULL,"CLUI","DefaultStepConnectingIcon",100);*/
pt->nIconsCount = cnt;
if (pt->himlIconList) ImageList_Destroy(pt->himlIconList);
pt->himlIconList = ImageList_Create(16,16,ILC_MASK|ILC_COLOR32,cnt,1);
- for (i = 0; i < cnt; i++)
+ for (i=0; i < cnt; i++)
{
HICON ic = CLUI_GetConnectingIconForProto(szProto,i);
if (ic) ImageList_AddIcon(pt->himlIconList,ic);
@@ -1561,7 +1561,7 @@ int CLUI_TestCursorOnBorders()
*/
hAux = WindowFromPoint(pt);
- while(hAux !=NULL)
+ while(hAux != NULL)
{
if (hAux == hwnd) {mouse_in_window = 1; break;}
hAux = GetParent(hAux);
@@ -1624,12 +1624,12 @@ int CLUI_SizingOnBorder(POINT pt, int PerformSize)
*/
if ( !g_CluiData.fAutoSize )
{
- if ( pt.y <= r.bottom && pt.y >= r.bottom - SIZING_MARGIN ) sizeOnBorderFlag = SCF_BOTTOM;
- else if ( pt.y >= r.top && pt.y <= r.top + SIZING_MARGIN ) sizeOnBorderFlag = SCF_TOP;
+ if ( pt.y <= r.bottom && pt.y >= r.bottom - SIZING_MARGIN ) sizeOnBorderFlag = SCF_BOTTOM;
+ else if ( pt.y >= r.top && pt.y <= r.top + SIZING_MARGIN ) sizeOnBorderFlag = SCF_TOP;
}
- if ( pt.x <= r.right && pt.x >= r.right - SIZING_MARGIN ) sizeOnBorderFlag += SCF_RIGHT;
- else if ( pt.x >= r.left && pt.x <= r.left + SIZING_MARGIN ) sizeOnBorderFlag += SCF_LEFT;
+ if ( pt.x <= r.right && pt.x >= r.right - SIZING_MARGIN ) sizeOnBorderFlag += SCF_RIGHT;
+ else if ( pt.x >= r.left && pt.x <= r.left + SIZING_MARGIN ) sizeOnBorderFlag += SCF_LEFT;
if (!(pt.x >= r.left && pt.x <= r.right && pt.y >= r.top && pt.y <= r.bottom)) sizeOnBorderFlag = SCF_NONE;
@@ -1889,14 +1889,14 @@ LRESULT CLUI::PreProcessWndProc( UINT msg, WPARAM wParam, LPARAM lParam, BOOL& b
bHandled = TRUE;
return 0;
}
- if (msg == uMsgGetProfile && wParam !=0) /* got IPC message */
+ if (msg == uMsgGetProfile && wParam != 0) /* got IPC message */
{
HANDLE hMap;
char szName[MAX_PATH];
int rc = 0;
mir_snprintf( szName, SIZEOF(szName), "Miranda::%u", wParam ); // caller will tell us the ID of the map
hMap = OpenFileMappingA( FILE_MAP_ALL_ACCESS,FALSE, szName );
- if ( hMap !=NULL )
+ if ( hMap != NULL )
{
void *hView = NULL;
hView = MapViewOfFile( hMap, FILE_MAP_ALL_ACCESS, 0, 0, MAX_PATH );
@@ -1951,7 +1951,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam )
// Ïðèëèïàíèå ê êðàÿì by ZorG
CLUI::SnappingToEdge(wp);
- if ((rcOldWindowRect.bottom-rcOldWindowRect.top != wp->cy || rcOldWindowRect.right-rcOldWindowRect.left !=wp->cx)&&!(wp->flags&SWP_NOSIZE))
+ if ((rcOldWindowRect.bottom-rcOldWindowRect.top != wp->cy || rcOldWindowRect.right-rcOldWindowRect.left != wp->cx)&&!(wp->flags&SWP_NOSIZE))
{
{
if (!(wp->flags&SWP_NOMOVE))
@@ -2120,7 +2120,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam )
db_set_b(NULL,"CList","State",SETTING_STATE_HIDDEN);
}
else db_set_b(NULL,"CList","State",SETTING_STATE_MINIMIZED);
- if (MySetProcessWorkingSetSize !=NULL)
+ if (MySetProcessWorkingSetSize != NULL)
MySetProcessWorkingSetSize(GetCurrentProcess(),-1,-1);
}
@@ -2181,7 +2181,7 @@ LRESULT CLUI::OnNcPaint( UINT msg, WPARAM wParam, LPARAM lParam )
if ( msg == WM_PRINT ) hdc = (HDC)wParam;
if ( !hdc ) hdc = GetWindowDC( m_hWnd );
CLUI_DrawMenuBackGround( m_hWnd, hdc, 0, 0 );
- if ( msg !=WM_PRINT ) ReleaseDC( m_hWnd, hdc );
+ if ( msg != WM_PRINT ) ReleaseDC( m_hWnd, hdc );
}
return lRes;
}
@@ -2356,7 +2356,7 @@ LRESULT CLUI::OnStatusBarUpdateTimer( UINT msg, WPARAM wParam, LPARAM lParam )
int status,i;
PROTOTICKS *pt = NULL;
- for (i = 0;i < 64;i++)
+ for (i=0;i < 64;i++)
{
pt = &CycleStartTick[i];
@@ -2455,7 +2455,7 @@ LRESULT CLUI::OnBringOutTimer( UINT msg, WPARAM wParam, LPARAM lParam )
POINT pt; GetCursorPos(&pt);
HWND hAux = WindowFromPoint(pt);
BOOL mouse_in_window = CLUI_CheckOwnedByClui(hAux);
- if ( !mouse_in_window && GetForegroundWindow() !=m_hWnd )
+ if ( !mouse_in_window && GetForegroundWindow() != m_hWnd )
CLUI_HideBehindEdge();
return TRUE;
}
@@ -2468,7 +2468,7 @@ LRESULT CLUI::OnBringInTimer( UINT msg, WPARAM wParam, LPARAM lParam )
POINT pt; GetCursorPos(&pt);
HWND hAux = WindowFromPoint(pt);
BOOL mouse_in_window = FALSE;
- while(hAux !=NULL)
+ while(hAux != NULL)
{
if (hAux == m_hWnd) { mouse_in_window = TRUE; break;}
hAux = GetParent(hAux);
@@ -2487,7 +2487,7 @@ LRESULT CLUI::OnTimer( UINT msg, WPARAM wParam, LPARAM lParam )
{
if ( MirandaExiting()) return FALSE;
- if ( (int)wParam >= TM_STATUSBARUPDATE && (int)wParam <= TM_STATUSBARUPDATE+64 )
+ if ( (int)wParam >= TM_STATUSBARUPDATE && (int)wParam <= TM_STATUSBARUPDATE+64 )
{
if ( !pcli->hwndStatus ) return FALSE;
else return OnStatusBarUpdateTimer( msg, wParam, lParam );
@@ -2893,7 +2893,7 @@ LRESULT CLUI::OnClickNotify( NMCLISTCONTROL * pnmc )
LRESULT CLUI::OnNotify( UINT msg, WPARAM wParam, LPARAM lParam )
{
LPNMHDR pnmhdr = (LPNMHDR)lParam;
- if ( pnmhdr->hwndFrom !=pcli->hwndContactTree )
+ if ( pnmhdr->hwndFrom != pcli->hwndContactTree )
return DefCluiWndProc( msg, wParam, lParam );
switch ( pnmhdr->code)
@@ -3066,8 +3066,8 @@ LRESULT CLUI::OnDestroy( UINT msg, WPARAM wParam, LPARAM lParam )
while (CLUI_WaitThreadsCompletion(m_hWnd)); //stop all my threads
TRACE("CLUI.c: WM_DESTROY - WaitThreadsCompletion DONE\n");
{
- int i = 0;
- for(i = 0; i < 64; i++)
+ int i=0;
+ for(i=0; i < 64; i++)
if (CycleStartTick[i].szProto) mir_free_and_nill(CycleStartTick[i].szProto);
}
diff --git a/plugins/Clist_modern/modern_cluiframes.cpp b/plugins/Clist_modern/modern_cluiframes.cpp
index 0447eaff41..e58122b1c0 100644
--- a/plugins/Clist_modern/modern_cluiframes.cpp
+++ b/plugins/Clist_modern/modern_cluiframes.cpp
@@ -121,7 +121,7 @@ int CLUIFrames_OnMoving( HWND hwnd, RECT * r)
{
int i;
g_CluiData.mutexPreventDockMoving = 0;
- for(i = 0;i < g_nFramesCount;i++) {
+ for(i=0;i < g_nFramesCount;i++) {
if (!g_pfwFrames[i].floating && g_pfwFrames[i].OwnerWindow != NULL &&g_pfwFrames[i].OwnerWindow != (HWND)-2)
{
@@ -151,7 +151,7 @@ int SetAlpha(BYTE Alpha)
{
int i;
- for(i = 0;i < g_nFramesCount;i++) {
+ for(i=0;i < g_nFramesCount;i++) {
if (!g_pfwFrames[i].floating && g_pfwFrames[i].OwnerWindow != NULL &&g_pfwFrames[i].OwnerWindow != (HWND)-2 && g_pfwFrames[i].visible && !g_pfwFrames[i].needhide )
{
@@ -188,7 +188,7 @@ int SetAlpha(BYTE Alpha)
int CLUIFrames_RepaintSubContainers()
{
int i;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
if (!g_pfwFrames[i].floating && g_pfwFrames[i].OwnerWindow != (HWND)0 &&g_pfwFrames[i].OwnerWindow != (HWND)-2 && g_pfwFrames[i].visible && !g_pfwFrames[i].needhide )
{
RedrawWindow(g_pfwFrames[i].hWnd,NULL,NULL,RDW_ALLCHILDREN|RDW_UPDATENOW|RDW_INVALIDATE|RDW_FRAME);
@@ -199,7 +199,7 @@ int CLUIFrames_RepaintSubContainers()
int CLUIFrames_ActivateSubContainers( BOOL active)
{
int i;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
if (active&&!g_pfwFrames[i].floating && g_pfwFrames[i].OwnerWindow != (HWND)0 &&g_pfwFrames[i].OwnerWindow != (HWND)-2 && g_pfwFrames[i].visible && !g_pfwFrames[i].needhide )
{
HWND hwnd = g_pfwFrames[i].OwnerWindow;
@@ -220,7 +220,7 @@ int CLUIFrames_SetParentForContainers( HWND parent )
g_CluiData.fOnDesktop = 1;
else
g_CluiData.fOnDesktop = 0;
- for(i = 0;i < g_nFramesCount;i++) {
+ for(i=0;i < g_nFramesCount;i++) {
if (!g_pfwFrames[i].floating && g_pfwFrames[i].OwnerWindow != (HWND)0 &&g_pfwFrames[i].OwnerWindow != (HWND)-2 && g_pfwFrames[i].visible && !g_pfwFrames[i].needhide )
{
HWND hwnd = g_pfwFrames[i].OwnerWindow;
@@ -234,7 +234,7 @@ int CLUIFrames_OnShowHide( HWND hwnd, int mode )
{
int i;
int prevFrameCount;
- for(i = 0;i < g_nFramesCount;i++) {
+ for(i=0;i < g_nFramesCount;i++) {
if (!g_pfwFrames[i].floating && g_pfwFrames[i].OwnerWindow != (HWND)0 &&g_pfwFrames[i].OwnerWindow != (HWND)-2)
{
{
@@ -277,7 +277,7 @@ static int id2pos(int id)
{
int i;
if (_fCluiFramesModuleNotStarted) return -1;
- for (i = 0;i < g_nFramesCount;i++)
+ for (i=0;i < g_nFramesCount;i++)
if (g_pfwFrames[i].id == id) return(i);
return(-1);
};
@@ -295,7 +295,7 @@ static FRAMEWND* FindFrameByWnd( HWND hwnd )
if ( hwnd == NULL ) return( NULL );
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
if ((g_pfwFrames[i].floating)&&(g_pfwFrames[i].ContainerWnd == hwnd))
return(&g_pfwFrames[i]);
@@ -306,7 +306,7 @@ static FRAMEWND* FindFrameByWnd( HWND hwnd )
int QueueAllFramesUpdating(BYTE queue)
{
int i;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
{
if (!g_CluiData.fLayered)
{
@@ -342,7 +342,7 @@ FRAMEWND * FindFrameByItsHWND(HWND FrameHwnd)
{
int i;
if ( FrameHwnd == NULL ) return( NULL );
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
{
if (g_pfwFrames[i].hWnd == FrameHwnd){return(&g_pfwFrames[i]);};
};
@@ -428,7 +428,7 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY )
nNewY = nY < nOffs ? 0 : nY;
nNewY = nNewY > ( sizeScreen.cy - nHeight - nOffs ) ? ( sizeScreen.cy - nHeight ) : nNewY;
- bLeading = pThumb->dockOpt.hwndRight !=NULL;
+ bLeading = pThumb->dockOpt.hwndRight != NULL;
if ( bMoveTogether )
{
@@ -445,11 +445,11 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY )
fakeTaskBarWindow.floating = TRUE;
- while( pCurThumb !=NULL )
+ while( pCurThumb != NULL )
{
if (pCurThumb->floating) {
- if ( pCurThumb !=pThumb )
+ if ( pCurThumb != pThumb )
{
GetWindowRect( pThumb->ContainerWnd, &rcThumb );
OffsetRect( &rcThumb, nX - rcThumb.left, nY - rcThumb.top );
@@ -743,7 +743,7 @@ static int LocateStorePosition(int Frameid,int maxstored)
if (g_pfwFrames[Frameid].Name == NULL)
return -1;
char settingname[255];
- for ( int i = 0;i < maxstored;i++)
+ for ( int i=0;i < maxstored;i++)
{
mir_snprintf(settingname,SIZEOF(settingname),"Name%d",i);
@@ -803,7 +803,7 @@ static int CLUIFramesStoreAllFrames()
{
int i;
if (_fCluiFramesModuleNotStarted) return -1;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
CLUIFramesStoreFrameSettings(i);
return 0;
}
@@ -813,7 +813,7 @@ static int CLUIFramesGetalClientFrame(void)
int i;
if (_fCluiFramesModuleNotStarted) return -1;
- if ( _nClientFrameId !=eUnknownId ) {
+ if ( _nClientFrameId != eUnknownId ) {
/* this value could become invalid if RemoveItemFromList was called,
* so we double-check */
if (_nClientFrameId < g_nFramesCount) {
@@ -823,7 +823,7 @@ static int CLUIFramesGetalClientFrame(void)
}
}
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
if (g_pfwFrames[i].align == alClient) {
_nClientFrameId = i;
return i;
@@ -1374,7 +1374,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam)
g_pfwFrames[pos].height = lParam;
if (!CLUIFramesFitInSize()) g_pfwFrames[pos].height = retval;
retval = g_pfwFrames[pos].height;
- if (g_pfwFrames[pos].height !=oldHeight)
+ if (g_pfwFrames[pos].height != oldHeight)
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
}
else
@@ -1428,7 +1428,7 @@ static int _us_DoShowAllFrames(WPARAM wParam,LPARAM lParam)
if (_fCluiFramesModuleNotStarted) return -1;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
g_pfwFrames[i].visible = TRUE;
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
return 0;
@@ -1441,7 +1441,7 @@ static int _us_DoShowTitles(WPARAM wParam,LPARAM lParam)
if (_fCluiFramesModuleNotStarted) return -1;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
g_pfwFrames[i].TitleBar.ShowTitleBar = TRUE;
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
return 0;
@@ -1454,7 +1454,7 @@ static int _us_DoHideTitles(WPARAM wParam,LPARAM lParam)
if (_fCluiFramesModuleNotStarted) return -1;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
g_pfwFrames[i].TitleBar.ShowTitleBar = FALSE;
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
return 0;
@@ -1533,7 +1533,7 @@ static int _us_DoMoveFrame(WPARAM wParam,LPARAM lParam)
v = 0;
sd = (SortData*)malloc(sizeof(SortData)*g_nFramesCount);
memset(sd,0,sizeof(SortData)*g_nFramesCount);
- for (i = 0;i < g_nFramesCount;i++)
+ for (i=0;i < g_nFramesCount;i++)
{
if (g_pfwFrames[i].floating||(!g_pfwFrames[i].visible)||(g_pfwFrames[i].align != curalign)){continue;};
@@ -1543,9 +1543,9 @@ static int _us_DoMoveFrame(WPARAM wParam,LPARAM lParam)
};
if (v == 0){return(0);};
qsort(sd,v,sizeof(SortData),sortfunc);
- for (i = 0;i < v;i++)
+ for (i=0;i < v;i++)
g_pfwFrames[sd[i].realpos].order = i+1; //to be sure that order is incremental
- for (i = 0;i < v;i++)
+ for (i=0;i < v;i++)
{
if (sd[i].realpos == pos)
{
@@ -1752,7 +1752,7 @@ static int _us_DoCollapseFrame(WPARAM wParam,LPARAM lParam)
}else
{
int i,sumheight = 0;
- for(i = 0;i < g_nFramesCount;i++) {
+ for(i=0;i < g_nFramesCount;i++) {
if ((g_pfwFrames[i].align != alClient)&&(!g_pfwFrames[i].floating)&&(g_pfwFrames[i].visible)&&(!g_pfwFrames[i].needhide)) {
sumheight += (g_pfwFrames[i].height)+(g_nTitleBarHeight*btoint(g_pfwFrames[i].TitleBar.ShowTitleBar))+2;
return FALSE;
@@ -1827,7 +1827,7 @@ static int CLUIFramesLoadMainMenu()
DestroyIcon_protect(mi.hIcon);
// create frames menu
int separator = 3000200000;
- for (int i = 0; i < g_nFramesCount; i++) {
+ for (int i=0; i < g_nFramesCount; i++) {
mi.hIcon = g_pfwFrames[i].TitleBar.hicon;
mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
mi.position = separator;
@@ -2184,7 +2184,7 @@ static int CLUIFrameMoveResize(const FRAMEWND *Frame)
Frame->wndSize.right-Frame->wndSize.left,
g_nTitleBarHeight,SWP_NOZORDER|SWP_NOACTIVATE );
}
- if ( Frame->visible && IsWindowVisible( pcli->hwndContactList ) && Frame->collapsed && Frame->wndSize.bottom-Frame->wndSize.top !=0 )
+ if ( Frame->visible && IsWindowVisible( pcli->hwndContactList ) && Frame->collapsed && Frame->wndSize.bottom-Frame->wndSize.top != 0 )
{
ShowWindow( Frame->OwnerWindow, SW_SHOW );
ShowWindow( Frame->hWnd, SW_SHOW );
@@ -2219,7 +2219,7 @@ static BOOL CLUIFramesFitInSize(void)
if (clientfrm != -1)
tbh = g_nTitleBarHeight*btoint(g_pfwFrames[clientfrm].TitleBar.ShowTitleBar);
- for(i = 0;i < g_nFramesCount;i++) {
+ for(i=0;i < g_nFramesCount;i++) {
if ((g_pfwFrames[i].align != alClient)&&(!g_pfwFrames[i].floating)&&(g_pfwFrames[i].visible)&&(!g_pfwFrames[i].needhide)) {
sumheight += (g_pfwFrames[i].height)+(g_nTitleBarHeight*btoint(g_pfwFrames[i].TitleBar.ShowTitleBar))+2/*+btoint(Frames[i].UseBorder)*2*/;
if (sumheight>_nContactListHeight-tbh-2)
@@ -2241,7 +2241,7 @@ int CLUIFrames_GetTotalHeight()
RECT border;
if (pcli->hwndContactList == NULL) return 0;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
{
if ((g_pfwFrames[i].visible)&&(!g_pfwFrames[i].needhide)&&(!g_pfwFrames[i].floating)&&(pcli->hwndContactTree)&& (g_pfwFrames[i].hWnd != pcli->hwndContactTree))
sumheight += (g_pfwFrames[i].height)+(g_nTitleBarHeight*btoint(g_pfwFrames[i].TitleBar.ShowTitleBar));
@@ -2276,7 +2276,7 @@ int CLUIFramesGetMinHeight()
if (clientfrm != -1)
tbh = g_nTitleBarHeight*btoint(g_pfwFrames[clientfrm].TitleBar.ShowTitleBar);
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
{
if ((g_pfwFrames[i].align != alClient)&&(g_pfwFrames[i].visible)&&(!g_pfwFrames[i].needhide)&&(!g_pfwFrames[i].floating))
{
@@ -2332,7 +2332,7 @@ static int CLUIFramesResizeFrames(const RECT newsize)
if (clientfrm != -1)
tbh = (g_nTitleBarHeight+g_CluiData.nGapBetweenTitlebar)*btoint(g_pfwFrames[clientfrm].TitleBar.ShowTitleBar);
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
{
if (!g_pfwFrames[i].floating)
{
@@ -2346,7 +2346,7 @@ static int CLUIFramesResizeFrames(const RECT newsize)
//sorting stuff
sdarray = (SortData*)malloc(sizeof(SortData)*g_nFramesCount);
if (sdarray == NULL){return(-1);};
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
{sdarray[i].order = g_pfwFrames[i].order;
sdarray[i].realpos = i;
};
@@ -2359,7 +2359,7 @@ static int CLUIFramesResizeFrames(const RECT newsize)
while(sumheight>(newheight-tbh)&&drawitems>0) {
sumheight = 0;
drawitems = 0;
- for(i = 0;i < g_nFramesCount;i++) {
+ for(i=0;i < g_nFramesCount;i++) {
if (((g_pfwFrames[i].align != alClient))&&(!g_pfwFrames[i].floating)&&(g_pfwFrames[i].visible)&&(!g_pfwFrames[i].needhide)) {
drawitems++;
curfrmtbh = (g_nTitleBarHeight+g_CluiData.nGapBetweenTitlebar)*btoint(g_pfwFrames[i].TitleBar.ShowTitleBar);
@@ -2435,7 +2435,7 @@ static int CLUIFramesResizeFrames(const RECT newsize)
}
}
}
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
if (g_pfwFrames[i].TitleBar.ShowTitleBar)
SetRect(&g_pfwFrames[i].TitleBar.wndSize,g_pfwFrames[i].wndSize.left,g_pfwFrames[i].wndSize.top-g_nTitleBarHeight-g_CluiData.nGapBetweenTitlebar,g_pfwFrames[i].wndSize.right,g_pfwFrames[i].wndSize.top-g_CluiData.nGapBetweenTitlebar);
if (sdarray != NULL){free(sdarray);sdarray = NULL;};
@@ -2448,7 +2448,7 @@ static int CLUIFramesResizeFrames(const RECT newsize)
static int SizeMoveNewSizes()
{
int i;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
{
if (g_pfwFrames[i].floating){
@@ -2472,7 +2472,7 @@ int CLUIFrames_ApplyNewSizes(int mode)
{
int i;
g_CluiData.mutexPreventDockMoving = 0;
- for(i = 0;i < g_nFramesCount;i++) {
+ for(i=0;i < g_nFramesCount;i++) {
if ( (mode == 1 && g_pfwFrames[i].OwnerWindow != (HWND)-2 && g_pfwFrames[i].OwnerWindow) ||
(mode == 2 && g_pfwFrames[i].OwnerWindow == (HWND)-2) ||
(mode == 3))
@@ -2499,7 +2499,7 @@ static int _us_DoUpdateFrame(WPARAM wParam,LPARAM lParam)
if (lParam&FU_FMPOS) CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,1);
int pos = id2pos( wParam );
- if ( pos < 0 || pos >= g_nFramesCount ) { return -1; }
+ if ( pos < 0 || pos >= g_nFramesCount ) { return -1; }
if ( lParam&FU_TBREDRAW ) CLUIFramesForceUpdateTB( &g_pfwFrames[pos] );
if ( lParam&FU_FMREDRAW ) CLUIFramesForceUpdateFrame( &g_pfwFrames[pos] );
return 0;
@@ -2552,7 +2552,7 @@ int SizeFramesByWindowRect(RECT *r, HDWP * PosBatch, int mode)
CLUIFramesResizeFrames(nRect);
{
int i;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
{
int dx;
int dy;
@@ -2629,7 +2629,7 @@ int CheckFramesPos(RECT *wr)
g_CluiData.nGapBetweenTitlebar = (int)db_get_dw(NULL,"CLUIFrames","GapBetweenTitleBar",SETTING_GAPTITLEBAR_DEFAULT);
GapBetweenFrames = db_get_dw(NULL,"CLUIFrames","GapBetweenFrames",SETTING_GAPFRAMES_DEFAULT);
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
{
int dx;
int dy;
@@ -3896,7 +3896,7 @@ static int _us_DoSetFrameFloat(WPARAM wParam,LPARAM lParam)
int pos = id2pos( wParam );
- if ( pos >= 0&& pos < g_nFramesCount )
+ if ( pos >= 0&& pos < g_nFramesCount )
if (g_pfwFrames[pos].floating || (lParam&2))
{
@@ -4141,7 +4141,7 @@ int UnLoadCLUIFramesModule(void)
UnitFramesMenu();
UnloadMainMenu();
- for (i = 0;i < g_nFramesCount;i++)
+ for (i=0;i < g_nFramesCount;i++)
{
if (g_pfwFrames[i].hWnd != pcli->hwndContactTree)
DestroyWindow(g_pfwFrames[i].hWnd);
@@ -4193,7 +4193,7 @@ static int _us_DoSetFramePaintProc(WPARAM wParam, LPARAM lParam)
int CLUIFrames_SetLayeredMode( BOOL fLayeredMode, HWND hwnd )
{
int i;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
{
if (fLayeredMode)
{
@@ -4224,7 +4224,7 @@ int CLUIFrames_SetLayeredMode( BOOL fLayeredMode, HWND hwnd )
int CLUIFrames_UpdateBorders()
{
- for ( int i = 0; i < g_nFramesCount; i++ )
+ for ( int i=0; i < g_nFramesCount; i++ )
{
if ( !g_pfwFrames[i].floating )
{
diff --git a/plugins/Clist_modern/modern_cluiservices.cpp b/plugins/Clist_modern/modern_cluiservices.cpp
index fb5d85f390..f88e4554c7 100644
--- a/plugins/Clist_modern/modern_cluiservices.cpp
+++ b/plugins/Clist_modern/modern_cluiservices.cpp
@@ -120,21 +120,21 @@ static INT_PTR ListEndRebuild(WPARAM wParam, LPARAM lParam)
{
int rebuild = 0;
//CLC does this automatically, but we need to force it if hideoffline or hideempty has changed
- if ((db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) == 0) !=((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEOFFLINE) == 0)) {
+ if ((db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEOFFLINE) == 0)) {
if (db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT))
SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_HIDEOFFLINE);
else
SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & ~CLS_HIDEOFFLINE);
rebuild = 1;
}
- if ((db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) == 0) !=((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) == 0)) {
+ if ((db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) == 0)) {
if (db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT))
SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_HIDEEMPTYGROUPS);
else
SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & ~CLS_HIDEEMPTYGROUPS);
rebuild = 1;
}
- if ((db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) == 0) !=((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS) == 0)) {
+ if ((db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS) == 0)) {
if (db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT))
SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_USEGROUPS);
else
diff --git a/plugins/Clist_modern/modern_commonheaders.cpp b/plugins/Clist_modern/modern_commonheaders.cpp
index 2556a9f624..17e611dcd6 100644
--- a/plugins/Clist_modern/modern_commonheaders.cpp
+++ b/plugins/Clist_modern/modern_commonheaders.cpp
@@ -206,9 +206,9 @@ BOOL DestroyIcon_protect(HICON icon)
void li_ListDestruct(SortedList *pList, ItemDestuctor pItemDestructor)
{
- int i = 0;
+ int i=0;
if (!pList) return;
- for (i = 0; i < pList->realCount; i++) pItemDestructor(pList->items[i]);
+ for (i=0; i < pList->realCount; i++) pItemDestructor(pList->items[i]);
List_Destroy(pList);
mir_free(pList);
}
@@ -234,7 +234,7 @@ void li_SortList(SortedList *pList, FSortFunc pSortFunct)
int i;
if (!pSortFunct) pSortFunct = pOldSort;
pList->sortFunc = NULL;
- for (i = 0; i < pList->realCount-1; i++)
+ for (i=0; i < pList->realCount-1; i++)
if (pOldSort(pList->items[i],pList->items[i+1]) < 0)
{
void * temp = pList->items[i];
@@ -266,7 +266,7 @@ HANDLE ModernHookEvent(char *EventID, MIRANDAHOOK HookProc)
HookRec * hr = NULL;
DWORD i;
//1. Find free
- for (i = 0;i < hooksRecAlloced;i++) {
+ for (i=0;i < hooksRecAlloced;i++) {
if (hooksrec[i].hHook == NULL)
{
hr = &(hooksrec[i]);
@@ -290,7 +290,7 @@ int ModernUnhookEvent(HANDLE hHook)
DWORD i;
//1. Find free
- for (i = 0;i < hooksRecAlloced;i++)
+ for (i=0;i < hooksRecAlloced;i++)
{
if (hooksrec[i].hHook == hHook)
{
@@ -307,7 +307,7 @@ int UnhookAll()
DWORD i;
TRACE("Unhooked Events:\n");
if (!hooksrec) return 0;
- for (i = 0;i < hooksRecAlloced;i++)
+ for (i=0;i < hooksRecAlloced;i++)
{
if (hooksrec[i].hHook != NULL)
{
diff --git a/plugins/Clist_modern/modern_contact.cpp b/plugins/Clist_modern/modern_contact.cpp
index 9f5a98d492..fa85d337bb 100644
--- a/plugins/Clist_modern/modern_contact.cpp
+++ b/plugins/Clist_modern/modern_contact.cpp
@@ -54,7 +54,7 @@ void cli_ChangeContactIcon(HANDLE hContact,int iIcon,int add)
static int GetStatusModeOrdering(int statusMode)
{
int i;
- for(i = 0;i < SIZEOF(statusModeOrder);i++)
+ for(i=0;i < SIZEOF(statusModeOrder);i++)
if (statusModeOrder[i].m_cache_nStatus == statusMode) return statusModeOrder[i].order;
return 1000;
}
@@ -88,7 +88,7 @@ int GetProtoIndex(char * szName)
int i;
if (!szName) return -1;
ProtoEnumAccounts( &accCount, &accs );
- for (i = 0; i < accCount; i++)
+ for (i=0; i < accCount; i++)
if (!mir_strcmpi(szName,accs[i]->szModuleName))
return accs[i]->iOrder;
return -1;
@@ -151,7 +151,7 @@ int CompareContacts2(const struct ClcContact *contact1,const struct ClcContact *
{
int rc = GetProtoIndex(szProto1)-GetProtoIndex(szProto2);
- if (rc !=0 && (szProto1 !=NULL && szProto2 !=NULL)) return rc;
+ if (rc != 0 && (szProto1 != NULL && szProto2 != NULL)) return rc;
}
else if (by == SORTBY_RATE)
return contact2->bContactRate-contact1->bContactRate;
@@ -162,7 +162,7 @@ int CompareContacts2(const struct ClcContact *contact1,const struct ClcContact *
int cliCompareContacts(const struct ClcContact *contact1,const struct ClcContact *contact2)
{
int i, r;
- for (i = 0; i < SIZEOF(g_CluiData.bSortByOrder); i++)
+ for (i=0; i < SIZEOF(g_CluiData.bSortByOrder); i++)
{
r = CompareContacts2(contact1, contact2, g_CluiData.bSortByOrder[i]);
if (r != 0)
@@ -201,7 +201,7 @@ INT_PTR ToggleGroups(WPARAM wParam,LPARAM lParam)
INT_PTR SetUseGroups(WPARAM wParam, LPARAM lParam)
{
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
- if ( wParam !=-1 )
+ if ( wParam != -1 )
{
if ( !newVal == wParam ) return 0;
newVal = wParam;
diff --git a/plugins/Clist_modern/modern_docking.cpp b/plugins/Clist_modern/modern_docking.cpp
index ad5a719c43..ff45c0eeda 100644
--- a/plugins/Clist_modern/modern_docking.cpp
+++ b/plugins/Clist_modern/modern_docking.cpp
@@ -111,7 +111,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam)
if (msg->message == WM_DESTROY)
db_set_b(NULL,"CList","Docked",(BYTE)g_CluiData.fDocked);
- if (!g_CluiData.fDocked && msg->message != WM_CREATE && msg->message != WM_MOVING && msg->message != WM_CREATEDOCKED && msg->message !=WM_MOVE && msg->message !=WM_SIZE) return 0;
+ if (!g_CluiData.fDocked && msg->message != WM_CREATE && msg->message != WM_MOVING && msg->message != WM_CREATEDOCKED && msg->message != WM_MOVE && msg->message != WM_SIZE) return 0;
switch(msg->message) {
case WM_CREATE:
//if (GetSystemMetrics(SM_CMONITORS)>1) return 0;
diff --git a/plugins/Clist_modern/modern_extraimage.cpp b/plugins/Clist_modern/modern_extraimage.cpp
index 6217592c07..77f805d20d 100644
--- a/plugins/Clist_modern/modern_extraimage.cpp
+++ b/plugins/Clist_modern/modern_extraimage.cpp
@@ -42,8 +42,8 @@ boolean isColumnVisible(int extra)
if (HasExtraIconsService())
return true;
- int i = 0;
- for (i = 0; i < sizeof(ExtraOrder)/sizeof(ExtraOrder[0]); i++)
+ int i=0;
+ for (i=0; i < sizeof(ExtraOrder)/sizeof(ExtraOrder[0]); i++)
if (ExtraOrder[i] == extra)
{
switch(i+1)
@@ -120,7 +120,7 @@ int ExtraImage_ColumnNumToExtraID(int column)
if (HasExtraIconsService())
return column+1;
- for (int i = 0; i < EXTRA_ICON_COUNT; i++)
+ for (int i=0; i < EXTRA_ICON_COUNT; i++)
if (ExtraImage_ExtraIDToColumnNum(i) == column)
return i;
@@ -203,7 +203,7 @@ void ExtraImage_ReloadExtraIcons()
//calc only needed protocols
//adding protocol icons
ProtoEnumAccounts( &count, &accs );
- for(i = 0;i < count;i++)
+ for(i=0;i < count;i++)
{
if (!IsAccountEnabled(accs[i]) || CallProtoService(accs[i]->szModuleName, PS_GETCAPS,PFLAGNUM_2, 0 ) == 0)
continue;
@@ -258,7 +258,7 @@ void ClearExtraIcons()
hItem = (HANDLE)SendMessage(pcli->hwndContactTree,CLM_FINDCONTACT,(WPARAM)hContact,0);
if (hItem == 0){continue;};
- for (i = 0;i < EnabledColumnCount;i++)
+ for (i=0;i < EnabledColumnCount;i++)
{
SendMessage(pcli->hwndContactTree,CLM_SETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(i,0xFF));
};
@@ -303,7 +303,7 @@ void ExtraImage_SetAllExtraIcons(HWND hwndList,HANDLE hContact)
ProtoEnumAccounts( &count, &accs );
maxpr = 0;
//calc only needed protocols
- for(i = 0;i < count;i++) {
+ for(i=0;i < count;i++) {
if ( !IsAccountEnabled( accs[i] ) || CallProtoService(accs[i]->szModuleName,PS_GETCAPS,PFLAGNUM_2,0) == 0) continue;
ImgIndex[maxpr] = accs[i]->szModuleName;
maxpr++;
@@ -334,7 +334,7 @@ void ExtraImage_SetAllExtraIcons(HWND hwndList,HANDLE hContact)
if (ExtraImage_ExtraIDToColumnNum(EXTRA_ICON_WEB) != -1)
{
- if (szProto !=NULL)
+ if (szProto != NULL)
{
char *homepage;
homepage = db_get_sa(pdnce->m_cache_hContact,"UserInfo", "Homepage");
@@ -386,7 +386,7 @@ void ExtraImage_SetAllExtraIcons(HWND hwndList,HANDLE hContact)
if (ExtraImage_ExtraIDToColumnNum(EXTRA_ICON_PROTO) != -1)
{
- for (i = 0;i < maxpr;i++)
+ for (i=0;i < maxpr;i++)
{
if (!mir_strcmp(ImgIndex[i],szProto))
{
@@ -398,7 +398,7 @@ void ExtraImage_SetAllExtraIcons(HWND hwndList,HANDLE hContact)
if (ExtraImage_ExtraIDToColumnNum(EXTRA_ICON_VISMODE) != -1)
{
BYTE iconIndex = 0xFF;
- if (szProto !=NULL)
+ if (szProto != NULL)
{
if (!db_get_b(hContact, szProto, "ChatRoom", 0))
{
diff --git a/plugins/Clist_modern/modern_framesmenu.cpp b/plugins/Clist_modern/modern_framesmenu.cpp
index 359f3c1f36..cc838470a3 100644
--- a/plugins/Clist_modern/modern_framesmenu.cpp
+++ b/plugins/Clist_modern/modern_framesmenu.cpp
@@ -18,7 +18,7 @@ void FreeAndNil( void **p )
if ( p == NULL )
return;
- if ( *p !=NULL ) {
+ if ( *p != NULL ) {
mir_free( *p );
*p = NULL;
} }
diff --git a/plugins/Clist_modern/modern_gdiplus.cpp b/plugins/Clist_modern/modern_gdiplus.cpp
index b62bed4231..e9b9446d33 100644
--- a/plugins/Clist_modern/modern_gdiplus.cpp
+++ b/plugins/Clist_modern/modern_gdiplus.cpp
@@ -231,7 +231,7 @@ BOOL GDIPlus_IsAnimatedGif (TCHAR * szName)
return (BOOL) (nFrameCount > 1);
}
-void GDIPlus_ExtractAnimatedGif (TCHAR * szName, int width, int height, HBITMAP * pBitmap, int ** pframesDelay, int * pframesCount, SIZE * pSizeAvatar)
+void GDIPlus_ExtractAnimatedGIF (TCHAR * szName, int width, int height, HBITMAP * pBitmap, int ** pframesDelay, int * pframesCount, SIZE * pSizeAvatar)
{
int nFrameCount = 0;
Bitmap image(szName);
@@ -285,7 +285,7 @@ void GDIPlus_ExtractAnimatedGif (TCHAR * szName, int width, int height, HBITMAP
if ( nFrameCount > 1 )
image.SelectActiveFrame(&pageGuid, 1 );
- for (int i = 0; i < nFrameCount; i++)
+ for (int i=0; i < nFrameCount; i++)
{
image.SelectActiveFrame( &pageGuid, i );
graphics.DrawImage( &image, Rect(i*clipWidth, 0,clipWidth,clipHeight ), 0, 0, imWidth, imHeight , UnitPixel, &attr);
diff --git a/plugins/Clist_modern/modern_groupmenu.cpp b/plugins/Clist_modern/modern_groupmenu.cpp
index a481d4e426..f36ec10135 100644
--- a/plugins/Clist_modern/modern_groupmenu.cpp
+++ b/plugins/Clist_modern/modern_groupmenu.cpp
@@ -93,7 +93,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam)
mmep->szServiceName = mir_strdup(mi->pszService);
mmep->Param1 = mi->popupPosition;
lpGroupMenuParam gmp = (lpGroupMenuParam)wParam;
- if (gmp !=NULL) {
+ if (gmp != NULL) {
mmep->Param1 = gmp->wParam;
mmep->Param2 = gmp->lParam;
}
@@ -538,7 +538,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam)
mmep->szServiceName = mir_strdup(mi->pszService);
mmep->Param1 = mi->popupPosition;
lpGroupMenuParam gmp = (lpGroupMenuParam)wParam;
- if (gmp !=NULL) {
+ if (gmp != NULL) {
mmep->Param1 = gmp->wParam;
mmep->Param2 = gmp->lParam;
}
diff --git a/plugins/Clist_modern/modern_image_array.cpp b/plugins/Clist_modern/modern_image_array.cpp
index 0bd302c0a9..7d0dbd5106 100644
--- a/plugins/Clist_modern/modern_image_array.cpp
+++ b/plugins/Clist_modern/modern_image_array.cpp
@@ -43,7 +43,7 @@ static BOOL ImageArray_Alloc(LP_IMAGE_ARRAY_DATA iad, int size)
{
size_grow += iad->grow_step - (size_grow % iad->grow_step);
- if (iad->nodes !=NULL)
+ if (iad->nodes != NULL)
{
IMAGE_ARRAY_DATA_NODE *tmp = (IMAGE_ARRAY_DATA_NODE *) realloc((void *)iad->nodes,
sizeof(IMAGE_ARRAY_DATA_NODE) * size_grow);
@@ -79,7 +79,7 @@ static BOOL ImageArray_Alloc(LP_IMAGE_ARRAY_DATA iad, int size)
else if (size < iad->nodes_allocated_size)
{
// Give some more space to try to avoid a free
- if ( (iad->nodes_allocated_size - size) / iad->grow_step >= 2 )
+ if ( (iad->nodes_allocated_size - size) / iad->grow_step >= 2 )
{
IMAGE_ARRAY_DATA_NODE *tmp;
@@ -135,7 +135,7 @@ HBITMAP ImageArray_Free(LP_IMAGE_ARRAY_DATA iad, BOOL keep_bitmap)
{
mod_DeleteDC(iad->hdc);
- if (iad->img !=NULL && !keep_bitmap)
+ if (iad->img != NULL && !keep_bitmap)
{
DeleteObject(iad->img);
iad->img = NULL;
@@ -143,7 +143,7 @@ HBITMAP ImageArray_Free(LP_IMAGE_ARRAY_DATA iad, BOOL keep_bitmap)
iad->height = 0;
}
- if (iad->nodes !=NULL)
+ if (iad->nodes != NULL)
{
free(iad->nodes);
iad->nodes = NULL;
@@ -163,7 +163,7 @@ void ImageArray_Clear(LP_IMAGE_ARRAY_DATA iad)
if (iad->hdc) mod_DeleteDC(iad->hdc);
iad->hdc = tmpdc;
- if (iad->img !=NULL)
+ if (iad->img != NULL)
{
DeleteObject(iad->img);
iad->img = NULL;
@@ -171,7 +171,7 @@ void ImageArray_Clear(LP_IMAGE_ARRAY_DATA iad)
iad->height = 0;
}
- if (iad->nodes !=NULL)
+ if (iad->nodes != NULL)
{
free(iad->nodes);
iad->nodes = NULL;
@@ -202,7 +202,7 @@ int ImageArray_AddImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos)
pos = iad->nodes_size;
// Add to end?
- if (pos >= iad->nodes_size)
+ if (pos >= iad->nodes_size)
{
pos = iad->nodes_size;
last_one = TRUE;
@@ -273,7 +273,7 @@ int ImageArray_AddImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos)
{
w = iad->width;
h = 0;
- for(i = 0; i < pos; i++)
+ for(i=0; i < pos; i++)
{
h += iad->nodes[i].height;
}
@@ -282,7 +282,7 @@ int ImageArray_AddImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos)
{
h = iad->height;
w = 0;
- for(i = 0; i < pos; i++)
+ for(i=0; i < pos; i++)
{
w += iad->nodes[i].width;
}
@@ -340,7 +340,7 @@ int ImageArray_AddImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos)
// restore things
SelectObject(hdc_old,old_bmp);
mod_DeleteDC(hdc_old);
- if (iad->img !=NULL) DeleteObject(iad->img);
+ if (iad->img != NULL) DeleteObject(iad->img);
iad->img = hNewBmp;
// Move array
@@ -377,7 +377,7 @@ BOOL ImageArray_ChangeImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos)
if (pos < 0)
return FALSE;
- if (pos >= iad->nodes_size)
+ if (pos >= iad->nodes_size)
return FALSE;
EnterCriticalSection(&iad->cs);
@@ -434,7 +434,7 @@ BOOL ImageArray_ChangeImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos)
{
w = iad->width;
h = 0;
- for(i = 0; i < pos; i++)
+ for(i=0; i < pos; i++)
{
h += iad->nodes[i].height;
}
@@ -443,7 +443,7 @@ BOOL ImageArray_ChangeImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos)
{
h = iad->height;
w = 0;
- for(i = 0; i < pos; i++)
+ for(i=0; i < pos; i++)
{
w += iad->nodes[i].width;
}
@@ -500,7 +500,7 @@ BOOL ImageArray_ChangeImage(LP_IMAGE_ARRAY_DATA iad, HBITMAP hBmp, int pos)
// restore things
mod_DeleteDC(hdc_old);
- if (iad->img !=NULL) DeleteObject(iad->img);
+ if (iad->img != NULL) DeleteObject(iad->img);
iad->img = hNewBmp;
// Move array
@@ -528,7 +528,7 @@ BOOL ImageArray_RemoveImage(LP_IMAGE_ARRAY_DATA iad, int pos)
if (pos < 0)
return FALSE;
- if (pos >= iad->nodes_size)
+ if (pos >= iad->nodes_size)
return FALSE;
EnterCriticalSection(&iad->cs);
@@ -578,7 +578,7 @@ BOOL ImageArray_RemoveImage(LP_IMAGE_ARRAY_DATA iad, int pos)
{
w = iad->width;
h = 0;
- for(i = 0; i < pos; i++)
+ for(i=0; i < pos; i++)
{
h += iad->nodes[i].height;
}
@@ -587,7 +587,7 @@ BOOL ImageArray_RemoveImage(LP_IMAGE_ARRAY_DATA iad, int pos)
{
h = iad->height;
w = 0;
- for(i = 0; i < pos; i++)
+ for(i=0; i < pos; i++)
{
w += iad->nodes[i].width;
}
@@ -629,7 +629,7 @@ BOOL ImageArray_RemoveImage(LP_IMAGE_ARRAY_DATA iad, int pos)
// restore things
mod_DeleteDC(hdc_old);
- if (iad->img !=NULL) DeleteObject(iad->img);
+ if (iad->img != NULL) DeleteObject(iad->img);
iad->img = hNewBmp;
// Move array
@@ -656,7 +656,7 @@ BOOL ImageArray_RemoveImage(LP_IMAGE_ARRAY_DATA iad, int pos)
BOOL ImageArray_DrawImage(LP_IMAGE_ARRAY_DATA iad, int pos, HDC hdcDest, int nXDest, int nYDest, BYTE Alpha)
{
- if (hdcDest == NULL || pos < 0 || pos >= iad->nodes_size)
+ if (hdcDest == NULL || pos < 0 || pos >= iad->nodes_size)
return FALSE;
EnterCriticalSection(&iad->cs);
@@ -667,7 +667,7 @@ BOOL ImageArray_DrawImage(LP_IMAGE_ARRAY_DATA iad, int pos, HDC hdcDest, int nXD
{
w = 0;
h = 0;
- for(i = 0; i < pos; i++)
+ for(i=0; i < pos; i++)
{
h += iad->nodes[i].height;
}
@@ -676,7 +676,7 @@ BOOL ImageArray_DrawImage(LP_IMAGE_ARRAY_DATA iad, int pos, HDC hdcDest, int nXD
{
h = 0;
w = 0;
- for(i = 0; i < pos; i++)
+ for(i=0; i < pos; i++)
{
w += iad->nodes[i].width;
}
diff --git a/plugins/Clist_modern/modern_keyboard.cpp b/plugins/Clist_modern/modern_keyboard.cpp
index a8c8dc2931..56f9ed6d2e 100644
--- a/plugins/Clist_modern/modern_keyboard.cpp
+++ b/plugins/Clist_modern/modern_keyboard.cpp
@@ -21,7 +21,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "hdr/modern_commonheaders.h"
-#include < m_hotkeys.h>
+#include <m_hotkeys.h>
int InitSkinHotKeys(void);
diff --git a/plugins/Clist_modern/modern_newrowopts.cpp b/plugins/Clist_modern/modern_newrowopts.cpp
index 78082a9d5a..fac4015bad 100644
--- a/plugins/Clist_modern/modern_newrowopts.cpp
+++ b/plugins/Clist_modern/modern_newrowopts.cpp
@@ -74,7 +74,7 @@ BOOL RemoveChildNode(NodeList * FromList, DWORD index)
if (!FromList) return FALSE;
if (FromList->AllocatedChilds <= index) return FALSE;
work = &(FromList->childNodes[index]);
- for(i = 0; i < work->AllocatedChilds; i++)
+ for(i=0; i < work->AllocatedChilds; i++)
{
if (work->childNodes[i].AllocatedChilds)
RemoveChildNode(work->childNodes,i);
@@ -131,7 +131,7 @@ void TraceTreeLevel(NodeList * node)
TRACE(buf);
}
ident += 5;
- for(i = 0; i < node->AllocatedChilds;i++)
+ for(i=0; i < node->AllocatedChilds;i++)
{
if (node->childNodes[i].AllocatedChilds>0)
@@ -156,7 +156,7 @@ BOOL CALLBACK DlgProcItemNewRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case WM_INITDIALOG:
{
NodeList * res1,*res2, *res3;
- int i = 0;
+ int i=0;
RootNode = AddNode(NULL);
RootNode->pData = i++;
res1 = AddNode(RootNode);
diff --git a/plugins/Clist_modern/modern_popup.cpp b/plugins/Clist_modern/modern_popup.cpp
index 839b0c9ba0..8fa33f370a 100644
--- a/plugins/Clist_modern/modern_popup.cpp
+++ b/plugins/Clist_modern/modern_popup.cpp
@@ -68,7 +68,7 @@ void ShowPopup(const char *title, const char *description, int type)
strncpy(ppd.lpzContactName, title == NULL ? "Modern Contact List" : title, SIZEOF(ppd.lpzContactName)-1);
ppd.lpzContactName[SIZEOF(ppd.lpzContactName)-1] = '\0';
- if (description !=NULL)
+ if (description != NULL)
{
strncpy(ppd.lpzText, description, SIZEOF(ppd.lpzText)-1);
ppd.lpzText[SIZEOF(ppd.lpzText)-1] = '\0';
diff --git a/plugins/Clist_modern/modern_row.cpp b/plugins/Clist_modern/modern_row.cpp
index 3767d2122a..fe892e767b 100644
--- a/plugins/Clist_modern/modern_row.cpp
+++ b/plugins/Clist_modern/modern_row.cpp
@@ -67,7 +67,7 @@ ROWCELL *cppInitModernRow(ROWCELL ** tabAccess)
int seq = 0;
ROWCELL * RowRoot = NULL;
FILE * hFile;
- int i = 0;
+ int i=0;
if (!db_get_b(NULL,"ModernData","UseAdvancedRowLayout",SETTING_ROW_ADVANCEDLAYOUT_DEFAULT)) return NULL;
tmplbuf = NULL;
if (db_get_b(NULL,"ModernData","UseAdvancedRowLayout",SETTING_ROW_ADVANCEDLAYOUT_DEFAULT) == 1)
@@ -84,9 +84,9 @@ ROWCELL *cppInitModernRow(ROWCELL ** tabAccess)
tmplbuf = (char*)malloc(fsize+1);
ZeroMemory(tmplbuf, fsize+1);
- for (i = 0; i < fsize; i++) tmplbuf[i] = getc(hFile);
+ for (i=0; i < fsize; i++) tmplbuf[i] = getc(hFile);
tmplbuf[i] = 0;
- i = 0;
+ i=0;
rowParse(RowRoot, RowRoot, tmplbuf, i, seq,tabAccess);
db_set_s(NULL,"ModernData","RowTemplate",tmplbuf);
free(tmplbuf);
@@ -261,7 +261,7 @@ void rowParserGetParam(ROWCELL* &cell, char *tbuf, int &hbuf)
return;
}
- if (param>TC_TEXT3 && param !=TC_SPACE) cell->hasfixed = 1;
+ if (param>TC_TEXT3 && param != TC_SPACE) cell->hasfixed = 1;
switch (param)
{
@@ -337,7 +337,7 @@ BOOL rowParse(ROWCELL* &cell, ROWCELL* parent, char *tbuf, int &hbuf, int &seque
rowAddCell(cell, cont);
rowParserGetParam(cell, tbuf, hbuf);
- if (cell->type !=0 && cell->type !=TC_SPACE && cell->type !=TC_FIXED)
+ if (cell->type != 0 && cell->type != TC_SPACE && cell->type != TC_FIXED)
RowTabAccess[sequence++] = cell;
if (!rowParse(cell->child, cell, tbuf, hbuf, sequence,RowTabAccess))
diff --git a/plugins/Clist_modern/modern_rowheight_funcs.cpp b/plugins/Clist_modern/modern_rowheight_funcs.cpp
index 06de4347ee..36078db950 100644
--- a/plugins/Clist_modern/modern_rowheight_funcs.cpp
+++ b/plugins/Clist_modern/modern_rowheight_funcs.cpp
@@ -76,7 +76,7 @@ int RowHeight_CalcRowHeight(struct ClcData *dat, HWND hwnd, struct ClcContact *c
}
int mod_CalcRowHeight_worker(struct ClcData *dat, HWND hwnd, struct ClcContact *contact, int item)
{
- BYTE i = 0;
+ BYTE i=0;
int res = 0;
int height = 0;
displayNameCacheEntry * pdnce;
@@ -111,7 +111,7 @@ int mod_CalcRowHeight_worker(struct ClcData *dat, HWND hwnd, struct ClcContact *
if (item != -1) dat->row_heights[item] = tmp;
return tmp;
}
- hasAvatar = (dat->use_avatar_service && contact->avatar_data !=NULL) ||(!dat->use_avatar_service && contact->avatar_pos !=AVATAR_POS_DONT_HAVE);
+ hasAvatar = (dat->use_avatar_service && contact->avatar_data != NULL) ||(!dat->use_avatar_service && contact->avatar_pos != AVATAR_POS_DONT_HAVE);
while (gl_RowTabAccess[i] != NULL)
{
if (gl_RowTabAccess[i]->type != TC_SPACE)
@@ -218,8 +218,8 @@ int mod_CalcRowHeight_worker(struct ClcData *dat, HWND hwnd, struct ClcContact *
{
if (
(contact->type == CLCIT_GROUP && !dat->row_hide_group_icon)||
- ( contact->type == CLCIT_CONTACT && contact->iImage !=-1 &&
- !(dat->icon_hide_on_avatar && dat->avatars_show && (hasAvatar|| (!hasAvatar && dat->icon_draw_on_avatar_space && contact->iImage !=-1)) && !contact->image_is_special))
+ ( contact->type == CLCIT_CONTACT && contact->iImage != -1 &&
+ !(dat->icon_hide_on_avatar && dat->avatars_show && (hasAvatar|| (!hasAvatar && dat->icon_draw_on_avatar_space && contact->iImage != -1)) && !contact->image_is_special))
)
{
gl_RowTabAccess[i]->h = ICON_HEIGHT;
@@ -231,7 +231,7 @@ int mod_CalcRowHeight_worker(struct ClcData *dat, HWND hwnd, struct ClcContact *
{
if (dat->avatars_show &&
contact->type == CLCIT_CONTACT &&
- (hasAvatar || (dat->icon_hide_on_avatar && dat->icon_draw_on_avatar_space && contact->iImage !=-1) )
+ (hasAvatar || (dat->icon_hide_on_avatar && dat->icon_draw_on_avatar_space && contact->iImage != -1) )
)
{
SIZE sz = {0};
@@ -250,7 +250,7 @@ int mod_CalcRowHeight_worker(struct ClcData *dat, HWND hwnd, struct ClcContact *
iH = dat->avatar_cache.nodes[contact->avatar_pos].height;
}
sz = GetAvatarSize(iW,iH,dat->avatars_maxwidth_size,dat->avatars_maxheight_size);
- if ((sz.cx == 0 || sz.cy == 0) && dat->icon_hide_on_avatar && dat->icon_draw_on_avatar_space && contact->iImage !=-1)
+ if ((sz.cx == 0 || sz.cy == 0) && dat->icon_hide_on_avatar && dat->icon_draw_on_avatar_space && contact->iImage != -1)
{ sz.cx = ICON_HEIGHT; sz.cy = ICON_HEIGHT; }
gl_RowTabAccess[i]->h = sz.cy;
@@ -371,7 +371,7 @@ BOOL RowHeights_Initialize(struct ClcData *dat)
void RowHeights_Free(struct ClcData *dat)
{
- if (dat->row_heights !=NULL)
+ if (dat->row_heights != NULL)
{
free(dat->row_heights);
dat->row_heights = NULL;
@@ -397,7 +397,7 @@ BOOL RowHeights_Alloc(struct ClcData *dat, int size)
size_grow += 100 - (size_grow % 100);
- if (dat->row_heights !=NULL)
+ if (dat->row_heights != NULL)
{
int *tmp = (int *) realloc((void *)dat->row_heights, sizeof(int) * size_grow);
@@ -449,7 +449,7 @@ int RowHeights_GetMaxRowHeight(struct ClcData *dat, HWND hwnd)
// Get contact font size
tmp = 0;
- for (i = 0 ; i < MAX_REGS(contact_fonts) ; i++)
+ for (i=0 ; i < MAX_REGS(contact_fonts) ; i++)
{
if (tmp < dat->fontModernInfo[contact_fonts[i]].fontHeight)
tmp = dat->fontModernInfo[contact_fonts[i]].fontHeight;
@@ -481,7 +481,7 @@ int RowHeights_GetMaxRowHeight(struct ClcData *dat, HWND hwnd)
}
// Get other font sizes
- for (i = 0 ; i < MAX_REGS(other_fonts) ; i++)
+ for (i=0 ; i < MAX_REGS(other_fonts) ; i++)
{
if (max_height < dat->fontModernInfo[other_fonts[i]].fontHeight)
max_height = dat->fontModernInfo[other_fonts[i]].fontHeight;
@@ -672,8 +672,8 @@ int RowHeights_GetRowHeight_worker(struct ClcData *dat, HWND hwnd, struct ClcCon
if (dat->avatars_show && !dat->avatars_ignore_size_for_row_height &&
contact->type == CLCIT_CONTACT &&
(
- (dat->use_avatar_service && contact->avatar_data !=NULL) ||
- (!dat->use_avatar_service && contact->avatar_pos !=AVATAR_POS_DONT_HAVE)
+ (dat->use_avatar_service && contact->avatar_data != NULL) ||
+ (!dat->use_avatar_service && contact->avatar_pos != AVATAR_POS_DONT_HAVE)
) && !minimalistic )
{
height = max(height, dat->avatars_maxheight_size);
@@ -691,10 +691,10 @@ int RowHeights_GetRowHeight_worker(struct ClcData *dat, HWND hwnd, struct ClcCon
if (!dat->icon_ignore_size_for_row_height)
{
if (contact->type == CLCIT_GROUP
- || (contact->type == CLCIT_CONTACT && contact->iImage !=-1
+ || (contact->type == CLCIT_CONTACT && contact->iImage != -1
&& !(dat->icon_hide_on_avatar && dat->avatars_show
- && ( (dat->use_avatar_service && contact->avatar_data !=NULL) ||
- (!dat->use_avatar_service && contact->avatar_pos !=AVATAR_POS_DONT_HAVE)
+ && ( (dat->use_avatar_service && contact->avatar_data != NULL) ||
+ (!dat->use_avatar_service && contact->avatar_pos != AVATAR_POS_DONT_HAVE)
)
&& !contact->image_is_special)))
{
@@ -724,10 +724,10 @@ int cliGetRowTopY(struct ClcData *dat, int item)
{
int i;
int y = 0;
- if (item >= dat->row_heights_size)
+ if (item >= dat->row_heights_size)
return cliGetRowBottomY(dat,item-1);
- for (i = 0 ; i < item ; i++)
+ for (i=0 ; i < item ; i++)
{
y += dat->row_heights[i];
}
@@ -742,10 +742,10 @@ int cliGetRowBottomY(struct ClcData *dat, int item)
int i;
int y = 0;
- if (item >= dat->row_heights_size)
+ if (item >= dat->row_heights_size)
return -1;
- for (i = 0 ; i <= item ; i++)
+ for (i=0 ; i <= item ; i++)
{
y += dat->row_heights[i];
}
@@ -760,7 +760,7 @@ int cliGetRowTotalHeight(struct ClcData *dat)
int i;
int y = 0;
- for (i = 0 ; i < dat->row_heights_size ; i++)
+ for (i=0 ; i < dat->row_heights_size ; i++)
{
y += dat->row_heights[i];
}
@@ -777,7 +777,7 @@ int cliRowHitTest(struct ClcData *dat, int pos_y)
if (pos_y < 0)
return -1;
- for (i = 0 ; i < dat->row_heights_size ; i++)
+ for (i=0 ; i < dat->row_heights_size ; i++)
{
y += dat->row_heights[i];
@@ -790,7 +790,7 @@ int cliRowHitTest(struct ClcData *dat, int pos_y)
int cliGetRowHeight(struct ClcData *dat, int item)
{
- if ( item >= dat->row_heights_size || item < 0 )
+ if ( item >= dat->row_heights_size || item < 0 )
return dat->max_row_height;
return dat->row_heights[ item ];
}
diff --git a/plugins/Clist_modern/modern_rowtemplateopt.cpp b/plugins/Clist_modern/modern_rowtemplateopt.cpp
index 4178d17215..b96d02e8ad 100644
--- a/plugins/Clist_modern/modern_rowtemplateopt.cpp
+++ b/plugins/Clist_modern/modern_rowtemplateopt.cpp
@@ -89,7 +89,7 @@ void rowOptShowSettings(HWND hwnd)
EnableWindow(GetDlgItem(hwnd,IDC_HALIGN) ,1);
EnableWindow(GetDlgItem(hwnd,IDC_CONTLAYER),1);
- if (cell->type !=TC_SPACE && cell->type !=TC_FIXED)
+ if (cell->type != TC_SPACE && cell->type != TC_FIXED)
{
EnableWindow(GetDlgItem(hwnd,IDC_CONTWIDTH) ,0);
EnableWindow(GetDlgItem(hwnd,IDC_CONTHEIGHT),0);
@@ -177,7 +177,7 @@ void rowOptGenerateTreeView(pROWCELL cell, HTREEITEM node, HWND hwnd)
int rowOptFillRowTree(HWND hwnd)
{
- int i = 0;
+ int i=0;
TreeView_DeleteAllItems(hwnd);
rowOptGenerateTreeView(rowOptTmplRoot, NULL, hwnd);
TreeView_Expand(hwnd, TreeView_GetRoot(hwnd), TVM_EXPAND);
@@ -254,7 +254,7 @@ void rowOptAddContainer(HWND htree, HTREEITEM hti)
TreeView_SetItem(htree, &tviparent);
{
- int i = 0;
+ int i=0;
ZeroMemory( rowOptTA, sizeof( rowOptTA ));
rowOptBuildTA(rowOptTmplRoot, (pROWCELL*)&rowOptTA, &i);
}
@@ -304,7 +304,7 @@ void rowOptDelContainer(HWND htree, HTREEITEM hti)
rowDeleteTree((pROWCELL)tvi.lParam);
{
- int i = 0;
+ int i=0;
ZeroMemory( rowOptTA, sizeof( rowOptTA ));
rowOptBuildTA( (pROWCELL)tvpi.lParam, (pROWCELL*)&rowOptTA, &i );
}
@@ -400,7 +400,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
{
int i, item;
- for (i = 0; i < SIZEOF(types); i++)
+ for (i=0; i < SIZEOF(types); i++)
{
item = SendDlgItemMessage(hwndDlg,IDC_CONTTYPE,CB_ADDSTRING,0,(LPARAM)TranslateTS(types[i]));
SendDlgItemMessage(hwndDlg,IDC_CONTTYPE,CB_SETITEMDATA,item,(LPARAM)0);
@@ -411,7 +411,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
{
int i, item;
TCHAR *alignment[] = {_T("left"), _T("hCenter"), _T("right")};
- for (i = 0; i < SIZEOF(alignment); i++)
+ for (i=0; i < SIZEOF(alignment); i++)
{
item = SendDlgItemMessage(hwndDlg,IDC_HALIGN,CB_ADDSTRING,0,(LPARAM)TranslateTS(alignment[i]));
SendDlgItemMessage(hwndDlg,IDC_HALIGN,CB_SETITEMDATA,item,(LPARAM)0);
@@ -423,7 +423,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
{
int i, item;
TCHAR *alignment[] = {_T("top"), _T("vCenter"), _T("bottom")};
- for (i = 0; i < SIZEOF(alignment); i++)
+ for (i=0; i < SIZEOF(alignment); i++)
{
item = SendDlgItemMessage(hwndDlg,IDC_VALIGN,CB_ADDSTRING,0,(LPARAM)TranslateTS(alignment[i]));
SendDlgItemMessage(hwndDlg,IDC_VALIGN,CB_SETITEMDATA,item,(LPARAM)0);
@@ -558,7 +558,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case WM_PAINT:
{
- int i = 0;
+ int i=0;
// Drawning row template at properties page
PAINTSTRUCT ps;
@@ -635,7 +635,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case TC_SPACE:
case TC_FIXED:
case 0:
- //if (rowOptTA[i] !=(pROWCELL)curItem.lParam)
+ //if (rowOptTA[i] != (pROWCELL)curItem.lParam)
continue;
}
Rectangle(hdc,
diff --git a/plugins/Clist_modern/modern_skinbutton.cpp b/plugins/Clist_modern/modern_skinbutton.cpp
index f15b8ee633..5d985b6a6e 100644
--- a/plugins/Clist_modern/modern_skinbutton.cpp
+++ b/plugins/Clist_modern/modern_skinbutton.cpp
@@ -671,7 +671,7 @@ static int ModernSkinButtonErase(int l,int t,int r, int b)
if (!g_pCachedWindow->hImageDC ||!g_pCachedWindow->hBackDC) return 0;
if (!(l||r||t||b))
{
- for(i = 0; i < ButtonsCount; i++)
+ for(i=0; i < ButtonsCount; i++)
{
if (pcli->hwndContactList && Buttons[i].hwnd != NULL)
{
@@ -711,7 +711,7 @@ int ModernSkinButtonRedrawAll(HDC hdc)
DWORD i;
if (!ModernSkinButtonModuleIsLoaded) return 0;
g_mutex_bLockUpdating++;
- for(i = 0; i < ButtonsCount; i++)
+ for(i=0; i < ButtonsCount; i++)
{
if (pcli->hwndContactList && Buttons[i].hwnd == NULL)
Buttons[i].hwnd = ModernSkinButtonCreateWindow(Buttons[i].bct,pcli->hwndContactList);
@@ -724,7 +724,7 @@ int ModernSkinButtonDeleteAll()
{
DWORD i;
if (!ModernSkinButtonModuleIsLoaded) return 0;
- for(i = 0; i < ButtonsCount; i++)
+ for(i=0; i < ButtonsCount; i++)
if (Buttons[i].hwnd) DestroyWindow(Buttons[i].hwnd);
if (Buttons) mir_free_and_nill(Buttons);
ButtonsCount = 0;
@@ -761,7 +761,7 @@ int ModernSkinButton_ReposButtons(HWND parent, BYTE draw, RECT * r)
OffsetRect(&rc,-rc.left,-rc.top);
rc.right = rc.left+(clr.right-clr.left);
rc.bottom = rc.top+(clr.bottom-clr.top);
- for(i = 0; i < ButtonsCount; i++)
+ for(i=0; i < ButtonsCount; i++)
{
int l,r,b,t;
RECT oldRect = {0};
diff --git a/plugins/Clist_modern/modern_skineditor.cpp b/plugins/Clist_modern/modern_skineditor.cpp
index 6f00aebf5a..3d532c53b4 100644
--- a/plugins/Clist_modern/modern_skineditor.cpp
+++ b/plugins/Clist_modern/modern_skineditor.cpp
@@ -392,7 +392,7 @@ char * MadeString(HWND hwndDlg)
BYTE a;
WORD l,t,b,r;
char buf_name[MAX_PATH] = {0};
- int i = 0;
+ int i=0;
a = (BYTE)SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_GETPOS,0,0);
l = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_GETPOS,0,0);
t = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_GETPOS,0,0);
@@ -414,7 +414,7 @@ char * MadeString(HWND hwndDlg)
WORD l,t,b,r;
WORD x,y,w,h;
char buf_name[MAX_PATH] = {0};
- int i = 0;
+ int i=0;
a = (BYTE)SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_GETPOS,0,0);
l = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_LEFT,UDM_GETPOS,0,0);
t = (WORD)SendDlgItemMessage(hwndDlg,IDC_SPIN_TOP,UDM_GETPOS,0,0);
@@ -558,13 +558,13 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
TranslateDialogDefault(hwndDlg);
FillObjectTree(hwndDlg,IDC_OBJECT_TREE,"$$*");
{ //Fill types combo
- int i = 0;
- for (i = 0; i < SIZEOF(TYPES); i++)
+ int i=0;
+ for (i=0; i < SIZEOF(TYPES); i++)
SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_ADDSTRING,0,(LPARAM)TranslateTS(TYPES[i]));
}
{ //Fill fit combo
- int i = 0;
- for (i = 0; i < SIZEOF(FITMODES); i++)
+ int i=0;
+ for (i=0; i < SIZEOF(FITMODES); i++)
SendDlgItemMessage(hwndDlg,IDC_FIT,CB_ADDSTRING,0,(LPARAM)TranslateTS(FITMODES[i]));
}
//SPIN Ranges
@@ -705,7 +705,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if (HIWORD(wParam) == EN_CHANGE)
{
fileChanged = TRUE;
- if ((HWND)lParam !=GetFocus())
+ if ((HWND)lParam != GetFocus())
{
GetFileSizes(hwndDlg);
fileChanged = FALSE;
@@ -731,7 +731,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
||LOWORD(wParam) == IDC_E_H
||LOWORD(wParam) == IDC_EDIT_ALPHA
)
- && HIWORD(wParam) !=EN_CHANGE || (HWND)lParam !=GetFocus()))
+ && HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
{
return 0;
}
diff --git a/plugins/Clist_modern/modern_skinengine.cpp b/plugins/Clist_modern/modern_skinengine.cpp
index 0af092a429..fa3862e218 100644
--- a/plugins/Clist_modern/modern_skinengine.cpp
+++ b/plugins/Clist_modern/modern_skinengine.cpp
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//Include
#include "hdr/modern_commonheaders.h"
-#include < m_png.h>
+#include <m_png.h>
#include "m_api/m_skin_eng.h"
#include "hdr/modern_skinselector.h"
#include "hdr/modern_cluiframes.h"
@@ -135,7 +135,7 @@ IniParser::IniParser( TCHAR * tcsFileName, BYTE flags ) : _Flags( flags )
_hFile = _tfopen( tcsFileName, _T("r"));
- if ( _hFile !=NULL )
+ if ( _hFile != NULL )
{
_eType = IT_FILE;
_isValid = true;
@@ -287,7 +287,7 @@ void IniParser::_DoInit()
void IniParser::_LoadResourceIni( HINSTANCE hInst, const char * resourceName, const char * resourceType )
{
- if ( _eType !=IT_UNKNOWN ) return;
+ if ( _eType != IT_UNKNOWN ) return;
HRSRC hRSrc = FindResourceA( hInst, resourceName, resourceType );
if ( !hRSrc ) return;
@@ -309,7 +309,7 @@ HRESULT IniParser::_DoParseFile()
{
char szLine[MAX_LINE_LEN];
_nLine = 0;
- while ( fgets( szLine, SIZEOF(szLine), _hFile ) !=NULL )
+ while ( fgets( szLine, SIZEOF(szLine), _hFile ) != NULL )
{
size_t len = 0;
char * pLine = (char*)_RemoveTailings( szLine, len );
@@ -333,10 +333,10 @@ HRESULT IniParser::_DoParseResource()
while ( pos < _pPosition + _dwSizeOfRes )
{
- int i = 0;
- while ( pos < _pPosition + _dwSizeOfRes && *pos !='\n' && *pos != '\0' && i < MAX_LINE_LEN - 1 )
+ int i=0;
+ while ( pos < _pPosition + _dwSizeOfRes && *pos != '\n' && *pos != '\0' && i < MAX_LINE_LEN - 1 )
{
- if ( (*pos) !='\r' )
+ if ( (*pos) != '\r' )
szLine[ i++ ] = *pos;
pos++;
}
@@ -388,7 +388,7 @@ BOOL IniParser::_DoParseLine( char * szLine )
char *ebuf = tbuf;
- while ( *ebuf !=']' && *ebuf !='\0' ) ebuf++;
+ while ( *ebuf != ']' && *ebuf != '\0' ) ebuf++;
if ( *ebuf == '\0' )
return FALSE; // no close bracket
@@ -471,7 +471,7 @@ HRESULT SkinEngineLoadModule()
GetModuleFileNameA( g_hInst, tDllPath, sizeof( tDllPath ));
{
char* p = strrchr( tDllPath, '\\' );
- if ( p !=NULL )
+ if ( p != NULL )
strcpy( p+1, "ImgDecoder.dll" );
else
{
@@ -520,7 +520,7 @@ int SkinEngineUnloadModule()
if (pEffectStack)
{
int i;
- for (i = 0; i < pEffectStack->realCount; i++)
+ for (i=0; i < pEffectStack->realCount; i++)
if (pEffectStack->items[i])
{
EFFECTSSTACKITEM * effect = (EFFECTSSTACKITEM*)(pEffectStack->items[i]);
@@ -670,9 +670,9 @@ int ske_ReleaseBufferDC(HDC hDC, int keepTime)
DWORD dwCurrentTime = GetTickCount();
DCBUFFER * pBuf = NULL;
//Try to find DC in buffer list - set flag to be release after time;
- int i = 0;
+ int i=0;
EnterCriticalSection(&BufferListCS);
- for (i = 0; i < BufferList->realCount; i++)
+ for (i=0; i < BufferList->realCount; i++)
{
pBuf = (DCBUFFER *)BufferList->items[i];
if (pBuf)
@@ -733,7 +733,7 @@ BOOL ske_SetRectOpaque(HDC memdc,RECT *fr, BOOL force)
hbmp = (HBITMAP)GetCurrentObject( memdc,OBJ_BITMAP );
GetObject( hbmp, sizeof(bmp), &bmp );
- if ( bmp.bmPlanes !=1 )
+ if ( bmp.bmPlanes != 1 )
return FALSE;
if (!bmp.bmBits)
@@ -1189,7 +1189,7 @@ HRGN ske_CreateOpaqueRgn(BYTE Level, bool Opaque)
inside = Opaque ? (buf->rgbReserved > Level) : (buf->rgbReserved < Level);
++buf;
- if (inside !=lastin)
+ if (inside != lastin)
{
if (inside)
{
@@ -1543,7 +1543,7 @@ static int ske_DrawSkinObject(SKINDRAWREQUEST * preq, GLYPHOBJECT * pobj)
{
int i;
HFONT hOldFont;
- for (i = 0; i < pobj->plTextList->realCount; i++)
+ for (i=0; i < pobj->plTextList->realCount; i++)
{
GLYPHTEXT * gt = (GLYPHTEXT *)pobj->plTextList->items[i];
if (!gt->hFont)
@@ -1605,8 +1605,8 @@ int ske_AddDescriptorToSkinObjectList (LPSKINOBJECTDESCRIPTOR lpDescr, SKINOBJEC
if (!sk) return 0;
if (mir_bool_strcmpi(lpDescr->szObjectID,"_HEADER_")) return 0;
{//check if new object allready presents.
- DWORD i = 0;
- for (i = 0; i < sk->dwObjLPAlocated;i++)
+ DWORD i=0;
+ for (i=0; i < sk->dwObjLPAlocated;i++)
if (!mir_strcmp(sk->pObjects[i].szObjectID,lpDescr->szObjectID)) return 0;
}
if (sk->dwObjLPAlocated+1>sk->dwObjLPReserved)
@@ -1671,7 +1671,7 @@ LPSKINOBJECTDESCRIPTOR ske_FindObjectByName(const char * szName, BYTE objType, S
DWORD i;
SKINOBJECTSLIST* sk;
sk = (Skin == NULL)?(&g_SkinObjectList):Skin;
- for (i = 0; i < sk->dwObjLPAlocated; i++)
+ for (i=0; i < sk->dwObjLPAlocated; i++)
{
if (sk->pObjects[i].bType == objType || objType == OT_ANY)
{
@@ -1863,7 +1863,7 @@ static BOOL ske_ReadTGAImageData(void * From, DWORD fromSize, BYTE * destBuf, DW
fromCount += 4;
}
else fread (rgba, sizeof (BYTE), 4, fp);
- for (i = 0; i < size; ++i, ptr += 4)
+ for (i=0; i < size; ++i, ptr += 4)
{
ptr[2] = rgba[2];
ptr[1] = rgba[1];
@@ -1873,7 +1873,7 @@ static BOOL ske_ReadTGAImageData(void * From, DWORD fromSize, BYTE * destBuf, DW
}
else
{ /* not run-length packet */
- for (i = 0; i < size; ++i, ptr += 4)
+ for (i=0; i < size; ++i, ptr += 4)
{
ptr[0] = from? from[fromCount++]:(BYTE)fgetc (fp);
ptr[1] = from? from[fromCount++]:(BYTE)fgetc (fp);
@@ -1977,12 +1977,12 @@ HBITMAP ske_LoadGlyphImage_Png2Dib(char * szFilename)
return (HBITMAP)NULL;
}
- if (( hFile = CreateFileA( szFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL )) !=INVALID_HANDLE_VALUE )
- if (( hMap = CreateFileMapping( hFile, NULL, PAGE_READONLY, 0, 0, NULL )) !=NULL )
- if (( ppMap = ( BYTE* )MapViewOfFile( hMap, FILE_MAP_READ, 0, 0, 0 )) !=NULL )
+ if (( hFile = CreateFileA( szFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL )) != INVALID_HANDLE_VALUE )
+ if (( hMap = CreateFileMapping( hFile, NULL, PAGE_READONLY, 0, 0, NULL )) != NULL )
+ if (( ppMap = ( BYTE* )MapViewOfFile( hMap, FILE_MAP_READ, 0, 0, 0 )) != NULL )
cbFileSize = GetFileSize( hFile, NULL );
- if ( cbFileSize !=0 ) {
+ if ( cbFileSize != 0 ) {
PNG2DIB param;
param.pSource = ppMap;
param.cbSourceSize = cbFileSize;
@@ -1993,9 +1993,9 @@ HBITMAP ske_LoadGlyphImage_Png2Dib(char * szFilename)
cbFileSize = 0;
}
- if ( ppMap !=NULL ) UnmapViewOfFile( ppMap );
- if ( hMap !=NULL ) CloseHandle( hMap );
- if ( hFile !=NULL ) CloseHandle( hFile );
+ if ( ppMap != NULL ) UnmapViewOfFile( ppMap );
+ if ( hMap != NULL ) CloseHandle( hMap );
+ if ( hFile != NULL ) CloseHandle( hFile );
if ( cbFileSize == 0 )
return (HBITMAP)NULL;
@@ -2107,7 +2107,7 @@ HBITMAP ske_LoadGlyphImage(char * szFileName)
ske_LockSkin();
if (pLoadedImages)
{
- for (i = 0; i < dwLoadedImagesCount; i++)
+ for (i=0; i < dwLoadedImagesCount; i++)
{
if (mir_bool_strcmpi(pLoadedImages[i].szFileName,szFile))
{
@@ -2145,7 +2145,7 @@ HBITMAP ske_LoadGlyphImage(char * szFileName)
int ske_UnloadGlyphImage(HBITMAP hbmp)
{
DWORD i;
- for (i = 0; i < dwLoadedImagesCount; i++)
+ for (i=0; i < dwLoadedImagesCount; i++)
{
if (hbmp == pLoadedImages[i].hGlyph)
{
@@ -2181,7 +2181,7 @@ int ske_UnloadSkin(SKINOBJECTSLIST * Skin)
int i;
if (gl_plSkinFonts && gl_plSkinFonts->realCount>0)
{
- for (i = 0; i < gl_plSkinFonts->realCount; i++)
+ for (i=0; i < gl_plSkinFonts->realCount; i++)
{
SKINFONT * sf = (SKINFONT *)gl_plSkinFonts->items[i];
if (sf)
@@ -2201,7 +2201,7 @@ int ske_UnloadSkin(SKINOBJECTSLIST * Skin)
mir_free_and_nill(Skin->pTextList);
ModernSkinButtonDeleteAll();
if (Skin->dwObjLPAlocated == 0) { ske_UnlockSkin(); return 0;}
- for (i = 0; i < Skin->dwObjLPAlocated; i++)
+ for (i=0; i < Skin->dwObjLPAlocated; i++)
{
switch(Skin->pObjects[i].bType)
{
@@ -2217,7 +2217,7 @@ int ske_UnloadSkin(SKINOBJECTSLIST * Skin)
int i;
if (dt->plTextList && dt->plTextList->realCount>0)
{
- for (i = 0; i < dt->plTextList->realCount; i++)
+ for (i=0; i < dt->plTextList->realCount; i++)
{
GLYPHTEXT * gt = (GLYPHTEXT *)dt->plTextList->items[i];
if (gt)
@@ -2252,7 +2252,7 @@ static void RegisterMaskByParce(const char * szSetting, char * szValue, SKINOBJE
{
int i;
DWORD ID = atoi(szSetting+1);
- for (i = 0; i < mir_strlen(szValue); i++) if (szValue[i] == ':') break;
+ for (i=0; i < mir_strlen(szValue); i++) if (szValue[i] == ':') break;
if (i < mir_strlen(szValue))
{
char * Obj, *Mask;
@@ -2301,7 +2301,7 @@ static void ske_LinkSkinObjects(SKINOBJECTSLIST * pObjectList)
{
DWORD i;
// LINK Mask with objects
- for (i = 0; i < pObjectList->pMaskList->dwMaskCnt; i++)
+ for (i=0; i < pObjectList->pMaskList->dwMaskCnt; i++)
{
MODERNMASK *mm = &(pObjectList->pMaskList->pl_Masks[i]);
void * pObject = (void*) ske_FindObjectByName(mm->szObjectName, OT_ANY, (SKINOBJECTSLIST*) pObjectList);
@@ -2314,7 +2314,7 @@ static void ske_LinkSkinObjects(SKINOBJECTSLIST * pObjectList)
{
int i;
// LINK Text with objects
- for (i = 0; i < pObjectList->pTextList->realCount; i++)
+ for (i=0; i < pObjectList->pTextList->realCount; i++)
{
GLYPHTEXT * glText;
GLYPHOBJECT *globj = NULL;
@@ -2417,7 +2417,7 @@ void ske_LoadSkinFromDB(void)
/*
static BOOL ske_ParseLineOfIniFile(char * Line, BOOL bOnlyObjects)
{
- DWORD i = 0;
+ DWORD i=0;
DWORD len = strlen(Line);
while (i < len && (Line[i] == ' ' || Line[i] == '\t')) i++; //skip spaces&tabs
if (i >= len) return FALSE; //only spaces (or tabs)
@@ -2487,7 +2487,7 @@ static BOOL ske_ParseLineOfIniFile(char * Line, BOOL bOnlyObjects)
// char bsn[MAXSN_BUFF_SIZE];
// char * Buff;
//
-// int i = 0;
+// int i=0;
// int f = 0;
// int ReadingSection = 0;
// char AllowedSection[260];
@@ -2583,7 +2583,7 @@ static BOOL ske_ParseLineOfIniFile(char * Line, BOOL bOnlyObjects)
// pp = -1;
// CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)szFileName, (LPARAM)fn);
// {
-// for (i = 0; i < mir_strlen(fn); i++) if (fn[i] == '.') pp = i;
+// for (i=0; i < mir_strlen(fn); i++) if (fn[i] == '.') pp = i;
// if (pp != -1)
// {
// fn[pp] = '\0';
@@ -2668,7 +2668,7 @@ static int ske_DeleteAllSettingInSection(char * SectionName)
if (nArrayLen == 0){return(0);};
{
int i;
- for (i = 0;i < nArrayLen;i++)
+ for (i=0;i < nArrayLen;i++)
{
db_unset(0,SectionName,pszSettingName[i]);
free(pszSettingName[i]);
@@ -2749,7 +2749,7 @@ BOOL ske_ResetTextEffect(HDC hdc)
{
int i;
if (!pEffectStack || !pEffectStack->realCount) return TRUE;
- for (i = 0; i < pEffectStack->realCount; i++)
+ for (i=0; i < pEffectStack->realCount; i++)
if (pEffectStack->items[i] && ((EFFECTSSTACKITEM*)(pEffectStack->items[i]))->hdc == hdc)
{
EFFECTSSTACKITEM * effect = (EFFECTSSTACKITEM*)(pEffectStack->items[i]);
@@ -2770,7 +2770,7 @@ BOOL ske_SelectTextEffect(HDC hdc, BYTE EffectID, DWORD FirstColor, DWORD Second
}
{
int i;
- for (i = 0; i < pEffectStack->realCount; i++)
+ for (i=0; i < pEffectStack->realCount; i++)
if (pEffectStack->items[i] && ((EFFECTSSTACKITEM*)(pEffectStack->items[i]))->hdc == hdc)
{
EFFECTSSTACKITEM * effect = (EFFECTSSTACKITEM*)(pEffectStack->items[i]);
@@ -2794,10 +2794,10 @@ BOOL ske_SelectTextEffect(HDC hdc, BYTE EffectID, DWORD FirstColor, DWORD Second
static BOOL ske_GetTextEffect(HDC hdc, MODERNEFFECT * modernEffect)
{
- int i = 0;
+ int i=0;
if (!pEffectStack || !pEffectStack->realCount) return FALSE;
if (!modernEffect) return FALSE;
- for (i = 0; i < pEffectStack->realCount; i++)
+ for (i=0; i < pEffectStack->realCount; i++)
if (pEffectStack->items[i] && ((EFFECTSSTACKITEM*)(pEffectStack->items[i]))->hdc == hdc)
{
EFFECTSSTACKITEM * effect = (EFFECTSSTACKITEM*)(pEffectStack->items[i]);
@@ -2978,7 +2978,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec
BYTE redCf = db_get_b(NULL,"ModernData","AlphaTextOutRed Correction", 77 );
BYTE greenCf = db_get_b(NULL,"ModernData","AlphaTextOutGreen Correction", 151 );
- for ( int i = 0; i < 256; i++ )
+ for ( int i=0; i < 256; i++ )
{
gammaTbl[i] = (BYTE)( 255 * pow( (double)i / 255, gammaCfPw ));
blueMulTbl[i] = i * blueCf;
@@ -3006,7 +3006,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec
else
pDestBits = (BYTE*)bmpDest.bmBits;
- BOOL isDest16bit = ( bmpDest.bmBitsPixel ) !=32;
+ BOOL isDest16bit = ( bmpDest.bmBitsPixel ) != 32;
// Creating offscreen buffer
@@ -3112,14 +3112,14 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec
//Create bitmap image for offscreen
BYTE * bits = NULL;
HBITMAP hbmp = ske_CreateDIB32Point( textSize.cx, textSize.cy, (void**)&bits );
- if ( bits !=NULL )
+ if ( bits != NULL )
{
HBITMAP holdbmp = (HBITMAP)SelectObject( hOffscreenDC, hbmp );
//Create buffer bitmap image for temp text
BYTE * bufbits = NULL;
HBITMAP bufbmp = ske_CreateDIB32Point( textSize.cx, textSize.cy, (void**)&bufbits );
- if ( bufbits !=NULL )
+ if ( bufbits != NULL )
{
HDC bufDC = CreateCompatibleDC( hDC );
HBITMAP bufoldbmp = (HBITMAP)SelectObject( bufDC, bufbmp );
@@ -3174,7 +3174,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec
BYTE gx = gammaTbl[ bufpix[1] ];
BYTE rx = gammaTbl[ bufpix[2] ];
- if ( al !=255 )
+ if ( al != 255 )
{
bx *= al/255;
gx *= al/255;
@@ -3255,7 +3255,7 @@ static int ske_DrawTextWithEffectWorker( HDC hdc, LPCTSTR lpString, int nCount,
INT_PTR ske_Service_DrawTextWithEffect( WPARAM wParam, LPARAM lParam )
{
DrawTextWithEffectParam * p = ( DrawTextWithEffectParam * ) wParam;
- if ( p->cbSize !=sizeof(DrawTextWithEffectParam))
+ if ( p->cbSize != sizeof(DrawTextWithEffectParam))
return FALSE;
return ske_DrawTextWithEffectWorker( p->hdc, p->lpchText, p->cchText, p->lprc, p->dwDTFormat, p->pEffect );
}
@@ -3657,7 +3657,7 @@ static INT_PTR ske_Service_UpdateFrameImage(WPARAM wParam, LPARAM lParam)
{
int i;
frm->bQueued = 0;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
if (IsAnyQueued |= g_pfwFrames[i].bQueued) break;
}
}
@@ -4019,7 +4019,7 @@ int ske_DrawNonFramedObjects(BOOL Erase,RECT *r)
//--Draw frames captions
{
int i;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
if (g_pfwFrames[i].TitleBar.ShowTitleBar && g_pfwFrames[i].visible && !g_pfwFrames[i].floating)
{
RECT rc;
@@ -4094,7 +4094,7 @@ int ske_ValidateFrameImageProc(RECT * r) // Calli
//-- Validating frames
{
int i;
- for(i = 0;i < g_nFramesCount;i++)
+ for(i=0;i < g_nFramesCount;i++)
if (g_pfwFrames[i].PaintCallbackProc && g_pfwFrames[i].visible && !g_pfwFrames[i].floating )
if (g_pfwFrames[i].bQueued || IsForceAllPainting)
ske_ValidateSingleFrameImage(&g_pfwFrames[i],IsForceAllPainting);
@@ -4540,7 +4540,7 @@ return res;
*/
static BOOL ske_CheckHasAlfaChannel(BYTE * from, int widthByte, int height)
{
- int i = 0,j = 0;
+ int i=0,j = 0;
DWORD * pt = (DWORD*)from;
while (j < height)
{
@@ -4562,8 +4562,8 @@ static BOOL ske_CheckHasAlfaChannel(BYTE * from, int widthByte, int height)
*/
static BOOL ske_CheckIconHasMask(BYTE * from)
{
- int i = 0;
- for (i = 0; i < 16*16/8; i++)
+ int i=0;
+ for (i=0; i < 16*16/8; i++)
{
if (from[i] != 0) return TRUE;
}
diff --git a/plugins/Clist_modern/modern_skinopt.cpp b/plugins/Clist_modern/modern_skinopt.cpp
index da46cb5be6..13f68037d7 100644
--- a/plugins/Clist_modern/modern_skinopt.cpp
+++ b/plugins/Clist_modern/modern_skinopt.cpp
@@ -27,9 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "io.h"
#include "hdr/modern_commonprototypes.h"
#include "hdr/modern_sync.h"
-#include < m_utils.h>
-#include < m_database.h>
-#include < m_modernopt.h>
+#include <m_utils.h>
+#include <m_database.h>
+#include <m_modernopt.h>
/*******************************/
// Main skin selection routine //
@@ -484,7 +484,7 @@ HTREEITEM FillAvailableSkinList( HWND hwndDlg )
AddSkinToList( hwndDlg, TranslateT( "Default Skin" ), _T("%Default Skin%"));
attrib = GetFileAttributes( path );
- if ( attrib !=INVALID_FILE_ATTRIBUTES && ( attrib & FILE_ATTRIBUTE_DIRECTORY ))
+ if ( attrib != INVALID_FILE_ATTRIBUTES && ( attrib & FILE_ATTRIBUTE_DIRECTORY ))
SearchSkinFiles( hwndDlg, path );
{
TCHAR * skinfile;
@@ -606,7 +606,7 @@ HTREEITEM AddItemToTree( HWND hTree, TCHAR * folder, TCHAR * itemName, void * da
BOOL ext = FALSE;
CallService( MS_UTILS_PATHTORELATIVET, ( WPARAM )folder, ( LPARAM )path );
ptrE = path;
- while ( *ptrE !=_T('\\') && *ptrE !=_T('\0') && *ptrE !=_T(':')) ptrE++;
+ while ( *ptrE != _T('\\') && *ptrE != _T('\0') && *ptrE != _T(':')) ptrE++;
if ( *ptrE == _T('\\'))
{
*ptrE = _T('\0');
diff --git a/plugins/Clist_modern/modern_skinselector.cpp b/plugins/Clist_modern/modern_skinselector.cpp
index 166a1fad12..770ae4ae8d 100644
--- a/plugins/Clist_modern/modern_skinselector.cpp
+++ b/plugins/Clist_modern/modern_skinselector.cpp
@@ -36,8 +36,8 @@ LISTMODERNMASK * MainModernMaskList = NULL;
/// IMPLEMENTATIONS
char * ModernMaskToString(MODERNMASK * mm, char * buf, UINT bufsize)
{
- int i = 0;
- for (i = 0; i < (int)mm->dwParamCnt;i++)
+ int i=0;
+ for (i=0; i < (int)mm->dwParamCnt;i++)
{
if (mm->pl_Params[i].bMaskParamFlag)
{
@@ -55,7 +55,7 @@ int SkinSelector_DeleteMask(MODERNMASK * mm)
{
int i;
if (!mm->pl_Params) return 0;
- for (i = 0;i < (int)mm->dwParamCnt;i++)
+ for (i=0;i < (int)mm->dwParamCnt;i++)
{
if (mm->pl_Params[i].szName) free(mm->pl_Params[i].szName);
if (mm->pl_Params[i].szValue) free(mm->pl_Params[i].szValue);
@@ -70,10 +70,10 @@ BOOL wildcmpi(TCHAR* name, TCHAR* mask)
TCHAR* last = '\0';
for (;; mask++, name++)
{
- if (*mask !='?' && _qtoupper(*mask) !=_qtoupper(*name)) break;
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) break;
if (*name == '\0') return ((BOOL)!*mask);
}
- if (*mask !='*') return FALSE;
+ if (*mask != '*') return FALSE;
for (;; mask++, name++)
{
while(*mask == '*')
@@ -82,7 +82,7 @@ BOOL wildcmpi(TCHAR* name, TCHAR* mask)
if (*mask == '\0') return ((BOOL)!*mask); /* true */
}
if (*name == '\0') return ((BOOL)!*mask); /* *mask == EOS */
- if (*mask !='?' && _qtoupper(*mask) !=_qtoupper(*name)) name -= (size_t)(mask - last) - 1, mask = last;
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) name -= (size_t)(mask - last) - 1, mask = last;
}
}
@@ -91,10 +91,10 @@ BOOL wildcmpi(char * name, char * mask)
char * last = '\0';
for (;; mask++, name++)
{
- if (*mask !='?' && _qtoupper(*mask) !=_qtoupper(*name)) break;
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) break;
if (*name == '\0') return ((BOOL)!*mask);
}
- if (*mask !='*') return FALSE;
+ if (*mask != '*') return FALSE;
for (;; mask++, name++)
{
while(*mask == '*')
@@ -103,7 +103,7 @@ BOOL wildcmpi(char * name, char * mask)
if (*mask == '\0') return ((BOOL)!*mask); /* true */
}
if (*name == '\0') return ((BOOL)!*mask); /* *mask == EOS */
- if (*mask !='?' && _qtoupper(*mask) !=_qtoupper(*name)) name -= (size_t)(mask - last) - 1, mask = last;
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) name -= (size_t)(mask - last) - 1, mask = last;
}
}
@@ -112,10 +112,10 @@ BOOL __inline wildcmp(const char * name, const char * mask, BYTE option)
const char * last = '\0';
for (;; mask++, name++)
{
- if (*mask !='?' && *mask !=*name) break;
+ if (*mask != '?' && *mask != *name) break;
if (*name == '\0') return ((BOOL)!*mask);
}
- if (*mask !='*') return FALSE;
+ if (*mask != '*') return FALSE;
for (;; mask++, name++)
{
while(*mask == '*')
@@ -124,7 +124,7 @@ BOOL __inline wildcmp(const char * name, const char * mask, BYTE option)
if (*mask == '\0') return ((BOOL)!*mask); /* true */
}
if (*name == '\0') return ((BOOL)!*mask); /* *mask == EOS */
- if (*mask !='?' && *mask !=*name) name -= (size_t)(mask - last) - 1, mask = last;
+ if (*mask != '?' && *mask != *name) name -= (size_t)(mask - last) - 1, mask = last;
}
}
@@ -186,7 +186,7 @@ lph_top: //only 4 of 9 instructions in here don't use AL, so optimal pipe use i
DWORD hash = 0;
int i;
int shift = 0;
- for(i = 0;szStr[i];i++) {
+ for(i=0;szStr[i];i++) {
hash ^= szStr[i] << shift;
if (shift>24) hash ^= (szStr[i]>>(32-shift))&0x7F;
shift = (shift+5)&0x1F;
@@ -225,7 +225,7 @@ int ClearMaskList(LISTMODERNMASK * mmTemplateList)
int i;
if (!mmTemplateList) return -1;
if (!mmTemplateList->pl_Masks) return -1;
- for(i = 0; i < (int)mmTemplateList->dwMaskCnt; i++)
+ for(i=0; i < (int)mmTemplateList->dwMaskCnt; i++)
SkinSelector_DeleteMask(&(mmTemplateList->pl_Masks[i]));
mir_free_and_nill(mmTemplateList->pl_Masks);
mmTemplateList->pl_Masks = NULL;
@@ -309,7 +309,7 @@ static BOOL _GetParamValue( char * szText, unsigned int& start, unsigned int len
enum { STATE_PARAM, STATE_VALUE };
int state = STATE_PARAM;
- if ( start >= length ) return FALSE;
+ if ( start >= length ) return FALSE;
paramlen = 0;
valuelen = 0;
@@ -476,7 +476,7 @@ BOOL CompareModernMask(MODERNMASK * mmValue,MODERNMASK * mmTemplate)
vh = p.dwValueHash;
pVal = 0;
if ( p.bMaskParamFlag& MPF_HASHED ) //compare by hash
- while (pVal < mmValue->dwParamCnt && mmValue->pl_Params[pVal].bMaskParamFlag !=0)
+ while (pVal < mmValue->dwParamCnt && mmValue->pl_Params[pVal].bMaskParamFlag != 0)
{
if (mmValue->pl_Params[pVal].dwId == ph)
{
@@ -540,7 +540,7 @@ MODERNMASK * FindMaskByStr(char * szValue,LISTMODERNMASK * mmTemplateList)
SKINOBJECTDESCRIPTOR * skin_FindObjectByMask (MODERNMASK * mm,LISTMODERNMASK * mmTemplateList)
{
SKINOBJECTDESCRIPTOR * res = NULL;
- DWORD i = 0;
+ DWORD i=0;
while (i < mmTemplateList->dwMaskCnt)
{
if (CompareModernMask(mm,&(mmTemplateList->pl_Masks[i])))
@@ -581,7 +581,7 @@ TCHAR * GetParamNT(char * string, TCHAR * buf, int buflen, BYTE paramN, char Del
char * GetParamN(char * string, char * buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces)
{
- int i = 0;
+ int i=0;
DWORD start = 0;
DWORD end = 0;
DWORD CurentCount = 0;
diff --git a/plugins/Clist_modern/modern_statusbar.cpp b/plugins/Clist_modern/modern_statusbar.cpp
index cf46a61696..391ea24465 100644
--- a/plugins/Clist_modern/modern_statusbar.cpp
+++ b/plugins/Clist_modern/modern_statusbar.cpp
@@ -401,7 +401,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
else sw = rectwidth;
if (ProtoWidth) mir_free_and_nill(ProtoWidth);
ProtoWidth = (int*)mir_alloc(sizeof(int)*visProtoCount);
- for (i = 0; i < visProtoCount; i++)
+ for (i=0; i < visProtoCount; i++)
{
SIZE textSize;
DWORD w = 0;
@@ -495,12 +495,12 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
}
// Reposition rects
- for(i = 0; i < visProtoCount; i++)
+ for(i=0; i < visProtoCount; i++)
if (ProtoWidth[i]>maxwidth) maxwidth = ProtoWidth[i];
if (g_StatusBarData.sameWidth)
{
- for (i = 0; i < visProtoCount; i++)
+ for (i=0; i < visProtoCount; i++)
ProtoWidth[i] = maxwidth;
SumWidth = maxwidth*visProtoCount;
}
@@ -512,7 +512,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
//dx = (int)(0.5+(float)dx/visProtoCount);
//SumWidth -= dx*visProtoCount;
SumWidth = 0;
- for (i = 0; i < visProtoCount; i++)
+ for (i=0; i < visProtoCount; i++)
{
ProtoWidth[i] = (int)((float)ProtoWidth[i]*f);
SumWidth += ProtoWidth[i];
@@ -531,7 +531,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
// r.top += g_StatusBarData.rectBorders.top;
// r.bottom -= g_StatusBarData.rectBorders.bottom;
r.left += g_StatusBarData.rectBorders.left+aligndx;
- for (i = 0; i < visProtoCount; i++)
+ for (i=0; i < visProtoCount; i++)
{
HRGN rgn;
int x = r.left;
@@ -626,7 +626,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
if ( db_get_b( NULL,ProtosData[i].AccountName,"LockMainStatus",0 ))
{
HICON hLockOverlay = LoadSkinnedIcon(SKINICON_OTHER_STATUS_LOCKED);
- if (hLockOverlay !=NULL)
+ if (hLockOverlay != NULL)
{
mod_DrawIconEx_helper(hDC, x, iconY, hLockOverlay, GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL | dim);
CallService(MS_SKIN2_RELEASEICON, (WPARAM)hLockOverlay, 0); }
@@ -894,7 +894,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam
int i;
RECT rc;
ScreenToClient(hwnd,&pt);
- for (i = 0; i < allocedItemData; i++)
+ for (i=0; i < allocedItemData; i++)
{
rc = ProtosData[i].protoRect;
if (PtInRect(&rc,pt))
@@ -969,7 +969,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam
NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip,0,0);
};
tooltipshoing = FALSE;
- for (i = 0; i < allocedItemData; i++)
+ for (i=0; i < allocedItemData; i++)
{
RECT rc1;
BOOL isOnExtra = FALSE;
@@ -993,7 +993,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam
}
if ( msg == WM_LBUTTONDOWN && bCtrl )
{
- if ( g_CluiData.bFilterEffective !=CLVM_FILTER_PROTOS || !bShift )
+ if ( g_CluiData.bFilterEffective != CLVM_FILTER_PROTOS || !bShift )
{
ApplyViewMode( "" );
mir_snprintf( g_CluiData.protoFilter, SIZEOF(g_CluiData.protoFilter), "%s|", ProtosData[i].AccountName );
@@ -1036,7 +1036,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam
{
int i = pcli->pfnGetAccountIndexByPos( pos );
- if ( i < 0 && i >= protoCount )
+ if ( i < 0 && i >= protoCount )
continue;
char protoF[ sizeof(g_CluiData.protoFilter) ];
diff --git a/plugins/Clist_modern/modern_statusbar_options.cpp b/plugins/Clist_modern/modern_statusbar_options.cpp
index f9703da9b6..a70fa2387c 100644
--- a/plugins/Clist_modern/modern_statusbar_options.cpp
+++ b/plugins/Clist_modern/modern_statusbar_options.cpp
@@ -203,7 +203,7 @@ static void UpdateStatusBarOptionsDisplay(HWND hwndDlg)
SendMessage(hwndComboBox, CB_ADDSTRING, 0, (LPARAM)TranslateT( " << Global>>" ));
SendMessage(hwndComboBox, CB_SETITEMDATA, 0, (LPARAM)0);
- for ( i = 0; i < count; i++ )
+ for ( i=0; i < count; i++ )
{
szName = accs[i]->szModuleName;
dat[i].szName = szName;
@@ -275,7 +275,7 @@ static void UpdateStatusBarOptionsDisplay(HWND hwndDlg)
{
int i, item;
TCHAR *align[] = {_T("Left"), _T("Center"), _T("Right")};
- for (i = 0; i < SIZEOF(align); i++) {
+ for (i=0; i < SIZEOF(align); i++) {
item = SendDlgItemMessage(hwndDlg,IDC_SBAR_HORIZ_ALIGN,CB_ADDSTRING,0,(LPARAM)TranslateTS(align[i]));
}
@@ -285,7 +285,7 @@ static void UpdateStatusBarOptionsDisplay(HWND hwndDlg)
{
int i, item;
TCHAR *align[] = {_T("Top"), _T("Center"), _T("Bottom")};
- for (i = 0; i < SIZEOF(align); i++) {
+ for (i=0; i < SIZEOF(align); i++) {
item = SendDlgItemMessage(hwndDlg,IDC_SBAR_VERT_ALIGN,CB_ADDSTRING,0,(LPARAM)TranslateTS(align[i]));
}
@@ -524,8 +524,8 @@ static void UpdateStatusBarOptionsDisplay(HWND hwndDlg)
LOWORD(wParam) == IDC_SBAR_BORDER_BOTTOM ||
LOWORD(wParam) == IDC_SBAR_BORDER_TOP
) && (
- HIWORD(wParam) !=EN_CHANGE ||
- (HWND)lParam !=GetFocus()
+ HIWORD(wParam) != EN_CHANGE ||
+ (HWND)lParam != GetFocus()
))
return 0; // dont make apply enabled during buddy set crap
else if ( LOWORD(wParam) == IDC_STATUSBAR_PROTO_LIST )
@@ -543,7 +543,7 @@ static void UpdateStatusBarOptionsDisplay(HWND hwndDlg)
int count = db_get_dw(0,"Protocols","ProtoCount",-1);
db_set_b(NULL, "CLUI", "SBarPerProto", IsDlgButtonChecked(hwndDlg, IDC_STATUSBAR_PER_PROTO));
- for (int i = 0; i < count; i++)
+ for (int i=0; i < count; i++)
{
HWND hwndComboBox = GetDlgItem( hwndDlg, IDC_STATUSBAR_PROTO_LIST );
StatusBarProtocolOptions sbpo = dat[i];
diff --git a/plugins/Clist_modern/modern_sync.cpp b/plugins/Clist_modern/modern_sync.cpp
index 85e7c1fab6..829c86c670 100644
--- a/plugins/Clist_modern/modern_sync.cpp
+++ b/plugins/Clist_modern/modern_sync.cpp
@@ -64,7 +64,7 @@ int SyncCall(void * vproc, int count, ... )
int i;
params[0] = (LPARAM)count;
va_start(va, count);
- for (i = 0; i < count && i < SIZEOF(params)-1; i++)
+ for (i=0; i < count && i < SIZEOF(params)-1; i++)
{
params[i+1] = va_arg(va,LPARAM);
}
@@ -78,7 +78,7 @@ int SyncCallProxy(PSYNCCALLBACKPROC pfnProc, WPARAM wParam, LPARAM lParam, CRITI
int nReturn = 0;
- if ( cs !=NULL )
+ if ( cs != NULL )
{
if ( !fnTryEnterCriticalSection ) // for poor OSes like Win98
{
diff --git a/plugins/Clist_modern/modern_tbbutton.cpp b/plugins/Clist_modern/modern_tbbutton.cpp
index 5d465927ba..5ad2b79401 100644
--- a/plugins/Clist_modern/modern_tbbutton.cpp
+++ b/plugins/Clist_modern/modern_tbbutton.cpp
@@ -163,7 +163,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
break;
}
case WM_SYSKEYUP:
- if (lpSBData->nStateId !=PBS_DISABLED && lpSBData->cHot && lpSBData->cHot == tolower((int) wParam))
+ if (lpSBData->nStateId != PBS_DISABLED && lpSBData->cHot && lpSBData->cHot == tolower((int) wParam))
{
if (lpSBData->pushBtn)
{
@@ -258,8 +258,8 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
}
case BUTTONSETASPUSHBTN:
- lpSBData->pushBtn = (wParam !=0);
- lpSBData->pbState = (lParam & 2) !=0;
+ lpSBData->pushBtn = (wParam != 0);
+ lpSBData->pbState = (lParam & 2) != 0;
return 0;
case WM_SETFOCUS:
@@ -288,7 +288,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
/*case WM_MOUSELEAVE:
{
// faked by the WM_TIMER
- if (lpSBData->nStateId !=PBS_DISABLED)
+ if (lpSBData->nStateId != PBS_DISABLED)
{
// don't change states if disabled
lpSBData->nStateId = PBS_NORMAL;
@@ -299,7 +299,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
*/
case WM_CAPTURECHANGED:
{
- if ( (HWND)lParam !=lpSBData->hWnd && lpSBData->nStateId !=PBS_DISABLED)
+ if ( (HWND)lParam != lpSBData->hWnd && lpSBData->nStateId != PBS_DISABLED)
{
// don't change states if disabled
lpSBData->nStateId = PBS_NORMAL;
@@ -323,7 +323,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
break;
}
- if (lpSBData->nStateId !=PBS_DISABLED && lpSBData->nStateId !=PBS_PRESSED)
+ if (lpSBData->nStateId != PBS_DISABLED && lpSBData->nStateId != PBS_PRESSED)
{
lpSBData->nStateId = PBS_PRESSED;
lpSBData->fHotMark = TRUE;
@@ -364,7 +364,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
lpSBData->pbState = TRUE;
}
- if (lpSBData->nStateId !=PBS_DISABLED)
+ if (lpSBData->nStateId != PBS_DISABLED)
{
// don't change states if disabled
if (msg == WM_LBUTTONUP)
@@ -382,7 +382,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
{
RECT rc;
POINT pt;
- BOOL bPressed = (wParam & MK_LBUTTON) !=0;
+ BOOL bPressed = (wParam & MK_LBUTTON) != 0;
if ( bPressed && !lpSBData->fHotMark )
break;
GetWindowRect(hwndDlg, &rc);
diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp
index 94bc917f1c..6e79d560b7 100644
--- a/plugins/Clist_modern/modern_toolbar.cpp
+++ b/plugins/Clist_modern/modern_toolbar.cpp
@@ -411,7 +411,7 @@ static int sttReposButtons(MTBINFO * mti)
int nBarSize;
int nFlexSeparatorsCount = 0;
int nUsedWidth = 0;
- int i = 0;
+ int i=0;
int nextX = 0;
int nFreeSpace;
BOOL bWasButttonBefore = FALSE;
@@ -482,7 +482,7 @@ static int sttReposButtons(MTBINFO * mti)
y += mti->nButtonHeight+mti->nButtonSpace;
nextX = 0;
if (mti->fSingleLine) break;
- } while (iFirstButtonId < mti->pButtonList->realCount && y >= 0 &&(mti->fAutoSize || (y+mti->nButtonHeight <= rcClient.bottom-rcClient.top)));
+ } while (iFirstButtonId < mti->pButtonList->realCount && y >= 0 &&(mti->fAutoSize || (y+mti->nButtonHeight <= rcClient.bottom-rcClient.top)));
for (i = iFirstButtonId; i < mti->pButtonList->realCount; i++)
{
MTB_BUTTONINFO * mtbi = (MTB_BUTTONINFO *)mti->pButtonList->items[i];
@@ -624,7 +624,7 @@ static void sttGetButtonSettings(char * ID, BYTE * pbVisible, DWORD * pdwOrder
}
static void sttReloadButtons()
{
- int i = 0;
+ int i=0;
tbcheck ;
tblock;
{
@@ -633,7 +633,7 @@ static void sttReloadButtons()
}
WindowList_Broadcast(tbdat.hToolBarWindowList, MTBM_REMOVE_ALL_BUTTONS, 0,0);
- for (i = 0; i < tbdat.listOfButtons->realCount; i++)
+ for (i=0; i < tbdat.listOfButtons->realCount; i++)
{
BYTE bVisible;
BYTE bPanel;
@@ -865,7 +865,7 @@ static LRESULT CALLBACK ToolBar_WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
}
}
- if ((curvis != vis || bResize) && vis !=-1)
+ if ((curvis != vis || bResize) && vis != -1)
{
frameopt = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS,frameID),0);
frameopt &= ~F_VISIBLE;
@@ -920,7 +920,7 @@ static LRESULT CALLBACK ToolBar_WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
case MTBM_REMOVE_ALL_BUTTONS:
{
int i;
- for (i = 0; i < pMTBInfo->pButtonList->realCount; i++ )
+ for (i=0; i < pMTBInfo->pButtonList->realCount; i++ )
{
MTB_BUTTONINFO * mtbi = (MTB_BUTTONINFO *)pMTBInfo->pButtonList->items[i];
if (mtbi->hWindow && mtbi->hwndToolBar == hwnd)
@@ -956,7 +956,7 @@ static LRESULT CALLBACK ToolBar_WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
{
RECT rcClient;
GetClientRect(pMTBInfo->hWnd, &rcClient);
- if (rcClient.bottom-rcClient.top !=Height && Height)
+ if (rcClient.bottom-rcClient.top != Height && Height)
{
supressRepos = TRUE;
PostMessage(pMTBInfo->hWnd,MTBM_UPDATEFRAMEVISIBILITY, -1, 0);
@@ -1010,7 +1010,7 @@ static LRESULT CALLBACK ToolBar_WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
GetClientRect(hwnd, &rcClient);
SkinDrawGlyph(hDC,&rcClient,&rcClient,"Bar,ID = ToolBar,Part = Background");
}
- for (i = 0; i < pMTBInfo->pButtonList->realCount; i++)
+ for (i=0; i < pMTBInfo->pButtonList->realCount; i++)
{
RECT childRect;
POINT Offset;
@@ -1029,7 +1029,7 @@ static LRESULT CALLBACK ToolBar_WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
void * hButton = (msg == MTBM_SETBUTTONSTATE) ? (void *)wParam : NULL;
MTB_BUTTONINFO *mtbi = NULL;
int i;
- for (i = 0; i < pMTBInfo->pButtonList->realCount; i++)
+ for (i=0; i < pMTBInfo->pButtonList->realCount; i++)
{
mtbi = (MTB_BUTTONINFO*)pMTBInfo->pButtonList->items[i];
if ((hButtonId && !strcmp(mtbi->szButtonID, hButtonId)) || (hButton == mtbi))
@@ -1051,7 +1051,7 @@ static LRESULT CALLBACK ToolBar_WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
void * hButton = (msg == MTBM_GETBUTTONSTATE) ? (void *)wParam : NULL;
MTB_BUTTONINFO *mtbi = NULL;
int i;
- for (i = 0; i < pMTBInfo->pButtonList->realCount; i++)
+ for (i=0; i < pMTBInfo->pButtonList->realCount; i++)
{
mtbi = (MTB_BUTTONINFO*)pMTBInfo->pButtonList->items[i];
if ((hButtonId && !strcmp(mtbi->szButtonID, hButtonId)) || (hButton == mtbi))
@@ -1067,7 +1067,7 @@ static LRESULT CALLBACK ToolBar_WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM
case MTBM_REMOVEBUTTON:
{
MTB_BUTTONINFO *mtbi = NULL;
- for (int i = 0; i < pMTBInfo->pButtonList->realCount; i++)
+ for (int i=0; i < pMTBInfo->pButtonList->realCount; i++)
{
mtbi = (MTB_BUTTONINFO*)pMTBInfo->pButtonList->items[i];
if (mtbi == (MTB_BUTTONINFO*)wParam)
@@ -1121,8 +1121,8 @@ static LRESULT CALLBACK ToolBar_OptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L
qsort(tbdat.listOfButtons->items,tbdat.listOfButtons->realCount,sizeof(MTB_BUTTONINFO *),sttSortButtons);
{
- int i = 0;
- for (i = 0; i < tbdat.listOfButtons->realCount; i++)
+ int i=0;
+ for (i=0; i < tbdat.listOfButtons->realCount; i++)
{
TVINSERTSTRUCT tvis = {0};
HTREEITEM hti;
@@ -1160,7 +1160,7 @@ static LRESULT CALLBACK ToolBar_OptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L
{
int i;
BOOL en = IsDlgButtonChecked(hwndDlg,IDC_TBSHOW);
- for (i = 0; i < SIZEOF(ControlIDS); i++)
+ for (i=0; i < SIZEOF(ControlIDS); i++)
EnableWindow(GetDlgItem(hwndDlg,ControlIDS[i]), en);
}
return TRUE;
@@ -1315,14 +1315,14 @@ static LRESULT CALLBACK ToolBar_OptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L
{
int i;
BOOL en = IsDlgButtonChecked(hwndDlg,IDC_TBSHOW);
- for (i = 0; i < SIZEOF(ControlIDS); i++)
+ for (i=0; i < SIZEOF(ControlIDS); i++)
EnableWindow(GetDlgItem(hwndDlg,ControlIDS[i]), en);
}
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
} else if ( (LOWORD(wParam) == IDC_TEXT_W ||
LOWORD(wParam) == IDC_TEXT_H ||
LOWORD(wParam) == IDC_TEXT_S )
- && HIWORD(wParam) !=EN_CHANGE || (HWND)lParam !=GetFocus()) return 0; // dont make apply enabled during buddy set crap
+ && HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()) return 0; // dont make apply enabled during buddy set crap
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
break;
}
diff --git a/plugins/Clist_modern/modern_viewmodebar.cpp b/plugins/Clist_modern/modern_viewmodebar.cpp
index 0895e45636..a8afbafa04 100644
--- a/plugins/Clist_modern/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/modern_viewmodebar.cpp
@@ -74,7 +74,7 @@ static int ViewModePaintCallbackProc(HWND hWnd, HDC hDC, RECT * rcPaint, HRGN rg
RECT MyRect = {0};
GetWindowRect(hWnd,&MyRect);
DrawViewModeBar(hWnd,hDC);
- for (i = 0; _buttons[i] != 0; i++)
+ for (i=0; _buttons[i] != 0; i++)
{
RECT childRect;
POINT Offset;
@@ -95,7 +95,7 @@ static int ViewModePaintCallbackProc(HWND hWnd, HDC hDC, RECT * rcPaint, HRGN rg
int CLVM_EnumProc(const char *szSetting, LPARAM lParam)
{
pfnEnumCallback EnumCallback = (pfnEnumCallback)lParam;
- if (szSetting !=NULL)
+ if (szSetting != NULL)
EnumCallback((char *)szSetting);
return(0);
}
@@ -129,7 +129,7 @@ int FillModes(char *szsetting)
static void ShowPage(HWND hwnd, int page)
{
- int i = 0;
+ int i=0;
int pageChange = 0;
if (page == 0 && IsWindowVisible(GetDlgItem(hwnd, _page2Controls[0])))
@@ -143,17 +143,17 @@ static void ShowPage(HWND hwnd, int page)
switch(page) {
case 0:
- while(_page1Controls[i] !=0)
+ while(_page1Controls[i] != 0)
ShowWindow(GetDlgItem(hwnd, _page1Controls[i++]), SW_SHOW);
- i = 0;
- while(_page2Controls[i] !=0)
+ i=0;
+ while(_page2Controls[i] != 0)
ShowWindow(GetDlgItem(hwnd, _page2Controls[i++]), SW_HIDE);
break;
case 1:
- while(_page1Controls[i] !=0)
+ while(_page1Controls[i] != 0)
ShowWindow(GetDlgItem(hwnd, _page1Controls[i++]), SW_HIDE);
- i = 0;
- while(_page2Controls[i] !=0)
+ i=0;
+ while(_page2Controls[i] != 0)
ShowWindow(GetDlgItem(hwnd, _page2Controls[i++]), SW_SHOW);
break;
}
@@ -176,7 +176,7 @@ static DWORD GetMaskForItem(HANDLE hItem)
{
DWORD dwMask = 0;
- for(int i = 0; i <= ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE; i++)
+ for(int i=0; i <= ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE; i++)
dwMask |= (SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, i) == nullImage ? 0 : 1 << i);
return dwMask;
@@ -231,7 +231,7 @@ static int FillDialog(HWND hwnd)
item.mask = LVIF_TEXT;
item.iItem = 1000;
- for(i = 0; i < protoCount; i++)
+ for(i=0; i < protoCount; i++)
{
item.pszText = accs[i]->szModuleName;
newItem = SendMessageA(hwndList, LVM_INSERTITEMA, 0, (LPARAM)&item);
@@ -259,7 +259,7 @@ static int FillDialog(HWND hwnd)
item.pszText = TranslateT("Ungrouped contacts");
newItem = SendMessage(hwndList, LVM_INSERTITEM, 0, (LPARAM)&item);
- for(i = 0;;i++)
+ for(i=0;;i++)
{
mir_snprintf(buf, 20, "%d", i);
if (DBGetContactSettingTString(NULL, "CListGroups", buf, &dbv))
@@ -414,7 +414,7 @@ void SaveState()
char szTemp[256];
hwndList = GetDlgItem(clvmHwnd, IDC_PROTOCOLS);
- for(i = 0; i < ListView_GetItemCount(hwndList); i++) {
+ for(i=0; i < ListView_GetItemCount(hwndList); i++) {
if (ListView_GetCheckState(hwndList, i)) {
item.mask = LVIF_TEXT;
item.pszText = szTemp;
@@ -436,7 +436,7 @@ void SaveState()
operators |= ListView_GetCheckState(hwndList, 0) ? CLVM_INCLUDED_UNGROUPED : 0;
- for(i = 0; i < ListView_GetItemCount(hwndList); i++) {
+ for(i=0; i < ListView_GetItemCount(hwndList); i++) {
if (ListView_GetCheckState(hwndList, i)) {
item.mask = LVIF_TEXT;
item.pszText = szTemp;
@@ -566,7 +566,7 @@ static void UpdateFilters()
if (DBGetContactSettingTString(NULL, CLVM_MODULE, szSetting, &dbv_gf))
goto cleanup;
mir_snprintf(szSetting, 128, "%c%s_OPT", 246, szBuf);
- if ((opt = db_get_dw(NULL, CLVM_MODULE, szSetting, -1)) !=-1)
+ if ((opt = db_get_dw(NULL, CLVM_MODULE, szSetting, -1)) != -1)
{
SendDlgItemMessage(clvmHwnd, IDC_AUTOCLEARSPIN, UDM_SETPOS, 0, MAKELONG(LOWORD(opt), 0));
}
@@ -586,7 +586,7 @@ static void UpdateFilters()
item.pszText = szTemp;
item.cchTextMax = 255;
- for(i = 0; i < ListView_GetItemCount(hwndList); i++)
+ for(i=0; i < ListView_GetItemCount(hwndList); i++)
{
item.iItem = i;
SendMessageA(hwndList, LVM_GETITEMA, 0, (LPARAM)&item);
@@ -693,7 +693,7 @@ void DeleteViewMode( char * szName )
HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
while(hContact)
{
- if (db_get_dw(hContact, CLVM_MODULE, szName, -1) !=-1)
+ if (db_get_dw(hContact, CLVM_MODULE, szName, -1) != -1)
db_set_dw(hContact, CLVM_MODULE, szName, 0);
hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
}
@@ -707,7 +707,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
switch(msg) {
case WM_INITDIALOG:
{
- int i = 0;
+ int i=0;
TCITEM tci;
RECT rcClient;
CLCINFOITEM cii = {0};
@@ -752,7 +752,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS,0,0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN,2,0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETINDENT,10,0);
- for(i = 0;i <= FONTID_MAX;i++)
+ for(i=0;i <= FONTID_MAX;i++)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETTEXTCOLOR,i,GetSysColor(COLOR_WINDOWTEXT));
cii.cbSize = sizeof(cii);
cii.hParentGroup = 0;
@@ -776,7 +776,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
index = 0;
}
- if (SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_SETCURSEL, index, 0) !=LB_ERR)
+ if (SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_SETCURSEL, index, 0) != LB_ERR)
{
clvm_curItem = index;
UpdateFilters();
@@ -784,8 +784,8 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
else
clvm_curItem = -1;
g_ViewModeOptDlg = TRUE;
- i = 0;
- while(_page2Controls[i] !=0)
+ i=0;
+ while(_page2Controls[i] != 0)
ShowWindow(GetDlgItem(hwndDlg, _page2Controls[i++]), SW_HIDE);
ShowWindow(hwndDlg, SW_SHOWNORMAL);
EnableWindow(GetDlgItem(hwndDlg, IDC_APPLY), FALSE);
@@ -844,7 +844,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
DeleteViewMode( szBuf );
SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_DELETESTRING, SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_GETCURSEL, 0, 0), 0);
- if (SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_SETCURSEL, 0, 0) !=LB_ERR)
+ if (SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_SETCURSEL, 0, 0) != LB_ERR)
{
clvm_curItem = 0;
UpdateFilters();
@@ -876,12 +876,12 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP
char *szUTF8Buf = NULL;
szUTF8Buf = mir_utf8encodeT(szBuf);
- if (db_get_dw(NULL, CLVM_MODULE, szUTF8Buf, -1) !=-1)
+ if (db_get_dw(NULL, CLVM_MODULE, szUTF8Buf, -1) != -1)
MessageBox(0, TranslateT("A view mode with this name does alredy exist"), TranslateT("Duplicate name"), MB_OK);
else
{
int iNewItem = SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_INSERTSTRING, -1, (LPARAM)szBuf);
- if (iNewItem !=LB_ERR)
+ if (iNewItem != LB_ERR)
{
SendDlgItemMessage(hwndDlg, IDC_VIEWMODES, LB_SETCURSEL, (WPARAM)iNewItem, 0);
SaveViewMode(szUTF8Buf, _T(""), "", 0, -1, 0, 0, 0, 0);
@@ -1109,9 +1109,9 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
{
int bSkinned = db_get_b(NULL, "CLCExt", "bskinned", 0);
- int i = 0;
+ int i=0;
- while(_buttons[i] !=0) {
+ while(_buttons[i] != 0) {
//SendMessage(GetDlgItem(hwnd, _buttons[i]), BM_SETSKINNED, 0, bSkinned);
if (1&&bSkinned) {
SendDlgItemMessage(hwnd, _buttons[i], BUTTONSETASFLATBTN, TRUE, 0);
@@ -1195,7 +1195,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
{
int i;
- for (i = 0; _buttons[i] != 0; i++)
+ for (i=0; _buttons[i] != 0; i++)
{
RECT childRect;
RECT MyRect;
@@ -1453,7 +1453,7 @@ void ApplyViewMode(const char *Name, bool onlySelector )
mir_snprintf(szSetting, 256, "%c_LastMode", 246);
db_unset(NULL,CLVM_MODULE,szSetting);
}
- if ( g_CluiData.bOldUseGroups !=(BYTE) -1 )
+ if ( g_CluiData.bOldUseGroups != (BYTE) -1 )
CallService( MS_CLIST_SETUSEGROUPS, (WPARAM)g_CluiData.bOldUseGroups, 0 );
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
@@ -1472,7 +1472,7 @@ void ApplyViewMode(const char *Name, bool onlySelector )
{
mir_snprintf(szSetting, 256, "%c%s_PF", 246, name);
if (!DBGetContactSettingString(NULL, CLVM_MODULE, szSetting, &dbv)) {
- if (lstrlenA(dbv.pszVal) >= 2)
+ if (lstrlenA(dbv.pszVal) >= 2)
{
strncpy(g_CluiData.protoFilter, dbv.pszVal, SIZEOF(g_CluiData.protoFilter));
g_CluiData.protoFilter[SIZEOF(g_CluiData.protoFilter) - 1] = 0;
@@ -1483,7 +1483,7 @@ void ApplyViewMode(const char *Name, bool onlySelector )
mir_snprintf(szSetting, 256, "%c%s_GF", 246, name);
if (!DBGetContactSettingTString(NULL, CLVM_MODULE, szSetting, &dbv))
{
- if (lstrlen(dbv.ptszVal) >= 2)
+ if (lstrlen(dbv.ptszVal) >= 2)
{
_tcsncpy(g_CluiData.groupFilter, dbv.ptszVal, SIZEOF(g_CluiData.groupFilter));
g_CluiData.groupFilter[SIZEOF(g_CluiData.groupFilter) - 1] = 0;
@@ -1493,12 +1493,12 @@ void ApplyViewMode(const char *Name, bool onlySelector )
}
mir_snprintf(szSetting, 256, "%c%s_SM", 246, name);
g_CluiData.statusMaskFilter = db_get_dw(NULL, CLVM_MODULE, szSetting, -1);
- if (g_CluiData.statusMaskFilter >= 1)
+ if (g_CluiData.statusMaskFilter >= 1)
g_CluiData.bFilterEffective |= CLVM_FILTER_STATUS;
mir_snprintf(szSetting, 256, "%c%s_SSM", 246, name);
g_CluiData.stickyMaskFilter = db_get_dw(NULL, CLVM_MODULE, szSetting, -1);
- if (g_CluiData.stickyMaskFilter !=-1)
+ if (g_CluiData.stickyMaskFilter != -1)
g_CluiData.bFilterEffective |= CLVM_FILTER_STICKYSTATUS;
/*
@@ -1576,7 +1576,7 @@ void ApplyViewMode(const char *Name, bool onlySelector )
BYTE bSaved = g_CluiData.bSortByOrder[0];
g_CluiData.bSortByOrder[0] = SORTBY_LASTMSG;
- for (i = 0; i < clistCache->realCount; i++)
+ for (i=0; i < clistCache->realCount; i++)
{
PDNCE pdnce = (PDNCE)clistCache->items[i];
pdnce->dwLastMsgTime = CompareContacts2_getLMTime(pdnce->m_cache_hContact);
@@ -1615,7 +1615,7 @@ void ApplyViewMode(const char *Name, bool onlySelector )
CallService(MS_CLIST_SETHIDEOFFLINE, 0, 0);
}
- else if ( g_CluiData.boldHideOffline !=(BYTE)-1 )
+ else if ( g_CluiData.boldHideOffline != (BYTE)-1 )
{
CallService(MS_CLIST_SETHIDEOFFLINE, g_CluiData.boldHideOffline, 0);
g_CluiData.boldHideOffline = -1;
@@ -1628,14 +1628,14 @@ void ApplyViewMode(const char *Name, bool onlySelector )
else if ( g_CluiData.filterFlags & CLVM_DONOTUSEGROUPS )
bUseGroups = 0;
- if ( bUseGroups !=-1 )
+ if ( bUseGroups != -1 )
{
if (g_CluiData.bOldUseGroups == (BYTE)-1 )
g_CluiData.bOldUseGroups = db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT );
CallService(MS_CLIST_SETUSEGROUPS, bUseGroups, 0);
}
- else if ( g_CluiData.bOldUseGroups !=(BYTE)-1 )
+ else if ( g_CluiData.bOldUseGroups != (BYTE)-1 )
{
CallService(MS_CLIST_SETUSEGROUPS, g_CluiData.bOldUseGroups, 0);
g_CluiData.bOldUseGroups = -1;
diff --git a/plugins/Clist_modern/modern_xptheme.cpp b/plugins/Clist_modern/modern_xptheme.cpp
index fa09a4d16d..79b54ee4c1 100644
--- a/plugins/Clist_modern/modern_xptheme.cpp
+++ b/plugins/Clist_modern/modern_xptheme.cpp
@@ -168,7 +168,7 @@ void xpt_FreeThemeForWindow(HWND hwnd)
xptcheck;
xptlock();
{
- int i = 0;
+ int i=0;
while (i < xptObjectList->realCount)
{
XPTObject* xptObject = (XPTObject*)xptObjectList->items[i];
@@ -191,7 +191,7 @@ void xpt_OnWM_THEMECHANGED()
xptlock();
{
int i;
- for (i = 0; i < xptObjectList->realCount; i++)
+ for (i=0; i < xptObjectList->realCount; i++)
_sttXptReloadThemeData((XPTObject*)xptObjectList->items[i]);
}
xptunlock();