summaryrefslogtreecommitdiff
path: root/plugins/New_GPG
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-11 16:47:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-11 16:47:12 +0000
commit52fe3f7be13509bd336c5efa28b8310a23211034 (patch)
tree70e0948e92b71cd09367545f9655dc343c5cc862 /plugins/New_GPG
parentfa837bfbc2a705947b14f1ce8ba36d996bb11104 (diff)
- Srmm_ModifyIcon helper applied instead of CallService(MS_MSG_MODIFYICON)
- various fixes related to SRMM icons; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@4426 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG')
-rwxr-xr-xplugins/New_GPG/src/icons.cpp36
1 files changed, 15 insertions, 21 deletions
diff --git a/plugins/New_GPG/src/icons.cpp b/plugins/New_GPG/src/icons.cpp
index ef236d16b4..0f436b53cc 100755
--- a/plugins/New_GPG/src/icons.cpp
+++ b/plugins/New_GPG/src/icons.cpp
@@ -68,27 +68,21 @@ void setSrmmIcon(HANDLE h)
hMC = metaGetContact(hContact);
else if(metaIsProtoMetaContacts(hContact))
hMC = metaGetContact(hContact);
- if(ServiceExists(MS_MSG_MODIFYICON))
- {
- StatusIconData sid = {0};
- sid.cbSize = sizeof(sid);
- sid.szModule = szGPGModuleName;
- sid.hIcon = IconLibGetIcon("secured");
- sid.dwId = 0x00000001;
- sid.flags = enabled?0:MBF_HIDDEN;
- CallService(MS_MSG_MODIFYICON, (WPARAM)hContact, (LPARAM)&sid);
- if( hMC )
- CallService(MS_MSG_MODIFYICON, (WPARAM)hMC, (LPARAM)&sid);
- ZeroMemory(&sid, sizeof(sid));
- sid.cbSize = sizeof(sid);
- sid.szModule = szGPGModuleName;
- sid.hIcon = IconLibGetIcon("unsecured");
- sid.dwId = 0x00000002;
- sid.flags = enabled?MBF_HIDDEN:0;
- CallService(MS_MSG_MODIFYICON, (WPARAM)hContact, (LPARAM)&sid);
- if( hMC )
- CallService(MS_MSG_MODIFYICON, (WPARAM)hMC, (LPARAM)&sid);
- }
+
+ StatusIconData sid = { sizeof(sid) };
+ sid.szModule = szGPGModuleName;
+ sid.hIcon = IconLibGetIcon("secured");
+ sid.dwId = 1;
+ sid.flags = enabled ? 0 : MBF_HIDDEN;
+ Srmm_ModifyIcon(hContact, &sid);
+ if(hMC)
+ Srmm_ModifyIcon(hMC, &sid);
+
+ sid.hIcon = IconLibGetIcon("unsecured");
+ sid.dwId = 2;
+ Srmm_ModifyIcon(hContact, &sid);
+ if(hMC)
+ Srmm_ModifyIcon(hMC, &sid);
}