diff options
author | George Hazan <george.hazan@gmail.com> | 2014-07-08 15:49:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-07-08 15:49:18 +0000 |
commit | 62ab18a9fda2f19c08ae63a14c7a262ca62f0cce (patch) | |
tree | 821876224af8cb3e3f4b9b29ea3237212cde37e7 /plugins/SecureIM/src/crypt_icons.cpp | |
parent | 19a5e6f0b9c3232933132dbaa9420aecef497336 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@9732 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/src/crypt_icons.cpp')
-rw-r--r-- | plugins/SecureIM/src/crypt_icons.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/plugins/SecureIM/src/crypt_icons.cpp b/plugins/SecureIM/src/crypt_icons.cpp index 97c3631523..704b2a8254 100644 --- a/plugins/SecureIM/src/crypt_icons.cpp +++ b/plugins/SecureIM/src/crypt_icons.cpp @@ -16,24 +16,24 @@ OBJLIST<ICON_CACHE> arIcoList(10); // преобразует mode в HICON который НЕ НУЖНО разрушать в конце
static ICON_CACHE& getCacheItem(int mode, int type)
{
- int m = mode & 0x0f, s = (mode & SECURED)>>4, i; // разобрали на части - режим и состояние
+ int m = mode & 0x0f, s = (mode & SECURED) >> 4, i; // разобрали на части - режим и состояние
HICON icon;
- for (i=0; i < arIcoList.getCount(); i++)
- if (arIcoList[i].mode == ((type<<8) | mode))
+ for (i = 0; i < arIcoList.getCount(); i++)
+ if (arIcoList[i].mode == ((type << 8) | mode))
return arIcoList[i];
i = s;
- switch(type) {
- case 1: i += IEC_CL_DIS; break;
- case 2: i += ICO_CM_DIS; break;
- case 3: i += ICO_MW_DIS; break;
+ switch (type) {
+ case 1: i += IEC_CL_DIS; break;
+ case 2: i += ICO_CM_DIS; break;
+ case 3: i += ICO_MW_DIS; break;
}
if (type == 1)
- icon = BindOverlayIcon(g_hIEC[i], g_hICO[ICO_OV_NAT+m]);
+ icon = BindOverlayIcon(g_hIEC[i], g_hICO[ICO_OV_NAT + m]);
else
- icon = BindOverlayIcon(g_hICO[i], g_hICO[ICO_OV_NAT+m]);
+ icon = BindOverlayIcon(g_hICO[i], g_hICO[ICO_OV_NAT + m]);
ICON_CACHE *p = new ICON_CACHE;
p->icon = icon;
@@ -101,17 +101,15 @@ void ShowStatusIconNotify(MCONTACT hContact) {
BYTE mode = isContactSecured(hContact);
NotifyEventHooks(g_hEvent[(mode&SECURED) != 0], hContact, 0);
- ShowStatusIcon(hContact,mode);
+ ShowStatusIcon(hContact, mode);
}
void RefreshContactListIcons(void)
{
- for (int i=0; i < arIcoList.getCount(); i++)
+ for (int i = 0; i < arIcoList.getCount(); i++)
arIcoList[i].hCLIcon = 0;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (isSecureProtocol(hContact))
ShowStatusIcon(hContact);
}
-
-// EOF
|