summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-02 20:55:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-02 20:55:18 +0000
commit78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch)
tree8512c50df70b8dd80c919e88ade3419207c95956 /plugins/UserInfoEx
parentce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff)
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r--plugins/UserInfoEx/Flags/svc_countrylistext.cpp8
-rw-r--r--plugins/UserInfoEx/Flags/svc_flags.cpp44
-rw-r--r--plugins/UserInfoEx/Flags/svc_flagsicons.cpp8
-rw-r--r--plugins/UserInfoEx/UInfoEx_10.vcxproj6
-rw-r--r--plugins/UserInfoEx/classMAnnivDate.cpp4
-rw-r--r--plugins/UserInfoEx/commonheaders.cpp6
-rw-r--r--plugins/UserInfoEx/ctrl_tzcombo.h2
-rw-r--r--plugins/UserInfoEx/dlg_anniversarylist.cpp10
-rw-r--r--plugins/UserInfoEx/ex_import/classExImContactBase.cpp10
-rw-r--r--plugins/UserInfoEx/ex_import/classExImContactXML.cpp10
-rw-r--r--plugins/UserInfoEx/mir_db.cpp6
-rw-r--r--plugins/UserInfoEx/mir_menuitems.cpp8
-rw-r--r--plugins/UserInfoEx/psp_options.cpp2
-rw-r--r--plugins/UserInfoEx/psp_profile.cpp2
-rw-r--r--plugins/UserInfoEx/svc_constants.h2
-rw-r--r--plugins/UserInfoEx/svc_email.cpp2
16 files changed, 68 insertions, 62 deletions
diff --git a/plugins/UserInfoEx/Flags/svc_countrylistext.cpp b/plugins/UserInfoEx/Flags/svc_countrylistext.cpp
index 54fcb86675..71b259c7ab 100644
--- a/plugins/UserInfoEx/Flags/svc_countrylistext.cpp
+++ b/plugins/UserInfoEx/Flags/svc_countrylistext.cpp
@@ -301,14 +301,14 @@ INT_PTR ServiceGetCountryByNumber(WPARAM wParam,LPARAM lParam)
int i;
UNREFERENCED_PARAMETER(lParam);
for(i=0; i<SIZEOF(countries); ++i)
- if((int)wParam==countries[i].id)
+ if ((int)wParam==countries[i].id)
return (INT_PTR)countries[i].szName;
return NULL;
}
INT_PTR ServiceGetCountryList(WPARAM wParam,LPARAM lParam)
{
- if((int*)wParam==NULL || (void*)lParam==NULL) return 1;
+ if ((int*)wParam==NULL || (void*)lParam==NULL) return 1;
*(int*)wParam=SIZEOF(countries);
*(struct CountryListEntry**)lParam=countries;
return 0;
@@ -319,8 +319,8 @@ INT_PTR ServiceGetCountryList(WPARAM wParam,LPARAM lParam)
VOID InitCountryListExt()
{
/* hack to replace built-in country list */
- if(!myDestroyServiceFunction(MS_UTILS_GETCOUNTRYLIST))
+ if (!myDestroyServiceFunction(MS_UTILS_GETCOUNTRYLIST))
myCreateServiceFunction(MS_UTILS_GETCOUNTRYLIST,ServiceGetCountryList);
- if(!myDestroyServiceFunction(MS_UTILS_GETCOUNTRYBYNUMBER))
+ if (!myDestroyServiceFunction(MS_UTILS_GETCOUNTRYBYNUMBER))
myCreateServiceFunction(MS_UTILS_GETCOUNTRYBYNUMBER,ServiceGetCountryByNumber);
}
diff --git a/plugins/UserInfoEx/Flags/svc_flags.cpp b/plugins/UserInfoEx/Flags/svc_flags.cpp
index bc3619f273..58fe8eec24 100644
--- a/plugins/UserInfoEx/Flags/svc_flags.cpp
+++ b/plugins/UserInfoEx/Flags/svc_flags.cpp
@@ -91,7 +91,7 @@ static void CALLBACK BufferedProcTimer(HWND hwnd, UINT msg, UINT idTimer, DWORD
for(i=0;i<nCallListCount;++i) {
/* find elapsed procs */
uElapsed=currentTick-callList[i].startTick; /* wraparound works */
- if((uElapsed+USER_TIMER_MINIMUM)>=callList[i].uElapse) {
+ if ((uElapsed+USER_TIMER_MINIMUM)>=callList[i].uElapse) {
/* call elapsed proc */
pfnBuffProc=callList[i].pfnBuffProc;
lParam=callList[i].lParam;
@@ -99,7 +99,7 @@ static void CALLBACK BufferedProcTimer(HWND hwnd, UINT msg, UINT idTimer, DWORD
pszProcName=callList[i].pszProcName;
#endif
/* resize storage array */
- if((i+1)<nCallListCount)
+ if ((i+1)<nCallListCount)
MoveMemory(&callList[i],&callList[i+1],((nCallListCount-i-1)*sizeof(struct BufferedCallData)));
--nCallListCount;
--i; /* reiterate current */
@@ -117,7 +117,7 @@ static void CALLBACK BufferedProcTimer(HWND hwnd, UINT msg, UINT idTimer, DWORD
CallFunctionAsync((void (CALLBACK *)(void*))pfnBuffProc,(void*)lParam); /* compatible */
}
/* find next timer delay */
- else if((callList[i].uElapse-uElapsed)<uElapseNext)
+ else if ((callList[i].uElapse-uElapsed)<uElapseNext)
uElapseNext=callList[i].uElapse-uElapsed;
}
@@ -150,7 +150,7 @@ void _CallFunctionBuffered(BUFFEREDPROC pfnBuffProc,LPARAM lParam,BOOL fAccumula
/* find existing */
for(i=0;i<nCallListCount;++i)
if(callList[i].pfnBuffProc==pfnBuffProc)
- if(!fAccumulateSameParam || callList[i].lParam==lParam) {
+ if (!fAccumulateSameParam || callList[i].lParam==lParam) {
data=&callList[i];
break;
}
@@ -173,7 +173,7 @@ void _CallFunctionBuffered(BUFFEREDPROC pfnBuffProc,LPARAM lParam,BOOL fAccumula
data->pszProcName=pszProcName;
mir_snprintf(szDbgLine,sizeof(szDbgLine),"buffered queue: %s(0x%X)\n",pszProcName,lParam); /* all ascii */
OutputDebugStringA(szDbgLine);
- if(!idBufferedTimer) {
+ if (!idBufferedTimer) {
mir_snprintf(szDbgLine,sizeof(szDbgLine),"next buffered timeout: %ums\n",uElapse); /* all ascii */
OutputDebugStringA(szDbgLine);
}
@@ -222,7 +222,7 @@ static INT_PTR ServiceDetectContactOriginCountry(WPARAM wParam,LPARAM lParam)
else if (countryNumber = (int)DB::Setting::GetWord((HANDLE)wParam,pszProto,"CompanyCountry",0))
return (INT_PTR)countryNumber;
/* fallback ip detect
- else if(countryNumber==0xFFFF && DBGetContactSettingByte(NULL,"Flags","UseIpToCountry",SETTING_USEIPTOCOUNTRY_DEFAULT)){
+ else if(countryNumber==0xFFFF && DBGetContactSettingByte(NULL,"Flags","UseIpToCountry",SETTING_USEIPTOCOUNTRY_DEFAULT)) {
countryNumber=ServiceIpToCountry(DBGetContactSettingDword((HANDLE)wParam,pszProto,"RealIP",0),0);
}*/
@@ -310,7 +310,7 @@ void EnsureExtraImages() //garantieren - sicherstellen - updaten
{
register HANDLE hContact;
//use Clist ExtraImageService?
- if(!myGlobals.ExtraIconsServiceExist) {
+ if (!myGlobals.ExtraIconsServiceExist) {
BYTE idExtraColumnNew = DB::Setting::GetByte(MODNAMEFLAGS,"ExtraImgFlagColumn",SETTING_EXTRAIMGFLAGCOLUMN_DEFAULT);
if(idExtraColumnNew != gFlagsOpts.idExtraColumn) {
/* clear previous column */
@@ -328,11 +328,11 @@ void EnsureExtraImages() //garantieren - sicherstellen - updaten
}
static void CALLBACK UpdateExtraImages(LPARAM lParam) {
- if(!lParam)
+ if (!lParam)
RemoveExtraImages(0);
else EnsureExtraImages();
-/* if(!myGlobals.ExtraIconsServiceExist && !gFlagsOpts.bShowExtraImgFlag)
+/* if (!myGlobals.ExtraIconsServiceExist && !gFlagsOpts.bShowExtraImgFlag)
RemoveExtraImages();
else EnsureExtraImages(); */
}
@@ -364,9 +364,9 @@ static int OnCListApplyIcons(WPARAM wParam,LPARAM lParam) {
//hookProc (ME_DB_CONTACT_SETTINGCHANGED) - workaround for missing event from ExtraIconSvc
static int OnExtraIconSvcChanged(WPARAM wParam,LPARAM lParam) {
DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam;
- if((HANDLE)wParam!=NULL)return 0;
- if(!lstrcmpA(dbcws->szModule, "ExtraIcons") &&
- !lstrcmpA(dbcws->szSetting,"Slot_Flags") ){
+ if ((HANDLE)wParam!=NULL)return 0;
+ if (!lstrcmpA(dbcws->szModule, "ExtraIcons") &&
+ !lstrcmpA(dbcws->szSetting,"Slot_Flags") ) {
BOOL bEnable;
switch (dbcws->value.type) {
case DBVT_BYTE:
@@ -388,7 +388,7 @@ static int OnExtraIconSvcChanged(WPARAM wParam,LPARAM lParam) {
else if(bEnable && !hApplyIconHook) {
hApplyIconHook = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, OnCListApplyIcons);
}
- else if(!bEnable && hApplyIconHook) {
+ else if (!bEnable && hApplyIconHook) {
UnhookEvent(hApplyIconHook); hApplyIconHook = NULL;
}
CallFunctionBuffered(UpdateExtraImages,(LPARAM)bEnable,FALSE,EXTRAIMAGE_REFRESHDELAY);
@@ -416,7 +416,7 @@ VOID SvcFlagsEnableExtraIcons(BYTE bColumn, BOOLEAN bUpdateDB) {
LOCALE_USER_DEFAULT,
LOCALE_ICOUNTRY | LOCALE_RETURN_NUMBER ,
(LPTSTR)&langid, sizeof(langid)/sizeof(TCHAR));
- if(!CallService(MS_UTILS_GETCOUNTRYBYNUMBER,langid,0)) langid = 1;
+ if (!CallService(MS_UTILS_GETCOUNTRYBYNUMBER,langid,0)) langid = 1;
EXTRAICON_INFO ico = {0};
ico.cbSize = sizeof(ico);
@@ -440,15 +440,15 @@ VOID SvcFlagsEnableExtraIcons(BYTE bColumn, BOOLEAN bUpdateDB) {
for(int i=0;i<nCountriesCount;++i)
phExtraImageList[i]=INVALID_HANDLE_VALUE;
}
- if(!hRebuildIconsHook) {
+ if (!hRebuildIconsHook) {
hRebuildIconsHook = HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, OnCListRebuildIcons);
}
}
//init hooks
- if(!hApplyIconHook) {
+ if (!hApplyIconHook) {
hApplyIconHook = HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, OnCListApplyIcons);
}
- if(!hSettingChangedHook) {
+ if (!hSettingChangedHook) {
hSettingChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
}
}
@@ -498,7 +498,7 @@ MsgWndData::FlagsIconSet() {
sid.cbSize = sizeof(sid);
sid.szModule = MODNAMEFLAGS;
/* ensure status icon is registered */
- if( m_contryID!=0xFFFF || gFlagsOpts.bUseUnknownFlag) {
+ if ( m_contryID!=0xFFFF || gFlagsOpts.bUseUnknownFlag) {
/* copy icon as status icon API will call DestroyIcon() on it */
hIcon = LoadFlagIcon(m_contryID);
sid.hIcon = (hIcon!=NULL)?CopyIcon(hIcon):NULL;
@@ -579,14 +579,14 @@ static __inline int MessageAPI_AddIcon(const char* pszName, const char* szModul/
int res = -1;
IconList* p = new IconList(&sid);
- if(!p->m_ID)delete p;
+ if (!p->m_ID)delete p;
else res = gIListMW.insert(p);
if(res == -1)delete p;
return res;
}
void CALLBACK UpdateStatusIcons(LPARAM lParam) {
- if(!lParam) {
+ if (!lParam) {
/* enum all opened message windows */
for (int i = 0; i < gMsgWndList.getCount(); i++)
gMsgWndList[i]->FlagsIconUpdate();
@@ -655,11 +655,11 @@ static int ExtraImgOptInit(WPARAM wParam,LPARAM lParam)
***********************************************************************************************************/
//hookProc ME_DB_CONTACT_SETTINGCHANGED
static int OnContactSettingChanged(WPARAM wParam,LPARAM lParam) {
- if((HANDLE)wParam==NULL) return 0;
+ if ((HANDLE)wParam==NULL) return 0;
DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam;
/* user details update */
- if(/*!lstrcmpA(dbcws->szSetting,"RealIP") || */
+ if (/*!lstrcmpA(dbcws->szSetting,"RealIP") || */
!lstrcmpA(dbcws->szSetting,SET_CONTACT_COUNTRY) ||
!lstrcmpA(dbcws->szSetting,SET_CONTACT_ORIGIN_COUNTRY) ||
!lstrcmpA(dbcws->szSetting,SET_CONTACT_COMPANY_COUNTRY))
diff --git a/plugins/UserInfoEx/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/Flags/svc_flagsicons.cpp
index d01941e323..34fec69c39 100644
--- a/plugins/UserInfoEx/Flags/svc_flagsicons.cpp
+++ b/plugins/UserInfoEx/Flags/svc_flagsicons.cpp
@@ -126,7 +126,7 @@ static int CountryNumberToBitmapIndex(int countryNumber)
if(countryNumber>BitmapIndexMap[i]) low=i+1;
else high=i-1;
}*/
- for( i=0; i < high; i++ ){
+ for ( i=0; i < high; i++ ) {
if(BitmapIndexMap[i]==countryNumber) return i;
}
}
@@ -231,7 +231,7 @@ FIBITMAP* LoadResource(UINT ID, LPTSTR lpType)
static INT_PTR ServiceLoadFlagIcon(WPARAM wParam,LPARAM lParam)
{
/* return handle */
- if((BOOL)lParam) {
+ if ((BOOL)lParam) {
if(phIconHandles==NULL) return NULL;
return (INT_PTR)phIconHandles[CountryNumberToIndex((int)wParam)];
}
@@ -358,7 +358,7 @@ VOID InitIcons()
FIP->FI_Unload(dib_mask);
//convert to target resolution
- if(!hbmMask || !(dib_ico = ConvertTo(dib_ico, bitDest, 0))) {
+ if (!hbmMask || !(dib_ico = ConvertTo(dib_ico, bitDest, 0))) {
FIP->FI_Unload(dib_ico);
if(hbmMask) DeleteObject(hbmMask);
return;
@@ -393,7 +393,7 @@ VOID InitIcons()
hScrBM = FIP->FI_CreateHBITMAPFromDIB(dib_ico);
FIP->FI_Unload(dib_ico);
- if(!hScrBM) {
+ if (!hScrBM) {
DeleteObject(hbmMask);
return;
}
diff --git a/plugins/UserInfoEx/UInfoEx_10.vcxproj b/plugins/UserInfoEx/UInfoEx_10.vcxproj
index 5a4ac4b518..12e4bbb4d0 100644
--- a/plugins/UserInfoEx/UInfoEx_10.vcxproj
+++ b/plugins/UserInfoEx/UInfoEx_10.vcxproj
@@ -106,6 +106,8 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -129,6 +131,8 @@
<StringPooling>true</StringPooling>
<WarningLevel>Level3</WarningLevel>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -154,6 +158,8 @@
<StringPooling>true</StringPooling>
<WarningLevel>Level3</WarningLevel>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
diff --git a/plugins/UserInfoEx/classMAnnivDate.cpp b/plugins/UserInfoEx/classMAnnivDate.cpp
index 31eeee7cdd..fb487f61d2 100644
--- a/plugins/UserInfoEx/classMAnnivDate.cpp
+++ b/plugins/UserInfoEx/classMAnnivDate.cpp
@@ -546,7 +546,7 @@ INT MAnnivDate::DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew) {
Clear();
switch(bOld) {
case 0: //MOD_MBIRTHDAY
- if(!DBGetDate(hContact, MOD_MBIRTHDAY, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR)) {
+ if (!DBGetDate(hContact, MOD_MBIRTHDAY, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR)) {
if(DBWriteDate(hContact, USERINFO, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR))
return 1;
DBDeleteDate(hContact, MOD_MBIRTHDAY, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR);
@@ -554,7 +554,7 @@ INT MAnnivDate::DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew) {
}
break;
case 1: //USERINFO
- if(!DBGetDate(hContact, USERINFO, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR)) {
+ if (!DBGetDate(hContact, USERINFO, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR)) {
if(DBWriteDate(hContact, MOD_MBIRTHDAY, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR))
return 1;
DB::Setting::WriteByte(hContact, MOD_MBIRTHDAY, "BirthMode", 2);
diff --git a/plugins/UserInfoEx/commonheaders.cpp b/plugins/UserInfoEx/commonheaders.cpp
index f8811bd9c0..a69a664168 100644
--- a/plugins/UserInfoEx/commonheaders.cpp
+++ b/plugins/UserInfoEx/commonheaders.cpp
@@ -176,10 +176,10 @@ unsigned int hashSetting_M2(const wchar_t * key)
INT_PTR myDestroyServiceFunction(const char * key) {
//DestroyServiceFunction always return 0 therfore we must call ServiceExists to enshure it is delete
- if(!ServiceExists(key)) return 0;
+ if (!ServiceExists(key)) return 0;
DestroyServiceFunction((HANDLE)(INT_PTR)hashSetting(key)); //old hash
- if(!ServiceExists(key)) return 0;
+ if (!ServiceExists(key)) return 0;
DestroyServiceFunction((HANDLE)(INT_PTR)hashSetting_M2(key)); //new MurmurHash2
- if(!ServiceExists(key)) return 0;
+ if (!ServiceExists(key)) return 0;
return 1;
}
diff --git a/plugins/UserInfoEx/ctrl_tzcombo.h b/plugins/UserInfoEx/ctrl_tzcombo.h
index d710819441..3034f57481 100644
--- a/plugins/UserInfoEx/ctrl_tzcombo.h
+++ b/plugins/UserInfoEx/ctrl_tzcombo.h
@@ -58,7 +58,7 @@ public:
static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting);
virtual VOID Release();
-// virtual VOID OnReset(){};
+// virtual VOID OnReset() {};
virtual BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto);
virtual VOID OnApply(HANDLE hContact, LPCSTR pszProto);
virtual VOID OnChangedByUser(WORD wChangedMsg);
diff --git a/plugins/UserInfoEx/dlg_anniversarylist.cpp b/plugins/UserInfoEx/dlg_anniversarylist.cpp
index a2daefd45d..a7af16c239 100644
--- a/plugins/UserInfoEx/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/dlg_anniversarylist.cpp
@@ -580,9 +580,9 @@ class CAnnivList
{
if (PtrIsValid(pDlg)) {
WINDOWPOS* wndPos = (WINDOWPOS*)lParam;
- if(!pDlg->_wmINIT && (wndPos->cx != 0 || wndPos->cy != 0)) {
+ if (!pDlg->_wmINIT && (wndPos->cx != 0 || wndPos->cy != 0)) {
//win pos change
- if( (wndPos->cx == pDlg->_rcWin.right - pDlg->_rcWin.left) &&
+ if ( (wndPos->cx == pDlg->_rcWin.right - pDlg->_rcWin.left) &&
(wndPos->cy == pDlg->_rcWin.bottom - pDlg->_rcWin.top) ) {
//win pos change (store new pos)
GetWindowRect(hDlg, &pDlg->_rcWin);
@@ -590,7 +590,7 @@ class CAnnivList
//win size change
else {
// l change
- if( (wndPos->cx < pDlg->_sizeMin.cx) && (wndPos->x > pDlg->_rcWin.left) ){
+ if ( (wndPos->cx < pDlg->_sizeMin.cx) && (wndPos->x > pDlg->_rcWin.left) ) {
wndPos->x = wndPos->x + wndPos->cx - pDlg->_sizeMin.cx;
wndPos->cx = pDlg->_sizeMin.cx;
}
@@ -600,7 +600,7 @@ class CAnnivList
}
// t change
- if( (wndPos->cy < pDlg->_sizeMin.cy) && (wndPos->y > pDlg->_rcWin.top) ) {
+ if ( (wndPos->cy < pDlg->_sizeMin.cy) && (wndPos->y > pDlg->_rcWin.top) ) {
wndPos->y = wndPos->y + wndPos->cy - pDlg->_sizeMin.cy;
wndPos->cy = pDlg->_sizeMin.cy;
}
@@ -844,7 +844,7 @@ class CAnnivList
hContact = DB::Contact::FindNext(hContact))
{
// ignore meta subcontacts here, as they are not interesting.
- if (!DB::MetaContact::IsSub(hContact)){
+ if (!DB::MetaContact::IsSub(hContact)) {
// filter protocol
pszProto = DB::Contact::Proto(hContact);
if (pszProto) {
diff --git a/plugins/UserInfoEx/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/ex_import/classExImContactBase.cpp
index c0e0bc05ee..0f75c0df43 100644
--- a/plugins/UserInfoEx/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/ex_import/classExImContactBase.cpp
@@ -266,7 +266,7 @@ HANDLE CExImContactBase::toDB()
_hContact = INVALID_HANDLE_VALUE;
return INVALID_HANDLE_VALUE;
}
- if(!IsAccountEnabled(pszAccount)) {
+ if (!IsAccountEnabled(pszAccount)) {
;
}
// create new contact
@@ -347,7 +347,7 @@ VOID CExImContactBase::toIni(FILE* file, int modCount)
ci.szProto = _pszProto;
ci.dwFlag = CNF_DISPLAY;
- if (!GetContactInfo(NULL, (LPARAM) &ci)){
+ if (!GetContactInfo(NULL, (LPARAM) &ci)) {
// CNF_DISPLAY always returns a string type
pszCI = (LPSTR)ci.pszVal;
}
@@ -398,9 +398,9 @@ BOOLEAN CExImContactBase::compareUID(DBVARIANT *dbv)
case DBVT_ASCIIZ:
hash = hashSetting_M2(dbv->pszVal);
case DBVT_WCHAR:
- if(!hash) hash = hashSettingW_M2((const char *)dbv->pwszVal);
+ if (!hash) hash = hashSettingW_M2((const char *)dbv->pwszVal);
case DBVT_UTF8:
- if(!hash) {
+ if (!hash) {
LPWSTR tmp = mir_utf8decodeW(dbv->pszVal);
hash = hashSettingW_M2((const char *)tmp);
mir_free(tmp);
@@ -473,7 +473,7 @@ LPSTR CExImContactBase::uid2String(BOOLEAN bPrependType)
INT_PTR baselen = Base64EncodeGetRequiredLength(_dbvUID.cpbVal, BASE64_FLAG_NOCRLF);
LPSTR t = (LPSTR)mir_alloc(baselen + 5 + bPrependType);
assert(t != NULL);
- if (Base64Encode(_dbvUID.pbVal, _dbvUID.cpbVal, t + bPrependType, &baselen, BASE64_FLAG_NOCRLF)){
+ if (Base64Encode(_dbvUID.pbVal, _dbvUID.cpbVal, t + bPrependType, &baselen, BASE64_FLAG_NOCRLF)) {
if (baselen){
t[baselen + bPrependType] = 0;
if (bPrependType) t[0] = 'n';
diff --git a/plugins/UserInfoEx/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/ex_import/classExImContactXML.cpp
index ecd7bd73c9..11f2aed631 100644
--- a/plugins/UserInfoEx/ex_import/classExImContactXML.cpp
+++ b/plugins/UserInfoEx/ex_import/classExImContactXML.cpp
@@ -438,7 +438,7 @@ INT CExImContactXML::ExportSetting(TiXmlElement *xmlModule, LPCSTR pszModule, LP
str = (LPSTR)mir_alloc(baselen + 6);
assert(str != NULL);
// encode data
- if (Base64Encode(dbv.pbVal, dbv.cpbVal, str+1, &baselen, BASE64_FLAG_NOCRLF)){
+ if (Base64Encode(dbv.pbVal, dbv.cpbVal, str+1, &baselen, BASE64_FLAG_NOCRLF)) {
if (baselen){
str[baselen+1] = 0;
str[0] = 'n';
@@ -683,7 +683,7 @@ INT CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact)
baselen = Base64DecodeGetRequiredLength(len);
pbVal = (PBYTE)mir_alloc(baselen /*+1*/);
if (pbVal != NULL){
- if (Base64Decode(pUID, len, pbVal, &baselen)){
+ if (Base64Decode(pUID, len, pbVal, &baselen)) {
uidn(pbVal, baselen);
}
else {
@@ -934,14 +934,14 @@ INT CExImContactXML::ImportModule(TiXmlNode* xmlModule)
isMetaModule = DB::Module::IsMeta(pszModule);
// just ignore MetaModule on normal contact to avoid errors (only keys)
- if(!isProtoModule && isMetaModule) {
+ if (!isProtoModule && isMetaModule) {
continue;
}
// just ignore MetaModule on Meta to avoid errors (only import spetial keys)
else if(isProtoModule && isMetaModule) {
if (!mir_stricmp(xKey->Attribute("key"),"Nick") ||
!mir_stricmp(xKey->Attribute("key"),"TzName") ||
- !mir_stricmp(xKey->Attribute("key"),"Timezone") ){
+ !mir_stricmp(xKey->Attribute("key"),"Timezone") ) {
if (ImportSetting(pszModule, xKey->ToElement()) == ERROR_OK) {
_pXmlFile->_numSettingsDone++;
}
@@ -1040,7 +1040,7 @@ INT CExImContactXML::ImportSetting(LPCSTR pszModule, TiXmlElement *xmlEntry)
cws.value.type = DBVT_BLOB;
cws.value.pbVal = (PBYTE)mir_alloc(baselen +1);
if (cws.value.pbVal != NULL){
- if (Base64Decode((value + 1), len, cws.value.pbVal, &baselen)){
+ if (Base64Decode((value + 1), len, cws.value.pbVal, &baselen)) {
cws.value.cpbVal = baselen;
}
else {
diff --git a/plugins/UserInfoEx/mir_db.cpp b/plugins/UserInfoEx/mir_db.cpp
index e002bbbdb9..b17dc3e7d0 100644
--- a/plugins/UserInfoEx/mir_db.cpp
+++ b/plugins/UserInfoEx/mir_db.cpp
@@ -1096,7 +1096,7 @@ BYTE GetInfoWithData(HANDLE hEvent, DBEVENTINFO *dbei)
{
BYTE result;
dbei->cbSize = sizeof(DBEVENTINFO);
- if(!dbei->cbBlob) {
+ if (!dbei->cbBlob) {
INT_PTR size = BlobSizeOf(hEvent);
dbei->cbBlob = (size != -1) ? (DWORD)size : 0;
}
@@ -1225,7 +1225,7 @@ BOOLEAN Exists(HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei)
edbe = FindPrev(edbe) ) {
hDbExistingEvent = edbe;
//compare without data (faster)
- if( result = IsEqual(dbei, &edbei, false)) {
+ if ( result = IsEqual(dbei, &edbei, false)) {
if(NULL == (result = !GetInfoWithData(edbe, &edbei))) continue;
//compare with data
result = IsEqual(dbei, &edbei, true);
@@ -1242,7 +1242,7 @@ BOOLEAN Exists(HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei)
edbe = FindNext(edbe) ) {
hDbExistingEvent = edbe;
//compare without data (faster)
- if( result = IsEqual(dbei, &edbei, false)) {
+ if ( result = IsEqual(dbei, &edbei, false)) {
if(NULL == (result = !GetInfoWithData(edbe, &edbei))) continue;
//compare with data
result = IsEqual(dbei, &edbei, true);
diff --git a/plugins/UserInfoEx/mir_menuitems.cpp b/plugins/UserInfoEx/mir_menuitems.cpp
index f045751ad7..9fd7f031a6 100644
--- a/plugins/UserInfoEx/mir_menuitems.cpp
+++ b/plugins/UserInfoEx/mir_menuitems.cpp
@@ -486,7 +486,7 @@ VOID RebuildSubGroup()
// Export
strcpy( tDest, "/ExportGroup"); //mi.pszService
- if(!ServiceExists(mi.pszService)) myCreateServiceFunction(mi.pszService, svcExIm_Group_Service);
+ if (!ServiceExists(mi.pszService)) myCreateServiceFunction(mi.pszService, svcExIm_Group_Service);
mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Export") : LPGEN("&Export Group");
mi.position = 1050200;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
@@ -496,7 +496,7 @@ VOID RebuildSubGroup()
// Import
strcpy( tDest, "/ImportGroup"); //mi.pszService
- if(!ServiceExists(mi.pszService)) myCreateServiceFunction(mi.pszService, svcExIm_Group_Service);
+ if (!ServiceExists(mi.pszService)) myCreateServiceFunction(mi.pszService, svcExIm_Group_Service);
mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Import") : LPGEN("&Import Group");
mi.position = 1050300;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
@@ -619,7 +619,7 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam)
// Export
strcpy( tDest, "/ExportAccount"); //mi.pszService
- if(!ServiceExists(mi.pszService)) myCreateServiceFunction(mi.pszService, svcExIm_Account_Service);
+ if (!ServiceExists(mi.pszService)) myCreateServiceFunction(mi.pszService, svcExIm_Account_Service);
mir_sntprintf(sztName, SIZEOF(sztName),_T("%s %s"), pAccountName->tszAccountName, TranslateT("&Export"));
mi.ptszName = sztName;
mi.position = 50200;
@@ -628,7 +628,7 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam)
// Import
strcpy( tDest, "/ImportAccount"); //mi.pszService
- if(!ServiceExists(mi.pszService)) myCreateServiceFunction(mi.pszService, svcExIm_Account_Service);
+ if (!ServiceExists(mi.pszService)) myCreateServiceFunction(mi.pszService, svcExIm_Account_Service);
mir_sntprintf(sztName, SIZEOF(sztName),_T("%s %s"), pAccountName->tszAccountName, TranslateT("&Import"));
mi.ptszName = sztName;
mi.position = 50300;
diff --git a/plugins/UserInfoEx/psp_options.cpp b/plugins/UserInfoEx/psp_options.cpp
index 2c7cc2d626..cb82943643 100644
--- a/plugins/UserInfoEx/psp_options.cpp
+++ b/plugins/UserInfoEx/psp_options.cpp
@@ -709,7 +709,7 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam
DBWriteCheckBtn(hDlg, CHECK_OPT_GETCONTACTINFO_ENABLED, SET_GETCONTACTINFO_ENABLED);
DBWriteCheckBtn(hDlg, CHECK_OPT_SREMAIL_ENABLED, SET_EXTENDED_EMAILSERVICE);
- if(!tmi.getTimeZoneTime) {
+ if (!tmi.getTimeZoneTime) {
DBWriteCheckBtn(hDlg, CHECK_OPT_AUTOTIMEZONE, SET_OPT_AUTOTIMEZONE);
if (IsDlgButtonChecked(hDlg, CHECK_OPT_AUTOTIMEZONE)) {
SvcTimezoneSyncWithWindows();
diff --git a/plugins/UserInfoEx/psp_profile.cpp b/plugins/UserInfoEx/psp_profile.cpp
index 1395f43d18..e964db40f6 100644
--- a/plugins/UserInfoEx/psp_profile.cpp
+++ b/plugins/UserInfoEx/psp_profile.cpp
@@ -726,7 +726,7 @@ static INT_PTR CALLBACK ProfileList_LabelEditProc(HWND hwnd, UINT msg, WPARAM wP
// select new list item
lvi.mask = LVIF_STATE;
lvi.state = LVIS_FOCUSED|LVIS_SELECTED;
- if (!ListView_SetItem(pList->hList, &lvi)){
+ if (!ListView_SetItem(pList->hList, &lvi)) {
return 0;
}
}
diff --git a/plugins/UserInfoEx/svc_constants.h b/plugins/UserInfoEx/svc_constants.h
index 575517cf82..2106f9fa3c 100644
--- a/plugins/UserInfoEx/svc_constants.h
+++ b/plugins/UserInfoEx/svc_constants.h
@@ -195,7 +195,7 @@ extern OBJLIST<CService> services;
static __inline HANDLE myCreateServiceFunction( const char * name, MIRANDASERVICE serviceProc)
{
CService* p = new CService(name,serviceProc);
- if(!p->m_hService){delete p; return 0;}
+ if (!p->m_hService){delete p; return 0;}
services.insert(p);
return p->m_hService;
}
diff --git a/plugins/UserInfoEx/svc_email.cpp b/plugins/UserInfoEx/svc_email.cpp
index ff9463c3dd..446556431f 100644
--- a/plugins/UserInfoEx/svc_email.cpp
+++ b/plugins/UserInfoEx/svc_email.cpp
@@ -393,7 +393,7 @@ VOID SvcEMailLoadModule()
disableDefaultModule[DEFMOD_SREMAIL] = TRUE;
// create own email send command
- if(!myDestroyServiceFunction(MS_EMAIL_SENDEMAIL))
+ if (!myDestroyServiceFunction(MS_EMAIL_SENDEMAIL))
myCreateServiceFunction(MS_EMAIL_SENDEMAIL, MenuCommand);
}
}