diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-02-22 10:48:36 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-02-22 10:48:36 +0000 |
commit | d5aa68bc585710dcb741ac2cd545c21410b0af7e (patch) | |
tree | 3bd7a1bdd0d4ca15a0fda106de74e5c8227e00b1 /plugins/Scriver/src/msgs.cpp | |
parent | 34c8d175d77f8e9d786b41fc8ed87d6816829fc8 (diff) |
hooking loading/unloading plugin events
git-svn-id: http://svn.miranda-ng.org/main/trunk@3687 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/msgs.cpp')
-rw-r--r-- | plugins/Scriver/src/msgs.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 7aed7129aa..d17cd0626d 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -476,6 +476,13 @@ int StatusIconPressed(WPARAM wParam, LPARAM lParam) { return 0;
}
+static int ModuleLoad(WPARAM wParam, LPARAM lParam)
+{
+ g_dat->smileyAddInstalled = ServiceExists(MS_SMILEYADD_SHOWSELECTION) && ServiceExists(MS_SMILEYADD_REPLACESMILEYS) != 0;
+ g_dat->popupInstalled = ServiceExists(MS_POPUP_ADDPOPUPEX) != 0;
+ g_dat->ieviewInstalled = ServiceExists(MS_IEVIEW_WINDOW) != 0;
+ return 0;
+}
static int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
{
@@ -485,6 +492,7 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) RegisterKeyBindings();
LoadGlobalIcons();
LoadMsgLogIcons();
+ ModuleLoad(0, 0);
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000090000;
@@ -563,6 +571,8 @@ int OnLoadModule(void) { HookEvent_Ex(ME_PROTO_CONTACTISTYPING, TypingMessage);
HookEvent_Ex(ME_SYSTEM_PRESHUTDOWN, OnSystemPreshutdown);
HookEvent_Ex(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
+ HookEvent_Ex(ME_SYSTEM_MODULELOAD, ModuleLoad);
+ HookEvent_Ex(ME_SYSTEM_MODULEUNLOAD, ModuleLoad);
CreateServiceFunction_Ex(MS_MSG_SENDMESSAGE, SendMessageCommand);
CreateServiceFunction_Ex(MS_MSG_SENDMESSAGEW, SendMessageCommandW);
|