diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
commit | 78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch) | |
tree | 8512c50df70b8dd80c919e88ade3419207c95956 /plugins/Modernb | |
parent | ce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff) |
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Modernb')
30 files changed, 377 insertions, 377 deletions
diff --git a/plugins/Modernb/MString.cpp b/plugins/Modernb/MString.cpp index bf385194c3..caba4e022c 100644 --- a/plugins/Modernb/MString.cpp +++ b/plugins/Modernb/MString.cpp @@ -79,7 +79,7 @@ bool CMStringData::IsShared() const void CMStringData::Lock()
{
nRefs--; // Locked buffers can't be shared, so no interlocked operation necessary
- if( nRefs == 0 )
+ if ( nRefs == 0 )
nRefs = -1;
}
diff --git a/plugins/Modernb/_disabled_src/groups.c b/plugins/Modernb/_disabled_src/groups.c index 8e282de26b..e9350bf66a 100644 --- a/plugins/Modernb/_disabled_src/groups.c +++ b/plugins/Modernb/_disabled_src/groups.c @@ -134,7 +134,7 @@ static int GetGroupName(WPARAM wParam,LPARAM lParam) {
int ret;
ret=GetGroupName2(wParam,lParam);
- if((int*)lParam)
+ if ((int*)lParam)
*(int*)lParam=0!=(*(int*)lParam&GROUPF_EXPANDED);
return ret;
}
diff --git a/plugins/Modernb/hdr/MString.h b/plugins/Modernb/hdr/MString.h index 28cbeebdcf..28840fd84b 100644 --- a/plugins/Modernb/hdr/MString.h +++ b/plugins/Modernb/hdr/MString.h @@ -126,7 +126,7 @@ public: CMSimpleStringT(const XCHAR* pchSrc, int nLength)
{
CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
- if( pData != NULL )
+ if ( pData != NULL )
{
Attach( pData );
SetLength( nLength );
@@ -148,9 +148,9 @@ public: {
CMStringData* pSrcData = strSrc.GetData();
CMStringData* pOldData = GetData();
- if( pSrcData != pOldData)
+ if ( pSrcData != pOldData)
{
- if( pOldData->IsLocked() )
+ if ( pOldData->IsLocked() )
SetString( strSrc.GetString(), strSrc.GetLength() );
else
{
@@ -238,7 +238,7 @@ public: int nNewLength = nOldLength+nLength;
PXSTR pszBuffer = GetBuffer( nNewLength );
- if( nOffset <= nOldLength )
+ if ( nOffset <= nOldLength )
{
pszSrc = pszBuffer+nOffset;
// No need to call CopyCharsOverlapped, since the destination is
@@ -262,10 +262,10 @@ public: void Empty()
{
CMStringData* pOldData = GetData();
- if( pOldData->nDataLength == 0 )
+ if ( pOldData->nDataLength == 0 )
return;
- if( pOldData->IsLocked() )
+ if ( pOldData->IsLocked() )
{
// Don't reallocate a locked buffer that's shrinking
SetLength( 0 );
@@ -281,13 +281,13 @@ public: {
CMStringData* pOldData = GetData();
int nLength = pOldData->nDataLength;
- if( pOldData->nAllocLength == nLength )
+ if ( pOldData->nAllocLength == nLength )
return;
- if( !pOldData->IsLocked() ) // Don't reallocate a locked buffer that's shrinking
+ if ( !pOldData->IsLocked() ) // Don't reallocate a locked buffer that's shrinking
{
CMStringData* pNewData = Allocate( nLength, sizeof( XCHAR ) );
- if( pNewData == NULL ) {
+ if ( pNewData == NULL ) {
SetLength( nLength );
return;
}
@@ -311,7 +311,7 @@ public: PXSTR GetBuffer()
{
CMStringData* pData = GetData();
- if( pData->IsShared() )
+ if ( pData->IsShared() )
Fork( pData->nDataLength );
return m_pszData;
@@ -343,7 +343,7 @@ public: PXSTR LockBuffer()
{
CMStringData* pData = GetData();
- if( pData->IsShared() )
+ if ( pData->IsShared() )
{
Fork( pData->nDataLength );
pData = GetData(); // Do it again, because the fork might have changed it
@@ -363,7 +363,7 @@ public: }
void ReleaseBuffer( int nNewLength = -1 )
{
- if( nNewLength == -1 )
+ if ( nNewLength == -1 )
{
int nAlloc = GetData()->nAllocLength;
nNewLength = StringLengthN( m_pszData, nAlloc);
@@ -397,7 +397,7 @@ public: }
void SetString( PCXSTR pszSrc, int nLength )
{
- if( nLength == 0 )
+ if ( nLength == 0 )
{
Empty();
}
@@ -408,7 +408,7 @@ public: UINT_PTR nOffset = pszSrc - GetString();
PXSTR pszBuffer = GetBuffer( nLength );
- if( nOffset <= nOldLength )
+ if ( nOffset <= nOldLength )
{
CopyCharsOverlapped( pszBuffer, GetAllocLength(),
pszBuffer+nOffset, nLength );
@@ -496,14 +496,14 @@ public: }
static int __stdcall StringLengthN(const char* psz, size_t sizeInXChar )
{
- if( psz == NULL )
+ if ( psz == NULL )
return 0;
return int( strnlen( psz, sizeInXChar ));
}
static int __stdcall StringLengthN(const wchar_t* psz, size_t sizeInXChar )
{
- if( psz == NULL )
+ if ( psz == NULL )
return 0;
return int( wcsnlen( psz, sizeInXChar ));
@@ -565,12 +565,12 @@ private: {
// Grow exponentially, until we hit 1K.
int nNewLength = pOldData->nAllocLength;
- if( nNewLength > 1024 )
+ if ( nNewLength > 1024 )
nNewLength += 1024;
else
nNewLength *= 2;
- if( nNewLength < nLength )
+ if ( nNewLength < nLength )
nNewLength = nLength;
Reallocate( nNewLength );
@@ -583,7 +583,7 @@ private: return;
CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ) );
- if( pNewData != NULL )
+ if ( pNewData != NULL )
Attach( pNewData );
}
@@ -820,7 +820,7 @@ public: {
int nLen = ::MultiByteToWideChar( _AtlGetConversionACP(), 0, pchData, nDataLength, NULL, NULL );
BSTR bstr = ::SysAllocStringLen( NULL, nLen );
- if( bstr != NULL )
+ if ( bstr != NULL )
::MultiByteToWideChar( _AtlGetConversionACP(), 0, pchData, nDataLength, bstr, nLen );
return bstr;
@@ -830,7 +830,7 @@ public: {
int nLen = ::MultiByteToWideChar( _AtlGetConversionACP(), 0, pchData, nDataLength, NULL, NULL );
BOOL bSuccess = ::SysReAllocStringLen( pbstr, NULL, nLen );
- if( bSuccess )
+ if ( bSuccess )
::MultiByteToWideChar( _AtlGetConversionACP(), 0, pchData, nDataLength, *pbstr, nLen );
return bSuccess;
@@ -1034,7 +1034,7 @@ public: static void __stdcall FloodCharacters( wchar_t ch, int nLength, LPWSTR psz )
{
// nLength is in XCHARs
- for( int i = 0; i < nLength; i++ )
+ for ( int i = 0; i < nLength; i++ )
{
psz[i] = ch;
}
@@ -1148,7 +1148,7 @@ public: CMStringT( char ch, int nLength = 1 ) :
CThisSimpleString()
{
- if( nLength > 0 )
+ if ( nLength > 0 )
{
PXSTR pszBuffer = this->GetBuffer( nLength );
StringTraits::FloodCharacters( XCHAR( ch ), nLength, pszBuffer );
@@ -1159,7 +1159,7 @@ public: CMStringT( wchar_t ch, int nLength = 1 ) :
CThisSimpleString()
{
- if( nLength > 0 )
+ if ( nLength > 0 )
{
//Convert ch to the BaseType
wchar_t pszCh[2] = { ch , 0 };
@@ -1202,7 +1202,7 @@ public: CMStringT( const YCHAR* pch, int nLength ) :
CThisSimpleString()
{
- if( nLength > 0 )
+ if ( nLength > 0 )
{
int nDestLength = StringTraits::GetBaseTypeLength( pch, nLength );
PXSTR pszBuffer = this->GetBuffer( nDestLength );
@@ -1235,7 +1235,7 @@ public: {
// nDestLength is in XCHARs
int nDestLength = (pszSrc != NULL) ? StringTraits::GetBaseTypeLength( pszSrc ) : 0;
- if( nDestLength > 0 )
+ if ( nDestLength > 0 )
{
PXSTR pszBuffer = this->GetBuffer( nDestLength );
StringTraits::ConvertToBaseType( pszBuffer, nDestLength, pszSrc);
@@ -1349,18 +1349,18 @@ public: // Delete 'nCount' characters, starting at index 'iIndex'
int Delete( int iIndex, int nCount = 1 )
{
- if( iIndex < 0 )
+ if ( iIndex < 0 )
iIndex = 0;
- if( nCount < 0 )
+ if ( nCount < 0 )
nCount = 0;
int nLength = this->GetLength();
- if( nCount + iIndex > nLength )
+ if ( nCount + iIndex > nLength )
{
nCount = nLength-iIndex;
}
- if( nCount > 0 )
+ if ( nCount > 0 )
{
int nNewLength = nLength-nCount;
int nXCHARsToCopy = nLength-(iIndex+nCount)+1;
@@ -1379,10 +1379,10 @@ public: // Insert character 'ch' before index 'iIndex'
int Insert( int iIndex, XCHAR ch )
{
- if( iIndex < 0 )
+ if ( iIndex < 0 )
iIndex = 0;
- if( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength() )
iIndex = this->GetLength();
int nNewLength = this->GetLength()+1;
@@ -1404,10 +1404,10 @@ public: // Insert string 'psz' before index 'iIndex'
int Insert( int iIndex, PCXSTR psz )
{
- if( iIndex < 0 )
+ if ( iIndex < 0 )
iIndex = 0;
- if( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength() )
{
iIndex = this->GetLength();
}
@@ -1415,7 +1415,7 @@ public: // nInsertLength and nNewLength are in XCHARs
int nInsertLength = StringTraits::SafeStringLen( psz );
int nNewLength = this->GetLength();
- if( nInsertLength > 0 )
+ if ( nInsertLength > 0 )
{
nNewLength += nInsertLength;
@@ -1440,7 +1440,7 @@ public: int nCount = 0;
// short-circuit the nop case
- if( chOld != chNew )
+ if ( chOld != chNew )
{
// otherwise modify each character that matches in the string
bool bCopied = false;
@@ -1451,9 +1451,9 @@ public: while( iChar < nLength )
{
// replace instances of the specified character only
- if( pszBuffer[iChar] == chOld )
+ if ( pszBuffer[iChar] == chOld )
{
- if( !bCopied )
+ if ( !bCopied )
{
bCopied = true;
pszBuffer = this->GetBuffer( nLength );
@@ -1463,7 +1463,7 @@ public: }
iChar = int( StringTraits::CharNext( pszBuffer+iChar )-pszBuffer );
}
- if( bCopied )
+ if ( bCopied )
{
this->ReleaseBufferSetLength( nLength );
}
@@ -1479,7 +1479,7 @@ public: // nSourceLen is in XCHARs
int nSourceLen = StringTraits::SafeStringLen( pszOld );
- if( nSourceLen == 0 )
+ if ( nSourceLen == 0 )
return 0;
// nReplacementLen is in XCHARs
int nReplacementLen = StringTraits::SafeStringLen( pszNew );
@@ -1502,7 +1502,7 @@ public: }
// if any changes were made, make them
- if( nCount > 0 )
+ if ( nCount > 0 )
{
// if the buffer is too small, just
// allocate a new buffer (slow but sure)
@@ -1550,7 +1550,7 @@ public: while( pszSource < pszEnd )
{
PXSTR pszNewSource = StringTraits::CharNext( pszSource );
- if( *pszSource != chRemove )
+ if ( *pszSource != chRemove )
{
// Copy the source to the destination. Remember to copy all bytes of an MBCS character
// Copy the source to the destination. Remember to copy all bytes of an MBCS character
@@ -1575,7 +1575,7 @@ public: CMStringT Tokenize( PCXSTR pszTokens, int& iStart ) const
{
- if( (pszTokens == NULL) || (*pszTokens == (XCHAR)0) )
+ if ( (pszTokens == NULL) || (*pszTokens == (XCHAR)0) )
{
if (iStart < this->GetLength())
return CMStringT( this->GetString()+iStart );
@@ -1584,11 +1584,11 @@ public: {
PCXSTR pszPlace = this->GetString()+iStart;
PCXSTR pszEnd = this->GetString()+this->GetLength();
- if( pszPlace < pszEnd )
+ if ( pszPlace < pszEnd )
{
int nIncluding = StringTraits::StringSpanIncluding( pszPlace, pszTokens );
- if( (pszPlace+nIncluding) < pszEnd )
+ if ( (pszPlace+nIncluding) < pszEnd )
{
pszPlace += nIncluding;
int nExcluding = StringTraits::StringSpanExcluding( pszPlace, pszTokens );
@@ -1615,7 +1615,7 @@ public: {
// nLength is in XCHARs
int nLength = this->GetLength();
- if( iStart < 0 || iStart >= nLength)
+ if ( iStart < 0 || iStart >= nLength)
return -1;
// find first single character
@@ -1636,7 +1636,7 @@ public: // nLength is in XCHARs
int nLength = this->GetLength();
- if( iStart < 0 || iStart > nLength )
+ if ( iStart < 0 || iStart > nLength )
return -1;
// find first matching substring
@@ -1711,9 +1711,9 @@ public: while( *psz != 0 )
{
- if( StringTraits::IsSpace( *psz ) )
+ if ( StringTraits::IsSpace( *psz ) )
{
- if( pszLast == NULL )
+ if ( pszLast == NULL )
pszLast = psz;
}
else
@@ -1723,7 +1723,7 @@ public: psz = StringTraits::CharNext( psz );
}
- if( pszLast != NULL )
+ if ( pszLast != NULL )
{
// truncate at trailing space start
int iLast = int( pszLast-this->GetString() );
@@ -1746,7 +1746,7 @@ public: psz = StringTraits::CharNext( psz );
}
- if( psz != this->GetString() )
+ if ( psz != this->GetString() )
{
// fix up data and length
int iFirst = int( psz-this->GetString() );
@@ -1792,9 +1792,9 @@ public: while( *psz != 0 )
{
- if( *psz == chTarget )
+ if ( *psz == chTarget )
{
- if( pszLast == NULL )
+ if ( pszLast == NULL )
{
pszLast = psz;
}
@@ -1806,7 +1806,7 @@ public: psz = StringTraits::CharNext( psz );
}
- if( pszLast != NULL )
+ if ( pszLast != NULL )
{
// truncate at left-most matching character
int iLast = int( pszLast-this->GetString() );
@@ -1820,7 +1820,7 @@ public: CMStringT& TrimRight( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0) )
{
return *this;
}
@@ -1833,9 +1833,9 @@ public: while( *psz != 0 )
{
- if( StringTraits::StringFindChar( pszTargets, *psz ) != NULL )
+ if ( StringTraits::StringFindChar( pszTargets, *psz ) != NULL )
{
- if( pszLast == NULL )
+ if ( pszLast == NULL )
{
pszLast = psz;
}
@@ -1847,7 +1847,7 @@ public: psz = StringTraits::CharNext( psz );
}
- if( pszLast != NULL )
+ if ( pszLast != NULL )
{
// truncate at left-most matching character
int iLast = int( pszLast-this->GetString() );
@@ -1868,7 +1868,7 @@ public: psz = StringTraits::CharNext( psz );
}
- if( psz != this->GetString() )
+ if ( psz != this->GetString() )
{
// fix up data and length
int iFirst = int( psz-this->GetString() );
@@ -1887,7 +1887,7 @@ public: CMStringT& TrimLeft( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0) )
{
return *this;
}
@@ -1898,7 +1898,7 @@ public: psz = StringTraits::CharNext( psz );
}
- if( psz != this->GetString() )
+ if ( psz != this->GetString() )
{
// fix up data and length
int iFirst = int( psz-this->GetString() );
@@ -1950,14 +1950,14 @@ public: if (nCount < 0)
nCount = 0;
- if( (iFirst + nCount) > this->GetLength() )
+ if ( (iFirst + nCount) > this->GetLength() )
nCount = this->GetLength()-iFirst;
- if( iFirst > this->GetLength() )
+ if ( iFirst > this->GetLength() )
nCount = 0;
// optimize case of returning entire string
- if( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()) )
+ if ( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()) )
return *this;
return CMStringT( this->GetString()+iFirst, nCount );
@@ -1971,7 +1971,7 @@ public: nCount = 0;
int nLength = this->GetLength();
- if( nCount >= nLength )
+ if ( nCount >= nLength )
{
return *this;
}
@@ -1987,7 +1987,7 @@ public: nCount = 0;
int nLength = this->GetLength();
- if( nCount >= nLength )
+ if ( nCount >= nLength )
return *this;
return CMStringT( this->GetString(), nCount );
@@ -2050,7 +2050,7 @@ public: ULONG nLength = StringTraits::GetEnvironmentVariable( pszVar, NULL, 0 );
BOOL bRetVal = FALSE;
- if( nLength == 0 )
+ if ( nLength == 0 )
{
this->Empty();
}
@@ -2069,7 +2069,7 @@ public: BOOL LoadString( UINT nID )
{
HINSTANCE hInst = StringTraits::FindStringResourceInstance( nID );
- if( hInst == NULL )
+ if ( hInst == NULL )
return FALSE;
return LoadString( hInst, nID );
diff --git a/plugins/Modernb/modern_clc.cpp b/plugins/Modernb/modern_clc.cpp index a3a08b7494..ec54139d94 100644 --- a/plugins/Modernb/modern_clc.cpp +++ b/plugins/Modernb/modern_clc.cpp @@ -235,7 +235,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam) }
else if (g_szMetaModuleName && !strcmp(cws->szModule,g_szMetaModuleName))
{
- if(!strcmp(cws->szSetting,"Handle"))
+ if (!strcmp(cws->szSetting,"Handle"))
{
pcli->pfnClcBroadcast( INTM_NAMEORDERCHANGED,0,0);
}
@@ -252,30 +252,30 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam) else if (!strcmp(cws->szModule,"CList"))
{
/*
- if(!strcmp(cws->szSetting,"MyHandle"))
+ if (!strcmp(cws->szSetting,"MyHandle"))
pcli->pfnClcBroadcast( INTM_NAMECHANGED,wParam,lParam);
- else if(!strcmp(cws->szSetting,"Group"))
+ else if (!strcmp(cws->szSetting,"Group"))
pcli->pfnClcBroadcast( INTM_GROUPCHANGED,wParam,lParam);
- else if(!strcmp(cws->szSetting,"Hidden"))
+ else if (!strcmp(cws->szSetting,"Hidden"))
pcli->pfnClcBroadcast( INTM_HIDDENCHANGED,wParam,lParam);
- else if(!strcmp(cws->szSetting,"noOffline"))
+ else if (!strcmp(cws->szSetting,"noOffline"))
pcli->pfnClcBroadcast( INTM_NAMEORDERCHANGED,wParam,lParam);
- else if(!strcmp(cws->szSetting,"NotOnList"))
+ else if (!strcmp(cws->szSetting,"NotOnList"))
pcli->pfnClcBroadcast( INTM_NOTONLISTCHANGED,wParam,lParam);
- else if(!strcmp(cws->szSetting,"NameOrder"))
+ else if (!strcmp(cws->szSetting,"NameOrder"))
pcli->pfnClcBroadcast( INTM_NAMEORDERCHANGED,0,0);
else
- else if(!strcmp(cws->szSetting,"Status"))
+ else if (!strcmp(cws->szSetting,"Status"))
pcli->pfnClcBroadcast( INTM_STATUSCHANGED,wParam,0);
else
*/
- if(!strcmp(cws->szSetting,"StatusMsg"))
+ if (!strcmp(cws->szSetting,"StatusMsg"))
pcli->pfnClcBroadcast( INTM_STATUSMSGCHANGED,wParam,0);
}
- else if(!strcmp(cws->szModule,"ContactPhoto"))
+ else if (!strcmp(cws->szModule,"ContactPhoto"))
{
if (!strcmp(cws->szSetting,"File"))
pcli->pfnClcBroadcast( INTM_AVATARCHANGED,wParam,0);
@@ -698,7 +698,7 @@ static LRESULT clcOnKeyDown(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wPa case VK_DELETE: pcli->pfnDeleteFromContactList(hwnd,dat); SetCapture(hwnd);return 0;
case VK_ESCAPE:
{
- if((dat->dragStage&DRAGSTAGEM_STAGE)==DRAGSTAGE_ACTIVE)
+ if ((dat->dragStage&DRAGSTAGEM_STAGE)==DRAGSTAGE_ACTIVE)
{
dat->iDragItem=-1;
dat->iInsertionMark=-1;
@@ -1005,7 +1005,7 @@ static LRESULT clcOnLButtonDown(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM if(GetFocus()!=hwnd) SetFocus(hwnd);
if(hit!=-1 && !(hitFlags&CLCHT_NOWHERE))
{
- if( hit==dat->selection && hitFlags&CLCHT_ONITEMLABEL && dat->exStyle&CLS_EX_EDITLABELS)
+ if ( hit==dat->selection && hitFlags&CLCHT_ONITEMLABEL && dat->exStyle&CLS_EX_EDITLABELS)
{
if ( !(dat->dragStage&DRAGSTAGEF_SKIPRENAME) )
{
@@ -1080,7 +1080,7 @@ static LRESULT clcOnLButtonDown(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM nm.hItem=ContactToItemHandle(contact,&nm.flags);
SendMessage(GetParent(hwnd),WM_NOTIFY,0,(LPARAM)&nm);
}
- if(!(hitFlags&(CLCHT_ONITEMICON|CLCHT_ONITEMLABEL|CLCHT_ONITEMCHECK)))
+ if (!(hitFlags&(CLCHT_ONITEMICON|CLCHT_ONITEMLABEL|CLCHT_ONITEMCHECK)))
{
NMCLISTCONTROL nm;
nm.hdr.code=NM_CLICK;
@@ -1234,13 +1234,13 @@ static LRESULT clcOnMouseMove(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w }
return 0;
}
- if((dat->dragStage&DRAGSTAGEM_STAGE)==DRAGSTAGE_NOTMOVED && !(dat->exStyle&CLS_EX_DISABLEDRAGDROP))
+ if ((dat->dragStage&DRAGSTAGEM_STAGE)==DRAGSTAGE_NOTMOVED && !(dat->exStyle&CLS_EX_DISABLEDRAGDROP))
{
if(abs((short)LOWORD(lParam)-dat->ptDragStart.x)>=GetSystemMetrics(SM_CXDRAG) || abs((short)HIWORD(lParam)-dat->ptDragStart.y)>=GetSystemMetrics(SM_CYDRAG))
dat->dragStage=(dat->dragStage&~DRAGSTAGEM_STAGE)|DRAGSTAGE_ACTIVE;
}
- if((dat->dragStage&DRAGSTAGEM_STAGE)==DRAGSTAGE_ACTIVE)
+ if ((dat->dragStage&DRAGSTAGEM_STAGE)==DRAGSTAGE_ACTIVE)
{
HCURSOR hNewCursor;
RECT clRect;
@@ -1340,7 +1340,7 @@ static LRESULT clcOnMouseMove(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w if(pt.x>=0 && pt.x<clRect.right && ((pt.y<0 && pt.y>-dat->dragAutoScrollHeight) || (pt.y>=clRect.bottom && pt.y<clRect.bottom+dat->dragAutoScrollHeight)))
{
- if(!dat->dragAutoScrolling)
+ if (!dat->dragAutoScrolling)
{
if(pt.y<0) dat->dragAutoScrolling=-1;
else dat->dragAutoScrolling=1;
@@ -1407,7 +1407,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w KillTimer(hwnd,TIMERID_DRAGAUTOSCROLL);
if(dat->dragStage==(DRAGSTAGE_NOTMOVED|DRAGSTAGEF_MAYBERENAME))
CLUI_SafeSetTimer(hwnd,TIMERID_RENAME,GetDoubleClickTime(),NULL);
- else if((dat->dragStage&DRAGSTAGEM_STAGE)==DRAGSTAGE_ACTIVE)
+ else if ((dat->dragStage&DRAGSTAGEM_STAGE)==DRAGSTAGE_ACTIVE)
{
POINT pt;
int target;
@@ -1442,7 +1442,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w if (res==1)
{
handle=(HANDLE)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hDest,0);
- if(!handle) return 0;
+ if (!handle) return 0;
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
}
}
@@ -1458,7 +1458,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w {
handle=(HANDLE)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hdest,0);
- if(!handle) return 0;
+ if (!handle) return 0;
CallService(MS_MC_REMOVEFROMMETA,(WPARAM)0,(LPARAM)hcontact);
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
@@ -1490,7 +1490,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w if (res==1)
{
- if(!handle) return 0;
+ if (!handle) return 0;
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
}
}
@@ -1519,7 +1519,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w if (res==1)
{
- if(!handle) return 0;
+ if (!handle) return 0;
CallService(MS_MC_REMOVEFROMMETA,(WPARAM)0,(LPARAM)hcontact);
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
@@ -1550,7 +1550,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w if (res==1)
{
- if(!handle) return 0;
+ if (!handle) return 0;
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
}
}
@@ -1567,7 +1567,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w if (res==1)
{
- if(!handle) return 0;
+ if (!handle) return 0;
CallService(MS_MC_REMOVEFROMMETA,(WPARAM)0,(LPARAM)hcontact);
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
@@ -1842,7 +1842,7 @@ static LRESULT clcOnIntmAvatarChanged(struct ClcData *dat, HWND hwnd, UINT msg, static LRESULT clcOnIntmTimeZoneChanged(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
struct ClcContact *contact;
- if(!FindItem(hwnd,dat,(HANDLE)wParam,&contact,NULL,NULL,FALSE))
+ if (!FindItem(hwnd,dat,(HANDLE)wParam,&contact,NULL,NULL,FALSE))
return corecli.pfnContactListControlWndProc(hwnd,msg,wParam,lParam);
if (contact) //!IsBadWritePtr(contact, sizeof(struct ClcContact)))
@@ -1859,7 +1859,7 @@ static LRESULT clcOnIntmNameChanged(struct ClcData *dat, HWND hwnd, UINT msg, WP int ret=corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
pcli->pfnInvalidateDisplayNameCacheEntry((HANDLE)wParam);
- if(!FindItem(hwnd,dat,(HANDLE)wParam,&contact,NULL,NULL,FALSE))
+ if (!FindItem(hwnd,dat,(HANDLE)wParam,&contact,NULL,NULL,FALSE))
return ret;
lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((HANDLE)wParam,0),SIZEOF(contact->szText));
@@ -1904,7 +1904,7 @@ static LRESULT clcOnIntmNotOnListChanged(struct ClcData *dat, HWND hwnd, UINT ms DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam;
struct ClcContact *contact;
- if(!FindItem(hwnd,dat,(HANDLE)wParam,&contact,NULL,NULL,TRUE))
+ if (!FindItem(hwnd,dat,(HANDLE)wParam,&contact,NULL,NULL,TRUE))
return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
if(contact->type!=CLCIT_CONTACT)
diff --git a/plugins/Modernb/modern_clcidents.cpp b/plugins/Modernb/modern_clcidents.cpp index bcbe3af247..b6106439bc 100644 --- a/plugins/Modernb/modern_clcidents.cpp +++ b/plugins/Modernb/modern_clcidents.cpp @@ -61,7 +61,7 @@ int cliGetRowsPriorTo(struct ClcGroup *group,struct ClcGroup *subgroup,int conta int subcontactscount=0;
k=ModernGetSettingByte(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT);
group->scanIndex=0;
- for(;;) {
+ for (;;) {
if(group->scanIndex==group->cl.count) {
group=group->parent;
if(group==NULL) break;
@@ -120,7 +120,7 @@ int FindItem(HWND hwnd,struct ClcData *dat,HANDLE hItem,struct ClcContact **cont group->scanIndex=0;
group=&dat->list;
- for(;;) {
+ for (;;) {
if(group->scanIndex==group->cl.count) {
struct ClcGroup *tgroup;
group=group->parent;
@@ -128,7 +128,7 @@ int FindItem(HWND hwnd,struct ClcData *dat,HANDLE hItem,struct ClcContact **cont nowVisible=1;
for(tgroup=group;tgroup;tgroup=tgroup->parent)
{
- if(!tgroup->expanded)
+ if (!tgroup->expanded)
{
nowVisible=0;
break;
@@ -138,12 +138,12 @@ int FindItem(HWND hwnd,struct ClcData *dat,HANDLE hItem,struct ClcContact **cont continue;
}
if(nowVisible) index++;
- if((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type==CLCIT_GROUP && ((UINT_PTR)hItem&~HCONTACT_ISGROUP)==group->cl.items[group->scanIndex]->groupId) ||
+ if ((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type==CLCIT_GROUP && ((UINT_PTR)hItem&~HCONTACT_ISGROUP)==group->cl.items[group->scanIndex]->groupId) ||
(IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type==CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact==hItem) ||
(IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type==CLCIT_INFO && group->cl.items[group->scanIndex]->hContact==(HANDLE)((UINT_PTR)hItem&~HCONTACT_ISINFO)))
{
if(isVisible) {
- if(!nowVisible) *isVisible=0;
+ if (!nowVisible) *isVisible=0;
else {
int posy = cliGetRowTopY(dat,index+1);
if(posy<dat->yScroll)
@@ -215,7 +215,7 @@ int cliGetRowByIndex(struct ClcData *dat,int testindex,struct ClcContact **conta if (testindex<0) return (-1);
{
group->scanIndex=0;
- for(;;) {
+ for (;;) {
if(group->scanIndex==group->cl.count) {
group=group->parent;
if(group==NULL) break;
diff --git a/plugins/Modernb/modern_clcitems.cpp b/plugins/Modernb/modern_clcitems.cpp index 36ab3bca7a..0901e406a0 100644 --- a/plugins/Modernb/modern_clcitems.cpp +++ b/plugins/Modernb/modern_clcitems.cpp @@ -295,7 +295,7 @@ void cli_AddContactToTree(HWND hwnd,struct ClcData *dat,HANDLE hContact,int upda struct ClcContact * cont;
pdisplayNameCacheEntry cacheEntry=(pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact);
if(dat->IsMetaContactsEnabled && cacheEntry && cacheEntry->m_cache_nHiddenSubcontact) return; //contact should not be added
- if(!dat->IsMetaContactsEnabled && cacheEntry && g_szMetaModuleName && !mir_strcmp(cacheEntry->m_cache_cszProto,g_szMetaModuleName)) return;
+ if (!dat->IsMetaContactsEnabled && cacheEntry && g_szMetaModuleName && !mir_strcmp(cacheEntry->m_cache_cszProto,g_szMetaModuleName)) return;
corecli.pfnAddContactToTree(hwnd,dat,hContact,updateTotalCount,checkHideOffline);
if (FindItem(hwnd,dat,hContact,&cont,&group,NULL,FALSE))
_LoadDataToContact(cont, group, dat, hContact);
@@ -424,14 +424,14 @@ void cliRebuildEntireList(HWND hwnd,struct ClcData *dat) group=&dat->list;
group->totalMembers++;
- if(!(style&CLS_NOHIDEOFFLINE) && (style&CLS_HIDEOFFLINE || group->hideOffline))
+ if (!(style&CLS_NOHIDEOFFLINE) && (style&CLS_HIDEOFFLINE || group->hideOffline))
{
if(cacheEntry->m_cache_cszProto==NULL) {
- if(!pcli->pfnIsHiddenMode(dat,ID_STATUS_OFFLINE)||cacheEntry->m_cache_nNoHiddenOffline || CLCItems_IsShowOfflineGroup(group))
+ if (!pcli->pfnIsHiddenMode(dat,ID_STATUS_OFFLINE)||cacheEntry->m_cache_nNoHiddenOffline || CLCItems_IsShowOfflineGroup(group))
cont=AddContactToGroup(dat,group,cacheEntry);
}
else
- if(!pcli->pfnIsHiddenMode(dat,wStatus)||cacheEntry->m_cache_nNoHiddenOffline || CLCItems_IsShowOfflineGroup(group))
+ if (!pcli->pfnIsHiddenMode(dat,wStatus)||cacheEntry->m_cache_nNoHiddenOffline || CLCItems_IsShowOfflineGroup(group))
cont=AddContactToGroup(dat,group,cacheEntry);
}
else cont=AddContactToGroup(dat,group,cacheEntry);
@@ -449,7 +449,7 @@ void cliRebuildEntireList(HWND hwnd,struct ClcData *dat) if(style&CLS_HIDEEMPTYGROUPS) {
group=&dat->list;
group->scanIndex=0;
- for(;;) {
+ for (;;) {
if(group->scanIndex==group->cl.count) {
group=group->parent;
if(group==NULL) break;
@@ -490,7 +490,7 @@ int GetNewSelection(struct ClcGroup *group, int selection, int direction) return 0;
}
group->scanIndex=0;
- for(;;) {
+ for (;;) {
if(group->scanIndex==group->cl.count) {
group=group->parent;
if(group==NULL) break;
@@ -776,7 +776,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 = ModernGetSettingDword(hContact, CLVM_MODULE, g_CluiData.current_viewmode, 0)) != 0) {
+ if ((dwLocalMask = ModernGetSettingDword(hContact, CLVM_MODULE, g_CluiData.current_viewmode, 0)) != 0) {
if(g_CluiData.bFilterEffective & CLVM_FILTER_STICKYSTATUS)
{
WORD wStatus = ModernGetSettingWord(hContact, szProto, "Status", ID_STATUS_OFFLINE);
@@ -791,7 +791,7 @@ int __fastcall CLVM_GetContactHiddenStatus(HANDLE hContact, char *szProto, struc filterResult = strstr(g_CluiData.protoFilter, szTemp) ? 1 : 0;
}
if(g_CluiData.bFilterEffective & CLVM_FILTER_GROUPS) {
- if(!ModernGetSettingTString(hContact, "CList", "Group", &dbv)) {
+ if (!ModernGetSettingTString(hContact, "CList", "Group", &dbv)) {
mir_sntprintf(szGroupMask, SIZEOF(szGroupMask), _T("%s|"), &dbv.ptszVal[0]);
filterResult = (g_CluiData.filterFlags & CLVM_PROTOGROUP_OP) ? (filterResult | (_tcsstr(g_CluiData.groupFilter, szGroupMask) ? 1 : 0)) : (filterResult & (_tcsstr(g_CluiData.groupFilter, szGroupMask) ? 1 : 0));
mir_free(dbv.ptszVal);
diff --git a/plugins/Modernb/modern_clcopts.cpp b/plugins/Modernb/modern_clcopts.cpp index 62dbe371d1..74b3a19b10 100644 --- a/plugins/Modernb/modern_clcopts.cpp +++ b/plugins/Modernb/modern_clcopts.cpp @@ -457,7 +457,7 @@ static INT_PTR CALLBACK DlgProcClistAdditionalOpts(HWND hwndDlg, UINT msg, WPARA EnableWindow(GetDlgItem(hwndDlg,IDC_SUBINDENTSPIN),t);
EnableWindow(GetDlgItem(hwndDlg,IDC_SUBINDENT),t);
}
- if((LOWORD(wParam)==IDC_SUBINDENT) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return 0;
+ if ((LOWORD(wParam)==IDC_SUBINDENT) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return 0;
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
return TRUE;
case WM_NOTIFY:
@@ -542,14 +542,14 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar EnableWindow(GetDlgItem(hwndDlg,IDC_SMOOTHTIME),IsDlgButtonChecked(hwndDlg,IDC_NOTNOSMOOTHSCROLLING));
if(LOWORD(wParam)==IDC_GREYOUT)
EnableWindow(GetDlgItem(hwndDlg,IDC_GREYOUTOPTS),IsDlgButtonChecked(hwndDlg,IDC_GREYOUT));
- if((/*LOWORD(wParam)==IDC_LEFTMARGIN ||*/ LOWORD(wParam)==IDC_SMOOTHTIME || LOWORD(wParam)==IDC_GROUPINDENT) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return 0;
+ if ((/*LOWORD(wParam)==IDC_LEFTMARGIN ||*/ LOWORD(wParam)==IDC_SMOOTHTIME || LOWORD(wParam)==IDC_GROUPINDENT) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam!=GetFocus())) return 0;
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
break;
case WM_NOTIFY:
switch(((LPNMHDR)lParam)->idFrom) {
case IDC_GREYOUTOPTS:
case IDC_HIDEOFFLINEOPTS:
- if(((LPNMHDR)lParam)->code==NM_CLICK) {
+ if (((LPNMHDR)lParam)->code==NM_CLICK) {
TVHITTESTINFO hti;
hti.pt.x=(short)LOWORD(GetMessagePos());
hti.pt.y=(short)HIWORD(GetMessagePos());
@@ -574,7 +574,7 @@ static INT_PTR CALLBACK DlgProcClistListOpts(HWND hwndDlg, UINT msg, WPARAM wPar {
DWORD exStyle=0;
for(int i=0;i<SIZEOF(checkBoxToStyleEx);i++)
- if((IsDlgButtonChecked(hwndDlg,checkBoxToStyleEx[i].id)==0)==checkBoxToStyleEx[i].neg)
+ if ((IsDlgButtonChecked(hwndDlg,checkBoxToStyleEx[i].id)==0)==checkBoxToStyleEx[i].neg)
exStyle|=checkBoxToStyleEx[i].flag;
ModernWriteSettingDword(NULL,"CLC","ExStyle",exStyle);
}
@@ -624,7 +624,7 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETDEFAULTCOLOUR,0,CLCDEFAULT_SELBKCOLOUR);
SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR,0,ModernGetSettingDword(NULL,"StatusBar","SelBkColour",CLCDEFAULT_SELBKCOLOUR));
{ DBVARIANT dbv={0};
- if(!ModernGetSettingString(NULL,"StatusBar","BkBitmap",&dbv)) {
+ if (!ModernGetSettingString(NULL,"StatusBar","BkBitmap",&dbv)) {
SetDlgItemTextA(hwndDlg,IDC_FILENAME,dbv.pszVal);
if (ServiceExists(MS_UTILS_PATHTOABSOLUTE)) {
char szPath[MAX_PATH];
@@ -686,7 +686,7 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w ofn.nMaxFile = SIZEOF(str);
ofn.nMaxFileTitle = MAX_PATH;
ofn.lpstrDefExt = "bmp";
- if(!GetOpenFileNameA(&ofn)) break;
+ if (!GetOpenFileNameA(&ofn)) break;
SetDlgItemTextA(hwndDlg,IDC_FILENAME,str);
}
else if(LOWORD(wParam)==IDC_FILENAME && HIWORD(wParam)!=EN_CHANGE) break;
@@ -936,12 +936,12 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L item=SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING,0,(LPARAM)accs[i]->tszAccountName);
SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,(LPARAM)accs[i]);
- if((dbv.type==DBVT_ASCIIZ || dbv.type==DBVT_UTF8)&& !strcmp(dbv.pszVal,accs[i]->szModuleName))
+ if ((dbv.type==DBVT_ASCIIZ || dbv.type==DBVT_UTF8)&& !strcmp(dbv.pszVal,accs[i]->szModuleName))
SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETCURSEL,item,0);
}
ModernDBFreeVariant(&dbv);
}
- if(-1==(int)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL,0,0))
+ if (-1==(int)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL,0,0))
SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETCURSEL,0,0);
SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_BLINKTIME),0); // set buddy
SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETRANGE,0,MAKELONG(0x3FFF,250));
@@ -1111,7 +1111,7 @@ static INT_PTR CALLBACK DlgProcClistBehaviourOpts(HWND hwndDlg, UINT msg, WPARAM EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC13),mode!=0);
}
- if(!IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZE)) {
+ if (!IsDlgButtonChecked(hwndDlg,IDC_AUTOSIZE)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC21),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC22),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_MAXSIZEHEIGHT),FALSE);
@@ -1247,7 +1247,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP CheckDlgButton(hwndDlg, IDC_SHOWCAPTION, ModernGetSettingByte(NULL,"CLUI","ShowCaption",SETTING_SHOWCAPTION_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, ModernGetSettingByte(NULL,"CLUI","ShowMainMenu",SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
//EnableWindow(GetDlgItem(hwndDlg,IDC_CLIENTDRAG),!IsDlgButtonChecked(hwndDlg,IDC_DRAGTOSCROLL));
- if(!IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION))
+ if (!IsDlgButtonChecked(hwndDlg,IDC_SHOWCAPTION))
{
EnableWindow(GetDlgItem(hwndDlg,IDC_MIN2TRAY),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_TOOLWND),FALSE);
@@ -1289,7 +1289,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP DBVARIANT dbv={0};
TCHAR *s=NULL;
char szUin[20];
- if(!ModernGetSettingTString(NULL,"CList","TitleText",&dbv))
+ if (!ModernGetSettingTString(NULL,"CList","TitleText",&dbv))
s=mir_tstrdup(dbv.ptszVal);
else
s=mir_tstrdup(_T(MIRANDANAME));
@@ -1302,32 +1302,32 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP sprintf(szUin,"%u",ModernGetSettingDword(NULL,"ICQ","UIN",0));
SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)szUin);
- if(!ModernGetSettingString(NULL,"ICQ","Nick",&dbv)) {
+ if (!ModernGetSettingString(NULL,"ICQ","Nick",&dbv)) {
SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)dbv.pszVal);
//mir_free_and_nill(dbv.pszVal);
ModernDBFreeVariant(&dbv);
dbv.pszVal=NULL;
}
- if(!ModernGetSettingString(NULL,"ICQ","FirstName",&dbv)) {
+ if (!ModernGetSettingString(NULL,"ICQ","FirstName",&dbv)) {
SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)dbv.pszVal);
//mir_free_and_nill(dbv.pszVal);
ModernDBFreeVariant(&dbv);
dbv.pszVal=NULL;
}
- if(!ModernGetSettingString(NULL,"ICQ","e-mail",&dbv)) {
+ if (!ModernGetSettingString(NULL,"ICQ","e-mail",&dbv)) {
SendDlgItemMessage(hwndDlg,IDC_TITLETEXT,CB_ADDSTRING,0,(LPARAM)dbv.pszVal);
//mir_free_and_nill(dbv.pszVal);
ModernDBFreeVariant(&dbv);
dbv.pszVal=NULL;
}
}
- if(!IsWinVer2000Plus()) {
+ if (!IsWinVer2000Plus()) {
EnableWindow(GetDlgItem(hwndDlg,IDC_FADEINOUT),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSPARENT),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_DROPSHADOW),FALSE);
}
else CheckDlgButton(hwndDlg,IDC_TRANSPARENT,ModernGetSettingByte(NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT)?BST_CHECKED:BST_UNCHECKED);
- if(!IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT)) {
+ if (!IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC11),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC12),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSACTIVE),FALSE);
@@ -1585,10 +1585,10 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, dat->item[indx].useWinColours = ModernGetSettingByte(NULL,module, "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS);
{
DBVARIANT dbv;
- if(!ModernGetSettingString(NULL,module,"BkBitmap",&dbv))
+ if (!ModernGetSettingString(NULL,module,"BkBitmap",&dbv))
{
int retval = CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)dat->item[indx].filename);
- if(!retval || retval == CALLSERVICE_NOTFOUND)
+ if (!retval || retval == CALLSERVICE_NOTFOUND)
lstrcpynA(dat->item[indx].filename, dbv.pszVal, MAX_PATH);
mir_free(dbv.pszVal);
}
@@ -1741,7 +1741,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, ofn.nMaxFile = SIZEOF(str);
ofn.nMaxFileTitle = MAX_PATH;
ofn.lpstrDefExt = "bmp";
- if(!GetOpenFileNameA(&ofn)) break;
+ if (!GetOpenFileNameA(&ofn)) break;
SetDlgItemTextA(hwndDlg, IDC_FILENAME, str);
}
else
@@ -1793,12 +1793,12 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, {
COLORREF col;
- if((col = dat->item[indx].bkColor) == DEFAULT_BKCOLOUR)
+ if ((col = dat->item[indx].bkColor) == DEFAULT_BKCOLOUR)
ModernDeleteSetting(NULL, module, "BkColour");
else
ModernWriteSettingDword(NULL, module, "BkColour", col);
- if((col = dat->item[indx].selColor) == DEFAULT_SELBKCOLOUR)
+ if ((col = dat->item[indx].selColor) == DEFAULT_SELBKCOLOUR)
ModernDeleteSetting(NULL, module, "SelBkColour");
else
ModernWriteSettingDword(NULL, module, "SelBkColour", col);
@@ -1810,7 +1810,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, int retval = CallService(MS_UTILS_PATHTOABSOLUTE,
(WPARAM)dat->item[indx].filename,
(LPARAM)str);
- if(!retval || retval == CALLSERVICE_NOTFOUND)
+ if (!retval || retval == CALLSERVICE_NOTFOUND)
ModernWriteSettingString(NULL, module, "BkBitmap", dat->item[indx].filename);
else
ModernWriteSettingString(NULL, module, "BkBitmap", str);
@@ -2035,14 +2035,14 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETRANGE,0,MAKELONG(900,1));
SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETPOS,0,MAKELONG(ModernGetSettingWord(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),0));
- if(!IsWinVer2000Plus())
+ if (!IsWinVer2000Plus())
{
EnableWindow(GetDlgItem(hwndDlg,IDC_FADEINOUT),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSPARENT),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_DROPSHADOW),FALSE);
}
- if(!IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT))
+ if (!IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT))
{
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC11),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC12),FALSE);
diff --git a/plugins/Modernb/modern_clcpaint.cpp b/plugins/Modernb/modern_clcpaint.cpp index bec3e0f6de..49483bc953 100644 --- a/plugins/Modernb/modern_clcpaint.cpp +++ b/plugins/Modernb/modern_clcpaint.cpp @@ -142,7 +142,7 @@ HFONT CLCPaint::ChangeToFont( HDC hdc, struct ClcData *dat, int id, int *fontHei res = ( HFONT )SelectObject( hdc, dat->fontModernInfo[id].hFont );
SetTextColor( hdc, dat->fontModernInfo[id].colour );
- if( fontHeight )
+ if ( fontHeight )
*fontHeight = dat->fontModernInfo[id].fontHeight;
ske_ResetTextEffect( hdc );
@@ -169,7 +169,7 @@ int CLCPaint::GetBasicFontID( struct ClcContact * contact ) return FONTID_CLOSEDGROUPS;
break;
case CLCIT_INFO:
- if( contact->flags & CLCIIF_GROUPFONT )
+ if ( contact->flags & CLCIIF_GROUPFONT )
return FONTID_OPENGROUPS;
else
return FONTID_CONTACTS;
@@ -306,42 +306,42 @@ void CLCPaint::_FillQuickHash() void CLCPaint::_SetHotTrackColour( HDC hdc, struct ClcData *dat )
{
- if( dat->gammaCorrection ) {
+ if ( dat->gammaCorrection ) {
COLORREF oldCol, newCol;
int oldLum, newLum;
oldCol = GetTextColor( hdc );
oldLum = ( GetRValue( oldCol )*30+GetGValue( oldCol )*59+GetBValue( oldCol )*11 )/100;
newLum = ( GetRValue( dat->hotTextColour )*30+GetGValue( dat->hotTextColour )*59+GetBValue( dat->hotTextColour )*11 )/100;
- if( newLum == 0 ) {
+ if ( newLum == 0 ) {
SetTextColor( hdc, dat->hotTextColour );
return;
}
- if( newLum>= oldLum+20 ) {
+ if ( newLum>= oldLum+20 ) {
oldLum+= 20;
newCol = RGB( GetRValue( dat->hotTextColour )*oldLum/newLum, GetGValue( dat->hotTextColour )*oldLum/newLum, GetBValue( dat->hotTextColour )*oldLum/newLum );
}
- else if( newLum<= oldLum ) {
+ else if ( newLum<= oldLum ) {
int r, g, b;
r = GetRValue( dat->hotTextColour )*oldLum/newLum;
g = GetGValue( dat->hotTextColour )*oldLum/newLum;
b = GetBValue( dat->hotTextColour )*oldLum/newLum;
- if( r>255 ) {
+ if ( r>255 ) {
g+= ( r-255 )*3/7;
b+= ( r-255 )*3/7;
r = 255;
}
- if( g>255 ) {
+ if ( g>255 ) {
r+= ( g-255 )*59/41;
- if( r>255 ) r = 255;
+ if ( r>255 ) r = 255;
b+= ( g-255 )*59/41;
g = 255;
}
- if( b>255 ) {
+ if ( b>255 ) {
r+= ( b-255 )*11/89;
- if( r>255 ) r = 255;
+ if ( r>255 ) r = 255;
g+= ( b-255 )*11/89;
- if( g>255 ) g = 255;
+ if ( g>255 ) g = 255;
b = 255;
}
newCol = RGB( r, g, b );
@@ -378,11 +378,11 @@ int CLCPaint::_GetGeneralisedStatus() for ( int i = 0; i<pcli->hClcProtoCount; i++ )
{
int thisStatus = pcli->clcProto[i].dwStatus;
- if( thisStatus == ID_STATUS_INVISIBLE )
+ if ( thisStatus == ID_STATUS_INVISIBLE )
return ID_STATUS_INVISIBLE;
int thisOnlineness = _GetStatusOnlineness( thisStatus );
- if( thisOnlineness > statusOnlineness )
+ if ( thisOnlineness > statusOnlineness )
{
status = thisStatus;
statusOnlineness = thisOnlineness;
@@ -734,7 +734,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str if ( Drawing->type == CLCIT_CONTACT )
pdnce = ( PDNCE )pcli->pfnGetCacheEntry( Drawing->hContact );
- if( Drawing->type == CLCIT_GROUP &&
+ if ( Drawing->type == CLCIT_GROUP &&
Drawing->group->parent->groupId == 0 &&
Drawing->group->parent->cl.items[0] != Drawing )
{
@@ -770,12 +770,12 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str // Store pos
if ( dat->text_rtl != 0 ) _RTLRect( &p_rect, free_row_rc.right, dx );
Drawing->pos_icon = p_rect;
- if( hottrack )
+ if ( hottrack )
{
colourFg = dat->hotTextColour;
mode = ILD_NORMAL;
}
- else if( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
+ else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
{
colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
mode = ILD_BLEND50;
@@ -813,11 +813,11 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str int count = 0;
RECT rc;
int x = 0;
- for( iImage = dat->extraColumnsCount-1; iImage>= 0 ; iImage-- )
+ for ( iImage = dat->extraColumnsCount-1; iImage>= 0 ; iImage-- )
{
COLORREF colourFg = dat->selBkColour;
int mode = BlendedInActiveState?BlendValue:ILD_NORMAL;
- if( Drawing->iExtraImage[iImage] == 0xFF && Drawing->iWideExtraImage[iImage] == 0xFFFF )
+ if ( Drawing->iExtraImage[iImage] == 0xFF && Drawing->iWideExtraImage[iImage] == 0xFFFF )
{
{
x+= ( x>0 )?dat->extraColumnSpacing:ICON_HEIGHT;
@@ -829,13 +829,13 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str continue;
}
- if( selected ) mode = BlendedInActiveState?ILD_NORMAL:ILD_SELECTED;
- else if( hottrack )
+ if ( selected ) mode = BlendedInActiveState?ILD_NORMAL:ILD_SELECTED;
+ else if ( hottrack )
{
mode = BlendedInActiveState?ILD_NORMAL:ILD_FOCUS;
colourFg = dat->hotTextColour;
}
- else if( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
+ else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
{
colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
mode = BlendValue;
@@ -881,7 +881,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str int space_width = 0;
char * szCounts = pcli->pfnGetGroupCountsText( dat, Drawing );
// Has to draw the count?
- if( szCounts && strlen( szCounts )>0 )
+ if ( szCounts && strlen( szCounts )>0 )
{
// calc width and height
ChangeToFont( hdcMem, dat, Drawing->group->expanded?FONTID_OPENGROUPCOUNTS:FONTID_CLOSEDGROUPCOUNTS, NULL );
@@ -935,28 +935,28 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str - //if( !( szCounts && strlen( szCounts )>0 ) )
+ //if ( !( szCounts && strlen( szCounts )>0 ) )
//uTextFormat|= ( dat->row_align_group_mode == 2 )?DT_RIGHT:( dat->row_align_group_mode == 1 )?DT_CENTER:DT_LEFT;
uTextFormat|= DT_VCENTER;
ChangeToFont( hdcMem, dat, Drawing->group->expanded?FONTID_OPENGROUPS:FONTID_CLOSEDGROUPS, NULL );
if ( selected )
SetTextColor( hdcMem, dat->selTextColour );
- else if( hottrack )
+ else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
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 );
}
- if( szCounts && strlen( szCounts )>0 )
+ if ( szCounts && strlen( szCounts )>0 )
{
ChangeToFont( hdcMem, dat, Drawing->group->expanded?FONTID_OPENGROUPCOUNTS:FONTID_CLOSEDGROUPCOUNTS, NULL );
if ( selected )
SetTextColor( hdcMem, dat->selTextColour );
- else if( hottrack )
+ else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
if ( dat->text_rtl != 0 ) _RTLRect( &countRect, free_row_rc.right, dx );
ske_DrawTextA( hdcMem, szCounts, lstrlenA( szCounts ), &countRect, uTextFormat );
@@ -974,7 +974,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str szCounts = pcli->pfnGetGroupCountsText( dat, Drawing );
// Has to draw the count?
- if( szCounts && szCounts[0] )
+ if ( szCounts && szCounts[0] )
{
RECT space_rc = fr_rc;
@@ -1018,11 +1018,11 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str // Set color
if ( selected )
SetTextColor( hdcMem, dat->selTextColour );
- else if( hottrack )
+ else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
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 );
@@ -1104,10 +1104,10 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str {
if ( selected )
SetTextColor( hdcMem, dat->selTextColour );
- else if( hottrack )
+ 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 );
@@ -1130,7 +1130,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str int space_width = 0;
char * szCounts = pcli->pfnGetGroupCountsText( dat, Drawing );
// Has to draw the count?
- if( szCounts && strlen( szCounts )>0 )
+ if ( szCounts && strlen( szCounts )>0 )
{
@@ -1186,27 +1186,27 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str - //if( !( szCounts && strlen( szCounts )>0 ) )
+ //if ( !( szCounts && strlen( szCounts )>0 ) )
//uTextFormat|= ( dat->row_align_group_mode == 2 )?DT_RIGHT:( dat->row_align_group_mode == 1 )?DT_CENTER:DT_LEFT;
uTextFormat|= DT_VCENTER;
ChangeToFont( hdcMem, dat, Drawing->group->expanded?FONTID_OPENGROUPS:FONTID_CLOSEDGROUPS, NULL );
if ( selected )
SetTextColor( hdcMem, dat->selTextColour );
- else if( hottrack )
+ 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 );
}
- if( szCounts && strlen( szCounts )>0 )
+ if ( szCounts && strlen( szCounts )>0 )
{
ChangeToFont( hdcMem, dat, Drawing->group->expanded?FONTID_OPENGROUPCOUNTS:FONTID_CLOSEDGROUPCOUNTS, NULL );
if ( selected )
SetTextColor( hdcMem, dat->selTextColour );
- else if( hottrack )
+ else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
ske_DrawTextA( hdcMem, szCounts, lstrlenA( szCounts ), &countRect, uTextFormat );
}
@@ -1300,12 +1300,12 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str int mode;
// Store pos
Drawing->pos_icon = p_rect;
- if( hottrack )
+ if ( hottrack )
{
colourFg = dat->hotTextColour;
mode = ILD_NORMAL;
}
- else if( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
+ else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
{
colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
mode = ILD_BLEND50;
@@ -1333,9 +1333,9 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str {
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 )
+ if ( hottrack )
blendmode = 255;
- else if( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
+ 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 )
@@ -1349,12 +1349,12 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str int mode;
// Store pos
Drawing->pos_icon = p_rect;
- if( hottrack )
+ if ( hottrack )
{
colourFg = dat->hotTextColour;
mode = ILD_NORMAL;
}
- else if( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
+ else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
{
colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
mode = ILD_BLEND50;
@@ -1568,11 +1568,11 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str int count = 0;
RECT rc;
int x = 0;
- for( iImage = 0; iImage<dat->extraColumnsCount ; iImage++ )
+ for ( iImage = 0; iImage<dat->extraColumnsCount ; iImage++ )
{
COLORREF colourFg = dat->selBkColour;
int mode = BlendedInActiveState?BlendValue:ILD_NORMAL;
- if( Drawing->iExtraImage[iImage] == 0xFF && Drawing->iWideExtraImage[iImage] == 0xFFFF )
+ if ( Drawing->iExtraImage[iImage] == 0xFF && Drawing->iWideExtraImage[iImage] == 0xFFFF )
{
if ( !dat->MetaIgnoreEmptyExtra )
{
@@ -1585,13 +1585,13 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str continue;
}
- if( selected ) mode = BlendedInActiveState?ILD_NORMAL:ILD_SELECTED;
- else if( hottrack )
+ if ( selected ) mode = BlendedInActiveState?ILD_NORMAL:ILD_SELECTED;
+ else if ( hottrack )
{
mode = BlendedInActiveState?ILD_NORMAL:ILD_FOCUS;
colourFg = dat->hotTextColour;
}
- else if( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
+ else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
{
colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
mode = BlendValue;
@@ -1635,13 +1635,13 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str if ( mode2 != -1 ) mode = mode2;
else
{
- if( selected ) mode = BlendedInActiveState?ILD_NORMAL:ILD_SELECTED;
- else if( hottrack )
+ if ( selected ) mode = BlendedInActiveState?ILD_NORMAL:ILD_SELECTED;
+ else if ( hottrack )
{
mode = BlendedInActiveState?ILD_NORMAL:ILD_FOCUS;
colourFg = dat->hotTextColour;
}
- else if( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
+ else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST )
{
colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
mode = BlendValue;
@@ -1713,7 +1713,7 @@ void CLCPaint::_DrawStatusIcon( struct ClcContact * Drawing, struct ClcData *dat BOOL CLCPaint::_DrawNonEnginedBackground( HWND hwnd, HDC hdcMem, RECT * rcPaint, RECT clRect, struct ClcData * dat )
{
- if( dat->hBmpBackground )
+ if ( dat->hBmpBackground )
{
BITMAP bmp;
HBITMAP oldbm;
@@ -1734,8 +1734,8 @@ BOOL CLCPaint::_DrawNonEnginedBackground( HWND hwnd, HDC hdcMem, RECT * rcPaint, maxy = dat->backgroundBmpUse&CLBF_TILEV?maxy = rcPaint->bottom:y+1;
switch( dat->backgroundBmpUse&CLBM_TYPE ) {
case CLB_STRETCH:
- if( dat->backgroundBmpUse&CLBF_PROPORTIONAL ) {
- if( clRect.right*bmp.bmHeight<clRect.bottom*bmp.bmWidth ) {
+ if ( dat->backgroundBmpUse&CLBF_PROPORTIONAL ) {
+ if ( clRect.right*bmp.bmHeight<clRect.bottom*bmp.bmWidth ) {
desth = clRect.bottom;
destw = desth*bmp.bmWidth/bmp.bmHeight;
}
@@ -1750,7 +1750,7 @@ BOOL CLCPaint::_DrawNonEnginedBackground( HWND hwnd, HDC hdcMem, RECT * rcPaint, }
break;
case CLB_STRETCHH:
- if( dat->backgroundBmpUse&CLBF_PROPORTIONAL ) {
+ if ( dat->backgroundBmpUse&CLBF_PROPORTIONAL ) {
destw = clRect.right;
desth = destw*bmp.bmHeight/bmp.bmWidth;
}
@@ -1765,7 +1765,7 @@ BOOL CLCPaint::_DrawNonEnginedBackground( HWND hwnd, HDC hdcMem, RECT * rcPaint, }
break;
case CLB_STRETCHV:
- if( dat->backgroundBmpUse&CLBF_PROPORTIONAL ) {
+ if ( dat->backgroundBmpUse&CLBF_PROPORTIONAL ) {
desth = clRect.bottom;
destw = desth*bmp.bmWidth/bmp.bmHeight;
}
@@ -1783,9 +1783,9 @@ BOOL CLCPaint::_DrawNonEnginedBackground( HWND hwnd, HDC hdcMem, RECT * rcPaint, }
break;
}
- for( ;y<maxy;y+= desth ) {
- if( y<rcPaint->top-desth ) continue;
- for( x = 0;x<maxx;x+= destw )
+ for ( ;y<maxy;y+= desth ) {
+ if ( y<rcPaint->top-desth ) continue;
+ for ( x = 0;x<maxx;x+= destw )
StretchBlt( hdcMem, x, y, destw, desth, hdcBmp, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY );
}
SelectObject( hdcBmp, oldbm );
@@ -1811,12 +1811,12 @@ int CLCPaint::_DetermineDrawMode( HWND hWnd, struct ClcData *dat ) LONG lStyle = GetWindowLong( hWnd, GWL_STYLE );
int nStatus = _GetGeneralisedStatus();
- if( ( lStyle & WS_DISABLED )
+ if ( ( lStyle & WS_DISABLED )
|| ( dat->greyoutFlags & pcli->pfnClcStatusToPf2( nStatus ) )
|| ( ( dat->greyoutFlags & GREYF_UNFOCUS) && ( GetFocus() != hWnd ) ) )
paintMode |= DM_GRAY;
- if( lStyle&CLS_GREYALTERNATE )
+ if ( lStyle&CLS_GREYALTERNATE )
paintMode |= DM_GREYALTERNATE;
return paintMode;
@@ -1928,7 +1928,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo {
group = group->parent;
indent--;
- if( group == NULL ) break; // Finished list
+ if ( group == NULL ) break; // Finished list
group->scanIndex++;
continue;
}
@@ -2043,7 +2043,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo if ( selected || hottrack )
{
RECT mrc = row_rc;
- if( Drawing->type == CLCIT_GROUP &&
+ if ( Drawing->type == CLCIT_GROUP &&
Drawing->group->parent->groupId == 0 &&
Drawing->group->parent->cl.items[0] != Drawing )
{
@@ -2054,14 +2054,14 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo {
if ( selected )
SkinDrawGlyph( pc.hdcMem, &mrc, rcPaint, "CL , ID = Selection " );
- if( hottrack )
+ if ( hottrack )
SkinDrawGlyph( pc.hdcMem, &mrc, rcPaint, "CL,ID=HotTracking" );
}
else if ( dat->HiLightMode == 2 ) // Less
{
if ( selected )
SkinDrawGlyph( pc.hdcMem, &mrc, rcPaint, "CL,ID=Selection" ); //instead of free_row_rc
- if( hottrack )
+ if ( hottrack )
SkinDrawGlyph( pc.hdcMem, &mrc, rcPaint, "CL,ID=HotTracking" );
}
}
@@ -2070,13 +2070,13 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo else
{
int checkboxWidth;
- if( ( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
+ if ( ( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
( lStyle&CLS_GROUPCHECKBOXES && Drawing->type == CLCIT_GROUP ) ||
( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ) )
checkboxWidth = dat->checkboxSize+2;
else checkboxWidth = 0;
//background
- if( selected ) {
+ if ( selected ) {
switch ( dat->HiLightMode )
{
case 0:
@@ -2112,7 +2112,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo }
// **** Checkboxes
- if( ( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
+ if ( ( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
( lStyle&CLS_GROUPCHECKBOXES && Drawing->type == CLCIT_GROUP ) ||
( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ) )
{
@@ -2144,7 +2144,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo mpRequest->pl_Params[1].dwValueHash = mod_CalcHash( "Ovl" );
{
RECT mrc = row_rc;
- if( Drawing->type == CLCIT_GROUP &&
+ if ( Drawing->type == CLCIT_GROUP &&
Drawing->group->parent->groupId == 0 &&
Drawing->group->parent->cl.items[0] != Drawing )
{
@@ -2171,7 +2171,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo if ( subindex == -1 && group->scanIndex<group->cl.count )
{
- if( group->cl.items[group->scanIndex]->type == CLCIT_GROUP && group->cl.items[group->scanIndex]->group->expanded )
+ if ( group->cl.items[group->scanIndex]->type == CLCIT_GROUP && group->cl.items[group->scanIndex]->group->expanded )
{
group = group->cl.items[group->scanIndex]->group;
indent++;
@@ -2226,12 +2226,12 @@ void CLCPaint::_DrawInsertionMark( struct ClcData * dat, RECT& clRect, _PaintCon void CLCPaint::_CopyPaintToDest( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMode, RECT* rcPaint, RECT& clRect, _PaintContext& pc )
{
- if( !( paintMode&DM_GRAY ) && ( paintMode & DM_DRAW_OFFSCREEN ) )
+ if ( !( paintMode&DM_GRAY ) && ( paintMode & DM_DRAW_OFFSCREEN ) )
{
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) ) );
@@ -2242,7 +2242,7 @@ void CLCPaint::_CopyPaintToDest( HWND hWnd, struct ClcData * dat, HDC hdc, int p }
void CLCPaint::_FreePaintContext( _PaintContext& pc )
{
- if( pc.hBrushAlternateGrey ) DeleteObject( pc.hBrushAlternateGrey );
+ if ( pc.hBrushAlternateGrey ) DeleteObject( pc.hBrushAlternateGrey );
SelectObject( pc.hdcMem, (HFONT) GetStockObject( DEFAULT_GUI_FONT ) );
if ( pc.fRelease&_PaintContext::release_hdcmem )
{
@@ -2287,7 +2287,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
@@ -2557,9 +2557,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 );
@@ -2632,7 +2632,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct szCounts = pcli->pfnGetGroupCountsText( dat, Drawing );
// Has to draw the count?
- if( szCounts && szCounts[0] )
+ if ( szCounts && szCounts[0] )
{
RECT space_rc = free_row_rc;
RECT counts_rc = free_row_rc;
@@ -2854,7 +2854,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct _StoreItemPos( Drawing, CIT_TEXT, &rc );
// Has to draw the count?
- if( counts_size.cx > 0 )
+ if ( counts_size.cx > 0 )
{
RECT counts_rc = text_rc;
//counts_size.cx;
@@ -2964,17 +2964,17 @@ void CLCPaint::_GetBlendMode( IN struct ClcData *dat, IN struct ClcContact * Dra int mode;
int BlendedInActiveState = ( dat->dbbBlendInActiveState );
int BlendValue = dat->dbbBlend25 ? ILD_BLEND25 : ILD_BLEND50;
- if( selected && ( bFlag&GIM_SELECTED_AFFECT ) )
+ if ( selected && ( bFlag&GIM_SELECTED_AFFECT ) )
{
colourFg = dat->selBkColour;
mode = BlendedInActiveState?ILD_NORMAL:ILD_SELECTED;
}
- else if( hottrack && ( bFlag&GIM_HOT_AFFECT ) )
+ else if ( hottrack && ( bFlag&GIM_HOT_AFFECT ) )
{
mode = BlendedInActiveState?ILD_NORMAL:ILD_FOCUS;
colourFg = dat->hotTextColour;
}
- else if( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST && ( bFlag&GIM_TEMP_AFFECT ) )
+ else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST && ( bFlag&GIM_TEMP_AFFECT ) )
{
colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
mode = BlendValue;
@@ -3153,7 +3153,7 @@ void CLCPaint::_DrawContactText( HDC hdcMem, struct ClcData *dat, struct ClcCont ChangeToFont( hdcMem, dat, GetBasicFontID( Drawing ), NULL );
if ( selected )
SetTextColor( hdcMem, dat->force_in_dialog ? GetSysColor( COLOR_HIGHLIGHTTEXT ) : dat->selTextColour );
- else if( hottrack )
+ else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
if ( Drawing->type == CLCIT_GROUP )
@@ -3193,12 +3193,12 @@ void CLCPaint::_DrawContactSubText( HDC hdcMem, struct ClcData *dat, struct ClcC char * szCounts = pcli->pfnGetGroupCountsText( dat, Drawing );
// Has to draw the count?
- if( szCounts && szCounts[0] )
+ if ( szCounts && szCounts[0] )
{
ChangeToFont( hdcMem, dat, Drawing->group->expanded?FONTID_OPENGROUPCOUNTS:FONTID_CLOSEDGROUPCOUNTS, NULL );
if ( selected )
SetTextColor( hdcMem, dat->selTextColour );
- else if( hottrack )
+ else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
ske_DrawTextA( hdcMem, szCounts, -1, prcItem, uTextFormat );
ske_ResetTextEffect( hdcMem );
@@ -3214,7 +3214,7 @@ void CLCPaint::_DrawContactSubText( HDC hdcMem, struct ClcData *dat, struct ClcC //draw second and third line
if ( selected )
SetTextColor( hdcMem, dat->selTextColour );
- else if( hottrack )
+ else if ( hottrack )
_SetHotTrackColour( hdcMem, dat );
uTextFormat|= DT_VCENTER;
if ( itemType == CIT_SUBTEXT1 )
@@ -3248,7 +3248,7 @@ void CLCPaint::_DrawContactSelection( HDC hdcMem, struct ClcData *dat, struct Cl {
if ( selected )
SkinDrawGlyph( hdcMem, prcItem, rcPaint, "Contact List/Selection" );
- else if( hottrack )
+ else if ( hottrack )
SkinDrawGlyph( hdcMem, prcItem, rcPaint, "Contact List/HotTracking" );
}
}
diff --git a/plugins/Modernb/modern_clcutils.cpp b/plugins/Modernb/modern_clcutils.cpp index 4b2dc8e798..f389a937b6 100644 --- a/plugins/Modernb/modern_clcutils.cpp +++ b/plugins/Modernb/modern_clcutils.cpp @@ -149,7 +149,7 @@ void cliScrollTo(HWND hwnd,struct ClcData *dat,int desty,int noSmooth) if(desty>maxy) desty=maxy;
if(desty<0) desty=0;
if(abs(desty-dat->yScroll)<4) noSmooth=1;
- if(!noSmooth && dat->exStyle&CLS_EX_NOSMOOTHSCROLLING) noSmooth=1;
+ if (!noSmooth && dat->exStyle&CLS_EX_NOSMOOTHSCROLLING) noSmooth=1;
previousy=dat->yScroll;
BOOL keyDown = ( ( GetKeyState( VK_UP )
@@ -161,14 +161,14 @@ void cliScrollTo(HWND hwnd,struct ClcData *dat,int desty,int noSmooth) | GetKeyState( VK_HOME )
| GetKeyState( VK_END ) ) & 0x8000 );
- if(!noSmooth && !keyDown)
+ if (!noSmooth && !keyDown)
{
startTick=GetTickCount();
- for(;;) {
+ for (;;) {
nowTick=GetTickCount();
if(nowTick>=startTick+dat->scrollTime) break;
dat->yScroll=oldy+(desty-oldy)*(int)(nowTick-startTick)/dat->scrollTime;
- if(/*dat->backgroundBmpUse&CLBF_SCROLL || dat->hBmpBackground==NULL &&*/FALSE)
+ if (/*dat->backgroundBmpUse&CLBF_SCROLL || dat->hBmpBackground==NULL &&*/FALSE)
ScrollWindowEx(hwnd,0,previousy-dat->yScroll,NULL,NULL,NULL,NULL,SW_INVALIDATE);
else
{
@@ -182,7 +182,7 @@ void cliScrollTo(HWND hwnd,struct ClcData *dat,int desty,int noSmooth) }
}
dat->yScroll=desty;
- if((dat->backgroundBmpUse&CLBF_SCROLL || dat->hBmpBackground==NULL) && FALSE)
+ if ((dat->backgroundBmpUse&CLBF_SCROLL || dat->hBmpBackground==NULL) && FALSE)
ScrollWindowEx(hwnd,0,previousy-dat->yScroll,NULL,NULL,NULL,NULL,SW_INVALIDATE);
else
CLUI__cliInvalidateRect(hwnd,NULL,FALSE);
@@ -367,7 +367,7 @@ int GetDropTargetInformation(HWND hwnd,struct ClcData *dat,POINT pt) dat->selection=dat->iDragItem;
dat->iInsertionMark=-1;
dat->nInsertionLevel=0;
- if(!PtInRect(&clRect,pt)) return DROPTARGET_OUTSIDE;
+ if (!PtInRect(&clRect,pt)) return DROPTARGET_OUTSIDE;
hit=cliHitTest(hwnd,dat,pt.x,pt.y,&contact,&group,&hitFlags);
cliGetRowByIndex(dat,dat->iDragItem,&movecontact,&movegroup);
@@ -431,7 +431,7 @@ int GetDropTargetInformation(HWND hwnd,struct ClcData *dat,POINT pt) group=bottomgroup;
if (bottomcontact==movecontact || group==movecontact->group) return DROPTARGET_ONSELF;
dat->nInsertionLevel=-1; // decreasing here
- for(;group;group=group->parent)
+ for (;group;group=group->parent)
{
dat->nInsertionLevel++;
if (group==movecontact->group) return DROPTARGET_ONSELF;
@@ -450,7 +450,7 @@ int GetDropTargetInformation(HWND hwnd,struct ClcData *dat,POINT pt) if(movecontact->type==CLCIT_GROUP)
{ //check not moving onto its own subgroup
dat->iInsertionMark=hit+1;
- for(;group;group=group->parent)
+ for (;group;group=group->parent)
{
dat->nInsertionLevel++;
if(group==movecontact->group) return DROPTARGET_ONSELF;
@@ -480,9 +480,9 @@ 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 )
+ if ( !dat->fontModernInfo[i].changed && dat->fontModernInfo[i].hFont )
{
DeleteObject(dat->fontModernInfo[i].hFont);
}
@@ -718,13 +718,13 @@ void LoadCLCOptions(HWND hwnd, struct ClcData *dat ) if (g_CluiData.fDisableSkinEngine)
{
DBVARIANT dbv;
- if(!dat->bkChanged)
+ if (!dat->bkChanged)
{
dat->bkColour=sttGetColor("CLC","BkColour",GetSysColor(COLOR_3DFACE));
{
if(ModernGetSettingByte(NULL,"CLC","UseBitmap",CLCDEFAULT_USEBITMAP))
{
- if(!ModernGetSettingString(NULL,"CLC","BkBitmap",&dbv))
+ if (!ModernGetSettingString(NULL,"CLC","BkBitmap",&dbv))
{
dat->hBmpBackground=(HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal);
ModernDBFreeVariant(&dbv);
@@ -740,7 +740,7 @@ void LoadCLCOptions(HWND hwnd, struct ClcData *dat ) dat->MenuTextHiColor=sttGetColor("Menu","SelTextColour",CLCDEFAULT_MODERN_SELTEXTCOLOUR);
if(ModernGetSettingByte(NULL,"Menu","UseBitmap",CLCDEFAULT_USEBITMAP)) {
- if(!ModernGetSettingString(NULL,"Menu","BkBitmap",&dbv)) {
+ if (!ModernGetSettingString(NULL,"Menu","BkBitmap",&dbv)) {
dat->hMenuBackground=(HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal);
//mir_free_and_nill(dbv.pszVal);
ModernDBFreeVariant(&dbv);
@@ -755,7 +755,7 @@ void LoadCLCOptions(HWND hwnd, struct ClcData *dat ) dat->selTextColour=ModernGetSettingDword(NULL,"CLC","SelTextColour",CLCDEFAULT_MODERN_SELTEXTCOLOUR);
dat->hotTextColour=ModernGetSettingDword(NULL,"CLC","HotTextColour",CLCDEFAULT_MODERN_HOTTEXTCOLOUR);
dat->quickSearchColour=ModernGetSettingDword(NULL,"CLC","QuickSearchColour",CLCDEFAULT_MODERN_QUICKSEARCHCOLOUR);
- if(!g_szMetaModuleName && ServiceExists(MS_MC_GETPROTOCOLNAME)) g_szMetaModuleName = (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
+ if (!g_szMetaModuleName && ServiceExists(MS_MC_GETPROTOCOLNAME)) g_szMetaModuleName = (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
dat->IsMetaContactsEnabled=(!(GetWindowLong(hwnd,GWL_STYLE)&CLS_MANUALUPDATE)) &&
g_szMetaModuleName && ModernGetSettingByte(NULL,g_szMetaModuleName,"Enabled",1) && ServiceExists(MS_MC_GETDEFAULTCONTACT);
diff --git a/plugins/Modernb/modern_clistevents.cpp b/plugins/Modernb/modern_clistevents.cpp index 9208ff8c16..e6cadaa02e 100644 --- a/plugins/Modernb/modern_clistevents.cpp +++ b/plugins/Modernb/modern_clistevents.cpp @@ -289,7 +289,7 @@ static int ehhEventAreaBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam) DBVARIANT dbv;
event_area.bkColour=sttGetColor("EventArea","BkColour",CLCDEFAULT_BKCOLOUR);
if(ModernGetSettingByte(NULL,"EventArea","UseBitmap",CLCDEFAULT_USEBITMAP)) {
- if(!ModernGetSettingString(NULL,"EventArea","BkBitmap",&dbv)) {
+ if (!ModernGetSettingString(NULL,"EventArea","BkBitmap",&dbv)) {
event_area.hBmpBackground=(HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal);
ModernDBFreeVariant(&dbv);
}
@@ -409,7 +409,7 @@ static void EventArea_HideShowNotifyFrame() if(desired)
{
- if(!dwVisible)
+ if (!dwVisible)
CallService(MS_CLIST_FRAMES_SHFRAME, (WPARAM)hNotifyFrame, 0);
}
else
diff --git a/plugins/Modernb/modern_clistmod.cpp b/plugins/Modernb/modern_clistmod.cpp index 781f2f2896..c22f5550e1 100644 --- a/plugins/Modernb/modern_clistmod.cpp +++ b/plugins/Modernb/modern_clistmod.cpp @@ -521,7 +521,7 @@ int cliShowHide(WPARAM wParam,LPARAM lParam) return 0;
}
- if( (bShow == TRUE || lParam == 1) )
+ if ( (bShow == TRUE || lParam == 1) )
{
Sync( CLUIFrames_ActivateSubContainers, TRUE );
CLUI_ShowWindowMod(pcli->hwndContactList, SW_RESTORE);
diff --git a/plugins/Modernb/modern_clistopts.cpp b/plugins/Modernb/modern_clistopts.cpp index f778426c37..5d8576dd2f 100644 --- a/plugins/Modernb/modern_clistopts.cpp +++ b/plugins/Modernb/modern_clistopts.cpp @@ -404,7 +404,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa SendDlgItemMessage(hwndDlg, IDC_AVATAR_BORDER_COLOR, CPM_SETCOLOUR, 0, (COLORREF)ModernGetSettingDword(NULL,"CList","AvatarsBorderColor",SETTINGS_AVATARBORDERCOLOR_DEFAULT));
- if(!IsDlgButtonChecked(hwndDlg,IDC_SHOW_AVATARS))
+ if (!IsDlgButtonChecked(hwndDlg,IDC_SHOW_AVATARS))
{
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_DRAW_BORDER),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_BORDER_COLOR_L),FALSE);
@@ -427,16 +427,16 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_SIZE_PIXELS3),FALSE);
EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), FALSE );
}
- if( !IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ) )
+ if ( !IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ) )
{
EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), FALSE );
}
- if(!IsDlgButtonChecked(hwndDlg,IDC_AVATAR_DRAW_BORDER))
+ if (!IsDlgButtonChecked(hwndDlg,IDC_AVATAR_DRAW_BORDER))
{
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_BORDER_COLOR_L),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_BORDER_COLOR),FALSE);
}
- if(!IsDlgButtonChecked(hwndDlg,IDC_AVATAR_ROUND_CORNERS))
+ if (!IsDlgButtonChecked(hwndDlg,IDC_AVATAR_ROUND_CORNERS))
{
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_CHECK),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE),FALSE);
@@ -447,7 +447,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_CUSTOM_CORNER_SIZE_SPIN),FALSE);
}
- if(!IsDlgButtonChecked(hwndDlg,IDC_AVATAR_OVERLAY_ICONS))
+ if (!IsDlgButtonChecked(hwndDlg,IDC_AVATAR_OVERLAY_ICONS))
{
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_OVERLAY_ICON_NORMAL),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_OVERLAY_ICON_PROTOCOL),FALSE);
@@ -1466,7 +1466,7 @@ INT_PTR CALLBACK DlgProcExtraIconsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
case WM_MOUSEMOVE:
{
- if(!dragging) break;
+ if (!dragging) break;
{
TVHITTESTINFO hti;
hti.pt.x=(short)LOWORD(lParam);
@@ -1496,7 +1496,7 @@ INT_PTR CALLBACK DlgProcExtraIconsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
case WM_LBUTTONUP:
{
- if(!dragging) break;
+ if (!dragging) break;
TreeView_SetInsertMark(GetDlgItem(hwndDlg,IDC_EXTRAORDER),NULL,0);
dragging=0;
ReleaseCapture();
diff --git a/plugins/Modernb/modern_clistsettings.cpp b/plugins/Modernb/modern_clistsettings.cpp index c251d2b21a..f04e0a860e 100644 --- a/plugins/Modernb/modern_clistsettings.cpp +++ b/plugins/Modernb/modern_clistsettings.cpp @@ -248,7 +248,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]);
}
@@ -616,7 +616,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) }
}
- if(!strcmp(cws->szModule,"CList"))
+ if (!strcmp(cws->szModule,"CList"))
{
//name is null or (setting is myhandle)
if (!strcmp(cws->szSetting,"Rate"))
@@ -642,15 +642,15 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) }
pcli->pfnClcBroadcast(CLM_AUTOREBUILD,0, 0);
}
- else if(!strcmp(cws->szSetting,"noOffline"))
+ else if (!strcmp(cws->szSetting,"noOffline"))
{
InvalidateDNCEbyPointer((HANDLE)wParam,pdnce,cws->value.type);
pcli->pfnClcBroadcast(CLM_AUTOREBUILD,0, 0);
}
}
- else if(!strcmp(cws->szModule,"Protocol"))
+ else if (!strcmp(cws->szModule,"Protocol"))
{
- if(!strcmp(cws->szSetting,"p"))
+ if (!strcmp(cws->szSetting,"p"))
{
char *szProto;
InvalidateDNCEbyPointer((HANDLE)wParam,pdnce,cws->value.type);
diff --git a/plugins/Modernb/modern_clisttray.cpp b/plugins/Modernb/modern_clisttray.cpp index de84dfea09..f94e25a668 100644 --- a/plugins/Modernb/modern_clisttray.cpp +++ b/plugins/Modernb/modern_clisttray.cpp @@ -99,7 +99,7 @@ INT_PTR CListTray_GetGlobalStatus(WPARAM wparam,LPARAM lparam) int connectingCount=0;
for (i=0;i<pcli->hClcProtoCount;i++)
{
- if(!pcli->pfnGetProtocolVisibility(pcli->clcProto[i].szProto)) continue;
+ if (!pcli->pfnGetProtocolVisibility(pcli->clcProto[i].szProto)) continue;
if (pcli->clcProto[i].dwStatus>=ID_STATUS_CONNECTING &&
pcli->clcProto[i].dwStatus<ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES)
{
@@ -175,7 +175,7 @@ void cliTrayIconUpdateBase(const char *szChangedProto) 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;
+ if (!lstrcmpA(szChangedProto,accs[i]->szModuleName)) pcli->cycleStep=i;
if(averageMode==0) averageMode=CallProtoService(accs[i]->szModuleName,PS_GETSTATUS,0,0);
else if(averageMode!=CallProtoService(accs[i]->szModuleName,PS_GETSTATUS,0,0)) {averageMode=-1; break;}
}
diff --git a/plugins/Modernb/modern_clui.cpp b/plugins/Modernb/modern_clui.cpp index 0de5249cc6..4ee09030ff 100644 --- a/plugins/Modernb/modern_clui.cpp +++ b/plugins/Modernb/modern_clui.cpp @@ -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);
}
@@ -1588,13 +1588,13 @@ int CLUI_TestCursorOnBorders() {
case 1:
case 2:
- if(!g_CluiData.fDocked||(g_CluiData.fDocked==2 && k==1)||(g_CluiData.fDocked==1 && k==2)){hCurs1 = LoadCursor(NULL, IDC_SIZEWE); break;}
- case 3: if(!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENS); break;}
- case 4: if(!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENWSE); break;}
- case 5: if(!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENESW); break;}
- case 6: if(!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENS); break;}
- case 7: if(!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENESW); break;}
- case 8: if(!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENWSE); break;}
+ if (!g_CluiData.fDocked||(g_CluiData.fDocked==2 && k==1)||(g_CluiData.fDocked==1 && k==2)){hCurs1 = LoadCursor(NULL, IDC_SIZEWE); break;}
+ case 3: if (!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENS); break;}
+ case 4: if (!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENWSE); break;}
+ case 5: if (!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENESW); break;}
+ case 6: if (!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENS); break;}
+ case 7: if (!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENESW); break;}
+ case 8: if (!g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENWSE); break;}
}
if (hCurs1) SetCursor(hCurs1);
return k;
@@ -2046,8 +2046,8 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) GetWindowRect(m_hWnd, &rc);
CheckFramesPos(&rc);
Sync(CLUIFrames_OnMoving,m_hWnd,&rc);
- if(!IsIconic(m_hWnd)) {
- if(!CallService(MS_CLIST_DOCKINGISDOCKED,0,0))
+ if (!IsIconic(m_hWnd)) {
+ if (!CallService(MS_CLIST_DOCKINGISDOCKED,0,0))
{ //if g_CluiData.fDocked, dont remember pos (except for width)
ModernWriteSettingDword(NULL,"CList","Height",(DWORD)(rc.bottom - rc.top));
ModernWriteSettingDword(NULL,"CList","x",(DWORD)rc.left);
@@ -2087,7 +2087,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) }
// ske_RedrawCompleteWindow();
- if(!CallService(MS_CLIST_DOCKINGISDOCKED,0,0))
+ if (!CallService(MS_CLIST_DOCKINGISDOCKED,0,0))
{ //if g_CluiData.fDocked, dont remember pos (except for width)
ModernWriteSettingDword(NULL,"CList","Height",(DWORD)(rc.bottom - rc.top));
ModernWriteSettingDword(NULL,"CList","x",(DWORD)rc.left);
@@ -2431,7 +2431,7 @@ LRESULT CLUI::OnAutoAlphaTimer( UINT msg, WPARAM wParam, LPARAM lParam ) CLUI_SmoothAlphaTransition(m_hWnd, (BYTE)(g_bTransparentFlag?ModernGetSettingByte(NULL,"CList","AutoAlpha",SETTING_AUTOALPHA_DEFAULT):255), 1);
}
}
- if(!bTransparentFocus) KillTimer(m_hWnd,TM_AUTOALPHA);
+ if (!bTransparentFocus) KillTimer(m_hWnd,TM_AUTOALPHA);
return TRUE;
}
LRESULT CLUI::OnSmoothAlphaTransitionTimer( UINT msg, WPARAM wParam, LPARAM lParam )
@@ -2620,7 +2620,7 @@ LRESULT CLUI::OnNcHitTest( UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT result;
result=DefWindowProc(m_hWnd,WM_NCHITTEST,wParam,lParam);
- if( (g_CluiData.fAutoSize) && ( result == HTSIZE || result == HTTOP ||
+ if ( (g_CluiData.fAutoSize) && ( result == HTSIZE || result == HTTOP ||
result == HTTOPLEFT || result == HTTOPRIGHT ||
result==HTBOTTOM || result==HTBOTTOMRIGHT ||
result==HTBOTTOMLEFT) )
@@ -2876,7 +2876,7 @@ LRESULT CLUI::OnClickNotify( NMCLISTCONTROL * pnmc ) };
if(hItem && !(hitFlags&CLCHT_NOWHERE))
return DefCluiWndProc( WM_NOTIFY, 0, (LPARAM)pnmc );
- if((hitFlags&(CLCHT_NOWHERE|CLCHT_INLEFTMARGIN|CLCHT_BELOWITEMS))==0)
+ if ((hitFlags&(CLCHT_NOWHERE|CLCHT_INLEFTMARGIN|CLCHT_BELOWITEMS))==0)
return DefCluiWndProc( WM_NOTIFY, 0, (LPARAM)pnmc );
if (ModernGetSettingByte(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) {
POINT pt;
diff --git a/plugins/Modernb/modern_cluiframes.cpp b/plugins/Modernb/modern_cluiframes.cpp index 4da12ab2f2..41f1754f81 100644 --- a/plugins/Modernb/modern_cluiframes.cpp +++ b/plugins/Modernb/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 )
{
@@ -160,7 +160,7 @@ int SetAlpha(BYTE Alpha) {
long l;
l=GetWindowLong(hwnd,GWL_EXSTYLE);
- if(!(l&WS_EX_LAYERED))
+ if (!(l&WS_EX_LAYERED))
{
HWND parent=NULL;
if (g_CluiData.fOnDesktop)
@@ -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)
{
{
@@ -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);
@@ -751,7 +751,7 @@ static int LocateStorePosition(int Frameid,int maxstored) if ( ModernGetSettingTString( NULL, CLUIFrameModule, settingname, &dbv ) )
continue;
- if( lstrcmpi( dbv.ptszVal, g_pfwFrames[Frameid].Name ) ==0 )
+ if ( lstrcmpi( dbv.ptszVal, g_pfwFrames[Frameid].Name ) ==0 )
{
ModernDBFreeVariant( &dbv );
return i;
@@ -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) {
@@ -1037,8 +1037,8 @@ static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam,LPARAM lParam) ModifyMItem((WPARAM)_hmiFloating,(LPARAM)&mi);
mi.flags=CMIM_FLAGS|CMIF_CHILDPOPUP;
- if( g_CluiData.fLayered ) mi.flags|=CMIF_GRAYED;
- else if((g_pfwFrames[pos].UseBorder)) mi.flags|=CMIF_CHECKED;
+ if ( g_CluiData.fLayered ) mi.flags|=CMIF_GRAYED;
+ else if ((g_pfwFrames[pos].UseBorder)) mi.flags|=CMIF_CHECKED;
ModifyMItem((WPARAM)_hmiBorder,(LPARAM)&mi);
mi.flags=CMIM_FLAGS|CMIF_CHILDPOPUP;
@@ -1056,7 +1056,7 @@ static int CLUIFramesModifyContextMenuForFrame(WPARAM wParam,LPARAM lParam) mi.flags=CMIM_FLAGS|CMIF_CHILDPOPUP;
if(g_pfwFrames[pos].collapsed) mi.flags|=CMIF_CHECKED;
- if((!g_pfwFrames[pos].visible)||(g_pfwFrames[pos].Locked)||(pos==CLUIFramesGetalClientFrame())) mi.flags|=CMIF_GRAYED;
+ if ((!g_pfwFrames[pos].visible)||(g_pfwFrames[pos].Locked)||(pos==CLUIFramesGetalClientFrame())) mi.flags|=CMIF_GRAYED;
ModifyMItem((WPARAM)_hmiColl,(LPARAM)&mi);
}
return 0;
@@ -1096,8 +1096,8 @@ static int CLUIFramesModifyMainMenuItems(WPARAM wParam,LPARAM lParam) mi.flags=CMIM_FLAGS|CMIF_CHILDPOPUP;
- if( g_CluiData.fLayered ) mi.flags|=CMIF_GRAYED;
- else if((g_pfwFrames[pos].UseBorder)) mi.flags|=CMIF_CHECKED;
+ if ( g_CluiData.fLayered ) mi.flags|=CMIF_GRAYED;
+ else if ((g_pfwFrames[pos].UseBorder)) mi.flags|=CMIF_CHECKED;
CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)g_pfwFrames[pos].MenuHandles.MIBorder,(LPARAM)&mi);
mi.flags=CMIM_FLAGS|CMIF_CHILDPOPUP|((g_pfwFrames[pos].align&alClient)?CMIF_GRAYED:0);
@@ -1131,7 +1131,7 @@ static int CLUIFramesModifyMainMenuItems(WPARAM wParam,LPARAM lParam) mi.flags=CMIM_FLAGS|CMIF_CHILDPOPUP;
if(g_pfwFrames[pos].collapsed) mi.flags|=CMIF_CHECKED;
- if((!g_pfwFrames[pos].visible)||g_pfwFrames[pos].Locked||(pos==CLUIFramesGetalClientFrame())) mi.flags|=CMIF_GRAYED;
+ if ((!g_pfwFrames[pos].visible)||g_pfwFrames[pos].Locked||(pos==CLUIFramesGetalClientFrame())) mi.flags|=CMIF_GRAYED;
CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)g_pfwFrames[pos].MenuHandles.MIColl,(LPARAM)&mi);
}
@@ -1160,16 +1160,16 @@ static INT_PTR _us_DoGetFrameOptions(WPARAM wParam,LPARAM lParam) case FO_FLAGS:
retval=0;
if(g_pfwFrames[pos].visible) retval|=F_VISIBLE;
- if(!g_pfwFrames[pos].collapsed) retval|=F_UNCOLLAPSED;
+ if (!g_pfwFrames[pos].collapsed) retval|=F_UNCOLLAPSED;
if(g_pfwFrames[pos].Locked) retval|=F_LOCKED;
if(g_pfwFrames[pos].TitleBar.ShowTitleBar) retval|=F_SHOWTB;
if(g_pfwFrames[pos].TitleBar.ShowTitleBarTip) retval|=F_SHOWTBTIP;
if (!g_CluiData.fLayered)
{
- if(!(GetWindowLong(g_pfwFrames[pos].hWnd,GWL_STYLE)&WS_BORDER)) retval|=F_NOBORDER;
+ if (!(GetWindowLong(g_pfwFrames[pos].hWnd,GWL_STYLE)&WS_BORDER)) retval|=F_NOBORDER;
}
else
- if(!g_pfwFrames[pos].UseBorder) retval|=F_NOBORDER;
+ if (!g_pfwFrames[pos].UseBorder) retval|=F_NOBORDER;
break;
@@ -1287,7 +1287,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam) style=(int)GetWindowLong(g_pfwFrames[pos].hWnd,GWL_STYLE);
style&=(~WS_BORDER);
- if( !(flag&F_NOBORDER ) && !g_CluiData.fLayered ) style|=WS_BORDER;
+ if ( !(flag&F_NOBORDER ) && !g_CluiData.fLayered ) style|=WS_BORDER;
SetWindowLong(g_pfwFrames[pos].hWnd,GWL_STYLE,(long)style);
SetWindowLong(g_pfwFrames[pos].TitleBar.hwnd,GWL_STYLE,(long)style& ~(WS_VSCROLL | WS_HSCROLL));
@@ -1373,7 +1373,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam) int oldHeight=g_pfwFrames[pos].height;
retval=g_pfwFrames[pos].height;
g_pfwFrames[pos].height=lParam;
- if(!CLUIFramesFitInSize()) g_pfwFrames[pos].height=retval;
+ if (!CLUIFramesFitInSize()) g_pfwFrames[pos].height=retval;
retval=g_pfwFrames[pos].height;
if (g_pfwFrames[pos].height != oldHeight)
CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
@@ -1382,7 +1382,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam) {
retval=g_pfwFrames[pos].HeightWhenCollapsed;
g_pfwFrames[pos].HeightWhenCollapsed=lParam;
- if(!CLUIFramesFitInSize()) g_pfwFrames[pos].HeightWhenCollapsed=retval;
+ if (!CLUIFramesFitInSize()) g_pfwFrames[pos].HeightWhenCollapsed=retval;
retval=g_pfwFrames[pos].HeightWhenCollapsed;
}
@@ -1407,7 +1407,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam) return (-1);
};
- if((lParam&alClient)&&(CLUIFramesGetalClientFrame()>=0)) { //only one alClient frame possible
+ if ((lParam&alClient)&&(CLUIFramesGetalClientFrame()>=0)) { //only one alClient frame possible
_nClientFrameId = eUnknownId;//recalc it
return -1;
@@ -1697,7 +1697,7 @@ static int _us_DoCollapseFrame(WPARAM wParam,LPARAM lParam) {
RECT rc;
if(CallService(MS_CLIST_DOCKINGISDOCKED,0,0)) {return 0;};
- if(!g_CluiData.fDocked && g_CluiData.fAutoSize) {return 0;};
+ if (!g_CluiData.fDocked && g_CluiData.fAutoSize) {return 0;};
GetWindowRect(pcli->hwndContactList,&rc);
if(g_pfwFrames[FrameId].collapsed==TRUE) {
@@ -1740,7 +1740,7 @@ static int _us_DoCollapseFrame(WPARAM wParam,LPARAM lParam) if (!g_pfwFrames[FrameId].floating)
{
- if(!CLUIFramesFitInSize()) {
+ if (!CLUIFramesFitInSize()) {
//cant collapse,we can resize only for height<alclient frame height
int alfrm=CLUIFramesGetalClientFrame();
@@ -1754,7 +1754,7 @@ static int _us_DoCollapseFrame(WPARAM wParam,LPARAM lParam) {
int i,sumheight=0;
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)) {
+ 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;
}
@@ -1893,7 +1893,7 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam) if(pcli->hwndContactList==0) return -1;
if (_fCluiFramesModuleNotStarted) return -1;
if(clfrm->cbSize!=sizeof(CLISTFrame)) return -1;
- if(!(_hTitleBarFont)) _hTitleBarFont = CLUILoadTitleBarFont();
+ if (!(_hTitleBarFont)) _hTitleBarFont = CLUILoadTitleBarFont();
g_pfwFrames=(FRAMEWND*)realloc(g_pfwFrames,sizeof(FRAMEWND)*(g_nFramesCount+1));
@@ -2222,7 +2222,7 @@ static BOOL CLUIFramesFitInSize(void) tbh=g_nTitleBarHeight*btoint(g_pfwFrames[clientfrm].TitleBar.ShowTitleBar);
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)) {
+ 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)
{
@@ -2245,7 +2245,7 @@ int CLUIFrames_GetTotalHeight() 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))
+ 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));
};
@@ -2280,7 +2280,7 @@ int CLUIFramesGetMinHeight() 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))
+ if ((g_pfwFrames[i].align!=alClient)&&(g_pfwFrames[i].visible)&&(!g_pfwFrames[i].needhide)&&(!g_pfwFrames[i].floating))
{
RECT wsize;
@@ -2361,8 +2361,8 @@ static int CLUIFramesResizeFrames(const RECT newsize) while(sumheight>(newheight-tbh)&&drawitems>0) {
sumheight=0;
drawitems=0;
- 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)) {
+ 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);
sumheight+=(g_pfwFrames[i].height)+curfrmtbh+(i > 0 ? sepw : 0)+( (g_pfwFrames[i].UseBorder &&!g_CluiData.fLayered)?2:0);
@@ -2381,7 +2381,7 @@ static int CLUIFramesResizeFrames(const RECT newsize) for(j=0;j<g_nFramesCount;j++) {
//move all alTop frames
i=sdarray[j].realpos;
- if((!g_pfwFrames[i].needhide)&&(!g_pfwFrames[i].floating)&&(g_pfwFrames[i].visible)&&(g_pfwFrames[i].align==alTop)) {
+ if ((!g_pfwFrames[i].needhide)&&(!g_pfwFrames[i].floating)&&(g_pfwFrames[i].visible)&&(g_pfwFrames[i].align==alTop)) {
curfrmtbh=(g_nTitleBarHeight+g_CluiData.nGapBetweenTitlebar)*btoint(g_pfwFrames[i].TitleBar.ShowTitleBar);
g_pfwFrames[i].wndSize.top=prevframebottomline+(i > 0 ? sepw : 0)+(curfrmtbh);
g_pfwFrames[i].wndSize.bottom=g_pfwFrames[i].height+g_pfwFrames[i].wndSize.top+((g_pfwFrames[i].UseBorder &&!g_CluiData.fLayered)?2:0);
@@ -2396,10 +2396,10 @@ static int CLUIFramesResizeFrames(const RECT newsize) }
if(sumheight<newheight) {
- for(j=0;j<g_nFramesCount;j++){
+ for(j=0;j<g_nFramesCount;j++) {
//move alClient frame
i=sdarray[j].realpos;
- if((!g_pfwFrames[i].needhide)&&(!g_pfwFrames[i].floating)&&(g_pfwFrames[i].visible)&&(g_pfwFrames[i].align==alClient)) {
+ if ((!g_pfwFrames[i].needhide)&&(!g_pfwFrames[i].floating)&&(g_pfwFrames[i].visible)&&(g_pfwFrames[i].align==alClient)) {
int oldh;
g_pfwFrames[i].wndSize.top=prevframebottomline+(j > 0 ? sepw : 0)+(tbh);
g_pfwFrames[i].wndSize.bottom=g_pfwFrames[i].wndSize.top+newheight-sumheight-tbh-(j > 0 ? sepw : 0);
@@ -2424,7 +2424,7 @@ static int CLUIFramesResizeFrames(const RECT newsize) for(j=g_nFramesCount-1;j>=0;j--) {
//move all alBottom frames
i=sdarray[j].realpos;
- if((g_pfwFrames[i].visible)&&(!g_pfwFrames[i].floating)&&(!g_pfwFrames[i].needhide)&&(g_pfwFrames[i].align==alBottom)) {
+ if ((g_pfwFrames[i].visible)&&(!g_pfwFrames[i].floating)&&(!g_pfwFrames[i].needhide)&&(g_pfwFrames[i].align==alBottom)) {
curfrmtbh=(g_nTitleBarHeight+g_CluiData.nGapBetweenTitlebar)*btoint(g_pfwFrames[i].TitleBar.ShowTitleBar);
g_pfwFrames[i].wndSize.bottom=prevframebottomline-(j > 0 ? sepw : 0);
@@ -2474,7 +2474,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) )
@@ -2501,9 +2501,9 @@ 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( lParam&FU_TBREDRAW ) CLUIFramesForceUpdateTB( &g_pfwFrames[pos] );
- if( lParam&FU_FMREDRAW ) CLUIFramesForceUpdateFrame( &g_pfwFrames[pos] );
+ 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;
}
@@ -2781,7 +2781,7 @@ int OnFrameTitleBarBackgroundChange(WPARAM wParam,LPARAM lParam) if (g_CluiData.fDisableSkinEngine)
{
if(ModernGetSettingByte(NULL,"FrameTitleBar","UseBitmap",CLCDEFAULT_USEBITMAP)) {
- if(!ModernGetSettingString(NULL,"FrameTitleBar","BkBitmap",&dbv)) {
+ if (!ModernGetSettingString(NULL,"FrameTitleBar","BkBitmap",&dbv)) {
hBmpBackground=(HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal);
//mir_free_and_nill(dbv.pszVal);
ModernDBFreeVariant(&dbv);
@@ -2900,7 +2900,7 @@ void DrawBackGround(HWND hwnd,HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColou break;
}
desth=clRect.bottom -clRect.top;
- for(;y<maxy;y+=desth) {
+ for (;y<maxy;y+=desth) {
if(y<rcPaint->top-desth) continue;
for(x=0;x<maxx;x+=destw)
StretchBlt(hdcMem,x,y,destw,desth,hdcBmp,0,0,bmp.bmWidth,bmp.bmHeight,SRCCOPY);
@@ -3461,7 +3461,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam if(newh>0) {
prevold=g_pfwFrames[Framemod].height;
g_pfwFrames[Framemod].height=newh;
- if(!CLUIFramesFitInSize()) { g_pfwFrames[Framemod].height=prevold; return TRUE;}
+ if (!CLUIFramesFitInSize()) { g_pfwFrames[Framemod].height=prevold; return TRUE;}
g_pfwFrames[Framemod].height=newh;
if(newh>3) g_pfwFrames[Framemod].collapsed=TRUE;
@@ -3898,7 +3898,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))
{
@@ -4226,7 +4226,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/Modernb/modern_contact.cpp b/plugins/Modernb/modern_contact.cpp index 58fd7759f4..1184bfda1d 100644 --- a/plugins/Modernb/modern_contact.cpp +++ b/plugins/Modernb/modern_contact.cpp @@ -89,7 +89,7 @@ int GetProtoIndex(char * szName) if (!szName) return -1;
ProtoEnumAccounts( &accCount, &accs );
for (i=0; i<accCount; i++)
- if(!mir_strcmpi(szName,accs[i]->szModuleName))
+ if (!mir_strcmpi(szName,accs[i]->szModuleName))
return accs[i]->iOrder;
return -1;
}
@@ -176,7 +176,7 @@ int cliCompareContacts(const struct ClcContact *contact1,const struct ClcContact INT_PTR ContactChangeGroup(WPARAM wParam,LPARAM lParam)
{
CallService(MS_CLUI_CONTACTDELETED,wParam,0);
- if((HANDLE)lParam==NULL)
+ if ((HANDLE)lParam==NULL)
ModernDeleteSetting((HANDLE)wParam,"CList","Group");
else
ModernWriteSettingTString((HANDLE)wParam,"CList","Group",pcli->pfnGetGroupName(lParam, NULL));
diff --git a/plugins/Modernb/modern_docking.cpp b/plugins/Modernb/modern_docking.cpp index d49e15700e..a7ffe8e506 100644 --- a/plugins/Modernb/modern_docking.cpp +++ b/plugins/Modernb/modern_docking.cpp @@ -111,7 +111,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam) if(msg->message==WM_DESTROY)
ModernWriteSettingByte(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;
@@ -185,7 +185,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam) dock_drag_dy=rcWindow.top-ptCursor.y;
Docking_GetMonitorRectFromPoint(ptCursor,&rcMonitor);
- if(((ptCursor.x<rcMonitor.left+EDGESENSITIVITY)
+ if (((ptCursor.x<rcMonitor.left+EDGESENSITIVITY)
|| (ptCursor.x>=rcMonitor.right-EDGESENSITIVITY))
&& ModernGetSettingByte(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT))
{
@@ -272,7 +272,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam) {
if(msg->lParam) return 0;
BOOL toBeDocked = (BOOL) ModernGetSettingByte(NULL,"CLUI","DockToSides",SETTING_DOCKTOSIDES_DEFAULT);
- if((msg->wParam && g_CluiData.fDocked<0) || (!msg->wParam && g_CluiData.fDocked>0)) g_CluiData.fDocked=-g_CluiData.fDocked;
+ if ((msg->wParam && g_CluiData.fDocked<0) || (!msg->wParam && g_CluiData.fDocked>0)) g_CluiData.fDocked=-g_CluiData.fDocked;
ZeroMemory(&abd,sizeof(abd));
abd.cbSize=sizeof(abd);
abd.hWnd=msg->hwnd;
@@ -305,7 +305,7 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam) return 0;
}
case WM_SYSCOMMAND:
- if((msg->wParam&0xFFF0)!=SC_MOVE) return 0;
+ if ((msg->wParam&0xFFF0)!=SC_MOVE) return 0;
SetActiveWindow(msg->hwnd);
SetCapture(msg->hwnd);
draggingTitle=1;
@@ -313,11 +313,11 @@ int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam) return TRUE;
case WM_MOUSEMOVE:
- if(!draggingTitle) return 0;
+ if (!draggingTitle) return 0;
{ RECT rc;
POINT pt;
GetClientRect(msg->hwnd,&rc);
- if(((g_CluiData.fDocked==DOCKED_LEFT || g_CluiData.fDocked==-DOCKED_LEFT) && (short)LOWORD(msg->lParam)>rc.right) ||
+ if (((g_CluiData.fDocked==DOCKED_LEFT || g_CluiData.fDocked==-DOCKED_LEFT) && (short)LOWORD(msg->lParam)>rc.right) ||
((g_CluiData.fDocked==DOCKED_RIGHT || g_CluiData.fDocked==-DOCKED_RIGHT) && (short)LOWORD(msg->lParam)<0)) {
ReleaseCapture();
draggingTitle=0;
diff --git a/plugins/Modernb/modern_extraimage.cpp b/plugins/Modernb/modern_extraimage.cpp index e54abd2628..6f145d3c79 100644 --- a/plugins/Modernb/modern_extraimage.cpp +++ b/plugins/Modernb/modern_extraimage.cpp @@ -388,7 +388,7 @@ void ExtraImage_SetAllExtraIcons(HWND hwndList,HANDLE hContact) {
for (i=0;i<maxpr;i++)
{
- if(!mir_strcmp(ImgIndex[i],szProto))
+ if (!mir_strcmp(ImgIndex[i],szProto))
{
SendMessage(hwndList,CLM_SETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(ExtraImage_ExtraIDToColumnNum(EXTRA_ICON_PROTO),i+3));
break;
diff --git a/plugins/Modernb/modern_popup.cpp b/plugins/Modernb/modern_popup.cpp index 33eebada34..8fa33f370a 100644 --- a/plugins/Modernb/modern_popup.cpp +++ b/plugins/Modernb/modern_popup.cpp @@ -55,7 +55,7 @@ void ShowPopup(const char *title, const char *description, int type) POPUPDATAEX ppd;
int ret;
- if(!ServiceExists(MS_POPUP_ADDPOPUPEX) || !EnablePopups)
+ if (!ServiceExists(MS_POPUP_ADDPOPUPEX) || !EnablePopups)
{
return;
}
diff --git a/plugins/Modernb/modern_rowheight_funcs.cpp b/plugins/Modernb/modern_rowheight_funcs.cpp index 0518626b62..774f68531b 100644 --- a/plugins/Modernb/modern_rowheight_funcs.cpp +++ b/plugins/Modernb/modern_rowheight_funcs.cpp @@ -680,7 +680,7 @@ int RowHeights_GetRowHeight_worker(struct ClcData *dat, HWND hwnd, struct ClcCon }
// Checkbox size
- if((style&CLS_CHECKBOXES && contact->type==CLCIT_CONTACT) ||
+ if ((style&CLS_CHECKBOXES && contact->type==CLCIT_CONTACT) ||
(style&CLS_GROUPCHECKBOXES && contact->type==CLCIT_GROUP) ||
(contact->type==CLCIT_INFO && contact->flags&CLCIIF_CHECKBOX))
{
diff --git a/plugins/Modernb/modern_rowtemplateopt.cpp b/plugins/Modernb/modern_rowtemplateopt.cpp index 2fc93d5c1d..756382b0f8 100644 --- a/plugins/Modernb/modern_rowtemplateopt.cpp +++ b/plugins/Modernb/modern_rowtemplateopt.cpp @@ -544,9 +544,9 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
case IDC_ROWTREE:
- if( ((LPNMHDR)lParam)->code == NM_SETCURSOR )
+ if ( ((LPNMHDR)lParam)->code == NM_SETCURSOR )
rowOptShowSettings(hwndDlg);
- if( ((LPNMHDR)lParam)->code == NM_CLICK )
+ if ( ((LPNMHDR)lParam)->code == NM_CLICK )
RedrawWindow(hwndDlg,&da,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_UPDATENOW);
break;
diff --git a/plugins/Modernb/modern_skineditor.cpp b/plugins/Modernb/modern_skineditor.cpp index 0f3b95a9df..d98bf9728c 100644 --- a/plugins/Modernb/modern_skineditor.cpp +++ b/plugins/Modernb/modern_skineditor.cpp @@ -682,11 +682,11 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM // {
// DWORD tick=GetTickCount();
res=GetOpenFileNameA(&ofn);
-// if(!res)
+// if (!res)
// if (GetTickCount()-tick<100)
// {
// res=GetOpenFileNameA(&ofn);
-// if(!res) break;
+// if (!res) break;
// }
// else break;
//}
diff --git a/plugins/Modernb/modern_skinengine.cpp b/plugins/Modernb/modern_skinengine.cpp index 54a6c8011c..242f429892 100644 --- a/plugins/Modernb/modern_skinengine.cpp +++ b/plugins/Modernb/modern_skinengine.cpp @@ -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;
@@ -2962,7 +2962,7 @@ static BOOL ske_DrawTextEffect(BYTE* destPt,BYTE* maskPt, DWORD width, DWORD hei static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRect, UINT format, DWORD ARGBcolor)
{
- if( !( lpString && lpRect ) )
+ if ( !( lpString && lpRect ) )
{
DebugBreak();
return 0;
@@ -2982,7 +2982,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec BYTE redCf = ModernGetSettingByte(NULL,"ModernData","AlphaTextOutRed Correction", 77 );
BYTE greenCf = ModernGetSettingByte(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;
@@ -3168,7 +3168,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec pDestScanLine = bits + lineBytes;
pBufScanLine = bufbits + lineBytes;
- for( x = 2; x < width - 2; x++)
+ for ( x = 2; x < width - 2; x++)
{
pix = pDestScanLine + ( x<<2 );
bufpix = pBufScanLine + ( x<<2 );
@@ -3710,7 +3710,7 @@ static INT_PTR ske_Service_InvalidateFrameImage(WPARAM wParam, LPARAM lParam) GetClientRect(frm->hWnd,&r);
r2=CreateRectRgn(r.left,r.top,r.right,r.bottom);
}
- if(!frm->UpdateRgn)
+ if (!frm->UpdateRgn)
{
frm->UpdateRgn=CreateRectRgn(0,0,1,1);
CombineRgn(frm->UpdateRgn,r2,0,RGN_COPY);
diff --git a/plugins/Modernb/modern_skinopt.cpp b/plugins/Modernb/modern_skinopt.cpp index aac4aff2ba..adbbc6a895 100644 --- a/plugins/Modernb/modern_skinopt.cpp +++ b/plugins/Modernb/modern_skinopt.cpp @@ -233,11 +233,11 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara {
DWORD tick = GetTickCount( );
res = GetOpenFileName( &ofn );
- if( !res )
+ if ( !res )
if ( GetTickCount( )-tick<100 )
{
res = GetOpenFileName( &ofn );
- if( !res ) break;
+ if ( !res ) break;
}
else break;
}
@@ -374,7 +374,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara }
if ( !sd ) return 0;
- if( sd->File && !_tcschr( sd->File, _T('%') ) )
+ if ( sd->File && !_tcschr( sd->File, _T('%') ) )
{
GetPrivateProfileString( _T( "Skin_Description_Section" ), _T( "Author" ), TranslateT( "( unknown )" ), Author, SIZEOF( Author ), sd->File );
GetPrivateProfileString( _T( "Skin_Description_Section" ), _T( "URL" ), _T( "" ), URL, SIZEOF( URL ), sd->File );
diff --git a/plugins/Modernb/modern_skinselector.cpp b/plugins/Modernb/modern_skinselector.cpp index b7559fa440..aef06d5fb9 100644 --- a/plugins/Modernb/modern_skinselector.cpp +++ b/plugins/Modernb/modern_skinselector.cpp @@ -68,21 +68,21 @@ int SkinSelector_DeleteMask(MODERNMASK * mm) BOOL wildcmpi(TCHAR* name, TCHAR* mask)
{
TCHAR* last='\0';
- for(;; mask++, name++)
+ for (;; mask++, name++)
{
- if(*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) break;
- if(*name == '\0') return ((BOOL)!*mask);
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) break;
+ if (*name == '\0') return ((BOOL)!*mask);
}
- if(*mask != '*') return FALSE;
- for(;; mask++, name++)
+ if (*mask != '*') return FALSE;
+ for (;; mask++, name++)
{
while(*mask == '*')
{
last = mask++;
- if(*mask == '\0') return ((BOOL)!*mask); /* true */
+ 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 (*name == '\0') return ((BOOL)!*mask); /* *mask == EOS */
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name) ) name -= (size_t)(mask - last) - 1, mask = last;
}
}
@@ -90,21 +90,21 @@ BOOL wildcmpi(TCHAR* name, TCHAR* mask) BOOL wildcmpi(char * name, char * mask)
{
char * last='\0';
- for(;; mask++, name++)
+ for (;; mask++, name++)
{
- if(*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) break;
- if(*name == '\0') return ((BOOL)!*mask);
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) break;
+ if (*name == '\0') return ((BOOL)!*mask);
}
- if(*mask != '*') return FALSE;
- for(;; mask++, name++)
+ if (*mask != '*') return FALSE;
+ for (;; mask++, name++)
{
while(*mask == '*')
{
last = mask++;
- if(*mask == '\0') return ((BOOL)!*mask); /* true */
+ 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 (*name == '\0') return ((BOOL)!*mask); /* *mask == EOS */
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name) ) name -= (size_t)(mask - last) - 1, mask = last;
}
}
#endif
@@ -112,21 +112,21 @@ BOOL wildcmpi(char * name, char * mask) BOOL __inline wildcmp(const char * name, const char * mask, BYTE option)
{
const char * last='\0';
- for(;; mask++, name++)
+ for (;; mask++, name++)
{
- if(*mask != '?' && *mask != *name) break;
- if(*name == '\0') return ((BOOL)!*mask);
+ if (*mask != '?' && *mask != *name) break;
+ if (*name == '\0') return ((BOOL)!*mask);
}
- if(*mask != '*') return FALSE;
- for(;; mask++, name++)
+ if (*mask != '*') return FALSE;
+ for (;; mask++, name++)
{
while(*mask == '*')
{
last = mask++;
- if(*mask == '\0') return ((BOOL)!*mask); /* true */
+ 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 (*name == '\0') return ((BOOL)!*mask); /* *mask == EOS */
+ if (*mask != '?' && *mask != *name) name -= (size_t)(mask - last) - 1, mask = last;
}
}
diff --git a/plugins/Modernb/modern_statusbar.cpp b/plugins/Modernb/modern_statusbar.cpp index b3af74e802..5e7eb0bc3b 100644 --- a/plugins/Modernb/modern_statusbar.cpp +++ b/plugins/Modernb/modern_statusbar.cpp @@ -116,7 +116,7 @@ int LoadStatusBarData() DBVARIANT dbv;
g_StatusBarData.bkColour=sttGetColor("StatusBar","BkColour",CLCDEFAULT_BKCOLOUR);
if(ModernGetSettingByte(NULL,"StatusBar","UseBitmap",CLCDEFAULT_USEBITMAP)) {
- if(!ModernGetSettingString(NULL,"StatusBar","BkBitmap",&dbv)) {
+ if (!ModernGetSettingString(NULL,"StatusBar","BkBitmap",&dbv)) {
g_StatusBarData.hBmpBackground=(HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal);
ModernDBFreeVariant(&dbv);
}
diff --git a/plugins/Modernb/modern_tbbutton.cpp b/plugins/Modernb/modern_tbbutton.cpp index 74b2e9e3b0..8e4a146fa5 100644 --- a/plugins/Modernb/modern_tbbutton.cpp +++ b/plugins/Modernb/modern_tbbutton.cpp @@ -173,7 +173,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam lpSBData->pbState = 1;
InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
}
- if(!lpSBData->fSendOnDown)
+ if (!lpSBData->fSendOnDown)
SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKELONG(GetDlgCtrlID(hwndDlg), BN_CLICKED), (LPARAM) hwndDlg);
return 0;
}
@@ -380,7 +380,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam lpSBData->nStateId = PBS_NORMAL;
InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
}
- if(!lpSBData->fSendOnDown && lpSBData->fHotMark)
+ if (!lpSBData->fSendOnDown && lpSBData->fHotMark)
SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKELONG(GetDlgCtrlID(hwndDlg), BN_CLICKED), (LPARAM) hwndDlg);
lpSBData->fHotMark = FALSE;
break;
@@ -412,7 +412,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam }
else if ( inClient && lpSBData->nStateId == PBS_HOT && bPressed )
{
- if( lpSBData->fHotMark )
+ if ( lpSBData->fHotMark )
{
lpSBData->nStateId = PBS_PRESSED;
InvalidateParentRect(lpSBData->hWnd, NULL, TRUE);
@@ -524,7 +524,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam }
case BM_SETIMAGE:
{
- if(!lParam)
+ if (!lParam)
break;
if (wParam == IMAGE_ICON)
{
diff --git a/plugins/Modernb/modern_toolbar.cpp b/plugins/Modernb/modern_toolbar.cpp index 44cf94da05..2746162ee1 100644 --- a/plugins/Modernb/modern_toolbar.cpp +++ b/plugins/Modernb/modern_toolbar.cpp @@ -274,7 +274,7 @@ static int ehhToolBarBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam) DBVARIANT dbv;
tbdat.mtb_bkColour=sttGetColor("ToolBar","BkColour",CLCDEFAULT_BKCOLOUR);
if(ModernGetSettingByte(NULL,"ToolBar","UseBitmap",CLCDEFAULT_USEBITMAP)) {
- if(!ModernGetSettingString(NULL,"ToolBar","BkBitmap",&dbv)) {
+ if (!ModernGetSettingString(NULL,"ToolBar","BkBitmap",&dbv)) {
tbdat.mtb_hBmpBackground=(HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal);
ModernDBFreeVariant(&dbv);
}
@@ -1244,7 +1244,7 @@ static LRESULT CALLBACK ToolBar_OptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L }
case WM_MOUSEMOVE:
{
- if(!dragging) break;
+ if (!dragging) break;
{
TVHITTESTINFO hti;
hti.pt.x=(short)LOWORD(lParam);
@@ -1273,7 +1273,7 @@ static LRESULT CALLBACK ToolBar_OptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L break;
case WM_LBUTTONUP:
{
- if(!dragging) break;
+ if (!dragging) break;
TreeView_SetInsertMark(GetDlgItem(hwndDlg,IDC_BTNORDER),NULL,0);
dragging=0;
ReleaseCapture();
diff --git a/plugins/Modernb/modern_viewmodebar.cpp b/plugins/Modernb/modern_viewmodebar.cpp index 4cb22d8c28..0af4d6ba28 100644 --- a/plugins/Modernb/modern_viewmodebar.cpp +++ b/plugins/Modernb/modern_viewmodebar.cpp @@ -568,7 +568,7 @@ static void UpdateFilters() iLen = SendDlgItemMessageA(clvmHwnd, IDC_VIEWMODES, LB_GETTEXTLEN, clvm_curItem, 0);
- if( iLen == 0 )
+ if ( iLen == 0 )
return;
szTempBuf= (TCHAR *)mir_alloc((iLen + 1)*sizeof(TCHAR));
@@ -590,7 +590,7 @@ static void UpdateFilters() if(ModernGetSettingTString(NULL, CLVM_MODULE, szSetting, &dbv_gf))
goto cleanup;
mir_snprintf(szSetting, 128, "%c%s_OPT", 246, szBuf);
- if((opt = ModernGetSettingDword(NULL, CLVM_MODULE, szSetting, -1)) != -1)
+ if ((opt = ModernGetSettingDword(NULL, CLVM_MODULE, szSetting, -1)) != -1)
{
SendDlgItemMessage(clvmHwnd, IDC_AUTOCLEARSPIN, UDM_SETPOS, 0, MAKELONG(LOWORD(opt), 0));
}
@@ -650,7 +650,7 @@ static void UpdateFilters() int i;
for(i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
- if((1 << (i - ID_STATUS_OFFLINE)) & statusMask)
+ if ((1 << (i - ID_STATUS_OFFLINE)) & statusMask)
ListView_SetCheckState(hwndList, i - ID_STATUS_OFFLINE, TRUE)
else
ListView_SetCheckState(hwndList, i - ID_STATUS_OFFLINE, FALSE);
@@ -709,7 +709,7 @@ void DeleteViewMode( char * szName ) mir_snprintf(szSetting, 256, "%c%s_SSM", 246, szName);
ModernDeleteSetting(NULL, CLVM_MODULE, szSetting);
ModernDeleteSetting(NULL, CLVM_MODULE, szName);
- if(!strcmp(g_CluiData.current_viewmode, szName) && lstrlenA(szName) == lstrlenA(g_CluiData.current_viewmode))
+ if (!strcmp(g_CluiData.current_viewmode, szName) && lstrlenA(szName) == lstrlenA(g_CluiData.current_viewmode))
{
g_CluiData.bFilterEffective = 0;
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
@@ -1010,7 +1010,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
hItem = (HANDLE)SendDlgItemMessage(hwndDlg,IDC_CLIST,CLM_HITTEST,(WPARAM)&hitFlags,MAKELPARAM(nm->pt.x,nm->pt.y));
if(hItem==NULL) break;
- if(!(hitFlags&CLCHT_ONITEMEXTRA))
+ if (!(hitFlags&CLCHT_ONITEMEXTRA))
break;
iImage = SendDlgItemMessage(hwndDlg,IDC_CLIST,CLM_GETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(nm->iColumn,0));
if(iImage == nullImage)
@@ -1297,7 +1297,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break;
KillTimer(hwnd, wParam);
- if(!g_CluiData.old_viewmode[0])
+ if (!g_CluiData.old_viewmode[0])
SendMessage(hwnd, WM_COMMAND, IDC_RESETMODES, 0);
else
ApplyViewMode((const char *)g_CluiData.old_viewmode);
@@ -1356,7 +1356,7 @@ clvm_reset_command: case IDC_CONFIGUREMODES:
{
clvm_config_command:
- if(!g_ViewModeOptDlg)
+ if (!g_ViewModeOptDlg)
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_OPT_VIEWMODES), 0, DlgProcViewModesSetup, 0);
break;
}
@@ -1428,7 +1428,7 @@ static int ehhViewModeBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam) DBVARIANT dbv;
view_mode.bkColour=sttGetColor("ViewMode","BkColour",CLCDEFAULT_BKCOLOUR);
if(ModernGetSettingByte(NULL,"ViewMode","UseBitmap",CLCDEFAULT_USEBITMAP)) {
- if(!ModernGetSettingString(NULL,"ViewMode","BkBitmap",&dbv)) {
+ if (!ModernGetSettingString(NULL,"ViewMode","BkBitmap",&dbv)) {
view_mode.hBmpBackground=(HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal);
ModernDBFreeVariant(&dbv);
}
@@ -1534,7 +1534,7 @@ void ApplyViewMode(const char *Name, bool onlySelector ) if ( !onlySelector )
{
mir_snprintf(szSetting, 256, "%c%s_PF", 246, name);
- if(!ModernGetSettingString(NULL, CLVM_MODULE, szSetting, &dbv)) {
+ if (!ModernGetSettingString(NULL, CLVM_MODULE, szSetting, &dbv)) {
if(lstrlenA(dbv.pszVal) >= 2)
{
strncpy(g_CluiData.protoFilter, dbv.pszVal, SIZEOF(g_CluiData.protoFilter));
@@ -1544,7 +1544,7 @@ void ApplyViewMode(const char *Name, bool onlySelector ) mir_free(dbv.pszVal);
}
mir_snprintf(szSetting, 256, "%c%s_GF", 246, name);
- if(!ModernGetSettingTString(NULL, CLVM_MODULE, szSetting, &dbv))
+ if (!ModernGetSettingTString(NULL, CLVM_MODULE, szSetting, &dbv))
{
if(lstrlen(dbv.ptszVal) >= 2)
{
@@ -1566,7 +1566,7 @@ void ApplyViewMode(const char *Name, bool onlySelector ) /*
mir_snprintf(szSetting, 256, "%c%s_VA", 246, name);
- if(!DBGetContactSetting(NULL, CLVM_MODULE, szSetting, &dbv)) {
+ if (!DBGetContactSetting(NULL, CLVM_MODULE, szSetting, &dbv)) {
strncpy(g_CluiData.varFilter, dbv.pszVal, sizeof(g_CluiData.varFilter));
g_CluiData.varFilter[sizeof(g_CluiData.varFilter) - 1] = 0;
if(lstrlenA(g_CluiData.varFilter) > 10 && ServiceExists(MS_VARS_FORMATSTRING))
@@ -1585,7 +1585,7 @@ void ApplyViewMode(const char *Name, bool onlySelector ) if(szProto) {
id = (char*) CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if(id) {
- if(!DBGetContactSetting(hContact, szProto, id, &dbv)) {
+ if (!DBGetContactSetting(hContact, szProto, id, &dbv)) {
if(dbv.type == DBVT_ASCIIZ) {
mir_snprintf(UIN, 256, "<%s:%s>", szProto, dbv.pszVal);
}
|