diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-10 19:12:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-10 19:12:33 +0000 |
commit | 7334ecff1581f0294e6fa7f594f828f85d45abb5 (patch) | |
tree | 5d16997f326a1d6ad0e3921c5ce9623817d55f9a /plugins/Clist_modern | |
parent | 9242a80a84fa5c96dbadec9594177875aeeec1ac (diff) |
- fix for View mode frame;
- many unneeded spaces removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@893 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
29 files changed, 405 insertions, 442 deletions
diff --git a/plugins/Clist_modern/hdr/MString.h b/plugins/Clist_modern/hdr/MString.h index 28840fd84b..497f074e5d 100644 --- a/plugins/Clist_modern/hdr/MString.h +++ b/plugins/Clist_modern/hdr/MString.h @@ -115,7 +115,7 @@ public: CMSimpleStringT(PCXSTR pszSrc)
{
int nLength = StringLength( pszSrc );
- CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pData = Allocate( nLength, sizeof( XCHAR ));
if (pData != NULL)
{
Attach( pData );
@@ -125,7 +125,7 @@ public: }
CMSimpleStringT(const XCHAR* pchSrc, int nLength)
{
- CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
+ CMStringData* pData = Allocate( nLength, sizeof( XCHAR ));
if ( pData != NULL )
{
Attach( pData );
@@ -150,8 +150,8 @@ public: CMStringData* pOldData = GetData();
if ( pSrcData != pOldData)
{
- if ( pOldData->IsLocked() )
- SetString( strSrc.GetString(), strSrc.GetLength() );
+ if ( pOldData->IsLocked())
+ SetString( strSrc.GetString(), strSrc.GetLength());
else
{
CMStringData* pNewData = CloneData( pSrcData );
@@ -218,7 +218,7 @@ public: void Append( PCXSTR pszSrc )
{
- Append( pszSrc, StringLength( pszSrc ) );
+ Append( pszSrc, StringLength( pszSrc ));
}
void Append( PCXSTR pszSrc, int nLength )
{
@@ -257,7 +257,7 @@ public: }
void Append( const CMSimpleStringT& strSrc )
{
- Append( strSrc.GetString(), strSrc.GetLength() );
+ Append( strSrc.GetString(), strSrc.GetLength());
}
void Empty()
{
@@ -265,7 +265,7 @@ public: if ( pOldData->nDataLength == 0 )
return;
- if ( pOldData->IsLocked() )
+ if ( pOldData->IsLocked())
{
// Don't reallocate a locked buffer that's shrinking
SetLength( 0 );
@@ -284,15 +284,15 @@ public: 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 ) );
+ CMStringData* pNewData = Allocate( nLength, sizeof( XCHAR ));
if ( pNewData == NULL ) {
SetLength( nLength );
return;
}
- CopyChars( PXSTR( pNewData->data() ), nLength, PCXSTR( pOldData->data() ), nLength );
+ CopyChars( PXSTR( pNewData->data()), nLength, PCXSTR( pOldData->data()), nLength );
pOldData->Release();
Attach( pNewData );
@@ -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
@@ -389,11 +389,11 @@ public: }
void SetString( PCXSTR pszSrc )
{
- SetString( pszSrc, StringLength( pszSrc ) );
+ SetString( pszSrc, StringLength( pszSrc ));
}
void assign( PCXSTR pszSrc )
{
- SetString( pszSrc, StringLength( pszSrc ) );
+ SetString( pszSrc, StringLength( pszSrc ));
}
void SetString( PCXSTR pszSrc, int nLength )
{
@@ -425,7 +425,7 @@ public: {
CMSimpleStringT s;
- Concatenate( s, str1, str1.GetLength(), str2, str2.GetLength() );
+ Concatenate( s, str1, str1.GetLength(), str2, str2.GetLength());
return s;
}
@@ -434,7 +434,7 @@ public: {
CMSimpleStringT s;
- Concatenate( s, str1, str1.GetLength(), psz2, StringLength( psz2 ) );
+ Concatenate( s, str1, str1.GetLength(), psz2, StringLength( psz2 ));
return s;
}
@@ -443,7 +443,7 @@ public: {
CMSimpleStringT s;
- Concatenate( s, psz1, StringLength( psz1 ), str2, str2.GetLength() );
+ Concatenate( s, psz1, StringLength( psz1 ), str2, str2.GetLength());
return s;
}
@@ -531,7 +531,7 @@ private: if (pNewData != NULL)
{
int nCharsToCopy = ((nOldLength < nLength) ? nOldLength : nLength)+1; // Copy '\0'
- CopyChars( PXSTR( pNewData->data() ), nCharsToCopy, PCXSTR( pOldData->data() ), nCharsToCopy );
+ CopyChars( PXSTR( pNewData->data()), nCharsToCopy, PCXSTR( pOldData->data()), nCharsToCopy );
pNewData->nDataLength = nOldLength;
pOldData->Release();
Attach(pNewData);
@@ -582,7 +582,7 @@ private: if ( pOldData->nAllocLength >= nLength || nLength <= 0)
return;
- CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ) );
+ CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ));
if ( pNewData != NULL )
Attach( pNewData );
}
@@ -680,19 +680,19 @@ public: static int __stdcall StringSpanIncluding( LPCSTR pszBlock, LPCSTR pszSet )
{
- return (int)_mbsspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ) );
+ return (int)_mbsspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ));
}
static int __stdcall StringSpanExcluding( LPCSTR pszBlock, LPCSTR pszSet )
{
- return (int)_mbscspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ) );
+ return (int)_mbscspn( reinterpret_cast< const unsigned char* >( pszBlock ), reinterpret_cast< const unsigned char* >( pszSet ));
}
static LPSTR __stdcall StringUppercase( LPSTR psz )
{
#pragma warning (push)
#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >( _mbsupr( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbsupr( reinterpret_cast< unsigned char* >( psz )) );
#pragma warning (pop)
}
@@ -700,7 +700,7 @@ public: {
#pragma warning (push)
#pragma warning(disable : 4996)
- return reinterpret_cast< LPSTR >( _mbslwr( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbslwr( reinterpret_cast< unsigned char* >( psz )) );
#pragma warning (pop)
}
@@ -726,7 +726,7 @@ public: static LPSTR __stdcall StringReverse( LPSTR psz )
{
- return reinterpret_cast< LPSTR >( _mbsrev( reinterpret_cast< unsigned char* >( psz ) ) );
+ return reinterpret_cast< LPSTR >( _mbsrev( reinterpret_cast< unsigned char* >( psz )) );
}
static int __stdcall GetFormattedLength( LPCSTR pszFormat, va_list args );
@@ -745,7 +745,7 @@ public: static int __stdcall GetBaseTypeLength( LPCSTR pszSrc )
{
// Returns required buffer length in XCHARs
- return int( strlen( pszSrc ) );
+ return int( strlen( pszSrc ));
}
static int __stdcall GetBaseTypeLength( LPCSTR pszSrc, int nLength )
@@ -772,7 +772,7 @@ public: if (nSrcLength == -1) { nSrcLength=1 + GetBaseTypeLength(pszSrc); }
// nLen is in XCHARs
memcpy_s( pszDest, nDestLength*sizeof( char ),
- pszSrc, nSrcLength*sizeof( char ) );
+ pszSrc, nSrcLength*sizeof( char ));
}
static void __stdcall ConvertToBaseType( LPSTR pszDest, int nDestLength, LPCWSTR pszSrc, int nSrcLength = -1)
@@ -839,13 +839,13 @@ public: static int __stdcall SafeStringLen( LPCSTR psz )
{
// returns length in bytes
- return (psz != NULL) ? int( strlen( psz ) ) : 0;
+ return (psz != NULL) ? int( strlen( psz )) : 0;
}
static int __stdcall SafeStringLen( LPCWSTR psz )
{
// returns length in wchar_ts
- return (psz != NULL) ? int( wcslen( psz ) ) : 0;
+ return (psz != NULL) ? int( wcslen( psz )) : 0;
}
static int __stdcall GetCharLen( const wchar_t* pch )
@@ -857,7 +857,7 @@ public: static int __stdcall GetCharLen( const char* pch )
{
// returns char length
- return int( _mbclen( reinterpret_cast< const unsigned char* >( pch ) ) );
+ return int( _mbclen( reinterpret_cast< const unsigned char* >( pch )) );
}
static DWORD __stdcall GetEnvironmentVariable( LPCSTR pszVar, LPSTR pszBuffer, DWORD dwSize )
@@ -883,12 +883,12 @@ public: static int __stdcall IsDigit( wchar_t ch )
{
- return iswdigit( static_cast<unsigned short>(ch) );
+ return iswdigit( static_cast<unsigned short>(ch));
}
static int __stdcall IsSpace( wchar_t ch )
{
- return iswspace( static_cast<unsigned short>(ch) );
+ return iswspace( static_cast<unsigned short>(ch));
}
static int __stdcall StringCompare( LPCWSTR pszA, LPCWSTR pszB )
@@ -1072,7 +1072,7 @@ public: static int __stdcall GetCharLen( const char* pch )
{
// returns char length
- return (int)( _mbclen( reinterpret_cast< const unsigned char* >( pch ) ) );
+ return (int)( _mbclen( reinterpret_cast< const unsigned char* >( pch )) );
}
static DWORD __stdcall GetEnvironmentVariable( LPCWSTR pszVar, LPWSTR pszBuffer, DWORD dwSize )
@@ -1366,7 +1366,7 @@ public: int nXCHARsToCopy = nLength-(iIndex+nCount)+1;
PXSTR pszBuffer = this->GetBuffer();
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex, nXCHARsToCopy*sizeof( XCHAR ), pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex, nXCHARsToCopy*sizeof( XCHAR ), pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ));
#else
memmove( pszBuffer+iIndex, pszBuffer+iIndex+nCount, nXCHARsToCopy*sizeof( XCHAR ));
#endif
@@ -1382,7 +1382,7 @@ public: if ( iIndex < 0 )
iIndex = 0;
- if ( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength())
iIndex = this->GetLength();
int nNewLength = this->GetLength()+1;
@@ -1391,9 +1391,9 @@ public: // move existing bytes down
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex+1, (nNewLength-iIndex)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex+1, (nNewLength-iIndex)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ));
#else
- memmove( pszBuffer+iIndex+1, pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ) );
+ memmove( pszBuffer+iIndex+1, pszBuffer+iIndex, (nNewLength-iIndex)*sizeof( XCHAR ));
#endif
pszBuffer[iIndex] = ch;
@@ -1407,7 +1407,7 @@ public: if ( iIndex < 0 )
iIndex = 0;
- if ( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength())
{
iIndex = this->GetLength();
}
@@ -1422,10 +1422,10 @@ public: PXSTR pszBuffer = this->GetBuffer( nNewLength );
// move existing bytes down
#if _MSC_VER >= 1400
- memmove_s( pszBuffer+iIndex+nInsertLength, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ) );
+ memmove_s( pszBuffer+iIndex+nInsertLength, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ), pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ));
memcpy_s( pszBuffer+iIndex, nInsertLength*sizeof( XCHAR ), psz, nInsertLength*sizeof( XCHAR ));
#else
- memmove( pszBuffer+iIndex+nInsertLength, pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ) );
+ memmove( pszBuffer+iIndex+nInsertLength, pszBuffer+iIndex, (nNewLength-iIndex-nInsertLength+1)*sizeof( XCHAR ));
memcpy( pszBuffer+iIndex, psz, nInsertLength*sizeof( XCHAR ));
#endif
this->ReleaseBufferSetLength( nNewLength );
@@ -1444,7 +1444,7 @@ public: {
// otherwise modify each character that matches in the string
bool bCopied = false;
- PXSTR pszBuffer = const_cast< PXSTR >( this->GetString() ); // We don't actually write to pszBuffer until we've called GetBuffer().
+ PXSTR pszBuffer = const_cast< PXSTR >( this->GetString()); // We don't actually write to pszBuffer until we've called GetBuffer().
int nLength = this->GetLength();
int iChar = 0;
@@ -1492,7 +1492,7 @@ public: while( pszStart < pszEnd )
{
PCXSTR pszTarget;
- while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld ) ) != NULL)
+ while((pszTarget = StringTraits::StringFindString( pszStart, pszOld )) != NULL)
{
nCount++;
pszStart = pszTarget+nSourceLen;
@@ -1509,7 +1509,7 @@ public: int nOldLength = this->GetLength();
int nNewLength = nOldLength+(nReplacementLen-nSourceLen)*nCount;
- PXSTR pszBuffer = this->GetBuffer( __max( nNewLength, nOldLength ) );
+ PXSTR pszBuffer = this->GetBuffer( __max( nNewLength, nOldLength ));
PXSTR pszStart = pszBuffer;
PXSTR pszEnd = pszStart+nOldLength;
@@ -1518,13 +1518,13 @@ public: while( pszStart < pszEnd )
{
PXSTR pszTarget;
- while( (pszTarget = StringTraits::StringFindString( pszStart, pszOld ) ) != NULL )
+ while((pszTarget = StringTraits::StringFindString( pszStart, pszOld )) != NULL )
{
int nBalance = nOldLength-int(pszTarget-pszBuffer+nSourceLen);
memmove_s( pszTarget+nReplacementLen, nBalance*sizeof( XCHAR ),
- pszTarget+nSourceLen, nBalance*sizeof( XCHAR ) );
+ pszTarget+nSourceLen, nBalance*sizeof( XCHAR ));
memcpy_s( pszTarget, nReplacementLen*sizeof( XCHAR ),
- pszNew, nReplacementLen*sizeof( XCHAR ) );
+ pszNew, nReplacementLen*sizeof( XCHAR ));
pszStart = pszTarget+nReplacementLen;
pszTarget[nReplacementLen+nBalance] = 0;
nOldLength += (nReplacementLen-nSourceLen);
@@ -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 );
@@ -1588,7 +1588,7 @@ public: {
int nIncluding = StringTraits::StringSpanIncluding( pszPlace, pszTokens );
- if ( (pszPlace+nIncluding) < pszEnd )
+ if ((pszPlace+nIncluding) < pszEnd )
{
pszPlace += nIncluding;
int nExcluding = StringTraits::StringSpanExcluding( pszPlace, pszTokens );
@@ -1711,7 +1711,7 @@ public: while( *psz != 0 )
{
- if ( StringTraits::IsSpace( *psz ) )
+ if ( StringTraits::IsSpace( *psz ))
{
if ( pszLast == NULL )
pszLast = psz;
@@ -1726,7 +1726,7 @@ public: if ( pszLast != NULL )
{
// truncate at trailing space start
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1741,20 +1741,20 @@ public: PCXSTR psz = this->GetString();
- while( StringTraits::IsSpace( *psz ) )
+ while( StringTraits::IsSpace( *psz ))
{
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1809,7 +1809,7 @@ public: if ( pszLast != NULL )
{
// truncate at left-most matching character
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -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;
}
@@ -1850,7 +1850,7 @@ public: if ( pszLast != NULL )
{
// truncate at left-most matching character
- int iLast = int( pszLast-this->GetString() );
+ int iLast = int( pszLast-this->GetString());
this->Truncate( iLast );
}
@@ -1868,15 +1868,15 @@ public: psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -1887,26 +1887,26 @@ 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;
}
PCXSTR psz = this->GetString();
- while( (*psz != 0) && (StringTraits::StringFindChar( pszTargets, *psz ) != NULL) )
+ while((*psz != 0) && (StringTraits::StringFindChar( pszTargets, *psz ) != NULL))
{
psz = StringTraits::CharNext( psz );
}
- if ( psz != this->GetString() )
+ if ( psz != this->GetString())
{
// fix up data and length
- int iFirst = int( psz-this->GetString() );
- PXSTR pszBuffer = this->GetBuffer( this->GetLength() );
+ int iFirst = int( psz-this->GetString());
+ PXSTR pszBuffer = this->GetBuffer( this->GetLength());
psz = pszBuffer+iFirst;
int nDataLength = this->GetLength()-iFirst;
memmove_s( pszBuffer, (this->GetLength()+1)*sizeof( XCHAR ),
- psz, (nDataLength+1)*sizeof( XCHAR ) );
+ psz, (nDataLength+1)*sizeof( XCHAR ));
this->ReleaseBufferSetLength( nDataLength );
}
@@ -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 );
@@ -2034,13 +2034,13 @@ public: // Allocate a BSTR containing a copy of the string
BSTR AllocSysString() const
{
- BSTR bstrResult = StringTraits::AllocSysString( this->GetString(), this->GetLength() );
+ BSTR bstrResult = StringTraits::AllocSysString( this->GetString(), this->GetLength());
return bstrResult;
}
BSTR SetSysString( BSTR* pbstr ) const
{
- StringTraits::ReAllocSysString( this->GetString(), pbstr, this->GetLength() );
+ StringTraits::ReAllocSysString( this->GetString(), pbstr, this->GetLength());
return *pbstr;
}
@@ -2079,7 +2079,7 @@ public: {
CMStringT strResult;
- Concatenate( strResult, str1, str1.GetLength(), str2, str2.GetLength() );
+ Concatenate( strResult, str1, str1.GetLength(), str2, str2.GetLength());
return strResult;
}
@@ -2088,7 +2088,7 @@ public: {
CMStringT strResult;
- Concatenate( strResult, str1, str1.GetLength(), psz2, StringLength( psz2 ) );
+ Concatenate( strResult, str1, str1.GetLength(), psz2, StringLength( psz2 ));
return strResult;
}
@@ -2097,7 +2097,7 @@ public: {
CMStringT strResult;
- Concatenate( strResult, psz1, StringLength( psz1 ), str2, str2.GetLength() );
+ Concatenate( strResult, psz1, StringLength( psz1 ), str2, str2.GetLength());
return strResult;
}
@@ -2127,7 +2127,7 @@ public: CMStringT strResult;
XCHAR chTemp = XCHAR( ch1 );
- Concatenate( strResult, &chTemp, 1, str2, str2.GetLength() );
+ Concatenate( strResult, &chTemp, 1, str2, str2.GetLength());
return strResult;
}
@@ -2137,7 +2137,7 @@ public: CMStringT strResult;
XCHAR chTemp = XCHAR( ch1 );
- Concatenate( strResult, &chTemp, 1, str2, str2.GetLength() );
+ Concatenate( strResult, &chTemp, 1, str2, str2.GetLength());
return strResult;
}
diff --git a/plugins/Clist_modern/hdr/modern_callproc.h b/plugins/Clist_modern/hdr/modern_callproc.h index e3c1df900d..19cfb883b6 100644 --- a/plugins/Clist_modern/hdr/modern_callproc.h +++ b/plugins/Clist_modern/hdr/modern_callproc.h @@ -17,7 +17,7 @@ template< class R > class _callParams0 : public __baseCall {
public:
R(*_proc)();
- _callParams0( R (*proc)() ) : _proc(proc){};
+ _callParams0( R (*proc)()) : _proc(proc){};
int __DoCallStorageProc() { return (int)_proc(); }
};
@@ -25,7 +25,7 @@ template<> class _callParams0<void> : public __baseCall {
public:
void(*_proc)();
- _callParams0( void (*proc)() ) : _proc(proc){};
+ _callParams0( void (*proc)()) : _proc(proc){};
int __DoCallStorageProc() { _proc(); return 0; }
};
@@ -108,7 +108,7 @@ template < class R, class A, class B, class C > R __DoCall( R(*__proc)( A, B, C };
-template < class R > R sync( R(*_proc)() )
+template < class R > R sync( R(*_proc)())
{ return __DoCall(_proc, SYNC); };
template < class R, class A > R sync( R(*_proc)( A ), A a )
{ return __DoCall(_proc, a, SYNC); };
@@ -116,7 +116,7 @@ template < class R, class A, class B > R sync( R(*_proc)( A,B), A a, B b ) { return __DoCall(_proc, a, b, SYNC); };
template < class R, class A, class B, class C > R sync( R(*_proc)( A,B,C ), A a, B b, C c)
{ return __DoCall(_proc, a, b, c, SYNC); };
-template < class R > int async( R(*_proc)() )
+template < class R > int async( R(*_proc)())
{ return __DoCall(_proc, ASYNC); };
template < class R, class A > R async( R(*_proc)( A ), A a )
{ return __DoCall(_proc, a, ASYNC); };
diff --git a/plugins/Clist_modern/hdr/modern_clui.h b/plugins/Clist_modern/hdr/modern_clui.h index 8f9c82797e..eb353f4609 100644 --- a/plugins/Clist_modern/hdr/modern_clui.h +++ b/plugins/Clist_modern/hdr/modern_clui.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "windowsX.h"
#define HANDLE_MESSAGE( _message, _fn) \
- case (_message): return This->_fn( (_message), (wParam), (lParam) )
+ case (_message): return This->_fn((_message), (wParam), (lParam))
class CLUI
{
diff --git a/plugins/Clist_modern/hdr/modern_commonheaders.h b/plugins/Clist_modern/hdr/modern_commonheaders.h index efb7b572a9..922e0b0d90 100644 --- a/plugins/Clist_modern/hdr/modern_commonheaders.h +++ b/plugins/Clist_modern/hdr/modern_commonheaders.h @@ -289,12 +289,8 @@ enum #define MirandaLoading() ((g_CluiData.bSTATE<STATE_NORMAL))
#define MirandaExiting() ((g_CluiData.bSTATE>STATE_NORMAL))
-
-
char * strdupn(const char * src, int len);
-#define SKINBUTTONCLASS _T("MirandaSkinButtonClass")
-
#define SORTBY_NAME 0
#define SORTBY_STATUS 1
#define SORTBY_LASTMSG 2
diff --git a/plugins/Clist_modern/hdr/modern_sync.h b/plugins/Clist_modern/hdr/modern_sync.h index 34686470e5..334d4696a7 100644 --- a/plugins/Clist_modern/hdr/modern_sync.h +++ b/plugins/Clist_modern/hdr/modern_sync.h @@ -40,7 +40,7 @@ public: template< class RET, class Ap, class Bp, class Cp, class A, class B, class C> RET Sync( RET(*proc)(Ap, Bp, Cp), A a, B b, C c )
{
PARAMS3<RET, Ap, Bp, Cp> params( proc, a, b, c );
- DoCall( (PSYNCCALLBACKPROC) PARAMS3<RET, Ap, Bp, Cp>::DoSyncCall, 0, (LPARAM) ¶ms );
+ DoCall((PSYNCCALLBACKPROC) PARAMS3<RET, Ap, Bp, Cp>::DoSyncCall, 0, (LPARAM) ¶ms );
return params.GetResult();
};
@@ -66,7 +66,7 @@ public: template< class RET, class Ap, class Bp, class A, class B> RET Sync( RET(*proc)(Ap, Bp), A a, B b )
{
PARAMS2<RET, Ap, Bp> params( proc, a, b );
- DoCall( (PSYNCCALLBACKPROC) PARAMS2<RET, Ap, Bp>::DoSyncCall, 0, (LPARAM) ¶ms );
+ DoCall((PSYNCCALLBACKPROC) PARAMS2<RET, Ap, Bp>::DoSyncCall, 0, (LPARAM) ¶ms );
return params.GetResult();
};
@@ -91,7 +91,7 @@ public: template< class RET, class Ap, class A> RET Sync( RET(*proc)(Ap), A a )
{
PARAMS1<RET, Ap> params( proc, a );
- DoCall( (PSYNCCALLBACKPROC) PARAMS1<RET, Ap>::DoSyncCall, 0, (LPARAM) ¶ms );
+ DoCall((PSYNCCALLBACKPROC) PARAMS1<RET, Ap>::DoSyncCall, 0, (LPARAM) ¶ms );
return params.GetResult();
};
diff --git a/plugins/Clist_modern/hdr/modern_tstring.h b/plugins/Clist_modern/hdr/modern_tstring.h index 5bd558c54d..17fc9cf50c 100644 --- a/plugins/Clist_modern/hdr/modern_tstring.h +++ b/plugins/Clist_modern/hdr/modern_tstring.h @@ -21,7 +21,7 @@ public: mbstring( const wstring& tStr ) { *this = tStr.c_str(); }
- mbstring& operator=( const wstring& tStr ) { this->operator =( tStr.c_str() ); return *this; }
+ mbstring& operator=( const wstring& tStr ) { this->operator =( tStr.c_str()); return *this; }
mbstring( const wchar_t * wChar );
mbstring& operator=( const astring& aStr );
@@ -46,7 +46,7 @@ public: tstring& operator=( const astring& aStr );
tstring& operator=( const mbstring& uStr );
operator astring();
- operator mbstring() { return mbstring( this->c_str() ); }
+ operator mbstring() { return mbstring( this->c_str()); }
};
#else
diff --git a/plugins/Clist_modern/init.cpp b/plugins/Clist_modern/init.cpp index 9a20924a46..3faaa7e1dd 100644 --- a/plugins/Clist_modern/init.cpp +++ b/plugins/Clist_modern/init.cpp @@ -153,7 +153,7 @@ static HRESULT SubclassClistInterface() {
// get the contact list interface
pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)g_hInst);
- if ( (INT_PTR)pcli == CALLSERVICE_NOTFOUND || pcli->version < 6 )
+ if ((INT_PTR)pcli == CALLSERVICE_NOTFOUND || pcli->version < 6 )
{
MessageBoxA( NULL, "This version of plugin requires Miranda IM " MINIMAL_COREVERSION_STR " or later", "Fatal error", MB_OK );
return TRUE;
diff --git a/plugins/Clist_modern/modern_aniavatars.cpp b/plugins/Clist_modern/modern_aniavatars.cpp index 6e9acf04d5..88611fa1d0 100644 --- a/plugins/Clist_modern/modern_aniavatars.cpp +++ b/plugins/Clist_modern/modern_aniavatars.cpp @@ -195,7 +195,7 @@ int AniAva_InitModule() memset(&AniAva,0,sizeof(AniAva));
if (g_CluiData.fGDIPlusFail) return 0;
if ( !( db_get_b(NULL,"CList","AvatarsAnimated",(ServiceExists(MS_AV_GETAVATARBITMAP) && !g_CluiData.fGDIPlusFail))
- && db_get_b(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT)) ) return 0;
+ && db_get_b(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT))) return 0;
{
WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(wc));
@@ -882,7 +882,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /*= NULL DeleteObject(hRgn);
}
- if ( ( AniAva.bFlags & AAO_HAS_OVERLAY )
+ if (( AniAva.bFlags & AAO_HAS_OVERLAY )
&& ( dat->overlayIconIdx != -1 )
&& ( AniAva.overlayIconImageList ))
{
@@ -1000,7 +1000,7 @@ static void _AniAva_LoadOptions() AniAva.bFlags = (db_get_b(NULL,"CList","AvatarsDrawBorders",SETTINGS_AVATARDRAWBORDER_DEFAULT)? AAO_HAS_BORDER :0) |
(db_get_b(NULL,"CList","AvatarsRoundCorners",SETTINGS_AVATARROUNDCORNERS_DEFAULT)? AAO_ROUND_CORNERS :0) |
(db_get_b(NULL,"CList","AvatarsDrawOverlay",SETTINGS_AVATARDRAWOVERLAY_DEFAULT)? AAO_HAS_OVERLAY :0) |
- ( (0) ? AAO_OPAQUE :0);
+ ((0) ? AAO_OPAQUE :0);
if (AniAva.bFlags & AAO_HAS_BORDER)
AniAva.borderColor = (COLORREF)db_get_dw(NULL,"CList","AvatarsBorderColor",SETTINGS_AVATARBORDERCOLOR_DEFAULT);;
diff --git a/plugins/Clist_modern/modern_clc.cpp b/plugins/Clist_modern/modern_clc.cpp index d1d0afed53..57d4da274b 100644 --- a/plugins/Clist_modern/modern_clc.cpp +++ b/plugins/Clist_modern/modern_clc.cpp @@ -515,7 +515,7 @@ static LRESULT clcOnSize(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam hBmpMask = CreateBitmap(rc.right, rc.bottom, 1, 1, NULL);
hdcMem = CreateCompatibleDC(hdc);
hoBmp = (HBITMAP) SelectObject(hdcMem, hBmp);
- hBrush = CreateSolidBrush( ( dat->useWindowsColours || dat->force_in_dialog ) ? GetSysColor(COLOR_HIGHLIGHT) : dat->selBkColour);
+ hBrush = CreateSolidBrush(( dat->useWindowsColours || dat->force_in_dialog ) ? GetSysColor(COLOR_HIGHLIGHT) : dat->selBkColour);
FillRect(hdcMem, &rc, hBrush);
DeleteObject(hBrush);
@@ -1650,7 +1650,7 @@ static LRESULT clcOnIntmIconChanged(struct ClcData *dat, HWND hwnd, UINT msg, WP nHiddenStatus = CLVM_GetContactHiddenStatus((HANDLE)wParam, szProto, dat);
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- bool isVisiblebyFilter = ( ( ( style & CLS_SHOWHIDDEN ) && nHiddenStatus != -1 ) || !nHiddenStatus );
+ bool isVisiblebyFilter = (( ( style & CLS_SHOWHIDDEN ) && nHiddenStatus != -1 ) || !nHiddenStatus );
bool ifVisibleByClui = !pcli->pfnIsHiddenMode( dat, status );
bool isVisible = g_CluiData.bFilterEffective&CLVM_FILTER_STATUS ? TRUE : ifVisibleByClui;
bool isIconChanged = CallService(MS_CLIST_GETCONTACTICON, wParam, 0) != LOWORD(lParam);
diff --git a/plugins/Clist_modern/modern_clcitems.cpp b/plugins/Clist_modern/modern_clcitems.cpp index 4cde320858..7a29b5e82a 100644 --- a/plugins/Clist_modern/modern_clcitems.cpp +++ b/plugins/Clist_modern/modern_clcitems.cpp @@ -401,7 +401,7 @@ void cliRebuildEntireList(HWND hwnd,struct ClcData *dat) cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact);
nHiddenStatus = CLVM_GetContactHiddenStatus(hContact, NULL, dat);
- if ( (style&CLS_SHOWHIDDEN && nHiddenStatus != -1) || !nHiddenStatus)
+ if ((style&CLS_SHOWHIDDEN && nHiddenStatus != -1) || !nHiddenStatus)
{
if (lstrlen(cacheEntry->tszGroup) == 0)
diff --git a/plugins/Clist_modern/modern_clcpaint.cpp b/plugins/Clist_modern/modern_clcpaint.cpp index 7093992d54..20839cb12c 100644 --- a/plugins/Clist_modern/modern_clcpaint.cpp +++ b/plugins/Clist_modern/modern_clcpaint.cpp @@ -177,7 +177,7 @@ int CLCPaint::GetBasicFontID( struct ClcContact * contact ) case CLCIT_CONTACT:
if ( contact->flags & CONTACTF_NOTONLIST )
return FONTID_NOTONLIST;
- else if ( ( contact->flags&CONTACTF_INVISTO
+ else if (( contact->flags&CONTACTF_INVISTO
&& _GetRealStatus( contact, ID_STATUS_OFFLINE ) != ID_STATUS_INVISIBLE )
||
( contact->flags&CONTACTF_VISTO
@@ -280,8 +280,8 @@ void CLCPaint::AddParam( MODERNMASK * mpModernMask, DWORD dwParamHash, const ch }
BOOL CLCPaint::CheckMiniMode( struct ClcData *dat, BOOL selected, BOOL hot )
{
- if ( ( !dat->bCompactMode /* not mini*/ )
- || ( ( dat->bCompactMode&0x01 ) && selected /*mini on selected*/ )
+ if (( !dat->bCompactMode /* not mini*/ )
+ || (( dat->bCompactMode&0x01 ) && selected /*mini on selected*/ )
/* || ( TRUE && hot )*/ ) return FALSE;
return TRUE;
}
@@ -429,7 +429,7 @@ RECT CLCPaint::_GetRectangle( struct ClcData *dat, RECT *row_rc, RECT *free_row }
else
{
- rc.left = max( rc.left + horizontal_space, rc.right - width_tmp ) + ( ( width_tmp - real_width ) >> 1 );
+ rc.left = max( rc.left + horizontal_space, rc.right - width_tmp ) + (( width_tmp - real_width ) >> 1 );
rc.right = min( rc.left + real_width, rc.right );
rc.top += max( 0, ( rc.bottom - rc.top - height ) >> 1 );
rc.bottom = min( rc.top + height, rc.bottom );
@@ -530,7 +530,7 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT * free_rc, SIZE * text_size, T text_rc.top += ( row_height - fac_height ) >> 1;
ske_DrawIconEx( hdcMem, text_rc.left, text_rc.top, piece->smiley,
- fac_width, fac_height, 0, NULL, DI_NORMAL|( ( factor < 1 )?128:0 )); //TO DO enchance drawing quality
+ fac_width, fac_height, 0, NULL, DI_NORMAL|(( factor < 1 )?128:0 )); //TO DO enchance drawing quality
}
else
{
@@ -753,7 +753,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str COLORREF colourFg;
int mode;
RECT p_rect = {0};
- p_rect.top = fr_rc.top+( ( fr_rc.bottom-fr_rc.top-ICON_HEIGHT )>>1 );
+ p_rect.top = fr_rc.top+(( fr_rc.bottom-fr_rc.top-ICON_HEIGHT )>>1 );
p_rect.left = fr_rc.left;
p_rect.right = p_rect.left+ICON_HEIGHT;
p_rect.bottom = p_rect.top+ICON_HEIGHT;
@@ -789,12 +789,12 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str //2 draw extra
{
RECT p_rect = {0};
- p_rect.top = fr_rc.top+( ( fr_rc.bottom-fr_rc.top-ICON_HEIGHT )>>1 );
+ p_rect.top = fr_rc.top+(( fr_rc.bottom-fr_rc.top-ICON_HEIGHT )>>1 );
//p_rect.left = fr_rc.left;
//p_rect.right = p_rect.left+ICON_HEIGHT;
p_rect.bottom = p_rect.top+ICON_HEIGHT;
- if ( ( Drawing->type == CLCIT_GROUP || Drawing->type == CLCIT_CONTACT || Drawing->type == CLCIT_INFO )
+ if (( Drawing->type == CLCIT_GROUP || Drawing->type == CLCIT_CONTACT || Drawing->type == CLCIT_INFO )
&& dat->extraColumnsCount > 0 && ( !InClistWindow || Drawing->type == CLCIT_CONTACT ))
{
int BlendedInActiveState = dat->dbbBlendInActiveState;
@@ -906,8 +906,8 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str else
{
countRect.right = nameRect.right;
- countRect.left = countRect.right-( ( count_size.cx>0 )?( count_size.cx-space_width ):0 );
- nameRect.right = countRect.left-( ( count_size.cx>0 )?space_width:0 );
+ countRect.left = countRect.right-(( count_size.cx>0 )?( count_size.cx-space_width ):0 );
+ nameRect.right = countRect.left-(( count_size.cx>0 )?space_width:0 );
nameRect.left = nameRect.right-text_size.cx;
}
@@ -1038,7 +1038,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str Drawing->pos_rename_rect = rc;
}
- if ( ( !InClistWindow || !g_CluiData.fLayered ) && ( ( Drawing->type == CLCIT_DIVIDER ) || ( Drawing->type == CLCIT_GROUP && dat->exStyle&CLS_EX_LINEWITHGROUPS )) )
+ if (( !InClistWindow || !g_CluiData.fLayered ) && (( Drawing->type == CLCIT_DIVIDER ) || ( Drawing->type == CLCIT_GROUP && dat->exStyle&CLS_EX_LINEWITHGROUPS )))
{
//???
RECT rc = fr_rc;
@@ -1051,7 +1051,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str rc.left = text_rect.right+3;
if ( rc.right-rc.left>4 )
{
- rc.top += ( ( rc.bottom-rc.top )>>1 )-1;
+ rc.top += (( rc.bottom-rc.top )>>1 )-1;
rc.bottom = rc.top+2;
DrawEdge( hdcMem, &rc, BDR_SUNKENOUTER, BF_RECT );
ske_SetRectOpaque( hdcMem, &rc );
@@ -1062,11 +1062,11 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str return;
}
minheight = max( minheight, height );
- dy += ( minheight>height )?( ( minheight-height )>>1 ):0;
+ dy += ( minheight>height )?(( minheight-height )>>1 ):0;
// Call Placement
cppCalculateRowItemsPos( gl_RowRoot, free_row_rc.right-free_row_rc.left );
// Now paint
- while ( ( gl_RowTabAccess[i] != NULL || ( i < 2 && Drawing->type == CLCIT_GROUP )) && !( i >= 2 && Drawing->type == CLCIT_GROUP ))
+ while (( gl_RowTabAccess[i] != NULL || ( i < 2 && Drawing->type == CLCIT_GROUP )) && !( i >= 2 && Drawing->type == CLCIT_GROUP ))
{
if ( gl_RowTabAccess[i]->r.right-gl_RowTabAccess[i]->r.left>0
@@ -1157,8 +1157,8 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str else
{
countRect.right = nameRect.right;
- countRect.left = countRect.right-( ( count_size.cx>0 )?( count_size.cx-space_width ):0 );
- nameRect.right = countRect.left-( ( count_size.cx>0 )?space_width:0 );
+ countRect.left = countRect.right-(( count_size.cx>0 )?( count_size.cx-space_width ):0 );
+ nameRect.right = countRect.left-(( count_size.cx>0 )?space_width:0 );
nameRect.left = nameRect.right-text_size.cx;
}
@@ -1267,13 +1267,13 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str case TC_STATUS:
{
- if ( ( Drawing->type == CLCIT_GROUP && !dat->row_hide_group_icon )
+ if (( Drawing->type == CLCIT_GROUP && !dat->row_hide_group_icon )
|| ( Drawing->type == CLCIT_CONTACT && Drawing->iImage != -1
&& !( dat->icon_hide_on_avatar && dat->avatars_show
- && ( ( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
+ && (( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE )
)
- && !Drawing->image_is_special )) )
+ && !Drawing->image_is_special )))
{
int iImage = -1;
// Get image
@@ -1801,9 +1801,9 @@ int CLCPaint::_DetermineDrawMode( HWND hWnd, struct ClcData *dat ) LONG lStyle = GetWindowLongPtr( 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 )) )
+ || (( dat->greyoutFlags & GREYF_UNFOCUS) && ( GetFocus() != hWnd )))
paintMode |= DM_GRAY;
if ( lStyle&CLS_GREYALTERNATE )
@@ -1857,7 +1857,7 @@ void CLCPaint::_PreparePaintContext( HWND hWnd, struct ClcData * dat, HDC hdc, i BYTE bgValue = ( gValue >255) ? 255 : gValue < 0 ? 0 : (BYTE)gValue;
BYTE bbValue = ( bValue >255) ? 255 : bValue < 0 ? 0 : (BYTE)bValue;
- pc.hBrushAlternateGrey = CreateSolidBrush( GetNearestColor( pc.hdcMem, RGB( brValue, bgValue, bbValue )) );
+ pc.hBrushAlternateGrey = CreateSolidBrush( GetNearestColor( pc.hdcMem, RGB( brValue, bgValue, bbValue )));
}
// Set some draw states
@@ -1871,32 +1871,29 @@ void CLCPaint::_PreparePaintContext( HWND hWnd, struct ClcData * dat, HDC hdc, i void CLCPaint::_DrawBackground( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMode, RECT * rcPaint, RECT& clRect, _PaintContext& pc )
{
- if ( paintMode&(DM_FLOAT|DM_CONTROL))
- {
+ if (paintMode & (DM_FLOAT | DM_CONTROL)) {
HBRUSH hBrush = CreateSolidBrush( pc.tmpbkcolour );
FillRect( pc.hdcMem, rcPaint, hBrush );
DeleteObject( hBrush );
ske_SetRectOpaque( pc.hdcMem, rcPaint );
- if ( !( paintMode&DM_GREYALTERNATE ))
- SkinDrawGlyph( pc.hdcMem, &clRect, rcPaint, "CL,ID = Background,Type = Control" );
+ if ( !( paintMode & DM_GREYALTERNATE))
+ SkinDrawGlyph( pc.hdcMem, &clRect, rcPaint, "CL,ID=Background,Type=Control" );
}
- else if ( paintMode&DM_CLASSIC)
- {
- if ( !_DrawNonEnginedBackground( hWnd, pc.hdcMem, rcPaint, clRect, dat ))
- {
+ else if ( paintMode&DM_CLASSIC) {
+ if ( !_DrawNonEnginedBackground( hWnd, pc.hdcMem, rcPaint, clRect, dat )) {
HBRUSH hBrush = CreateSolidBrush( pc.tmpbkcolour );
FillRect( pc.hdcMem, rcPaint, hBrush );
DeleteObject( hBrush );
}
}
- else
- {
+ else {
if ( paintMode&DM_NON_LAYERED )
ske_BltBackImage( hWnd, (paintMode&DM_GRAY) ? pc.hdcMem2 : pc.hdcMem, rcPaint );
- SkinDrawGlyph( pc.hdcMem, &clRect, rcPaint, "CL,ID = Background" );
+ SkinDrawGlyph(pc.hdcMem, &clRect, rcPaint, "CL,ID=Background");
}
}
+
void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMode, RECT* rcPaint, RECT& clRect, _PaintContext& pc )
{
struct ClcContact *Drawing;
@@ -1963,7 +1960,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo RowHeight_CalcRowHeight( dat, hWnd, Drawing, line_num );
// Init settings
- selected = ( ( line_num == dat->selection ) && ( dat->hwndRenameEdit != NULL || dat->showSelAlways || dat->exStyle&CLS_EX_SHOWSELALWAYS || is_foreground ) && Drawing->type != CLCIT_DIVIDER );
+ selected = (( line_num == dat->selection ) && ( dat->hwndRenameEdit != NULL || dat->showSelAlways || dat->exStyle&CLS_EX_SHOWSELALWAYS || is_foreground ) && Drawing->type != CLCIT_DIVIDER );
hottrack = dat->exStyle&CLS_EX_TRACKSELECT && Drawing->type != CLCIT_DIVIDER && dat->iHotTrack == line_num;
left_pos = clRect.left + dat->leftMargin + indent * dat->groupIndent + subident;
right_pos = dat->rightMargin; // Border
@@ -2002,9 +1999,9 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo FillRect( pc.hdcMem, &row_rc, pc.hBrushAlternateGrey );
}
else
- SkinDrawGlyph( pc.hdcMem, &row_rc, rcPaint, "CL,ID = GreyAlternate" );
+ SkinDrawGlyph( pc.hdcMem, &row_rc, rcPaint, "CL,ID=GreyAlternate" );
}
- if ( ! (paintMode&(DM_CLASSIC|DM_CONTROL)) )
+ if ( ! (paintMode&(DM_CLASSIC|DM_CONTROL)))
{
// Row background
if ( !(paintMode&DM_CONTROL))
@@ -2035,16 +2032,16 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo if ( dat->HiLightMode == 1 ) // Full or default
{
if ( selected )
- SkinDrawGlyph( pc.hdcMem, &mrc, rcPaint, "CL , ID = Selection " );
+ SkinDrawGlyph( pc.hdcMem, &mrc, rcPaint, "CL,ID=Selection" );
if ( hottrack )
- SkinDrawGlyph( pc.hdcMem, &mrc, rcPaint, "CL,ID = HotTracking" );
+ 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
+ SkinDrawGlyph( pc.hdcMem, &mrc, rcPaint, "CL,ID=Selection" ); //instead of free_row_rc
if ( hottrack )
- SkinDrawGlyph( pc.hdcMem, &mrc, rcPaint, "CL,ID = HotTracking" );
+ SkinDrawGlyph( pc.hdcMem, &mrc, rcPaint, "CL,ID=HotTracking" );
}
}
@@ -2052,7 +2049,7 @@ 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;
@@ -2094,7 +2091,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 ))
{
@@ -2141,7 +2138,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo }
y += dat->row_heights[line_num];
//increment by subcontacts
- if ( ( group->cl.items && group->scanIndex < group->cl.count && group->cl.items[group->scanIndex]->subcontacts != NULL && group->cl.items[group->scanIndex]->type != CLCIT_GROUP )
+ if (( group->cl.items && group->scanIndex < group->cl.count && group->cl.items[group->scanIndex]->subcontacts != NULL && group->cl.items[group->scanIndex]->type != CLCIT_GROUP )
&& ( group->cl.items[group->scanIndex]->SubExpanded && dat->expandMeta ))
{
if ( subindex < group->cl.items[group->scanIndex]->SubAllocated-1 )
@@ -2212,10 +2209,10 @@ void CLCPaint::_CopyPaintToDest( HWND hWnd, struct ClcData * dat, HDC hdc, int p BitBlt( hdc, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, pc.hdcMem, rcPaint->left, rcPaint->top, SRCCOPY );
}
- if ( ( paintMode&DM_GRAY ) && hdc && hdc != pc.hdcMem )
+ if (( paintMode&DM_GRAY ) && hdc && hdc != pc.hdcMem )
{
BLENDFUNCTION bf = {AC_SRC_OVER, 0, 80, AC_SRC_ALPHA };
- BOOL a = ( ( paintMode&DM_GRAY ) && ( ( paintMode&DM_NON_LAYERED)) );
+ BOOL a = (( paintMode&DM_GRAY ) && (( paintMode&DM_NON_LAYERED)));
ske_AlphaBlend( a ? pc.hdcMem2 : hdc, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, pc.hdcMem, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, bf );
if ( a )
BitBlt( hdc, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, pc.hdcMem2, rcPaint->left, rcPaint->top, SRCCOPY );
@@ -2305,7 +2302,7 @@ void CLCPaint::_StoreItemPos( struct ClcContact *contact, int ItemType, RECT * r case CIT_CHECKBOX:
break;
default:
- if ( ( ItemType&CIT_EXTRA ) == CIT_EXTRA )
+ if (( ItemType&CIT_EXTRA ) == CIT_EXTRA )
{
int iImage = ItemType&0x3F;
contact->pos_extra[iImage] = *rc;
@@ -2351,7 +2348,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct max_width = dat->avatars_maxheight_size;
// Has to draw?
- if ( ( dat->use_avatar_service && Drawing->avatar_data == NULL )
+ if (( dat->use_avatar_service && Drawing->avatar_data == NULL )
|| ( !dat->use_avatar_service && Drawing->avatar_pos == AVATAR_POS_DONT_HAVE )
|| miniMode )
{
@@ -2369,8 +2366,8 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct if ( rc.left < rc.right )
{
/* center icon in avatar place */
- if ( rc.right-rc.left>16 ) rc.left += ( ( ( rc.right-rc.left )-16 )>>1 );
- if ( rc.bottom-rc.top>16 ) rc.top += ( ( ( rc.bottom-rc.top )-16 )>>1 );
+ if ( rc.right-rc.left>16 ) rc.left += (( ( rc.right-rc.left )-16 )>>1 );
+ if ( rc.bottom-rc.top>16 ) rc.top += (( ( rc.bottom-rc.top )-16 )>>1 );
// Store position
_StoreItemPos( Drawing, CIT_ICON, &rc );
@@ -2379,7 +2376,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct else
{
// Has to keep the empty space??
- if ( ( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ))
+ if (( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ))
{
// Make rectangle
rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
@@ -2423,7 +2420,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct {
RECT rc;
int iImage = -1;
- BOOL has_avatar = ( ( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
+ BOOL has_avatar = (( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE ))
&& !( CheckMiniMode( dat, selected, hottrack ));
@@ -2434,7 +2431,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct && !Drawing->image_is_special )
{
// Don't have to draw, but has to keep the empty space?
- if ( ( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ))
+ if (( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ))
{
rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
left, dat->iconXSpace, dat->iconXSpace, ICON_HEIGHT, HORIZONTAL_SPACE );
@@ -2455,7 +2452,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
&& GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons )
&& dat->avatars_overlay_type == SETTING_AVATAR_OVERLAY_TYPE_CONTACT
- )) )
+ )))
{
// Don't have to draw and don't have to keep the empty space
break;
@@ -2485,7 +2482,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct }
case ITEM_CONTACT_TIME: /////////////////////////////////////////////////////////////////////////////////////////////////////
{
- PDNCE pdnce = ( PDNCE )( ( Drawing->type == CLCIT_CONTACT )?pcli->pfnGetCacheEntry( Drawing->hContact ):NULL );
+ PDNCE pdnce = ( PDNCE )(( Drawing->type == CLCIT_CONTACT )?pcli->pfnGetCacheEntry( Drawing->hContact ):NULL );
if ( Drawing->type == CLCIT_CONTACT && dat->contact_time_show && pdnce->hTimeZone )
{
TCHAR szResult[80];
@@ -2669,10 +2666,10 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct if ( dat->row_align_group_mode == 1 ) //center
{
int x;
- x = free_row_rc.left+( ( free_row_rc.right-free_row_rc.left-full_text_width )>>1 );
+ x = free_row_rc.left+(( free_row_rc.right-free_row_rc.left-full_text_width )>>1 );
//int l = dat->leftMargin;
//int r = dat->rightMargin;
- //x = l+row_rc.left+( ( row_rc.right-row_rc.left-full_text_width-l-r )>>1 );
+ //x = l+row_rc.left+(( row_rc.right-row_rc.left-full_text_width-l-r )>>1 );
text_rc.left = x;
text_rc.right = x+full_text_width;
}
@@ -2691,7 +2688,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct else if ( Drawing->type == CLCIT_CONTACT && !CheckMiniMode( dat, selected, hottrack ))
{
int tmp;
- PDNCE pdnce = ( PDNCE )( ( Drawing->type == CLCIT_CONTACT )?pcli->pfnGetCacheEntry( Drawing->hContact ):NULL );
+ PDNCE pdnce = ( PDNCE )(( Drawing->type == CLCIT_CONTACT )?pcli->pfnGetCacheEntry( Drawing->hContact ):NULL );
if ( dat->second_line_show && dat->second_line_type == TEXT_CONTACT_TIME && pdnce->hTimeZone)
{
// Get contact time
@@ -2799,7 +2796,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct RECT rc = free_row_rc;
rc.top += ( rc.bottom - rc.top ) >> 1;
rc.bottom = rc.top + 2;
- rc.right = rc.left + ( ( rc.right - rc.left - text_size.cx )>>1 ) - 3;
+ rc.right = rc.left + (( rc.right - rc.left - text_size.cx )>>1 ) - 3;
trc.left = rc.right + 3;
trc.right = trc.left + text_size.cx + 6;
if ( text_size.cy < trc.bottom - trc.top )
@@ -3186,7 +3183,7 @@ void CLCPaint::_DrawContactSubText( HDC hdcMem, struct ClcData *dat, struct ClcC else if ( Drawing->type == CLCIT_CONTACT )
{
SIZE text_size = { _rcWidth( prcItem ), _rcHeight( prcItem ) };
- PDNCE pdnce = ( PDNCE )( ( Drawing->type == CLCIT_CONTACT )?pcli->pfnGetCacheEntry( Drawing->hContact ):NULL );
+ PDNCE pdnce = ( PDNCE )(( Drawing->type == CLCIT_CONTACT )?pcli->pfnGetCacheEntry( Drawing->hContact ):NULL );
if ( pdnce )
{
ChangeToFont( hdcMem, dat, itemType == CIT_SUBTEXT1 ? FONTID_SECONDLINE : FONTID_THIRDLINE, NULL );
@@ -3208,7 +3205,7 @@ void CLCPaint::_DrawContactSubText( HDC hdcMem, struct ClcData *dat, struct ClcC void CLCPaint::_DrawContactTime( HDC hdcMem, struct ClcData *dat, struct ClcContact *Drawing, int& selected, int& hottrack, RECT& text_rc, RECT * prcItem )
{
TCHAR szResult[80];
- PDNCE pdnce = ( PDNCE )( ( Drawing->type == CLCIT_CONTACT )?pcli->pfnGetCacheEntry( Drawing->hContact ):NULL );
+ PDNCE pdnce = ( PDNCE )(( Drawing->type == CLCIT_CONTACT )?pcli->pfnGetCacheEntry( Drawing->hContact ):NULL );
if ( !pdnce ) return;
@@ -3223,8 +3220,7 @@ void CLCPaint::_DrawContactTime( HDC hdcMem, struct ClcData *dat, struct ClcCont void CLCPaint::_DrawContactSelection( HDC hdcMem, struct ClcData *dat, struct ClcContact *Drawing, int& selected, int& hottrack, RECT *rcPaint, RECT * prcItem )
{
// Selection background
- if ( ( selected || hottrack ) && dat->HiLightMode == 0 )
- {
+ if (( selected || hottrack ) && dat->HiLightMode == 0) {
if ( selected )
SkinDrawGlyph( hdcMem, prcItem, rcPaint, "Contact List/Selection" );
else if ( hottrack )
@@ -3298,7 +3294,7 @@ void CLCPaint::_DrawContactItems( HWND hwnd, HDC hdcMem, struct ClcData *dat, st ( dat->text_rtl ? DT_RTLREADING : 0 ) |
( dat->text_align_right ? DT_RIGHT : 0 )|
( gl_TrimText?DT_END_ELLIPSIS:0 )|
- ( ( dat->force_in_dialog || dat->bkChanged ) ? DT_FORCENATIVERENDER:0 );
+ (( dat->force_in_dialog || dat->bkChanged ) ? DT_FORCENATIVERENDER:0 );
text_rc = *row_rc;
@@ -3342,7 +3338,7 @@ void CLCPaint::_DrawContactItems( HWND hwnd, HDC hdcMem, struct ClcData *dat, st }
}
}
- if ( ( Drawing->type == CLCIT_GROUP && dat->exStyle&CLS_EX_LINEWITHGROUPS )
+ if (( Drawing->type == CLCIT_GROUP && dat->exStyle&CLS_EX_LINEWITHGROUPS )
|| ( Drawing->type == CLCIT_DIVIDER ))
_DrawContactLine( hdcMem, dat, Drawing, free_row_rc, rcPaint, text_rc );
}
diff --git a/plugins/Clist_modern/modern_clcutils.cpp b/plugins/Clist_modern/modern_clcutils.cpp index aa386d0e17..9e6066c13a 100644 --- a/plugins/Clist_modern/modern_clcutils.cpp +++ b/plugins/Clist_modern/modern_clcutils.cpp @@ -74,7 +74,7 @@ int cliHitTest(HWND hwnd,struct ClcData *dat,int testx,int testy,struct ClcConta if (group) *group = hitgroup;
/////////
- if ( ((testx < hitcontact->pos_indent) && !dat->text_rtl) ||
+ if (((testx < hitcontact->pos_indent) && !dat->text_rtl) ||
((testx>clRect.right-hitcontact->pos_indent) && dat->text_rtl))
{
if (flags) *flags |= CLCHT_ONITEMINDENT;
diff --git a/plugins/Clist_modern/modern_clistevents.cpp b/plugins/Clist_modern/modern_clistevents.cpp index a1fcac155a..4453329c66 100644 --- a/plugins/Clist_modern/modern_clistevents.cpp +++ b/plugins/Clist_modern/modern_clistevents.cpp @@ -342,7 +342,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC) }
else
{
- SkinDrawGlyph(hDC,&rc,&rc,"Main,ID = EventArea");
+ SkinDrawGlyph(hDC,&rc,&rc,"Main,ID=EventArea");
}
hOldFont = g_clcPainter.ChangeToFont(hDC,NULL,FONTID_EVENTAREA,NULL);
SetBkMode(hDC,TRANSPARENT);
diff --git a/plugins/Clist_modern/modern_clistmod.cpp b/plugins/Clist_modern/modern_clistmod.cpp index 535ebc3737..fb182af5ec 100644 --- a/plugins/Clist_modern/modern_clistmod.cpp +++ b/plugins/Clist_modern/modern_clistmod.cpp @@ -500,7 +500,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/Clist_modern/modern_clui.cpp b/plugins/Clist_modern/modern_clui.cpp index d6c7cf9623..fe27bc2a34 100644 --- a/plugins/Clist_modern/modern_clui.cpp +++ b/plugins/Clist_modern/modern_clui.cpp @@ -176,14 +176,14 @@ int CLUI::OnEvent_DBSettingChanging(WPARAM wParam,LPARAM lParam) if (dbcws == NULL) return(0);
if (MirandaExiting()) return 0;
- if ( ( dbcws->value.type == DBVT_WORD && !mir_strcmp(dbcws->szSetting,"ApparentMode")) ||
+ if (( dbcws->value.type == DBVT_WORD && !mir_strcmp(dbcws->szSetting,"ApparentMode")) ||
( dbcws->value.type == DBVT_ASCIIZ &&
- ( ( !mir_strcmp(dbcws->szSetting,"e-mail") ||
+ (( !mir_strcmp(dbcws->szSetting,"e-mail") ||
!mir_strcmp(dbcws->szSetting,"Mye-mail0") ||
!mir_strcmp(dbcws->szSetting,"Cellular")) ||
( !mir_strcmp(dbcws->szModule,"UserInfo") &&
( !mir_strcmp(dbcws->szSetting,"MyPhone0") ||
- !mir_strcmp(dbcws->szSetting,"Mye-mail0")) )) ))
+ !mir_strcmp(dbcws->szSetting,"Mye-mail0"))))))
ExtraImage_SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return(0);
};
@@ -1341,7 +1341,7 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) //ske_BltBackImage(hwnd,hdc,&r1);
}
if ( !g_CluiData.fDisableSkinEngine)
- SkinDrawGlyph(hdc,&r1,&r1,"Main,ID = MenuBar");
+ SkinDrawGlyph(hdc,&r1,&r1,"Main,ID=MenuBar");
else
{
HBRUSH hbr = NULL;
@@ -1901,7 +1901,7 @@ LRESULT CLUI::PreProcessWndProc( UINT msg, WPARAM wParam, LPARAM lParam, BOOL& b char szFilePath[MAX_PATH], szProfile[MAX_PATH];
CallService( MS_DB_GETPROFILEPATH,MAX_PATH,(LPARAM)&szFilePath );
CallService( MS_DB_GETPROFILENAME,MAX_PATH,(LPARAM)&szProfile );
- _snprintf( (char*)hView, MAX_PATH, "%s\\%s", szFilePath, szProfile );
+ _snprintf((char*)hView, MAX_PATH, "%s\\%s", szFilePath, szProfile );
UnmapViewOfFile( hView );
rc = 1;
}
@@ -2191,7 +2191,7 @@ LRESULT CLUI::OnEraseBkgnd( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ ) LRESULT CLUI::OnNcCreate( UINT msg, WPARAM wParam, LPARAM lParam )
{
- ( (LPCREATESTRUCT)lParam )->style &= ~(CS_HREDRAW | CS_VREDRAW);
+ ((LPCREATESTRUCT)lParam )->style &= ~(CS_HREDRAW | CS_VREDRAW);
return DefCluiWndProc( msg, wParam, lParam );
}
@@ -2248,7 +2248,7 @@ LRESULT CLUI::OnPaint( UINT msg, WPARAM wParam, LPARAM lParam ) w2 = w;
else
w2 = ps.rcPaint;
- SkinDrawGlyph(ps.hdc,&w,&w2,"Main,ID = Background,Opt = Non-Layered");
+ SkinDrawGlyph(ps.hdc,&w,&w2,"Main,ID=Background,Opt=Non-Layered");
ps.fErase = FALSE;
EndPaint(m_hWnd,&ps);
}
@@ -2298,7 +2298,7 @@ LRESULT CLUI::OnCreateClc( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ ) {
CreateCLC();
if ( db_get_b( NULL, "CList", "ShowOnStart", SETTING_SHOWONSTART_DEFAULT ))
- cliShowHide( (WPARAM) m_hWnd, (LPARAM)TRUE );
+ cliShowHide((WPARAM) m_hWnd, (LPARAM)TRUE );
PostMessage( pcli->hwndContactTree, CLM_AUTOREBUILD, 0, 0 );
return FALSE;
}
@@ -2343,7 +2343,7 @@ LRESULT CLUI::OnParentNotify( UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT CLUI::OnSetFocus( UINT msg, WPARAM wParam, LPARAM lParam )
{
- if ( hFrameContactTree && ( !CallService( MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM( FO_FLOATING, hFrameContactTree ), 0 )) )
+ if ( hFrameContactTree && ( !CallService( MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM( FO_FLOATING, hFrameContactTree ), 0 )))
{
SetFocus(pcli->hwndContactTree);
}
@@ -2487,7 +2487,7 @@ LRESULT CLUI::OnTimer( UINT msg, WPARAM wParam, LPARAM lParam ) {
if ( MirandaExiting()) return FALSE;
- if ( (int)wParam >= TM_STATUSBARUPDATE && (int)wParam <= TM_STATUSBARUPDATE+64 )
+ if ((int)wParam >= TM_STATUSBARUPDATE && (int)wParam <= TM_STATUSBARUPDATE+64 )
{
if ( !pcli->hwndStatus ) return FALSE;
else return OnStatusBarUpdateTimer( msg, wParam, lParam );
@@ -2617,7 +2617,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))
@@ -2896,10 +2896,10 @@ LRESULT CLUI::OnNotify( UINT msg, WPARAM wParam, LPARAM lParam ) switch ( pnmhdr->code)
{
- case CLN_NEWCONTACT: return OnNewContactNotify( (NMCLISTCONTROL *)pnmhdr );
- case CLN_LISTREBUILT: return OnListRebuildNotify( (NMCLISTCONTROL *)pnmhdr );
- case CLN_LISTSIZECHANGE: return OnListSizeChangeNotify( (NMCLISTCONTROL *)pnmhdr );
- case NM_CLICK: return OnClickNotify( (NMCLISTCONTROL *)pnmhdr );
+ case CLN_NEWCONTACT: return OnNewContactNotify((NMCLISTCONTROL *)pnmhdr );
+ case CLN_LISTREBUILT: return OnListRebuildNotify((NMCLISTCONTROL *)pnmhdr );
+ case CLN_LISTSIZECHANGE: return OnListSizeChangeNotify((NMCLISTCONTROL *)pnmhdr );
+ case NM_CLICK: return OnClickNotify((NMCLISTCONTROL *)pnmhdr );
}
return DefCluiWndProc( msg, wParam, lParam );
@@ -2976,7 +2976,7 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam ) HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_MAINMENU);
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 1, dis->itemState);
- mir_snprintf(buf,SIZEOF(buf),"Main,ID = MainMenu,Selected = %s,Hot = %s",(dis->itemState&ODS_SELECTED)?"True":"False",(dis->itemState&ODS_HOTLIGHT)?"True":"False");
+ mir_snprintf(buf,SIZEOF(buf),"Main,ID=MainMenu,Selected=%s,Hot=%s",(dis->itemState&ODS_SELECTED)?"True":"False",(dis->itemState&ODS_HOTLIGHT)?"True":"False");
SkinDrawGlyph(dis->hDC,&dis->rcItem,&dis->rcItem,buf);
int x = (dis->rcItem.right + dis->rcItem.left - GetSystemMetrics(SM_CXSMICON)) / 2 + offset;
@@ -3008,7 +3008,7 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam ) }
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 2, dis->itemState);
SetBkMode(dis->hDC,TRANSPARENT);
- mir_snprintf(buf,SIZEOF(buf),"Main,ID = StatusMenu,Selected = %s,Hot = %s",(dis->itemState&ODS_SELECTED)?"True":"False",(dis->itemState&ODS_HOTLIGHT)?"True":"False");
+ mir_snprintf(buf,SIZEOF(buf),"Main,ID=StatusMenu,Selected=%s,Hot=%s",(dis->itemState&ODS_SELECTED)?"True":"False",(dis->itemState&ODS_HOTLIGHT)?"True":"False");
SkinDrawGlyph(dis->hDC,&dis->rcItem,&dis->rcItem,buf);
SetTextColor(dis->hDC, (dis->itemState&ODS_SELECTED/*|dis->itemState&ODS_HOTLIGHT*/)?dat->MenuTextHiColor:dat->MenuTextColor);
DrawText(dis->hDC,TranslateT("Status"), lstrlen(TranslateT("Status")),&rc, DT_CENTER|DT_VCENTER|DT_SINGLELINE);
@@ -3025,7 +3025,7 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam ) short dx = 1+(dis->itemState&ODS_SELECTED?1:0)-(dis->itemState&ODS_HOTLIGHT?1:0);
HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 3, dis->itemState);
- mir_snprintf(buf,SIZEOF(buf),"Main,ID = MainMenu,Selected = %s,Hot = %s",(dis->itemState&ODS_SELECTED)?"True":"False",(dis->itemState&ODS_HOTLIGHT)?"True":"False");
+ mir_snprintf(buf,SIZEOF(buf),"Main,ID=MainMenu,Selected=%s,Hot=%s",(dis->itemState&ODS_SELECTED)?"True":"False",(dis->itemState&ODS_HOTLIGHT)?"True":"False");
SkinDrawGlyph(dis->hDC,&dis->rcItem,&dis->rcItem,buf);
DrawState(dis->hDC,NULL,NULL,(LPARAM)hIcon,0,(dis->rcItem.right+dis->rcItem.left-GetSystemMetrics(SM_CXSMICON))/2+dx,(dis->rcItem.bottom+dis->rcItem.top-GetSystemMetrics(SM_CYSMICON))/2+dx,0,0,DST_ICON|(dis->itemState&ODS_INACTIVE && FALSE?DSS_DISABLED:DSS_NORMAL));
CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
diff --git a/plugins/Clist_modern/modern_cluiframes.cpp b/plugins/Clist_modern/modern_cluiframes.cpp index 5af86e7bde..4e6940e5e2 100644 --- a/plugins/Clist_modern/modern_cluiframes.cpp +++ b/plugins/Clist_modern/modern_cluiframes.cpp @@ -351,7 +351,7 @@ FRAMEWND * FindFrameByItsHWND(HWND FrameHwnd) static void DockThumbs( FRAMEWND *pThumbLeft, FRAMEWND *pThumbRight, BOOL bMoveLeft )
{
- if ( ( pThumbRight->dockOpt.hwndLeft == NULL ) && ( pThumbLeft->dockOpt.hwndRight == NULL ))
+ if (( pThumbRight->dockOpt.hwndLeft == NULL ) && ( pThumbLeft->dockOpt.hwndRight == NULL ))
{
pThumbRight->dockOpt.hwndLeft = pThumbLeft->ContainerWnd;
pThumbLeft->dockOpt.hwndRight = pThumbRight->ContainerWnd;
@@ -361,7 +361,7 @@ static void DockThumbs( FRAMEWND *pThumbLeft, FRAMEWND *pThumbRight, BOOL bMoveL static void UndockThumbs( FRAMEWND *pThumb1, FRAMEWND *pThumb2 )
{
- if ( ( pThumb1 == NULL ) || ( pThumb2 == NULL ))
+ if (( pThumb1 == NULL ) || ( pThumb2 == NULL ))
{
return;
}
@@ -1001,7 +1001,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid,int root,int popuppos,HGEN static int ModifyMItem(WPARAM wParam,LPARAM lParam)
{
- if ( (int) wParam == -1 ) return 0; // FIXME
+ if ((int) wParam == -1 ) return 0; // FIXME
return ModifyMenuItemProxy(wParam,lParam);
};
@@ -2348,7 +2348,7 @@ static int CLUIFramesResizeFrames(const RECT newsize) 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);
+ sumheight += (g_pfwFrames[i].height)+curfrmtbh+(i > 0 ? sepw : 0)+((g_pfwFrames[i].UseBorder && !g_CluiData.fLayered)?2:0);
if (sumheight>newheight-tbh) {
sumheight -= (g_pfwFrames[i].height)+curfrmtbh + (i > 0 ? sepw : 0);
g_pfwFrames[i].needhide = !g_CluiData.fDocked && g_CluiData.fAutoSize?FALSE:TRUE;
@@ -2458,7 +2458,7 @@ int CLUIFrames_ApplyNewSizes(int mode) int i;
g_CluiData.mutexPreventDockMoving = 0;
for (i=0;i < g_nFramesCount;i++) {
- if ( (mode == 1 && g_pfwFrames[i].OwnerWindow != (HWND)-2 && g_pfwFrames[i].OwnerWindow) ||
+ if ((mode == 1 && g_pfwFrames[i].OwnerWindow != (HWND)-2 && g_pfwFrames[i].OwnerWindow) ||
(mode == 2 && g_pfwFrames[i].OwnerWindow == (HWND)-2) ||
(mode == 3))
if (g_pfwFrames[i].floating){
@@ -2946,7 +2946,7 @@ int DrawTitleBar(HDC hdcMem2,RECT * rect,int Frameid) {
FillRect(hdcMem,&rc,hBack);
//SelectObject(hdcMem,hoBrush);
- SkinDrawGlyph(hdcMem,&rc,&rc,"Main,ID = FrameCaption");
+ SkinDrawGlyph(hdcMem,&rc,&rc,"Main,ID=FrameCaption");
}
else
{
@@ -2967,7 +2967,7 @@ int DrawTitleBar(HDC hdcMem2,RECT * rect,int Frameid) ske_BltBackImage(g_pfwFrames[pos].TitleBar.hwnd,hdcMem,&rc);
}
else BitBlt(hdcMem,0,0,rc.right-rc.left,rc.bottom-rc.top,hdcMem2,rect->left,rect->top,SRCCOPY);
- SkinDrawGlyph(hdcMem,&rc,&rc,"Main,ID = FrameCaption");
+ SkinDrawGlyph(hdcMem,&rc,&rc,"Main,ID=FrameCaption");
}
if (bThemed)
SetTextColor(hdcMem,GetSysColor(COLOR_CAPTIONTEXT ));
diff --git a/plugins/Clist_modern/modern_image_array.cpp b/plugins/Clist_modern/modern_image_array.cpp index c00a140f23..21a87c18d7 100644 --- a/plugins/Clist_modern/modern_image_array.cpp +++ b/plugins/Clist_modern/modern_image_array.cpp @@ -79,7 +79,7 @@ static BOOL ImageArray_Alloc(LP_IMAGE_ARRAY_DATA iad, int size) else if (size < iad->nodes_allocated_size)
{
// Give some more space to try to avoid a free
- if ( (iad->nodes_allocated_size - size) / iad->grow_step >= 2 )
+ if ((iad->nodes_allocated_size - size) / iad->grow_step >= 2 )
{
IMAGE_ARRAY_DATA_NODE *tmp;
diff --git a/plugins/Clist_modern/modern_row.cpp b/plugins/Clist_modern/modern_row.cpp index 55dcc6edc8..d2799d2b9a 100644 --- a/plugins/Clist_modern/modern_row.cpp +++ b/plugins/Clist_modern/modern_row.cpp @@ -183,7 +183,7 @@ char * rowParserGetNextWord(char *tbuf, int &hbuf) // Tag-bracers found
if ( !(ch == '>' && j < 0)) //not single '>' found
{
- if ( (ch == '<' || ch == '>') && j >= 0)
+ if ((ch == '<' || ch == '>') && j >= 0)
{
if (ch == '>')
{
diff --git a/plugins/Clist_modern/modern_rowheight_funcs.cpp b/plugins/Clist_modern/modern_rowheight_funcs.cpp index d9290ad2c1..238962baa2 100644 --- a/plugins/Clist_modern/modern_rowheight_funcs.cpp +++ b/plugins/Clist_modern/modern_rowheight_funcs.cpp @@ -693,7 +693,7 @@ int RowHeights_GetRowHeight_worker(struct ClcData *dat, HWND hwnd, struct ClcCon if (contact->type == CLCIT_GROUP
|| (contact->type == CLCIT_CONTACT && contact->iImage != -1
&& !(dat->icon_hide_on_avatar && dat->avatars_show
- && ( (dat->use_avatar_service && contact->avatar_data != NULL) ||
+ && ((dat->use_avatar_service && contact->avatar_data != NULL) ||
(!dat->use_avatar_service && contact->avatar_pos != AVATAR_POS_DONT_HAVE)
)
&& !contact->image_is_special)))
diff --git a/plugins/Clist_modern/modern_rowtemplateopt.cpp b/plugins/Clist_modern/modern_rowtemplateopt.cpp index 8a93d63fd3..cc64f3a522 100644 --- a/plugins/Clist_modern/modern_rowtemplateopt.cpp +++ b/plugins/Clist_modern/modern_rowtemplateopt.cpp @@ -306,7 +306,7 @@ void rowOptDelContainer(HWND htree, HTREEITEM hti) {
int i=0;
ZeroMemory( rowOptTA, sizeof( rowOptTA ));
- rowOptBuildTA( (pROWCELL)tvpi.lParam, (pROWCELL*)&rowOptTA, &i );
+ rowOptBuildTA((pROWCELL)tvpi.lParam, (pROWCELL*)&rowOptTA, &i );
}
TreeView_DeleteItem(htree, hti);
@@ -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/Clist_modern/modern_skinbutton.cpp b/plugins/Clist_modern/modern_skinbutton.cpp index d4a7dfe5f5..8bae142748 100644 --- a/plugins/Clist_modern/modern_skinbutton.cpp +++ b/plugins/Clist_modern/modern_skinbutton.cpp @@ -582,8 +582,8 @@ typedef struct _MButton MButton * Buttons = NULL;
DWORD ButtonsCount = 0;
-#define _center_h( rc ) (( (rc)->right + (rc)->left ) >> 1)
-#define _center_v( rc ) (( (rc)->bottom + (rc)->top ) >> 1)
+#define _center_h( rc ) (((rc)->right + (rc)->left ) >> 1)
+#define _center_v( rc ) (((rc)->bottom + (rc)->top ) >> 1)
int ModernSkinButton_AddButton(HWND parent,
char * ID,
@@ -639,7 +639,7 @@ int ModernSkinButton_AddButton(HWND parent, bct->StateService = mir_strdup(StateDefService);
if (DBkey && &DBkey != '\0') bct->ValueDBSection = mir_strdup(DBkey); else bct->ValueDBSection = NULL;
if (TypeDef && &TypeDef != '\0') bct->ValueTypeDef = mir_strdup(TypeDef); else bct->ValueTypeDef = mir_strdup("sDefault");
- bct->ID = mir_strdup(ID);
+ bct->ID=mir_strdup(ID);
bct->Hint = mir_tstrdup(Hint);
Buttons[ButtonsCount].bct = bct;
Buttons[ButtonsCount].hwnd = NULL;
diff --git a/plugins/Clist_modern/modern_skineditor.cpp b/plugins/Clist_modern/modern_skineditor.cpp index fdd239e98a..36763ef5d5 100644 --- a/plugins/Clist_modern/modern_skineditor.cpp +++ b/plugins/Clist_modern/modern_skineditor.cpp @@ -234,16 +234,16 @@ void SetAppropriateGroups(HWND hwndDlg, int Type) void SetControls(HWND hwndDlg, char * str)
{
char buf[250];
- int Type = 0;
+ int Type=0;
if ( !str)
{
SetAppropriateGroups(hwndDlg,-1);
return;
}
GetParamN(str,buf,SIZEOF(buf),1,',',TRUE);
- if (mir_bool_strcmpi(buf,"Solid")) Type = 1;
- else if (mir_bool_strcmpi(buf,"Image")) Type = 2;
- else if (mir_bool_strcmpi(buf,"Fragment")) Type = 3;
+ if (mir_bool_strcmpi(buf,"Solid")) Type=1;
+ else if (mir_bool_strcmpi(buf,"Image")) Type=2;
+ else if (mir_bool_strcmpi(buf,"Fragment")) Type=3;
SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_SETCURSEL,(WPARAM)Type,(LPARAM)0);
SetAppropriateGroups(hwndDlg,Type);
switch (Type)
diff --git a/plugins/Clist_modern/modern_skinengine.cpp b/plugins/Clist_modern/modern_skinengine.cpp index e1e2b8f214..11c8391c4d 100644 --- a/plugins/Clist_modern/modern_skinengine.cpp +++ b/plugins/Clist_modern/modern_skinengine.cpp @@ -189,7 +189,7 @@ HRESULT IniParser::WriteStrToDb( const char * szSection, const char * szName, co //TODO check security here
if ( wildcmp( szSection,"Skin_Description_Section",1 )) return S_OK;
}
- if ( ( This->_Flags == IniParser::FLAG_ONLY_OBJECTS ) && !wildcmp( szSection, DEFAULTSKINSECTION,1 ))
+ if (( This->_Flags == IniParser::FLAG_ONLY_OBJECTS ) && !wildcmp( szSection, DEFAULTSKINSECTION,1 ))
return S_OK; // skip not objects
@@ -335,7 +335,7 @@ HRESULT IniParser::_DoParseResource() int i=0;
while ( pos < _pPosition + _dwSizeOfRes && *pos != '\n' && *pos != '\0' && i < MAX_LINE_LEN - 1 )
{
- if ( (*pos) != '\r' )
+ if ((*pos) != '\r' )
szLine[ i++ ] = *pos;
pos++;
}
@@ -2235,7 +2235,7 @@ int ske_UnloadSkin(SKINOBJECTSLIST * Skin) static void RegisterMaskByParce(const char * szSetting, char * szValue, SKINOBJECTSLIST * pSkin)
{
int i;
- DWORD ID = atoi(szSetting+1);
+ DWORD ID=atoi(szSetting+1);
for (i=0; i < mir_strlen(szValue); i++) if (szValue[i] == ':') break;
if (i < mir_strlen(szValue))
{
@@ -2666,8 +2666,8 @@ static BOOL ske_DrawTextEffect(BYTE* destPt,BYTE* maskPt, DWORD width, DWORD hei {
minX = max( 0, minX + mcLeftStart - 2 );
minY = max( 0, minY + mcTopStart - 2 );
- maxX = min( (int)width, maxX + mcRightEnd - 1 );
- maxY = min( (int)height, maxY + mcBottomEnd - 1 );
+ maxX = min((int)width, maxX + mcRightEnd - 1 );
+ maxY = min((int)height, maxY + mcBottomEnd - 1 );
outbuf = (sbyte*)malloc(width*height*sizeof(sbyte));
memset(outbuf,0,width*height*sizeof(sbyte));
@@ -2767,7 +2767,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec for ( int i=0; i < 256; i++ )
{
- gammaTbl[i] = (BYTE)( 255 * pow( (double)i / 255, gammaCfPw ));
+ gammaTbl[i] = (BYTE)( 255 * pow((double)i / 255, gammaCfPw ));
blueMulTbl[i] = i * blueCf;
redMulTbl[i] = i * redCf;
greenMulTbl[i] = i * greenCf;
@@ -2818,7 +2818,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec BOOL bNeedFreeWorkString = FALSE;
// if we need to cut the text with ellipsis
- if ( ( format&DT_END_ELLIPSIS ) && textSize.cx > workRectWidth )
+ if (( format&DT_END_ELLIPSIS ) && textSize.cx > workRectWidth )
{
// Calc geometric width of ellipsis
SIZE szEllipsis;
@@ -2841,10 +2841,10 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec // replace end of string by elipsis
bNeedFreeWorkString = TRUE;
- lpWorkString = (TCHAR*) malloc( ( visibleCharCount + 4) * sizeof(TCHAR));
+ lpWorkString = (TCHAR*) malloc(( visibleCharCount + 4) * sizeof(TCHAR));
- memcpy( (void*) lpWorkString, lpString, visibleCharCount * sizeof(TCHAR));
- memcpy( (void*) ( lpWorkString + visibleCharCount ), _T("..."), 4 * sizeof(TCHAR)); // 3 + 1
+ memcpy((void*) lpWorkString, lpString, visibleCharCount * sizeof(TCHAR));
+ memcpy((void*) ( lpWorkString + visibleCharCount ), _T("..."), 4 * sizeof(TCHAR)); // 3 + 1
nCount = visibleCharCount + 3;
}
@@ -2967,12 +2967,12 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec gx *= al/255;
rx *= al/255;
}
- BYTE ax = (BYTE)( ( (DWORD)rx*77 + (DWORD)gx * 151 + (DWORD)bx *28 + 128 ) / 256 );
+ BYTE ax = (BYTE)(( (DWORD)rx*77 + (DWORD)gx * 151 + (DWORD)bx *28 + 128 ) / 256 );
if (ax)
{
//Normalize components to gray
- BYTE axx = 255 - ( ( r + g + b ) >> 2 ) ; // Coefficient of grayance, more white font - more gray edges
+ BYTE axx = 255 - (( r + g + b ) >> 2 ) ; // Coefficient of grayance, more white font - more gray edges
WORD atx = ax * (255 - axx);
bx = ( atx + bx * axx )/255;
gx = ( atx + gx * axx )/255;
@@ -3013,7 +3013,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec free( pDestBits );
if ( bNeedFreeWorkString )
- free( (void*)lpWorkString );
+ free((void*)lpWorkString );
return 0;
}
@@ -3677,13 +3677,13 @@ static int ske_ValidateSingleFrameImage(FRAMEWND * Frame, BOOL SkipBkgBlitting) BitBlt(g_pCachedWindow->hImageDC,rLine.left,rLine.top,rLine.right-rLine.left,rLine.bottom-rLine.top,g_pCachedWindow->hBackDC,rLine.left,rLine.top,SRCCOPY);
{
char req[255];
- _snprintf(req,sizeof(req),"Main,ID = ScrollBar,Frame = %s,Part = Back",Frame->szName);
+ _snprintf(req,sizeof(req),"Main,ID=ScrollBar,Frame=%s,Part=Back",Frame->szName);
SkinDrawGlyph(g_pCachedWindow->hImageDC,&rLine,&rLine,req);
- _snprintf(req,sizeof(req),"Main,ID = ScrollBar,Frame = %s,Part = Thumb",Frame->szName);
+ _snprintf(req,sizeof(req),"Main,ID=ScrollBar,Frame=%s,Part=Thumb",Frame->szName);
SkinDrawGlyph(g_pCachedWindow->hImageDC,&rThumb,&rThumb,req);
- _snprintf(req,sizeof(req),"Main,ID = ScrollBar,Frame = %s,Part = UpLineButton",Frame->szName);
+ _snprintf(req,sizeof(req),"Main,ID=ScrollBar,Frame=%s,Part=UpLineButton",Frame->szName);
SkinDrawGlyph(g_pCachedWindow->hImageDC,&rUpBtn,&rUpBtn,req);
- _snprintf(req,sizeof(req),"Main,ID = ScrollBar,Frame = %s,Part = DownLineButton",Frame->szName);
+ _snprintf(req,sizeof(req),"Main,ID=ScrollBar,Frame=%s,Part=DownLineButton",Frame->szName);
SkinDrawGlyph(g_pCachedWindow->hImageDC,&rDnBtn,&rDnBtn,req);
}
}
@@ -3777,7 +3777,7 @@ int ske_ReCreateBackImage(BOOL Erase,RECT *w) DeleteObject(g_pCachedWindow->hBackDIB);
g_pCachedWindow->hBackDIB = hb2;
FillRect(g_pCachedWindow->hBackDC,&wnd,GetSysColorBrush(COLOR_BTNFACE));
- SkinDrawGlyph(g_pCachedWindow->hBackDC,&wnd,&wnd,"Main,ID = Background,Opt = Non-Layered");
+ SkinDrawGlyph(g_pCachedWindow->hBackDC,&wnd,&wnd,"Main,ID=Background,Opt=Non-Layered");
ske_SetRectOpaque(g_pCachedWindow->hBackDC,&wnd);
}
return 1;
@@ -3802,7 +3802,7 @@ int ske_DrawNonFramedObjects(BOOL Erase,RECT *r) g_pCachedWindow->hBackDIB = hb2;
}
- SkinDrawGlyph(g_pCachedWindow->hBackDC,&w,&w,"Main,ID = Background");
+ SkinDrawGlyph(g_pCachedWindow->hBackDC,&w,&w,"Main,ID=Background");
//--Draw frames captions
{
int i;
diff --git a/plugins/Clist_modern/modern_skinopt.cpp b/plugins/Clist_modern/modern_skinopt.cpp index bfd739edea..1ffb72804c 100644 --- a/plugins/Clist_modern/modern_skinopt.cpp +++ b/plugins/Clist_modern/modern_skinopt.cpp @@ -142,7 +142,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara sd = ( SkinListData* )( tvi.lParam );
}
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 );
@@ -291,8 +291,8 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara dWidth = ( int )( xScale*bmp.bmWidth );
dHeight = ( int )( yScale*bmp.bmHeight );
//CalcPosition
- imgPos.x = workRect.left+( ( wWidth-dWidth )>>1 );
- imgPos.y = workRect.top+( ( wHeight-dHeight )>>1 );
+ imgPos.x = workRect.left+(( wWidth-dWidth )>>1 );
+ imgPos.y = workRect.top+(( wHeight-dHeight )>>1 );
//DrawImage
if ( !g_CluiData.fGDIPlusFail ) //Use gdi+ engine
{
@@ -316,7 +316,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara break;
case WM_NOTIFY:
- switch ( ( ( LPNMHDR )lParam )->idFrom )
+ switch (( ( LPNMHDR )lParam )->idFrom )
{
case IDC_TREE1:
{
@@ -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 );
@@ -417,7 +417,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara break;
}
case 0:
- switch ( ( ( LPNMHDR )lParam )->code )
+ switch (( ( LPNMHDR )lParam )->code )
{
case PSN_APPLY:
{
@@ -537,7 +537,7 @@ HTREEITEM AddSkinToList( HWND hwndDlg, TCHAR * path, TCHAR* file ) _sntprintf( fullName, SIZEOF( fullName ), _T("%s\\%s"), path, file );
memmove( defskinname, file, (_tcslen( file )-4) * sizeof(TCHAR));
defskinname[_tcslen( file )+1] = _T('\0');
- if ( !file || _tcschr( file, _T('%')) )
+ if ( !file || _tcschr( file, _T('%')))
{
//sd->File = "%Default Skin%";
_sntprintf( sd->File, MAX_PATH, _T("%%Default Skin%%"));
@@ -583,7 +583,7 @@ HTREEITEM FindChild( HWND hTree, HTREEITEM Parent, TCHAR * Caption, void * data TreeView_GetItem( hTree, &tvi );
sd = ( SkinListData* )( tvi.lParam );
if ( sd )
- if ( !_tcsicmp( sd->File, ( ( SkinListData* )data )->File ))
+ if ( !_tcsicmp( sd->File, (( SkinListData* )data )->File ))
return tmp;
}
else
@@ -679,7 +679,7 @@ INT_PTR SvcActiveSkin(WPARAM wParam, LPARAM lParam) INT_PTR SvcApplySkin(WPARAM wParam, LPARAM lParam)
{
- ske_LoadSkinFromIniFile( (TCHAR *)lParam, FALSE );
+ ske_LoadSkinFromIniFile((TCHAR *)lParam, FALSE );
ske_LoadSkinFromDB( );
glOtherSkinWasLoaded = TRUE;
pcli->pfnClcBroadcast( INTM_RELOADOPTIONS, 0, 0 );
@@ -721,7 +721,7 @@ INT_PTR SvcPreviewSkin(WPARAM wParam, LPARAM lParam) TCHAR imfn[MAX_PATH] = {0};
TCHAR skinfolder[MAX_PATH] = {0};
GetPrivateProfileString( _T( "Skin_Description_Section" ), _T( "Preview" ), _T( "" ), imfn, SIZEOF( imfn ), (LPCTSTR)lParam );
- IniParser::GetSkinFolder( (LPCTSTR)lParam, skinfolder );
+ IniParser::GetSkinFolder((LPCTSTR)lParam, skinfolder );
_sntprintf( prfn, SIZEOF( prfn ), _T("%s\\%s"), skinfolder, imfn );
CallService( MS_UTILS_PATHTOABSOLUTET, ( WPARAM )prfn, ( LPARAM ) imfn );
char * imfn_ch = mir_t2a( imfn );
@@ -747,8 +747,8 @@ INT_PTR SvcPreviewSkin(WPARAM wParam, LPARAM lParam) dWidth = ( int )( xScale*bmp.bmWidth );
dHeight = ( int )( yScale*bmp.bmHeight );
//CalcPosition
- imgPos.x = workRect.left+( ( wWidth-dWidth )>>1 );
- imgPos.y = workRect.top+( ( wHeight-dHeight )>>1 );
+ imgPos.x = workRect.left+(( wWidth-dWidth )>>1 );
+ imgPos.y = workRect.top+(( wHeight-dHeight )>>1 );
//DrawImage
if ( !g_CluiData.fGDIPlusFail ) //Use gdi+ engine
{
diff --git a/plugins/Clist_modern/modern_skinselector.cpp b/plugins/Clist_modern/modern_skinselector.cpp index e0eb272f10..2500bc3ac6 100644 --- a/plugins/Clist_modern/modern_skinselector.cpp +++ b/plugins/Clist_modern/modern_skinselector.cpp @@ -649,15 +649,15 @@ int RegisterButtonByParce(char * ObjectName, char * Params) GetParamN(Params,Section, SIZEOF(Section),2,',',0);
GetParamN(Params,Type, SIZEOF(Type),3,',',0);
}
- alingnto = ( (TL[0] == 'R') ? SBF_ALIGN_TL_RIGHT : 0 )
- +( (TL[0] == 'C') ? SBF_ALIGN_TL_HCENTER : 0 )
- +( (TL[1] == 'B') ? SBF_ALIGN_TL_BOTTOM : 0 )
- +( (TL[1] == 'C') ? SBF_ALIGN_TL_VCENTER : 0 )
- +( (TL[2] == 'R') ? SBF_ALIGN_BR_RIGHT : 0 )
- +( (TL[2] == 'C') ? SBF_ALIGN_BR_HCENTER : 0 )
- +( (TL[3] == 'B') ? SBF_ALIGN_BR_BOTTOM : 0 )
- +( (TL[3] == 'C') ? SBF_ALIGN_BR_VCENTER : 0 )
- +( (TL[4] == 'I') ? SBF_CALL_ON_PRESS : 0 );
+ alingnto = ((TL[0] == 'R') ? SBF_ALIGN_TL_RIGHT : 0 )
+ +((TL[0] == 'C') ? SBF_ALIGN_TL_HCENTER : 0 )
+ +((TL[1] == 'B') ? SBF_ALIGN_TL_BOTTOM : 0 )
+ +((TL[1] == 'C') ? SBF_ALIGN_TL_VCENTER : 0 )
+ +((TL[2] == 'R') ? SBF_ALIGN_BR_RIGHT : 0 )
+ +((TL[2] == 'C') ? SBF_ALIGN_BR_HCENTER : 0 )
+ +((TL[3] == 'B') ? SBF_ALIGN_BR_BOTTOM : 0 )
+ +((TL[3] == 'C') ? SBF_ALIGN_BR_VCENTER : 0 )
+ +((TL[4] == 'I') ? SBF_CALL_ON_PRESS : 0 );
if (a) res = ModernSkinButton_AddButton(pcli->hwndContactList,ObjectName+1,pServiceName,pStatusServiceName,"\0",Left,Top,Right,Bottom,alingnto,TranslateTS(Hint),Section,Type,MinWidth,MinHeight);
else res = ModernSkinButton_AddButton(pcli->hwndContactList,ObjectName+1,pServiceName,pStatusServiceName,"\0",Left,Top,Right,Bottom,alingnto,TranslateTS(Hint),NULL,NULL,MinWidth,MinHeight);
}
diff --git a/plugins/Clist_modern/modern_statusbar.cpp b/plugins/Clist_modern/modern_statusbar.cpp index 8c15eecc77..f7e61abab1 100644 --- a/plugins/Clist_modern/modern_statusbar.cpp +++ b/plugins/Clist_modern/modern_statusbar.cpp @@ -177,19 +177,14 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) int xstatus = 0;
SIZE textSize = {0};
GetClientRect(hWnd,&rc);
- if (g_CluiData.fDisableSkinEngine)
- {
+ if (g_CluiData.fDisableSkinEngine) {
if (g_StatusBarData.bkUseWinColors && xpt_IsThemed(g_StatusBarData.hTheme))
- {
xpt_DrawTheme(g_StatusBarData.hTheme, hWnd, hDC, 0, 0, &rc, &rc);
- }
else
DrawBackGround(hWnd, hDC, g_StatusBarData.hBmpBackground, g_StatusBarData.bkColour, g_StatusBarData.backgroundBmpUse );
}
- else
- {
- SkinDrawGlyph(hDC,&rc,&rc,"Main,ID = StatusBar"); //TBD
- }
+ else SkinDrawGlyph(hDC,&rc,&rc,"Main,ID=StatusBar"); //TBD
+
g_StatusBarData.nProtosPerLine = db_get_b(NULL,"CLUI","StatusBarProtosPerLine",SETTING_PROTOSPERLINE_DEFAULT);
hOldFont = g_clcPainter.ChangeToFont(hDC,NULL,FONTID_STATUSBAR_PROTONAME,NULL);
@@ -469,7 +464,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) w += textSize.cx + 3 + spaceWidth;
}
- if ( ( ProtosData[i].showProtoName) ||
+ if (( ProtosData[i].showProtoName) ||
(ProtosData[i].showProtoEmails && ProtosData[i].ProtoEMailCount ) ||
(ProtosData[i].showStatusName) ||
((ProtosData[i].xStatusMode&8) && ProtosData[i].ProtoXStatus))
@@ -597,7 +592,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) SelectClipRgn(hDC,rgn);
ProtosData[i].DoubleIcons = FALSE;
- DWORD dim = ProtosData[i].isDimmed ? ( ( 64 << 24 ) | 0x80 ) : 0;
+ DWORD dim = ProtosData[i].isDimmed ? (( 64 << 24 ) | 0x80 ) : 0;
if ((ProtosData[i].xStatusMode&3) == 3)
{
@@ -615,7 +610,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if (hIcon) mod_DrawIconEx_helper(hDC,x,iconY,hIcon,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL| ((hxIcon && (ProtosData[i].xStatusMode&4))?(192 << 24):0 ) | dim );
}
- if ( ( hxIcon || hIcon) && TRUE /* TODO g_StatusBarData.bDrawLockOverlay options to draw locked proto*/ )
+ if (( hxIcon || hIcon) && TRUE /* TODO g_StatusBarData.bDrawLockOverlay options to draw locked proto*/ )
{
if ( db_get_b( NULL,ProtosData[i].AccountName,"LockMainStatus",0 ))
{
@@ -853,7 +848,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam NotifyEventHooks(g_CluiData.hEventStatusBarHideToolTip,0,0);
tooltipshoing = FALSE;
};
- ID = Sync( FindFrameID, hwnd );
+ ID=Sync( FindFrameID, hwnd );
if (ID)
{
res = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS,ID),0);
@@ -976,7 +971,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam BOOL bShift = ( GetKeyState( VK_SHIFT )&0x8000 );
BOOL bCtrl = ( GetKeyState( VK_CONTROL )&0x8000 );
- if ( ( msg == WM_MBUTTONDOWN || ( msg == WM_RBUTTONDOWN && bCtrl ) || isOnExtra) && _ModernStatus_OnExtraIconClick( i ))
+ if (( msg == WM_MBUTTONDOWN || ( msg == WM_RBUTTONDOWN && bCtrl ) || isOnExtra) && _ModernStatus_OnExtraIconClick( i ))
{
return TRUE;
}
@@ -1054,7 +1049,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam {
if (msg == WM_RBUTTONDOWN)
{
- BOOL a = ( (g_StatusBarData.perProtoConfig && ProtosData[i].SBarRightClk) || g_StatusBarData.SBarRightClk );
+ BOOL a = ((g_StatusBarData.perProtoConfig && ProtosData[i].SBarRightClk) || g_StatusBarData.SBarRightClk );
if ( a ^ bShift )
hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN,0,0);
else
diff --git a/plugins/Clist_modern/modern_tbbutton.cpp b/plugins/Clist_modern/modern_tbbutton.cpp index 8421785765..bb3169294f 100644 --- a/plugins/Clist_modern/modern_tbbutton.cpp +++ b/plugins/Clist_modern/modern_tbbutton.cpp @@ -294,7 +294,7 @@ static LRESULT CALLBACK ToolbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam return 1;
case WM_CAPTURECHANGED:
- if ( (HWND)lParam != lpSBData->hwnd && lpSBData->stateId != PBS_DISABLED) {
+ if ((HWND)lParam != lpSBData->hwnd && lpSBData->stateId != PBS_DISABLED) {
// don't change states if disabled
lpSBData->stateId = PBS_NORMAL;
InvalidateParentRect(lpSBData->hwnd, NULL, TRUE);
@@ -303,8 +303,8 @@ static LRESULT CALLBACK ToolbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam case WM_LBUTTONDOWN:
{
- int xPos = ( ( int )( short ) LOWORD( lParam ));
- int yPos = ( ( int )( short ) HIWORD( lParam ));
+ int xPos = (( int )( short ) LOWORD( lParam ));
+ int yPos = (( int )( short ) HIWORD( lParam ));
POINT ptMouse = { xPos, yPos };
RECT rcClient;
@@ -526,13 +526,8 @@ static LRESULT BroadCastMessageToChild(HWND hwnd, int message, WPARAM wParam, LP return 1;
}
-static void CustomizeButton(HANDLE ttbid, HWND hWnd, LPARAM lParam)
+void MakeButtonSkinned(HWND hWnd)
{
- if (ttbid == TTB_WINDOW_HANDLE) {
- CustomizeToolbar(hWnd);
- return;
- }
-
MButtonCustomize Custom;
Custom.cbLen = sizeof(TBBUTTONDATA);
Custom.fnPainter = (pfnPainterFunc)PaintWorker;
@@ -540,12 +535,23 @@ static void CustomizeButton(HANDLE ttbid, HWND hWnd, LPARAM lParam) SendMessage(hWnd, BUTTONSETCUSTOM, 0, (LPARAM)&Custom);
TBBUTTONDATA* p = (TBBUTTONDATA*)GetWindowLongPtr(hWnd, 0);
- sprintf(p->szButtonID, "Toolbar.%p", p->hwnd);
p->nFontID = -1;
p->hThemeButton = xpt_AddThemeHandle(p->hwnd, L"BUTTON");
p->hThemeToolbar = xpt_AddThemeHandle(p->hwnd, L"TOOLBAR");
WindowList_Add(hButtonWindowList, hWnd, NULL);
+}
+
+static void CustomizeButton(HANDLE ttbid, HWND hWnd, LPARAM lParam)
+{
+ if (ttbid == TTB_WINDOW_HANDLE) {
+ CustomizeToolbar(hWnd);
+ return;
+ }
+
+ MakeButtonSkinned(hWnd);
+ TBBUTTONDATA* p = (TBBUTTONDATA*)GetWindowLongPtr(hWnd, 0);
+ sprintf(p->szButtonID, "Toolbar.%p", p->hwnd);
SendMessage(hWnd, MBM_UPDATETRANSPARENTFLAG, 0, 2);
}
diff --git a/plugins/Clist_modern/modern_viewmodebar.cpp b/plugins/Clist_modern/modern_viewmodebar.cpp index c771e4b6f6..2eb2a02c1c 100644 --- a/plugins/Clist_modern/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/modern_viewmodebar.cpp @@ -32,6 +32,8 @@ $Id: viewmodes.c 2998 2006-06-01 07:11:52Z nightwish2004 $ #define TIMERID_VIEWMODEEXPIRE 100
+void MakeButtonSkinned(HWND hWnd);
+
typedef int (__cdecl *pfnEnumCallback)(char *szName);
static HWND clvmHwnd = 0;
static int clvm_curItem = 0;
@@ -64,7 +66,7 @@ static int DrawViewModeBar(HWND hWnd, HDC hDC) {
RECT rc;
GetClientRect(hWnd, &rc);
- SkinDrawGlyph(hDC,&rc,&rc,"ViewMode,ID = Background");
+ SkinDrawGlyph(hDC,&rc,&rc,"ViewMode,ID=Background");
return 0;
}
@@ -1042,10 +1044,10 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM switch(msg) {
case WM_CREATE:
{
- HWND hwndButton;
RECT rcMargins = {12,0,2,0};
- hwndSelector = CreateWindow( SKINBUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP , 0, 0, 20, 20,
+ hwndSelector = CreateWindow( MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP , 0, 0, 20, 20,
hwnd, (HMENU) IDC_SELECTMODE, g_hInst, NULL);
+ MakeButtonSkinned(hwndSelector);
SendMessage(hwndSelector, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select a view mode"), 0);
SendMessage(hwndSelector, BUTTONSETMARGINS,0 ,(LPARAM) &rcMargins);
SendMessage(hwndSelector, BUTTONSETID,0 ,(LPARAM) "ViewMode.Select" );
@@ -1055,15 +1057,17 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM SendMessage(hwndSelector, BUTTONSETSENDONDOWN, 0 ,(LPARAM) 1 );
//SendMessage(hwndSelector, BM_SETASMENUACTION, 1, 0);
- hwndButton = CreateWindow( SKINBUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ HWND hwndButton = CreateWindow( MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU) IDC_CONFIGUREMODES, g_hInst, NULL);
+ MakeButtonSkinned(hwndButton);
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Setup view modes"), 0);
SendMessage(hwndButton, BUTTONSETID,0 ,(LPARAM) "ViewMode.Setup" );
SendMessage(hwndButton, BUTTONSETASFLATBTN, TRUE, 0 );
SendMessage(hwndButton, MBM_UPDATETRANSPARENTFLAG, 0, 2);
- hwndButton = CreateWindow( SKINBUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
+ hwndButton = CreateWindow( MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20,
hwnd, (HMENU) IDC_RESETMODES, g_hInst, NULL);
+ MakeButtonSkinned(hwndButton);
SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear view mode and return to default display"), 0);
SendMessage(hwndButton, BUTTONSETID,0 ,(LPARAM) "ViewMode.Clear" );
SendMessage(hwnd, WM_USER + 100, 0, 0);
@@ -1085,8 +1089,9 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM PosBatch = DeferWindowPos(PosBatch, GetDlgItem(hwnd, IDC_SELECTMODE), 0,
1, 1, rcCLVMFrame.right - 46, 18, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW | SWP_NOCOPYBITS);
EndDeferWindowPos(PosBatch);
- break;
}
+ break;
+
case WM_USER + 100:
SendMessage(GetDlgItem(hwnd, IDC_RESETMODES), MBM_SETICOLIBHANDLE, 0,
(LPARAM) RegisterIcolibIconHandle("CLN_CLVM_reset", "Contact List",Translate("Reset view mode"), _T("clisticons.dll"),9, g_hInst, IDI_RESETVIEW ));
@@ -1112,8 +1117,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM }
}
- if (g_CluiData.bFilterEffective)
- {
+ if (g_CluiData.bFilterEffective) {
TCHAR * temp;
//temp = alloca((strlen(szSetting)+1)*sizeof(TCHAR));
mir_utf8decode(g_CluiData.current_viewmode,&temp);
@@ -1122,35 +1126,21 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM mir_free(temp);
}
}
- else
- SetWindowText(GetDlgItem(hwnd, IDC_SELECTMODE), TranslateT("All contacts"));
+ else SetWindowText(GetDlgItem(hwnd, IDC_SELECTMODE), TranslateT("All contacts"));
break;
+
case WM_ERASEBKGND:
if (g_CluiData.fDisableSkinEngine)
return sttDrawViewModeBackground(hwnd, (HDC)wParam, NULL);
else
return 0;
+
case WM_NCPAINT:
case WM_PAINT:
- /*if ( g_CluiData.fDisableSkinEngine )
- {
- PAINTSTRUCT ps;
- HDC hdc = BeginPaint(hwnd,&ps);
- if (hdc)
- {
- HBRUSH br = GetSysColorBrush(COLOR_3DFACE);
- FillRect(hdc,&ps.rcPaint,br);
- }
- EndPaint(hwnd,&ps);
- }
- else
- */
if (GetParent(hwnd) == pcli->hwndContactList && g_CluiData.fLayered)
- {
ValidateRect(hwnd,NULL);
- }
- else if (GetParent(hwnd) != pcli->hwndContactList || !g_CluiData.fLayered)
- {
+
+ else if (GetParent(hwnd) != pcli->hwndContactList || !g_CluiData.fLayered) {
HDC hdc, hdc2;
HBITMAP hbmp,hbmpo;
RECT rc = {0};
@@ -1163,39 +1153,29 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM hbmpo = (HBITMAP)SelectObject(hdc2,hbmp);
if ( g_CluiData.fDisableSkinEngine )
- {
sttDrawViewModeBackground( hwnd, hdc2, &rc );
- }
- else
- {
- if (GetParent(hwnd) != pcli->hwndContactList)
- {
+ else {
+ if (GetParent(hwnd) != pcli->hwndContactList) {
HBRUSH br = GetSysColorBrush(COLOR_3DFACE);
FillRect(hdc2,&rc,br);
}
- else
- ske_BltBackImage(hwnd,hdc2,&rc);
+ else ske_BltBackImage(hwnd,hdc2,&rc);
DrawViewModeBar(hwnd,hdc2);
}
- {
- int i;
- for (i=0; _buttons[i] != 0; i++)
- {
- RECT childRect;
- RECT MyRect;
- POINT Offset;
- GetWindowRect(hwnd,&MyRect);
- GetWindowRect(GetDlgItem(hwnd, _buttons[i]),&childRect);
- Offset.x = childRect.left-MyRect.left;;
- Offset.y = childRect.top-MyRect.top;
- SendMessage(GetDlgItem(hwnd, _buttons[i]),BUTTONDRAWINPARENT,(WPARAM)hdc2,(LPARAM)&Offset);
-
- }
+ for (int i=0; _buttons[i] != 0; i++) {
+ RECT childRect;
+ RECT MyRect;
+ POINT Offset;
+ GetWindowRect(hwnd,&MyRect);
+ GetWindowRect(GetDlgItem(hwnd, _buttons[i]),&childRect);
+ Offset.x = childRect.left-MyRect.left;;
+ Offset.y = childRect.top-MyRect.top;
+ SendMessage(GetDlgItem(hwnd, _buttons[i]),BUTTONDRAWINPARENT,(WPARAM)hdc2,(LPARAM)&Offset);
}
- BitBlt(hdc,rc.left,rc.top,rc.right-rc.left,rc.bottom-rc.top,
- hdc2,rc.left,rc.top,SRCCOPY);
+
+ BitBlt(hdc,rc.left,rc.top,rc.right-rc.left,rc.bottom-rc.top,hdc2,rc.left,rc.top,SRCCOPY);
SelectObject(hdc2,hbmpo);
DeleteObject(hbmp);
mod_DeleteDC(hdc2);
@@ -1213,81 +1193,72 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM return 0;
case WM_TIMER:
- switch(wParam) {
- case TIMERID_VIEWMODEEXPIRE:
- {
- POINT pt;
- RECT rcCLUI;
+ if (wParam == TIMERID_VIEWMODEEXPIRE) {
+ POINT pt;
+ RECT rcCLUI;
- GetWindowRect(pcli->hwndContactList, &rcCLUI);
- GetCursorPos(&pt);
- if (PtInRect(&rcCLUI, pt))
- break;
-
- KillTimer(hwnd, wParam);
- if ( !g_CluiData.old_viewmode[0])
- SendMessage(hwnd, WM_COMMAND, IDC_RESETMODES, 0);
- else
- ApplyViewMode((const char *)g_CluiData.old_viewmode);
+ GetWindowRect(pcli->hwndContactList, &rcCLUI);
+ GetCursorPos(&pt);
+ if (PtInRect(&rcCLUI, pt))
break;
- }
+
+ KillTimer(hwnd, wParam);
+ if ( !g_CluiData.old_viewmode[0])
+ SendMessage(hwnd, WM_COMMAND, IDC_RESETMODES, 0);
+ else
+ ApplyViewMode((const char *)g_CluiData.old_viewmode);
}
break;
case WM_COMMAND:
- {
- switch(LOWORD(wParam)) {
- case IDC_SELECTMODE:
+ switch(LOWORD(wParam)) {
+ case IDC_SELECTMODE:
+ {
+ RECT rc;
+ POINT pt;
+ int selection;
+ MENUITEMINFO mii = {0};
+ TCHAR szTemp[256];
+
+ BuildViewModeMenu();
+ GetWindowRect((HWND)lParam, &rc);
+ pt.x = rc.left;
+ pt.y = rc.bottom;
+ selection = TrackPopupMenu(hViewModeMenu,TPM_RETURNCMD|TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON, pt.x, pt.y, 0, GetParent(hwnd), NULL);
+ PostMessage(hwnd, WM_NULL, 0, 0);
+ if (selection)
{
- RECT rc;
- POINT pt;
- int selection;
- MENUITEMINFO mii = {0};
- TCHAR szTemp[256];
-
- BuildViewModeMenu();
- //GetWindowRect(GetDlgItem(hwnd, IDC_SELECTMODE), &rc);
- GetWindowRect((HWND)lParam, &rc);
- pt.x = rc.left;
- pt.y = rc.bottom;
- selection = TrackPopupMenu(hViewModeMenu,TPM_RETURNCMD|TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON, pt.x, pt.y, 0, GetParent(hwnd), NULL);
- PostMessage(hwnd, WM_NULL, 0, 0);
- if (selection)
- {
- if (selection == 10001)
- goto clvm_config_command;
- else if (selection == 10002)
- goto clvm_reset_command;
-
- mii.cbSize = sizeof(mii);
- mii.fMask = MIIM_STRING;
- mii.dwTypeData = szTemp;
- mii.cch = 256;
- GetMenuItemInfo(hViewModeMenu, selection, FALSE, &mii);
-
- char * temp = mir_utf8encodeT(szTemp);
- ApplyViewMode(temp);
- if (temp)
- mir_free(temp);
- }
- break;
+ if (selection == 10001)
+ goto clvm_config_command;
+ else if (selection == 10002)
+ goto clvm_reset_command;
+
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_STRING;
+ mii.dwTypeData = szTemp;
+ mii.cch = 256;
+ GetMenuItemInfo(hViewModeMenu, selection, FALSE, &mii);
+
+ char * temp = mir_utf8encodeT(szTemp);
+ ApplyViewMode(temp);
+ if (temp)
+ mir_free(temp);
}
- case IDC_RESETMODES:
-clvm_reset_command:
- ApplyViewMode( "" );
break;
- case IDC_CONFIGUREMODES:
- {
-clvm_config_command:
- if ( !g_ViewModeOptDlg)
- CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_OPT_VIEWMODES), 0, DlgProcViewModesSetup, 0);
- break;
- }
}
+ case IDC_RESETMODES:
+clvm_reset_command:
+ ApplyViewMode( "" );
break;
+ case IDC_CONFIGUREMODES:
+clvm_config_command:
+ if ( !g_ViewModeOptDlg)
+ CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_OPT_VIEWMODES), 0, DlgProcViewModesSetup, 0);
+ break;
}
+
default:
return DefWindowProc(hwnd, msg, wParam, lParam);
}
@@ -1378,7 +1349,6 @@ void CreateViewModeFrame() wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = g_hInst;
- //wndclass.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH) GetSysColorBrush(COLOR_3DFACE);
wndclass.lpszMenuName = 0;
@@ -1580,7 +1550,7 @@ void ApplyViewMode(const char *Name, bool onlySelector ) }
}
- TCHAR * temp = mir_utf8decodeW( ( name[0] == (char)13 ) ? name + 1 : name );
+ TCHAR * temp = mir_utf8decodeW(( name[0] == (char)13 ) ? name + 1 : name );
SetWindowText(hwndSelector, temp);
mir_free(temp);
diff --git a/plugins/Clist_modern/res/skin.msf b/plugins/Clist_modern/res/skin.msf index 4f8c1a5b58..8197689075 100644 --- a/plugins/Clist_modern/res/skin.msf +++ b/plugins/Clist_modern/res/skin.msf @@ -76,67 +76,67 @@ $$BarButton = sGlyph,Fragment,back%.tga,31,50,7,20,StretchBoth,3,4,2,5,150 $$BarButton/Hot = sGlyph,Fragment,back%.tga,24,50,7,20,StretchBoth,3,4,2,5,200
$$BarButton/Pressed = sGlyph,Fragment,back%.tga,24,49,7,20,StretchBoth,3,4,2,5,255
-@0 = s$$Window:Main,ID = Background
-@1 = s$$Background:CL,ID = Background
-@10 = s$$SubGroup/Closed/Hot:CL,ID = Row,Type = Group,Open = False,Hot = True,Indent^0
-@11 = s$$SubGroup/Closed/Selected:CL,ID = Row,Type = Group,Open = False,Selected = True,Indent^0
-@12 = s$$SubGroup/Closed:CL,ID = Row,Type = Group,Open = False,Indent^0
-@13 = s$$SubGroup/Open/Hot:CL,ID = Row,Type = Group,Open = True,Hot = True,Indent^0
-@14 = s$$SubGroup/Open/Selected:CL,ID = Row,Type = Group,Open = True,Selected = True,Indent^0
-@15 = s$$SubGroup/Open:CL,ID = Row,Type = Group,Open = True,Indent^0
-@20 = s$$Group/Closed/Hot:CL,ID = Row,Type = Group,Open = False,Hot = True
-@21 = s$$Group/Closed/Selected:CL,ID = Row,Type = Group,Open = False,Selected = True
-@22 = s$$Group/Closed:CL,ID = Row,Type = Group,Open = False
-@23 = s$$Group/Open/Hot:CL,ID = Row,Type = Group,Open = True,Hot = True
-@24 = s$$Group/Open/Selected:CL,ID = Row,Type = Group,Open = True,Selected = True
-@25 = s$$Group/Open:CL,ID = Row,Type = Group,Open = True
-@50 = s$$Contact/Selected:CL,ID = Row,Type = *Contact,Selected = True
-@51 = s$$Contact/Hot:CL,ID = Row,Type = *Contact,Hot = True
-@62 = s$$Contact/Last:CL,ID = Row,Type = SubContact,SubPos = Last,GroupPos = Last
-@63 = s$$Contact/Normal:CL,ID = Row,Type = SubContact,SubPos = First
-@64 = s$$Contact/Last:CL,ID = Row,Type = SubContact,SubPos = First-Single,GroupPos = Last
-@65 = s$$Contact/Normal:CL,ID = Row,Type = SubContact,SubPos = Last,GroupPos = First
-@66 = s$$Contact/Last:CL,ID = Row,Type = SubContact,SubPos = First-Single,GroupPos = First-Single
-@67 = s$$Contact/Last:CL,ID = Row,Type = MetaContact,GroupPos = Last,Open = False
-@68 = s$$Contact/First:CL,ID = Row,Type = MetaContact,GroupPos = First,Open = False
-@69 = s$$Contact/First:CL,ID = Row,Type = MetaContact,GroupPos = First
-@70 = s$$Contact/Last:CL,ID = Row,Type = MetaContact,GroupPos = First-Single,Open = False
-@71 = s$$Contact/Normal:CL,ID = Row,Type = Contact,GroupPos = Last,Indent = 2
-@72 = s$$Contact/Normal:CL,ID = Row,Type = Contact,GroupPos = First,Indent = 2
-@73 = s$$Contact/Last:CL,ID = Row,Type = Contact,GroupPos = Last
-@74 = s$$Contact/Last:CL,ID = Row,Type = Contact,GroupPos = First-Single
-;@75 = s$$Group/Open:CL,ID = Row,Type = *Contact,Index = 0 ; Fix of first contact is group liked then groups are disabled fix
-@75 = s$$Contact/First:CL,ID = Row,Type = *Contact,Index = 0
-@76 = s$$Contact/First:CL,ID = Row,Type = *Contact,Index = 1
-@77 = s$$Contact/First:CL,ID = Row,Type = *Contact,GroupPos = First
-@78 = s$$Contact/Normal:CL,ID = Row,Type = *Contact
-@80 = s$$Scroll/Back:Main,ID = ScrollBar,Part = Back
-@90 = s$$Scroll/BtnUp:Main,ID = ScrollBar,Part = UpLineButton
-@100 = s$$Scroll/BtnDn:Main,ID = ScrollBar,Part = DownLineButton
-@110 = s$$Scroll/Thumb:Main,ID = ScrollBar,Part = Thumb
-@120 = s$$FrameTitleBar:Main,ID = FrameCaption
-@130 = s$$StatusBar:Main,ID = StatusBar
-@131 = s$$EventArea:Main,ID = EventArea
-@140 = s$$Button/Close/Down:MButton,ID = close,Down = 1
-@150 = s$$Button/Close/Hovered:MButton,ID = close,Hovered = 1
-@160 = s$$Button/Close/Normal:MButton,ID = close
-@170 = s$$Button/Minimize/Down:MButton,ID = minimize,Down = 1
-@180 = s$$Button/Minimize/Hovered:MButton,ID = minimize,Hovered = 1
-@190 = s$$Button/Minimize/Normal:MButton,ID = minimize
-@200 = s$$Button/Menu/Down:MButton,ID = mainmenu,Down = 1
-@210 = s$$Button/Menu/Hovered:MButton,ID = mainmenu,Hovered = 1
-@220 = s$$Button/Menu/Normal:MButton,ID = mainmenu
-
-@300 = s$$ViewMode:ViewMode,ID = Background
-@301 = s$$ViewMode/CurrentMode/Pressed:Button,ID = ViewMode.Select,Pressed = True
-@302 = s$$ViewMode/CurrentMode/Hot:Button,ID = ViewMode.Select,Hovered = True
-@303 = s$$ViewMode/CurrentMode:Button,ID = ViewMode.Select
-@304 = s$$ViewMode/SetupMode/Pressed:Button,ID = ViewMode.Setup,Pressed = True
-@305 = s$$ViewMode/SetupMode/Hot:Button,ID = ViewMode.Setup,Hovered = True
-@306 = s$$ViewMode/SetupMode:Button,ID = ViewMode.Setup
-@307 = s$$ViewMode/ResetMode/Pressed:Button,ID = ViewMode.Clear,Pressed = True
-@308 = s$$ViewMode/ResetMode/Hot:Button,ID = ViewMode.Clear,Hovered = True
-@309 = s$$ViewMode/ResetMode:Button,ID = ViewMode.Clear
+@0 = s$$Window:Main,ID=Background
+@1 = s$$Background:CL,ID=Background
+@10 = s$$SubGroup/Closed/Hot:CL,ID=Row,Type=Group,Open = False,Hot = True,Indent^0
+@11 = s$$SubGroup/Closed/Selected:CL,ID=Row,Type=Group,Open = False,Selected = True,Indent^0
+@12 = s$$SubGroup/Closed:CL,ID=Row,Type=Group,Open = False,Indent^0
+@13 = s$$SubGroup/Open/Hot:CL,ID=Row,Type=Group,Open = True,Hot = True,Indent^0
+@14 = s$$SubGroup/Open/Selected:CL,ID=Row,Type=Group,Open = True,Selected = True,Indent^0
+@15 = s$$SubGroup/Open:CL,ID=Row,Type=Group,Open = True,Indent^0
+@20 = s$$Group/Closed/Hot:CL,ID=Row,Type=Group,Open = False,Hot = True
+@21 = s$$Group/Closed/Selected:CL,ID=Row,Type=Group,Open = False,Selected = True
+@22 = s$$Group/Closed:CL,ID=Row,Type=Group,Open = False
+@23 = s$$Group/Open/Hot:CL,ID=Row,Type=Group,Open = True,Hot = True
+@24 = s$$Group/Open/Selected:CL,ID=Row,Type=Group,Open = True,Selected = True
+@25 = s$$Group/Open:CL,ID=Row,Type=Group,Open = True
+@50 = s$$Contact/Selected:CL,ID=Row,Type=*Contact,Selected = True
+@51 = s$$Contact/Hot:CL,ID=Row,Type=*Contact,Hot = True
+@62 = s$$Contact/Last:CL,ID=Row,Type=SubContact,SubPos = Last,GroupPos = Last
+@63 = s$$Contact/Normal:CL,ID=Row,Type=SubContact,SubPos = First
+@64 = s$$Contact/Last:CL,ID=Row,Type=SubContact,SubPos = First-Single,GroupPos = Last
+@65 = s$$Contact/Normal:CL,ID=Row,Type=SubContact,SubPos = Last,GroupPos = First
+@66 = s$$Contact/Last:CL,ID=Row,Type=SubContact,SubPos = First-Single,GroupPos = First-Single
+@67 = s$$Contact/Last:CL,ID=Row,Type=MetaContact,GroupPos = Last,Open = False
+@68 = s$$Contact/First:CL,ID=Row,Type=MetaContact,GroupPos = First,Open = False
+@69 = s$$Contact/First:CL,ID=Row,Type=MetaContact,GroupPos = First
+@70 = s$$Contact/Last:CL,ID=Row,Type=MetaContact,GroupPos = First-Single,Open = False
+@71 = s$$Contact/Normal:CL,ID=Row,Type=Contact,GroupPos = Last,Indent = 2
+@72 = s$$Contact/Normal:CL,ID=Row,Type=Contact,GroupPos = First,Indent = 2
+@73 = s$$Contact/Last:CL,ID=Row,Type=Contact,GroupPos = Last
+@74 = s$$Contact/Last:CL,ID=Row,Type=Contact,GroupPos = First-Single
+;@75 = s$$Group/Open:CL,ID=Row,Type=*Contact,Index = 0 ; Fix of first contact is group liked then groups are disabled fix
+@75 = s$$Contact/First:CL,ID=Row,Type=*Contact,Index = 0
+@76 = s$$Contact/First:CL,ID=Row,Type=*Contact,Index = 1
+@77 = s$$Contact/First:CL,ID=Row,Type=*Contact,GroupPos = First
+@78 = s$$Contact/Normal:CL,ID=Row,Type=*Contact
+@80 = s$$Scroll/Back:Main,ID=ScrollBar,Part = Back
+@90 = s$$Scroll/BtnUp:Main,ID=ScrollBar,Part = UpLineButton
+@100 = s$$Scroll/BtnDn:Main,ID=ScrollBar,Part = DownLineButton
+@110 = s$$Scroll/Thumb:Main,ID=ScrollBar,Part = Thumb
+@120 = s$$FrameTitleBar:Main,ID=FrameCaption
+@130 = s$$StatusBar:Main,ID=StatusBar
+@131 = s$$EventArea:Main,ID=EventArea
+@140 = s$$Button/Close/Down:MButton,ID=close,Down = 1
+@150 = s$$Button/Close/Hovered:MButton,ID=close,Hovered = 1
+@160 = s$$Button/Close/Normal:MButton,ID=close
+@170 = s$$Button/Minimize/Down:MButton,ID=minimize,Down = 1
+@180 = s$$Button/Minimize/Hovered:MButton,ID=minimize,Hovered = 1
+@190 = s$$Button/Minimize/Normal:MButton,ID=minimize
+@200 = s$$Button/Menu/Down:MButton,ID=mainmenu,Down = 1
+@210 = s$$Button/Menu/Hovered:MButton,ID=mainmenu,Hovered = 1
+@220 = s$$Button/Menu/Normal:MButton,ID=mainmenu
+
+@300 = s$$ViewMode:ViewMode,ID=Background
+@301 = s$$ViewMode/CurrentMode/Pressed:Button,ID=ViewMode.Select,Pressed = True
+@302 = s$$ViewMode/CurrentMode/Hot:Button,ID=ViewMode.Select,Hovered = True
+@303 = s$$ViewMode/CurrentMode:Button,ID=ViewMode.Select
+@304 = s$$ViewMode/SetupMode/Pressed:Button,ID=ViewMode.Setup,Pressed = True
+@305 = s$$ViewMode/SetupMode/Hot:Button,ID=ViewMode.Setup,Hovered = True
+@306 = s$$ViewMode/SetupMode:Button,ID=ViewMode.Setup
+@307 = s$$ViewMode/ResetMode/Pressed:Button,ID=ViewMode.Clear,Pressed = True
+@308 = s$$ViewMode/ResetMode/Hot:Button,ID=ViewMode.Clear,Hovered = True
+@309 = s$$ViewMode/ResetMode:Button,ID=ViewMode.Clear
@1610 = s$$BarButton/Pressed:Button,Pressed = True
@1620 = s$$BarButton/Hot:Button,Hovered = True
@1630 = s$$BarButton:Button
|