diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-11 07:08:40 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-11 07:08:40 +0000 |
commit | bd820972afe24409e6b570adbc45f5dc0fa2385d (patch) | |
tree | e600bf39409083219c7928e10ec2b61002529641 /plugins/FingerprintNG/src/fingerprint.cpp | |
parent | 6029165c364f93a84ab7e98ef71d3a711b0f588c (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/FingerprintNG/src/fingerprint.cpp')
-rw-r--r-- | plugins/FingerprintNG/src/fingerprint.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp index df1a7aca71..036c1eb7a2 100644 --- a/plugins/FingerprintNG/src/fingerprint.cpp +++ b/plugins/FingerprintNG/src/fingerprint.cpp @@ -1159,38 +1159,20 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) hExtraIcon = ExtraIcon_Register("Client", LPGEN("Fingerprint"), "client_Miranda_Unknown",
OnExtraIconListRebuild,OnExtraImageApply,OnExtraIconClick);
- if (db_get_b(NULL, MODULENAME, "StatusBarIcon", 1) && ServiceExists(MS_MSG_ADDICON)) {
+ if (db_get_b(NULL, MODULENAME, "StatusBarIcon", 1)) {
StatusIconData sid = { sizeof(sid) };
sid.szModule = MODULENAME;
sid.flags = MBF_HIDDEN;
sid.dwId = 1;
- CallService(MS_MSG_ADDICON, 0, (LPARAM)&sid);
+ Srmm_AddIcon(&sid);
}
return 0;
}
-/****************************************************************************************
-* OnPreShutdown
-* Drops all unused graphic stuff
-*/
-
-static int OnPreShutdown(WPARAM wParam, LPARAM lParam)
-{
- if (ServiceExists(MS_MSG_REMOVEICON)) {
- StatusIconData sid = { sizeof(sid) };
- sid.szModule = MODULENAME;
- sid.dwId = 1;
- CallService(MS_MSG_REMOVEICON, 0, (LPARAM)&sid);
- }
-
- return 0;
-}
-
void InitFingerModule()
{
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
CreateServiceFunction(MS_FP_SAMECLIENTS, ServiceSameClientsA);
CreateServiceFunction(MS_FP_GETCLIENTICON, ServiceGetClientIconA);
|