summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/init.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-11 07:08:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-11 07:08:40 +0000
commitbd820972afe24409e6b570adbc45f5dc0fa2385d (patch)
treee600bf39409083219c7928e10ec2b61002529641 /plugins/New_GPG/src/init.cpp
parent6029165c364f93a84ab7e98ef71d3a711b0f588c (diff)
SRMM icons to be unloaded automatically
git-svn-id: http://svn.miranda-ng.org/main/trunk@4418 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/init.cpp')
-rwxr-xr-xplugins/New_GPG/src/init.cpp35
1 files changed, 15 insertions, 20 deletions
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index 46a0aaa475..01bf91848c 100755
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -124,26 +124,21 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam)
if(!db_get_b(NULL, szGPGModuleName, "FirstRun", 1))
InitCheck();
InitIconLib();
- if(ServiceExists(MS_MSG_ADDICON))
- {
- HICON IconLibGetIcon(const char* ident);
- StatusIconData sid = {0};
- sid.cbSize = sizeof(sid);
- sid.szModule = szGPGModuleName;
- sid.flags = MBF_HIDDEN;
- sid.dwId = 0x00000001;
- sid.hIcon = IconLibGetIcon("secured");
- sid.szTooltip = Translate("GPG Turn off encryption");
- CallService(MS_MSG_ADDICON, 0, (LPARAM)&sid);
- ZeroMemory(&sid, sizeof(sid));
- sid.cbSize = sizeof(sid);
- sid.szModule = szGPGModuleName;
- sid.flags = MBF_HIDDEN;
- sid.dwId = 0x00000002;
- sid.hIcon = IconLibGetIcon("unsecured");
- sid.szTooltip = Translate("GPG Turn on encryption");
- CallService(MS_MSG_ADDICON, 0, (LPARAM)&sid);
- }
+
+ HICON IconLibGetIcon(const char* ident);
+
+ StatusIconData sid = { sizeof(sid) };
+ sid.szModule = szGPGModuleName;
+ sid.flags = MBF_HIDDEN;
+ sid.dwId = 0x00000001;
+ sid.hIcon = IconLibGetIcon("secured");
+ sid.szTooltip = Translate("GPG Turn off encryption");
+ Srmm_AddIcon(&sid);
+
+ sid.dwId = 0x00000002;
+ sid.hIcon = IconLibGetIcon("unsecured");
+ sid.szTooltip = Translate("GPG Turn on encryption");
+ Srmm_AddIcon(&sid);
bMetaContacts = ServiceExists(MS_MC_GETMETACONTACT) != 0;