From 78c0815c4118fe24ab78cce2dc48a6232dcd824a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 2 Jun 2012 20:55:18 +0000 Subject: - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SecureIM/svcs_clist.cpp | 42 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'plugins/SecureIM/svcs_clist.cpp') diff --git a/plugins/SecureIM/svcs_clist.cpp b/plugins/SecureIM/svcs_clist.cpp index 4d70edb2bc..359e273562 100644 --- a/plugins/SecureIM/svcs_clist.cpp +++ b/plugins/SecureIM/svcs_clist.cpp @@ -5,16 +5,16 @@ int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) { HANDLE hContact = (HANDLE)wParam; DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; - if(!hContact || strcmp(cws->szSetting,"Status")) return 0; + if (!hContact || strcmp(cws->szSetting,"Status")) return 0; pUinKey ptr = getUinKey(hContact); int stat = getContactStatus(hContact); - if(!ptr || stat==-1) return 0; + if (!ptr || stat==-1) return 0; // HANDLE hMetaContact = getMetaContact(hContact); // if(hMetaContact) { // ptr = getUinKey(hMetaContact); -// if(!ptr) return 0; +// if (!ptr) return 0; // } if (stat==ID_STATUS_OFFLINE) { // go offline @@ -49,7 +49,7 @@ int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) { } } else { // go not offline -// if(!hMetaContact) { // is contact or metacontact (not subcontact) +// if (!hMetaContact) { // is contact or metacontact (not subcontact) if (ptr->offlineKey) { cpp_reset_context(ptr->cntx); ptr->offlineKey = false; @@ -82,7 +82,7 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) { #if defined(_DEBUG) || defined(NETLIB_LOG) Sent_NetLog("onExtraImageListRebuilding"); #endif - if( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_ADD_ICON) ) { + if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_ADD_ICON) ) { RefreshContactListIcons(); } return 0; @@ -91,9 +91,9 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) { int __cdecl onExtraImageApplying(WPARAM wParam, LPARAM) { - if( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_SET_ICON) && isSecureProtocol((HANDLE)wParam) ) { + if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_SET_ICON) && isSecureProtocol((HANDLE)wParam) ) { IconExtraColumn iec = mode2iec(isContactSecured((HANDLE)wParam)); - if( g_hCLIcon ) { + if ( g_hCLIcon ) { ExtraIcon_SetIcon(g_hCLIcon, (HANDLE)wParam, iec.hImage); } else { @@ -111,7 +111,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { #endif HANDLE hContact = (HANDLE)wParam; BOOL bMC = isProtoMetaContacts(hContact); - if( bMC ) hContact = getMostOnline(hContact); // возьмем тот, через который пойдет сообщение + if ( bMC ) hContact = getMostOnline(hContact); // возьмем тот, через который пойдет сообщение pUinKey ptr = getUinKey(hContact); int i; @@ -122,11 +122,11 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { ShowStatusIconNotify(hContact); // check offline/online - if(!ptr) { + if (!ptr) { // hide menu bars mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_HIDDEN; for(i=0;imode==MODE_NATIVE || ptr->mode==MODE_RSAAES) ) { // Native/RSAAES mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIM_ICON; - if( !isSecured ) { + if ( !isSecured ) { // create secureim connection mi.hIcon = mode2icon(ptr->mode|SECURED,2); CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)g_hMenu[0],(LPARAM)&mi); @@ -166,7 +166,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)g_hMenu[1],(LPARAM)&mi); } // set status menu - if( bSCM && !bMC && + if ( bSCM && !bMC && ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG ) ) { mi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON; @@ -182,24 +182,24 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { } } else - if( isSecureProto && !isChat && (ptr->mode==MODE_PGP || ptr->mode==MODE_GPG) ) { + if ( isSecureProto && !isChat && (ptr->mode==MODE_PGP || ptr->mode==MODE_GPG) ) { // PGP, GPG - if( ptr->mode==MODE_PGP && bPGPloaded ) { - if((bPGPkeyrings || bPGPprivkey) && !isGPG) { + if ( ptr->mode==MODE_PGP && bPGPloaded ) { + if ((bPGPkeyrings || bPGPprivkey) && !isGPG) { mi.flags = CMIM_FLAGS; CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)g_hMenu[isPGP+6],(LPARAM)&mi); } } - if( ptr->mode==MODE_GPG && bGPGloaded ) { + if ( ptr->mode==MODE_GPG && bGPGloaded ) { if(bGPGkeyrings && !isPGP) { mi.flags = CMIM_FLAGS; CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)g_hMenu[isGPG+8],(LPARAM)&mi); } } } - if( isSecureProto && !isChat && isMiranda ) { + if ( isSecureProto && !isChat && isMiranda ) { // set mode menu - if( bMCM && !bMC && + if ( bMCM && !bMC && ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG ) ) { mi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON; @@ -209,8 +209,8 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { mi.flags = CMIM_FLAGS | CMIM_ICON; for(i=0;imode!=MODE_PGP && !bPGP ) continue; - if( i==MODE_GPG && ptr->mode!=MODE_GPG && !bGPG ) continue; + if ( i==MODE_PGP && ptr->mode!=MODE_PGP && !bPGP ) continue; + if ( i==MODE_GPG && ptr->mode!=MODE_GPG && !bGPG ) continue; mi.hIcon = (i == ptr->mode) ? g_hICO[ICO_ST_ENA] : NULL; CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)g_hMenu[11+i],(LPARAM)&mi); } -- cgit v1.2.3