From 52fe3f7be13509bd336c5efa28b8310a23211034 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 11 Apr 2013 16:47:12 +0000 Subject: - 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 --- plugins/New_GPG/src/icons.cpp | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'plugins/New_GPG/src') 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); } -- cgit v1.2.3