summaryrefslogtreecommitdiff
path: root/plugins/FingerprintNG/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-08 14:55:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-08 14:55:45 +0000
commit5a19cc3dfc0e40d61b860dbeeedf802a5047a667 (patch)
tree2d1d2f713e5f63c12f2d38edd6525c7e9074a91a /plugins/FingerprintNG/src/main.cpp
parent3aa29ef3d7220de7080eae79b4dc31ef99bb4015 (diff)
- MBF_OWNERSTATE option moved to the public header;
- client icon drawing moved to FingerPrint; - old code in tabSRMM completely wiped out; git-svn-id: http://svn.miranda-ng.org/main/trunk@4389 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FingerprintNG/src/main.cpp')
-rw-r--r--plugins/FingerprintNG/src/main.cpp40
1 files changed, 14 insertions, 26 deletions
diff --git a/plugins/FingerprintNG/src/main.cpp b/plugins/FingerprintNG/src/main.cpp
index 0bf08fb1e6..3d62e30240 100644
--- a/plugins/FingerprintNG/src/main.cpp
+++ b/plugins/FingerprintNG/src/main.cpp
@@ -26,16 +26,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HINSTANCE g_hInst;
int hLangpack;
-HANDLE hHeap = NULL;
+HANDLE hHeap = NULL;
-HANDLE compClientServA = NULL;
-HANDLE getClientIconA = NULL;
-
-HANDLE compClientServW = NULL;
-HANDLE getClientIconW = NULL;
-LPSTR g_szClientDescription = NULL;
-
-HANDLE hStaticHooks[1] = { NULL };
+LPSTR g_szClientDescription = NULL;
//End of header
@@ -67,11 +60,12 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
static int OnPreShutdown(WPARAM wParam, LPARAM lParam)
{
- DestroyServiceFunction(compClientServA);
- DestroyServiceFunction(getClientIconA);
- DestroyServiceFunction(compClientServW);
- DestroyServiceFunction(getClientIconW);
-
+ if (ServiceExists(MS_MSG_REMOVEICON)) {
+ StatusIconData sid = { sizeof(sid) };
+ sid.szModule = MODULENAME;
+ CallService(MS_MSG_REMOVEICON, 0, (LPARAM)&sid);
+ }
+
return 0;
}
@@ -79,13 +73,13 @@ extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfoEx);
- hStaticHooks[0] = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
- compClientServA = CreateServiceFunction(MS_FP_SAMECLIENTS, ServiceSameClientsA);
- getClientIconA = CreateServiceFunction(MS_FP_GETCLIENTICON, ServiceGetClientIconA);
-
- compClientServW = CreateServiceFunction(MS_FP_SAMECLIENTSW, ServiceSameClientsW);
- getClientIconW = CreateServiceFunction(MS_FP_GETCLIENTICONW, ServiceGetClientIconW);
+
+ CreateServiceFunction(MS_FP_SAMECLIENTS, ServiceSameClientsA);
+ CreateServiceFunction(MS_FP_GETCLIENTICON, ServiceGetClientIconA);
+ CreateServiceFunction(MS_FP_SAMECLIENTSW, ServiceSameClientsW);
+ CreateServiceFunction(MS_FP_GETCLIENTICONW, ServiceGetClientIconW);
return 0;
}
@@ -98,11 +92,5 @@ extern "C" int __declspec(dllexport) Unload()
HeapDestroy(hHeap);
ClearFI();
-
- for (size_t i = 0; i < SIZEOF(hStaticHooks); i++)
- {
- UnhookEvent(hStaticHooks[i]);
- hStaticHooks[i] = NULL;
- }
return 0;
}