From bd820972afe24409e6b570adbc45f5dc0fa2385d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 11 Apr 2013 07:08:40 +0000 Subject: SRMM icons to be unloaded automatically git-svn-id: http://svn.miranda-ng.org/main/trunk@4418 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FingerprintNG/src/fingerprint.cpp | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'plugins/FingerprintNG/src') 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); -- cgit v1.2.3